/* ==========================================================================
   kairos.css — Kairos design system (spec §3, TAS Frameworkless Design Language)

   Layers in this file:
     1. Tokens (§3.1 — verbatim) + supplementary tokens
     2. Font faces (self-hosted Montserrat 300/400/500/600/700, latin subset)
     3. Base + typography scale
     4. Application shell (§3.2) + responsive behaviour (§3.4)
     5. Components (§3.3)
     6. Utilities

   No inline styles or scripts anywhere in the app (CSP: self, spec §10.5).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens — §3.1, names and values verbatim

   Phase 21 slice 2, stage 1 (ruling 14 (1)): the six page-wide tokens switch
   together to the design language, so secondary text keeps its contrast on
   the new page colour (the old --k-secondary on --k-page would be 4.46:1).
   Each old name was an alias of its DL token (block 1a below), one line
   each, so the 400-odd rules that read the old names moved with no rule
   rewritten: --k-canvas → --k-page, --k-body → --k-text, --k-secondary and
   --k-hint-strong → --k-muted, --k-hint → --k-faint, --k-hairline →
   --k-divider, and --k-border took the DL value. --k-band → --k-surface-2
   rode with them. Phase 21 slice 16 stage 3 (ruling 96) read every rule
   through the DL names and the aliases left this block, with --k-green,
   --k-focus-ring and the radii --k-radius-field and --k-radius-pill (the
   same values as --k-brand, --k-r-item and --k-r-pill), and stage 4 (ruling
   99's twelfth item) the last, --k-radius-card (= --k-r-box). Stage 4 (ruling
   95) switched every reader of the launch colours to its design-language
   token by meaning — --k-ink to --k-text; the tones and their tints to the
   --k-<tone>-fg / -bg pairs; --k-green-tint to --k-selected or --k-ok-bg;
   --k-green-border to --k-border or --k-control; --k-green-deep to
   --k-sidebar or --k-brand-hover; --k-warning-text to --k-warn-fg — and
   took --k-shadow-card off every card-like box, and their definitions left
   this block. What it holds now: --k-surface and --k-border (the design
   language's names and values), and the two shadows of what floats over the
   page. WCAG 2.x ratios after the switch, recomputed by
   ui/tests/test_dl_contrast.py: text on white 16.28, on page 14.88; muted on
   white 5.95, page 5.44, surface-2 5.63, selected 5.41. --k-faint (2.59 on
   white) is decoration and disabled text only, as --k-hint was.
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --k-z-fullscreen: 300;      /* the player's full-window fallback: above the shell */
  --k-surface:  #ffffff;      /* cards, panels, sidebars */

  /* Lines */
  --k-border:    #E3E6E0;            /* DL value; was #e2e5e3 */

  /* Shadows: only what floats over the page has one (DL §9: no drop shadows
     on cards). The overlay's for menus, pop-ups, sheets and the confirmation;
     the small one for a menu or toolbar that sits close to its control (the
     bell's menu, the workflow editor's toolbar): the launch --k-shadow-card's
     value, kept for floats under a float's name (ruling 95). */
  --k-shadow-overlay: 0 12px 40px rgba(23,32,27,.18);
  --k-shadow-menu: 0 1px 2px rgba(23,32,27,.06);
}

/* Supplementary tokens (implementation detail, not §3.1) */
:root {
  --k-font: "Montserrat", system-ui, sans-serif;

  /* House colours — identify PEOPLE only (avatars, house markers).
     Never use these for UI state (spec §3.1). */
  --k-house-dalrymple:  #3092cb;
  --k-house-mulligan:   #ab0a27;
  --k-house-leichhardt: #dab851;
  --k-house-kennedy:    #2b963d;

  /* No fixed content cap (§3.4 as amended 15 October 2026, ruling 46): the
     launch layout's 1440 px cap is gone. The content area spans the width
     right of the navigation; a data page fills it, and every other page stops
     at about 2400 px of content and centres (4.3 below). The gutters grow
     with the screen: 24 px below 1920 px, 32 px to 2559 and 48 px from 2560
     (the rules after this block). */
  --k-reading-max: 2400px;
  /* Forms (Phase 18 Wave 3, W5): a form column, the width a short form's
     column takes from 1920 px. No text control, textarea or editor has a
     width cap of its own: a field fills the column it is in (Judd, 29
     October 2026; this replaced --k-field-max, 720 px, and
     --k-measure-field, 611 px). */
  --k-form-col: 760px;
  /* The form layout's own column track, from 1920 px. It is the form column, except inside Configuration (.k-config-page), which
     sets it to 1fr: forms there fill the container (Phase 33, D1). */
  --k-form-track: var(--k-form-col);
  /* A two-column form's natural page width (W5b; Judd's ruling of 15 October
     2026): two columns of 720 px, the 32 px gap between them and the
     card's 20 px padding each side — 1,512 px. A form of more than six
     fields with no side panel stops here from 1920 px (4.3 below). It is a
     page width, not a field width. */
  --k-form-natural: 1512px;
  --k-gutter: 24px;
  /* Which navigation the shell is drawing — "sidebar", "drawer" or "tabbar".
     Set only by the tier media queries in §3.4 below; ui/kairos.js reads it
     (kShell) rather than repeating any breakpoint, so CSS and script can
     never disagree about which tier a screen is in. */
  --k-nav-tier: sidebar;
  /* How the panel (#k-panel) draws — "inline", "sheet" or "full" (Phase 21
     slice 1b, design note §4; ruling 4). Set only by the two panel-mode
     queries in 4.3b below; kPanel in ui/kairos.js reads it, as kShell reads
     --k-nav-tier, so the script repeats no breakpoint. */
  --k-panel-mode: inline;
}
@media (min-width: 1920px) {
  :root { --k-gutter: 32px; }
}
@media (min-width: 2560px) {
  :root { --k-gutter: 48px; }
}

/* --------------------------------------------------------------------------
   1a. Design language (Phase 21) — tokens
   docs/ui/design-language.md §2 (version 1.1), authoritative for spec
   §3.1–§3.3 by Judd's ruling 1 of 21 October 2026. Merged here in slice 1a
   from the draft stylesheet that was static/css/kairos.css (ruling 2: one
   stylesheet), with NO visible change: nothing above reads these names yet.

   Three draft names already exist in block 1 and keep block 1's value in
   slice 1a: --k-surface (same value), --k-border (DL #E3E6E0) and --k-font
   (DL Montserrat, system-ui, sans-serif). Where a DL name stands for an old
   concept (--k-brand for --k-green, --k-muted for --k-secondary and so on)
   it is defined with the DL value and the old token is left alone; the slice
   that switches each old token is in docs/technical/ui-design-language.md
   ("The design-language layer"). The AA
   fix --k-warning-text was untouched until slice 16 stage 4, which read its
   readers through --k-warn-fg (ruling 95).
   Slice 2 (stage 1) switched the page-wide tokens: block 1's --k-canvas,
   --k-body, --k-secondary, --k-hint, --k-hairline, --k-band and
   --k-hint-strong became aliases of the tokens here, and --k-border has the
   DL value (ruling 14 (1)); slice 16 stage 3 renamed their readers to the
   tokens here and the aliases left.

   Renamed from the draft: --k-rail-w is --k-aside-rail-w, because .k-rail is
   the navigation here (plan §4). --k-sidebar-w and its collapsed twin follow
   spec §3.4 / DL §3.5 (240 / 64 px), not the draft's 232 / 56. Added: the
   --k-on-brand text colour, so no rule below types #fff.
   -------------------------------------------------------------------------- */
:root {
  /* §2.1 Colour */
  --k-brand: #006649;
  --k-brand-hover: #004A35;
  --k-bad-hover: #7A1814;  /* extends DL §2.1 (slice 15 plan reading 25): the filled destructive act's hover, as --k-brand-hover is brand's; 10.7:1 with --k-on-brand; drawn from slice 15 stage 2 */
  --k-sidebar: #1B4B3C;
  --k-page: #F4F5F2;
  --k-surface-2: #F8F9F6;
  --k-selected: #F1F5F2;
  --k-selected-strong: var(--k-ok-bg);  /* a chosen tile or cell (Phase 24 Q11): --k-selected is too faint to tell a choice by; with a --k-brand edge, 6.0:1 against the tint, 7.0:1 against white */
  --k-divider: #ECEEEA;
  --k-control: #CBD2CD;
  --k-control-edge: #858E89;  /* DL §2.1 amendment, version 1.4 (Judd's ruling 91): the edges of text boxes, drop-downs and tick boxes, 3.4:1 on white; buttons and dashed empty slots keep --k-control; drawn from slice 15 stage 3 */
  --k-text: #1D211F;
  --k-text-2: #3F4944;
  --k-muted: #5C6661;
  --k-faint: #9AA39E;
  --k-on-brand: #FFFFFF;  /* text and icons on --k-brand, --k-sidebar, --k-bad-fg and the avatar palette */

  /* §2.1 Semantic pairs: always background and foreground together */
  --k-ok-bg: #E2F0E9;      --k-ok-fg: #0B5B40;
  --k-warn-bg: #FBEFD6;    --k-warn-fg: #7A4E00;
  --k-bad-bg: #FBE3E1;     --k-bad-fg: #9A1F1A;
  --k-info-bg: #E3ECF8;    --k-info-fg: #1F4E8C;
  --k-neutral-bg: #ECEEEA; --k-neutral-fg: #3F4944;

  /* §2.1 Bars and charts */
  --k-bar-warn: #E0A530;
  --k-bar-ok: #006649;
  --k-bar-ok-2: #4F9B7B;
  --k-bar-info: #1F4E8C;

  /* §2.1 Sidebar badges */
  --k-badge-bg: rgba(255, 255, 255, .18);
  --k-badge-bad-bg: #F6C6C2;
  --k-badge-bad-fg: #5C120E;

  /* §2.1 Avatar palette: index = a server-side hash of the person's id mod 8,
     applied as .k-avatar--0 … --7 (CSP: no inline --k-av). */
  --k-av-0: #1F4E8C; --k-av-1: #6B3FA0; --k-av-2: #006649; --k-av-3: #B5541C;
  --k-av-4: #3F4944; --k-av-5: #8A1C5C; --k-av-6: #0E7C7B; --k-av-7: #4F9B7B;

  /* §5.1 Tag colours: the avatar palette by index, except Sage, darkened from
     #4F9B7B (3.3:1 with white) to #3B7A60 (5.07:1) for white text. */
  --k-tag-0: var(--k-av-0); --k-tag-1: var(--k-av-1); --k-tag-2: var(--k-av-2);
  --k-tag-3: var(--k-av-3); --k-tag-4: var(--k-av-4); --k-tag-5: var(--k-av-5);
  --k-tag-6: var(--k-av-6); --k-tag-7: #3B7A60;

  /* 2/3 intensity, dark text (Judd, 3 November 2026): index = row * 8 + base. */
  --k-tag-8: #6A89B2; --k-tag-9: #9C7FC0; --k-tag-10: #559986; --k-tag-11: #CE8D68;
  --k-tag-12: #888E8B; --k-tag-13: #B6729A; --k-tag-14: #5EA8A7; --k-tag-15: #7CA695;
  /* 1/3 intensity, dark text (Judd, 3 November 2026): index = row * 8 + base. */
  --k-tag-16: #B4C4D9; --k-tag-17: #CEBFDF; --k-tag-18: #AACCC2; --k-tag-19: #E6C6B3;
  --k-tag-20: #BFC2C1; --k-tag-21: #D8B3C9; --k-tag-22: #AFD3D3; --k-tag-23: #BED3CA;

  /* §2.2 Type scale */
  --k-fs-title: 30px;
  --k-fs-section: 24px;
  --k-fs-panel: 18px;
  --k-fs-card: 15px;
  --k-fs-body: 14px;
  --k-fs-row: 13px;
  --k-fs-meta: 12px;
  --k-fs-label: 11px;
  --k-fs-micro: 10px;

  /* §2.3 Shape and size */
  --k-r-card: 12px;
  --k-r-box: 10px;
  --k-r-item: 8px;
  --k-r-pill: 999px;
  /* The one navigation (spec §3.2 as amended 12 October 2026, C14; §3.4):
     240px expanded, holding every module's sections; 64px collapsed. Block 1's
     --k-rail-width and its collapsed twin were these values until Phase 21
     slice 16 stage 3, which read every rule through these, the DL's names. */
  --k-sidebar-w: 240px;
  --k-sidebar-w-collapsed: 64px;
  --k-topbar-h: 52px;
  --k-bar-h: var(--k-topbar-h);  /* the context bar's height, and where the panel and the sticky parts begin; with the View as banner it is the banner's and the bar's together (DL §5.14b) */
  --k-view-as-h: 44px;  /* the View as banner's height from 900 px, where it is sticky above the context bar (Phase 29, DL §5.14b) */
  --k-aside-rail-w: 72px;
  --k-panel-w: 376px;
  --k-blade-w: 320px;
  --k-ctl-h: 36px;
  --k-ctl-h-sm: 32px;
  --k-focus: 0 0 0 3px rgba(0, 102, 73, .14);
  --k-scrim: rgba(23, 32, 27, .35);  /* behind the panel's sheet (the slide-overs' scrim, as a token) */
  --k-z-phone-scrim: 55;  /* the phone drawer's scrim and drawer sit above the tab bar (z-index 50) */
  --k-z-phone-drawer: 56;
}

/* --------------------------------------------------------------------------
   2. Fonts — Montserrat self-hosted (no Google Fonts calls from the network)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/montserrat-v31-latin-300.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/montserrat-v31-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/montserrat-v31-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/montserrat-v31-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/montserrat-v31-latin-700.woff2") format("woff2");
}

/* --------------------------------------------------------------------------
   3. Base + typography
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--k-font);
  font-size: var(--k-fs-body); /* DL §2.2 Body 14 (Phase 21 slice 15; ruling 14 (1)) */
  line-height: 20px;
  font-weight: 400;
  color: var(--k-text);
  background: var(--k-page);
  text-align: left; /* text is left-aligned throughout (spec §3.1) */
}

h1, h2, h3, h4, h5, h6, p, ul, ol, dl, figure { margin: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

a { color: var(--k-brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Visible green focus rings everywhere (spec §10.5) */
:focus-visible {
  outline: 2px solid var(--k-brand);
  outline-offset: 2px;
  border-radius: 2px;
}
/* On dark chrome a deep-green ring is invisible; use the tint instead */
.k-rail :focus-visible,
.k-tabbar :focus-visible,
.k-toast :focus-visible {
  outline-color: var(--k-selected);
}

[x-cloak] { display: none !important; }

/* Typography scale — §3.1 table */
.k-display    { font-weight: 300; font-size: 34px;   line-height: 40px; color: var(--k-text); }
.k-title      { font-weight: 300; font-size: var(--k-fs-title); line-height: 1.15; color: var(--k-text); } /* DL §2.2 page title and stat numeral, 30/300 (Phase 21 slice 2; was 26/32) */
.k-heading    { font-weight: 600; font-size: 15px;   line-height: 20px; color: var(--k-text); }
.k-subheading { font-weight: 600; font-size: 13px;   line-height: 18px; color: var(--k-text); }
.k-body       { font-weight: 400; font-size: var(--k-fs-body); line-height: 20px; color: var(--k-text); } /* DL §2.2 Body 14/20 (Phase 21 slice 15; was 13/20) */
.k-table-text { font-weight: 400; font-size: 12.5px; line-height: 18px; color: var(--k-text); }
/* DL §2.2 Meta and Label (ruling 94, Phase 21 slice 16 stage 4): the launch
   .k-caption (300 / 11.5 / 16) and .k-overline (600 / 10) were folded in, their
   markup renamed, and these took their place in the cascade. */
.k-meta  { font-size: var(--k-fs-meta); font-weight: 400; color: var(--k-muted); }
.k-label { font-size: var(--k-fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }
/* A term whose case is its meaning, inside uppercase type ("4Ps", never
   "4PS"): the k_as_written filter wraps it (Judd, 17 October 2026). */
.k-as-written { text-transform: none; }

/* --------------------------------------------------------------------------
   4. Application shell — §3.2
   -------------------------------------------------------------------------- */
.k-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 8px 14px;
  background: var(--k-surface);
  color: var(--k-brand);
  font-weight: 600;
  border-radius: 0 0 var(--k-r-item) 0;
  box-shadow: var(--k-shadow-overlay);
}
.k-skip-link:focus { left: 0; }

.k-app {
  display: flex;
  min-height: 100vh;
}

/* 4.1 The navigation (.k-rail) — restyled to the design language in Phase 21
   slice 1b (DL §3.1; design note §1), its behaviour exactly as built: 240 px
   expanded and 64 px collapsed (--k-sidebar-w), the three tiers, the
   collapse memory, the flyout, the drawer and the no-script path. The
   shell's own rules read the DL tokens directly; the page-wide colour
   switches wait for slice 2 (ruling 14 (1)).

   Contrast over --k-sidebar, alpha blended (WCAG 2.x; every text pair at or
   above 4.5:1, design note §1): white 9.91; module rows at 84 % 7.54; third
   level at 78 % 6.74; the role line at 70 % 5.79; group labels at 65 % 5.23;
   white on the 14 % active wash 6.67 and on the 10 % section wash 7.45; a
   badge (white on 18 %) 5.98, but 4.36 on a 14 % row — so on a washed row it
   flips to --k-sidebar on white, 9.91. */
:root {
  --k-sidebar-fg: rgba(255, 255, 255, .84);      /* module and section rows */
  --k-sidebar-fg-3: rgba(255, 255, 255, .78);    /* the third level */
  --k-sidebar-fg-dim: rgba(255, 255, 255, .70);  /* the role line, icon buttons */
  --k-sidebar-label: rgba(255, 255, 255, .65);   /* group labels */
  --k-sidebar-wash: rgba(255, 255, 255, .14);    /* the active module */
  --k-sidebar-wash-2: rgba(255, 255, 255, .10);  /* the active section, hover */
  --k-sidebar-line: rgba(255, 255, 255, .12);    /* the foot's rule, the flyout's edge */
}
.k-rail {
  flex: 0 0 var(--k-sidebar-w);
  width: var(--k-sidebar-w);
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 12px 0 16px;
  background: var(--k-sidebar);
  color: var(--k-on-brand);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 40;
  transition: flex-basis .15s ease, width .15s ease;
}
/* The brand row: the Kairos mark (white SVG, brand assets 30 October 2026),
   "Kairos", and the collapse control as an icon at the row's right. */
.k-rail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 12px 20px;
}
.k-rail-mark {
  flex: 0 0 auto;
  display: block;
  width: 28px;
  height: 28px;
}
.k-rail-wordmark {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  font-size: var(--k-fs-panel);
  color: var(--k-on-brand);
  white-space: nowrap;
}

.k-rail-toggle {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--k-r-item);
  background: transparent;
  color: var(--k-sidebar-fg-dim);
  cursor: pointer;
}
.k-rail-toggle:hover { background: var(--k-sidebar-wash-2); color: var(--k-on-brand); }
.k-rail-toggle svg { width: 16px; height: 16px; transition: transform .15s ease; }
.k-app.k-rail-collapsed .k-rail-toggle svg { transform: rotate(180deg); }

.k-rail-nav {
  list-style: none;
  margin: 0;
  padding: 0 12px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* A module: 40 px, radius 8, an 18 px icon and the label at 13/500. The
   active module is the 14 % wash and 600 — no accent bar (DL §9). */
.k-rail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 12px;
  margin: 0;
  border-radius: var(--k-r-item);
  color: var(--k-sidebar-fg);
  font-size: var(--k-fs-row);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}
.k-rail-item:hover { background: var(--k-sidebar-wash-2); color: var(--k-on-brand); text-decoration: none; }
.k-rail-item.is-active {
  background: var(--k-sidebar-wash);
  color: var(--k-on-brand);
  font-weight: 600;
}
.k-rail-item svg { flex: 0 0 18px; width: 18px; height: 18px; }

/* The current module is marked server-side: base.html captures its `module`
   block once and the navigation renders `.is-active` and aria-current from it
   (kairos.ui.nav), so the indication needs no script and no attribute-selector
   fallback — the "owed work" an earlier note here described is done. */

/* 4.1a The module entries and their sections (C14).
   Each module is a link, then — when it has sections — a native <details>
   whose small <summary> sits at the right of the link's row and whose body
   flows beneath it. */
.k-nav-module { position: relative; }
.k-nav-module.has-body > .k-rail-item { padding-right: 40px; }
.k-nav-toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--k-sidebar-fg-dim);
  cursor: pointer;
  list-style: none;
}
.k-nav-toggle::-webkit-details-marker { display: none; }
.k-nav-toggle::marker { content: ""; }
.k-nav-toggle:hover { background: var(--k-sidebar-wash-2); color: var(--k-on-brand); }
.k-nav-toggle svg { width: 14px; height: 14px; transition: transform .15s ease; }
.k-nav-disclosure[open] > .k-nav-toggle svg { transform: rotate(180deg); }
.k-nav-body { padding: 4px 0 6px; }
/* The module's own name at the top of its body: needed only in the
   collapsed flyout, where the label beside the icon is hidden. */
.k-nav-flyout-head { display: none; }

/* The sections: group labels at 11/600 uppercase in 65 % white; rows 32 px at
   12/500, their text at 54 px, under the module's label; the page you are on
   the 10 % wash and 600. The third level — the open workspace's sections,
   nested under its row (.k-sidebar-nav--sub) — is 30 px, indented 58 px, at
   78 % white. The open workspace's own row is white and 600, unwashed. */
.k-rail .k-sidebar-section { margin: 0; }
.k-rail .k-sidebar-section > .k-label {
  display: block;
  padding: 8px 12px 4px 42px;
  font-size: var(--k-fs-label);
  letter-spacing: .1em;
  color: var(--k-sidebar-label);
  white-space: normal;
}
.k-rail .k-sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.k-rail .k-sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 0 10px 0 42px;
  border-radius: var(--k-r-item);
  color: var(--k-sidebar-fg);
  font-size: var(--k-fs-meta);
  font-weight: 500;
  line-height: 16px;
  text-decoration: none;
}
.k-rail .k-sidebar-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-rail a.k-sidebar-link:hover { background: var(--k-sidebar-wash-2); color: var(--k-on-brand); text-decoration: none; }
.k-rail .k-sidebar-link.is-open { color: var(--k-on-brand); font-weight: 600; }
.k-rail .k-sidebar-link.is-active {
  background: var(--k-sidebar-wash-2);
  color: var(--k-on-brand);
  font-weight: 600;
}
.k-rail .k-sidebar-nav--sub .k-sidebar-link {
  min-height: 30px;
  padding-left: 58px;
  color: var(--k-sidebar-fg-3);
}
.k-rail .k-sidebar-nav--sub .k-sidebar-link.is-active { color: var(--k-on-brand); }
/* "All workspaces" / "All helpdesks", the last row of a module's short list
   (Judd's navigation rulings N3 and N7, 29 October 2026): a search icon where
   a count would sit, and no count. */
.k-rail .k-sidebar-link--all svg { flex: 0 0 auto; color: var(--k-sidebar-fg-3); }
.k-rail a.k-sidebar-link--all:hover svg { color: var(--k-on-brand); }
/* Badges (DL §2.1): open counts on an 18 % white wash; the reader's overdue
   count rose (.k-badge--bad: styled here, used from slice 12). On a washed
   row the neutral badge flips to --k-sidebar on white, for contrast. */
.k-rail .k-badge {
  flex: 0 0 auto;
  min-width: 0;
  padding: 1px 7px;
  border: 0;
  border-radius: var(--k-r-pill);
  background: var(--k-badge-bg);
  color: var(--k-on-brand);
  font-size: var(--k-fs-label);
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}
.k-rail .k-sidebar-link.is-active .k-badge:not(.k-badge--bad) { background: var(--k-on-brand); color: var(--k-sidebar); }
.k-rail .k-meta { padding: 2px 12px 0 42px; color: var(--k-sidebar-fg-dim); font-weight: 400; }

/* Collapsed to 64px icons — in the sidebar tier only: from 1280 px, and from
   900 px with a mouse (a fine pointer, or none). Elsewhere the navigation is
   a drawer, which always opens at full width, or the tab bar. This query is
   the exact complement, at 600 px and up, of the drawer tier's in §3.4 below
   (ruling 46 Q3: a touch screen narrower than 1280 px gets the drawer). */
@media (min-width: 1280px), (min-width: 900px) and (pointer: fine), (min-width: 900px) and (pointer: none) {
  .k-app.k-rail-collapsed .k-rail {
    flex-basis: var(--k-sidebar-w-collapsed);
    width: var(--k-sidebar-w-collapsed);
  }
  .k-app.k-rail-collapsed .k-rail-label,
  .k-app.k-rail-collapsed .k-rail-wordmark,
  .k-app.k-rail-collapsed .k-rail-user-meta { display: none; }
  .k-app.k-rail-collapsed .k-rail-item { justify-content: center; padding: 0; }
  .k-app.k-rail-collapsed .k-rail-head { flex-direction: column; padding-inline: 8px; }
  .k-app.k-rail-collapsed .k-rail-user { flex-direction: column; margin-inline: 8px; padding-inline: 0; }

  /* Every other module is its icon, a link to the module. */
  .k-app.k-rail-collapsed .k-nav-module:not(.is-current) > .k-nav-disclosure { display: none; }

  /* The current module's icon opens its sections as a flyout: the summary
     covers the icon's row, so the icon itself is the control, and the body
     is a full-height panel beside the 64px rail. Fixed rather than absolute
     because the rail scrolls and would clip it. */
  .k-app.k-rail-collapsed .k-nav-module.is-current > .k-nav-disclosure > .k-nav-toggle {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: auto;
    border-radius: var(--k-r-item);
  }
  .k-app.k-rail-collapsed .k-nav-module.is-current > .k-nav-disclosure > .k-nav-toggle svg { display: none; }
  .k-app.k-rail-collapsed .k-nav-module.is-current > .k-nav-disclosure > .k-nav-body {
    position: fixed;
    top: 0;
    bottom: 0;
    left: var(--k-sidebar-w-collapsed);
    width: 248px;
    overflow-y: auto;
    padding: 16px 10px;
    background: var(--k-sidebar);
    border-left: 1px solid var(--k-sidebar-line);
    box-shadow: var(--k-shadow-overlay);
  }
  .k-app.k-rail-collapsed .k-nav-flyout-head {
    display: block;
    padding: 4px 12px 8px;
    color: var(--k-on-brand);
    font-weight: 600;
    font-size: var(--k-fs-card);
  }
  /* In the flyout there is no module label to sit under: the rows start at
     the flyout's own edge, the third level one step in. */
  .k-app.k-rail-collapsed .k-nav-body .k-sidebar-section > .k-label,
  .k-app.k-rail-collapsed .k-nav-body .k-sidebar-link,
  .k-app.k-rail-collapsed .k-nav-body .k-meta { padding-left: 12px; }
  .k-app.k-rail-collapsed .k-nav-body .k-sidebar-nav--sub .k-sidebar-link { padding-left: 28px; }
}

/* The foot: a 32 px white avatar with --k-sidebar initials, the name at
   13/600 and the role at 11 in 70 % white, and sign-out as an icon button —
   still a POST form. */
.k-rail-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 12px 0;
  padding: 12px 8px 0;
  border-top: 1px solid var(--k-sidebar-line);
}
.k-rail-user .k-avatar {
  background: var(--k-on-brand);
  color: var(--k-sidebar);
  font-size: var(--k-fs-meta);
  font-weight: 700;
  box-shadow: none;
}
.k-rail-user-meta { flex: 1 1 auto; min-width: 0; }
.k-rail-user-name {
  font-size: var(--k-fs-row);
  font-weight: 600;
  color: var(--k-on-brand);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.k-rail-user-role {
  font-size: var(--k-fs-label);
  color: var(--k-sidebar-fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.k-rail-signout { flex: 0 0 auto; margin: 0; }
.k-rail-signout-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--k-r-item);
  background: transparent;
  color: var(--k-sidebar-fg-dim);
  cursor: pointer;
}
.k-rail-signout-btn:hover,
.k-rail-signout-btn:focus-visible { background: var(--k-sidebar-wash-2); color: var(--k-on-brand); }

/* 4.2 The context sidebar column is retired: its sections now sit inside
   the navigation (4.1a). `.k-badge` keeps its light-surface look for any
   use outside the navigation. */
.k-badge {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: var(--k-r-pill);
  background: var(--k-page);
  border: 1px solid var(--k-border);
  color: var(--k-muted);
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
}

/* Drawer scrim (the drawer tier: 600–899px, and a touch screen to 1279px) */
.k-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(23,32,27,.35);
  border: 0;
  padding: 0;
  z-index: 45;
}

/* 4.3 Content area. Two page widths (§3.4 as amended 15 October 2026,
   ruling 46 Q4), declared by the page through base.html's page_kind block:
   a data page (.k-content--data: tables, the queue, the board, the
   timeline, the workflow canvas) fills the width right of the navigation; any
   other page stops at --k-reading-max of content, plus its gutters, and
   centres in the remainder. The context bar above it spans the whole column
   (Phase 21 slice 1b, 4.3a below), whatever the page's width.
   Confirmation pages and sign-in keep their own narrow cards (Q5). */
.k-content {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--k-page);
  display: flex;
  flex-direction: column;
  --k-shell-max: calc(var(--k-reading-max) + 2 * var(--k-gutter));
}
.k-content--data { --k-shell-max: none; }
/* The third page width (Phase 18 Wave 3, W5b; Judd's ruling of 15 October
   2026, to be recorded as ruling 48): a form page whose form has more than
   six fields — k_form_cols has marked them .k-form-cols inside the page's
   .k-form-main — and no side panel (.k-form-side) narrows, from 1920 px, to
   the form's natural width (--k-form-natural, about 1,600 px with its
   gutters) and centres, rather than stretching its two columns across the
   screen. Read from the page's own structure, so no template declares it:
   the top bar, the breadcrumbs, the header and the form share the width and
   their edges line up. A form with a side panel, a Configuration detail
   page (its related lists are its side), a short form (no .k-form-cols)
   and a confirmation page are untouched, and below 1920 px nothing moves.
   Configuration is not capped either (Phase 33, D1; Judd's UI pass of 16
   November 2026): a Configuration page's forms fill the container. */
@media (min-width: 1920px) {
  .k-content:has(.k-form-main .k-form-cols):not(:has(.k-form-side)):not(:has(.k-config-page)) {
    --k-shell-max: calc(var(--k-form-natural) + 2 * var(--k-gutter));
  }
}

/* 4.3a The context bar (.k-topbar; Phase 21 slice 1b, design note §2, DL
   §3.2, ruling 5): one white bar with a bottom border, 52 px, sticky at the
   top of the content column and the full width of it — it no longer shares
   the page's width cap. Left, the breadcrumb; right, in order, the search
   icon (or its pill), the bell, a 1 px divider when the page has actions,
   then the page actions. The page scrolls beneath it, so the root keeps its
   height clear when it scrolls a focused control or an anchor into view
   (WCAG 2.2 2.4.11). */
html { scroll-padding-top: calc(var(--k-bar-h) + 8px); }

.k-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--k-topbar-h);
  padding: 0 var(--k-gutter);
  background: var(--k-surface);
  border-bottom: 1px solid var(--k-border);
}
.k-drawer-toggle {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: -8px;
  padding: 0;
  border: 0;
  border-radius: var(--k-r-pill);
  background: transparent;
  color: var(--k-text-2);
  cursor: pointer;
}
.k-drawer-toggle:hover { background: var(--k-surface-2); color: var(--k-text); }

/* The breadcrumb, in the bar: 13 px on one line, trail items --k-muted
   (5.95:1) as links, separators --k-faint as decoration, the current item
   --k-text at 600 and not a link. Earlier items give way first; the last
   ellipsises. A page with no trail shows its module as the one item. */
.k-breadcrumbs {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.k-crumbs {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-size: var(--k-fs-row);
  line-height: 20px;
  color: var(--k-muted);
}
.k-crumbs li { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 4 auto; white-space: nowrap; }
.k-crumbs li:last-child { flex: 0 1 auto; }
.k-crumbs li > a,
.k-crumbs li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-crumbs li + li::before { content: "›"; flex: 0 0 auto; color: var(--k-faint); }
.k-crumbs a { color: var(--k-muted); }
.k-crumbs a:hover { color: var(--k-brand); }
.k-crumbs [aria-current="page"] { color: var(--k-text); font-weight: 600; }

/* The bar's icon buttons — the search icon, the bell: 36 px circles in
   --k-text-2 (9.34:1), 44 px on a coarse pointer (below). */
.k-bar-btn,
.k-bell-btn {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--k-r-pill);
  background: transparent;
  color: var(--k-text-2);
  cursor: pointer;
  text-decoration: none;
}
.k-bar-btn:hover,
.k-bell-btn:hover { background: var(--k-surface-2); color: var(--k-text); text-decoration: none; }
.k-bar-btn svg,
.k-bell-btn svg { width: 18px; height: 18px; }

/* Search (spec §10.2; ruling 5, ruling 14 (4)): the icon is a link to the
   results page, and ui/kairos.js turns a plain click, or "/", into the pill
   in its place — 340 px, a brand border, the --k-focus ring and an Esc hint.
   The breadcrumb, the bar's one flexible item, gives way, so nothing to the
   pill's right moves. The results page draws the bar with the pill open. */
.k-search {
  display: none;
  position: relative;
  flex: 0 0 340px;
  width: 340px;
  max-width: 340px;
  min-width: 0;
  align-items: center;
  /* A <form>; some UA stylesheets give one a bottom margin. */
  margin: 0;
}
.k-topbar.is-searching .k-search { display: flex; }
.k-topbar.is-searching .k-search-open { display: none; }
.k-search input[type="search"] {
  width: 100%;
  height: var(--k-ctl-h);
  padding: 0 52px 0 36px;
  border: 1px solid var(--k-brand);
  border-radius: var(--k-r-pill);
  background: var(--k-surface);
  box-shadow: var(--k-focus);
  font-size: var(--k-fs-row);
  line-height: 20px;
  color: var(--k-text);
}
.k-search input[type="search"]::-webkit-search-cancel-button { display: none; }
.k-search input[type="search"]::placeholder { color: var(--k-muted); }
.k-search input[type="search"]:focus { outline: 0; }
.k-search input[type="search"]:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 1px; }
.k-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--k-brand);
  pointer-events: none;
}
.k-search-kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 6px;
  border: 1px solid var(--k-control);
  border-radius: 4px;
  background: var(--k-surface);
  color: var(--k-muted);
  font-size: var(--k-fs-label);
  line-height: 16px;
  pointer-events: none;
}
/* The live results under the pill (DL §10): a listbox the input owns, the
   top five of each kind and "All results for …" last. The highlighted
   option (aria-selected, moved by the arrow keys) and a hovered one take
   --k-selected. */
.k-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 35;
  max-height: min(70vh, 460px);
  overflow-y: auto;
  padding: 6px 0;
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-card);
  box-shadow: var(--k-shadow-overlay);
}
.k-search-results[hidden] { display: none; }
.k-search-results__label {
  padding: 8px 14px 4px;
  font-size: var(--k-fs-label);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--k-muted);
}
.k-search-results__opt {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 14px;
  color: var(--k-text);
  font-size: var(--k-fs-row);
  line-height: 18px;
}
.k-search-results__opt:hover,
.k-search-results__opt[aria-selected="true"] { background: var(--k-selected); text-decoration: none; }
.k-search-results__key { flex: 0 0 72px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--k-fs-meta); color: var(--k-muted); }
.k-search-results__title { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.k-search-results__none { margin: 0; padding: 10px 14px 4px; font-size: var(--k-fs-row); color: var(--k-muted); }
.k-search-results__all { margin-top: 4px; border-top: 1px solid var(--k-divider); font-weight: 600; }
a.k-search-results__all { color: var(--k-brand); }
.k-search-results__inner > .k-search-results__all:first-child { margin-top: 0; border-top: 0; }

/* Notification bell (§10.1). A real link to the notifications list (Phase 18
   Wave 2); kBell turns a plain click into the dropdown. The badge is a child
   of the link so the count sits on the icon, on --k-bad-fg (8.12:1); the
   menu is anchored to the .k-bell wrapper. */
.k-bell {
  position: relative;
  flex: 0 0 auto;
}
.k-bell-btn:focus-visible {
  outline: 2px solid var(--k-brand);
  outline-offset: 1px;
}
.k-bell-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--k-bad-fg);
  color: var(--k-on-brand);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 17px;
  text-align: center;
}
.k-bell-badge.is-empty { display: none; }
/* What's new: a quiet dot, never beside a count. The server paints it from
   the user's seen date alone; once the polled badge shows a number this rule
   hides the dot and its hidden text (display: none also drops the description). */
.k-bell-new {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--k-brand);
  box-shadow: 0 0 0 2px var(--k-surface);
}
.k-bell-badge:not(.is-empty) ~ .k-bell-new,
.k-bell-badge:not(.is-empty) ~ .k-bell-new-text { display: none; }
/* The "New" pill beside a link in the bell menu's footer. */
.k-new-pill {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--k-brand);
  color: var(--k-on-brand);
  font-size: 10px;
  font-weight: 600;
  line-height: 15px;
  vertical-align: 1px;
}
.k-bell-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  width: 330px;
  max-width: calc(100vw - 32px);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-box);
  background: var(--k-surface);
  box-shadow: var(--k-shadow-menu);
  overflow: hidden;
}
.k-bell-menu-head,
.k-bell-menu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--k-surface-2);
}
.k-bell-menu-foot { border-top: 1px solid var(--k-divider); }
/* A foot link that carries the New pill: text and pill on one row. */
.k-bell-menu-foot-link { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.k-bell-menu-foot-link .k-new-pill { margin-left: 0; }
.k-bell-menu-head { border-bottom: 1px solid var(--k-divider); }
.k-bell-menu-action {
  border: 0;
  background: none;
  padding: 0;
  color: var(--k-brand);
  font-size: 11.5px;
  cursor: pointer;
}
.k-bell-menu-inner .k-notification-list { max-height: 340px; overflow-y: auto; }
.k-bell-empty { padding: 16px 14px; }

/* Notification rows — the list page and the dropdown share them. */
.k-notification-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.k-notification {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--k-divider);
}
.k-notification:last-child { border-bottom: 0; }
.k-notification.is-unread { background: var(--k-surface-2); }
/* Unread (Phase 18 Wave 2): a dot and a bold title, and "Unread:" for a
   screen reader in the title itself — never the tint alone. The dot's slot is
   kept on a read row, so titles stay aligned. */
.k-notification-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
}
.k-notification.is-unread .k-notification-dot { background: var(--k-brand); }
.k-notification.is-unread .k-notification-title { font-weight: 600; }
.k-notification-body { flex: 1 1 auto; min-width: 0; }
/* The list page's day headings ("Today", "Yesterday", the date). */
.k-notification-day + .k-notification-day { border-top: 1px solid var(--k-divider); }
.k-notification-day-label {
  margin: 0;
  padding: 10px 14px 6px;
  font-size: 11.5px;
  line-height: 16px;
  font-weight: 600;
  color: var(--k-text);
}
.k-notification-title {
  display: block;
  margin: 2px 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--k-text);
}
.k-notification-title.is-stub { color: var(--k-muted); font-style: italic; }
/* "Mark read" — labelled in words since Phase 18 Wave 2, where it was a bare
   tick; at least 32 px tall, past WCAG 2.2's 24 px minimum. */
.k-notification-read {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-pill);
  background: var(--k-surface);
  color: var(--k-text);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.k-notification-read:hover { border-color: var(--k-brand); color: var(--k-brand); }

/* The divider and the page actions (DL §3.2): at most one secondary and one
   primary, or a primary with a chevron menu; on a record page a secondary
   and the Actions menu (ruling 14 (5)). Restyled in the bar only — a 36 px
   pill at 13/600, the primary white on --k-brand (7.01:1), the secondary
   white with a --k-control border and --k-ok-fg text. Slice 15 stage 2
   restyled k-btn everywhere to the same values, so slice 16 stage 4 (ruling
   99 (5)) cut these scoped rules to what still differs: a fixed 36 px height
   and 13 px type with an 8 px gap and line-height 1 at every size (the bar's
   Actions trigger is a k-btn--s, which .k-actions-trigger would otherwise
   make 32 px, 12 px type, 6 px gap), and the 12 px leading inset of a
   primary, or of a secondary that leads with its icon. */
.k-bar-divider {
  flex: 0 0 1px;
  width: 1px;
  height: 24px;
  margin: 0 4px;
  background: var(--k-border);
}
.k-topbar-action {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.k-topbar-action form { margin: 0; }
.k-topbar .k-btn {
  height: var(--k-ctl-h);
  padding: 0 16px;
  gap: 8px;
  font-size: var(--k-fs-row);
  line-height: 1;
}
.k-topbar .k-btn--primary { padding-left: 12px; }
.k-topbar .k-btn--secondary:has(svg:first-child) { padding-left: 12px; }
.k-topbar .k-actions-trigger { min-height: 0; padding: 0 12px 0 16px; }
.k-topbar .k-actions-trigger svg { width: 12px; height: 12px; }
/* The "⋯" a phone shows in place of the trigger's word (k_actions bar=True). */
.k-actions-trigger-glyph { display: none; }

/* The page beneath the bar: the top gutter is 28 (§3.4's table). */
.k-page {
  width: 100%;
  max-width: var(--k-shell-max);
  margin: 0 auto;
  padding: 28px var(--k-gutter) 48px;
  flex: 1 1 auto;
}

/* 4.3b The work area and the panel (Phase 21 slice 1b, design note §4; DL
   §3.4, §10; spec §3.4 as amended 21 October 2026, ruling 4). Under the bar
   one row holds #k-main, then the right rail's slot (stage 4), then the
   panel. #k-main keeps its page width rules: a reading page still stops at
   --k-reading-max and centres in what the row leaves it.

   The panel (#k-panel) is 376 px and hidden until kPanel (ui/kairos.js)
   opens it. Three modes, which the two queries below set as --k-panel-mode
   for the script to read:
   - inline, from 1440 px: a column beside main, sticky under the bar, in
     place of the right rail;
   - sheet, 600–1439 px: fixed at the right over the page with a scrim, the
     slide-over's focus trap and focus return (the rail stays underneath);
   - full, below 600 px: the whole screen, over the tab bar. */
.k-workarea {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  min-width: 0;
}
.k-workarea > .k-page { min-width: 0; }
.k-panel {
  display: flex;
  flex: 0 0 var(--k-panel-w);
  width: var(--k-panel-w);
  position: sticky;
  top: var(--k-bar-h);
  align-self: flex-start;
  height: calc(100vh - var(--k-bar-h));
  height: calc(100dvh - var(--k-bar-h));
  background: var(--k-surface);
  border-left: 1px solid var(--k-border);
}
.k-panel[hidden] { display: none; }
.k-panel > .k-panel__body:last-child { border-right: 0; }
.k-panel__sections { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.k-panel__head > .k-panel__title { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.k-panel__title:focus { outline: none; }
.k-panel__close {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--k-r-pill);
  background: transparent;
  color: var(--k-text-2);
  cursor: pointer;
}
.k-panel__close:hover { background: var(--k-surface-2); color: var(--k-text); text-decoration: none; }
.k-panel__close svg { width: 16px; height: 16px; }
.k-panel-scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  width: 100%;
  border: 0;
  padding: 0;
  background: var(--k-scrim);
  cursor: default;
}
.k-panel-scrim[hidden] { display: none; }
/* Locked while the sheet or the full-screen panel is open. */
body.k-panel-locked { overflow: hidden; }
/* kScrollHold (kairos.js) adds this to <html> when the page had a scrollbar as
   a lock goes on, so the page does not widen by the scrollbar's width and
   jump (Judd, 30 October 2026). The locks are kPanel's and kOverlay's. */
html.k-scroll-held { scrollbar-gutter: stable; }
/* The tools blade (Judd's ruling of 30 October 2026, DL §3.4 as amended): the
   labelled rail stays drawn while the panel is open, and the panel sits
   between #k-main and the rail by `order`, not by moving it in the DOM (the
   rail comes first there, so Tab goes from a section button into the blade).
   A page's tools are 320 px (--k-blade-w) and show one section; any other
   content of the panel (the wizard, filters, a quick view) keeps 376 px. */
.k-workarea > .k-panel { order: 2; }
.k-workarea > .k-aside-rail { order: 3; }
.k-panel:has(.k-tools) {
  flex-basis: var(--k-blade-w);
  width: var(--k-blade-w);
}
/* Scripting on (kPanel sets data-k-blade): only the open section is drawn.
   With scripting off the attribute is never set and every section shows. */
.k-tools[data-k-blade] > :not(.is-open) { display: none; }
/* The blade slides out from behind the rail and back (Judd, 30 October 2026):
   a transform slide of 220 ms, decelerating, in; 180 ms, accelerating, out. It
   is the blade only; the 376 px panel keeps its plain open and close. The rail
   is drawn above the panel (z-index 61) so the blade appears to come from
   behind it. kPanel hides the panel at once on close, as ever, and sets
   data-k-panel-closing (and inert) for the length of the slide so that the
   hidden panel is still drawn; it takes the attribute off on animationend. */
@keyframes k-blade-in {
  from { transform: translateX(100%); }
  to { transform: none; }
}
@keyframes k-blade-out {
  from { transform: none; }
  to { transform: translateX(100%); }
}
.k-panel[data-k-panel-ready]:not([hidden]):has(.k-tools) {
  animation: k-blade-in 220ms cubic-bezier(0.2, 0, 0, 1);
}
/* The rail rises above the sheet (z-index 60) only while a blade is open or
   sliding closed, so the blade comes from behind it. At other times it keeps
   its place in the page, under the top bar's menus (the top bar is 30; the
   sheet already covers those menus in this state; Judd, 30 October 2026). */
.k-workarea:has(> .k-panel:not([hidden]) .k-tools) > .k-aside-rail,
.k-workarea:has(> .k-panel[data-k-panel-closing] .k-tools) > .k-aside-rail {
  z-index: 61;
}
/* The slide carries the inline blade about its own width past the page's right
   edge, which would flash a sideways scrollbar. The work area clips it for
   those moments only; clip, not hidden, so it does not become a scroll
   container and the sticky panel and rail keep working (Judd, 30 October 2026). */
.k-workarea:has(> .k-panel:not([hidden]) .k-tools),
.k-workarea:has(> .k-panel[data-k-panel-closing] .k-tools) {
  overflow-x: clip;
}
.k-panel[hidden][data-k-panel-closing]:has(.k-tools) {
  display: flex;
  animation: k-blade-out 180ms cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}
@keyframes k-scrim-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.k-panel-scrim:not([hidden]) { animation: k-scrim-in 220ms ease-out; }
@media (prefers-reduced-motion: reduce) {
  .k-panel[data-k-panel-ready]:not([hidden]):has(.k-tools),
  .k-panel-scrim:not([hidden]) { animation: none; }
  /* No slide-out: the hidden panel stays hidden (kPanel has no matchMedia of
     its own, so the stylesheet is what knows). */
  .k-panel[hidden][data-k-panel-closing]:has(.k-tools) { display: none; }
}

@media (max-width: 1439px) {
  :root { --k-panel-mode: sheet; }
  .k-panel {
    /* align-self back to normal: current Chromium shrinks a fixed box with
       align-self: flex-start to its content, top and bottom notwithstanding
       (design note §4, build note). */
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    height: auto;
    align-self: normal;
    max-width: 100vw;
    z-index: 60;
    box-shadow: var(--k-shadow-overlay);
  }
  /* The tools blade as a sheet sits left of the rail where the rail is drawn
     (the sidebar tier), so the rail stays visible and its buttons usable; the
     scrim covers the page only. The drawer and tab-bar tiers, where the rail
     is not drawn, follow with the rail's own query (4.3c). It also starts
     below the top bar, so the bar stays clear and the blade sits between the
     bar and the rail rather than over the bar (Judd, 30 October 2026). */
  .k-panel:has(.k-tools) {
    top: var(--k-bar-h);
    right: var(--k-aside-rail-w);
  }
  .k-workarea:has(> .k-panel:not([hidden]) .k-tools) > .k-panel-scrim {
    top: var(--k-bar-h);
    right: var(--k-aside-rail-w);
    width: auto;
  }
}
@media (max-width: 599px) {
  :root { --k-panel-mode: full; }
  .k-panel,
  .k-panel:has(.k-tools) {
    left: 0;
    right: 0;
    width: auto;
    z-index: 70;
    border-left: 0;
    box-shadow: none;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/* The panel's content as a page of its own (scripting off, or any request
   that is not htmx's into #k-panel; kairos.ui.panel): the same head and
   sections in a card in the page. */
.k-panel-frame {
  display: flex;
  max-width: 560px;
  margin-inline: auto;
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-card);
  overflow: hidden;
}
.k-panel-frame > .k-panel__body { border-right: 0; }

/* 4.3c The right rail and More actions (Phase 21 slice 1b, design note §3;
   DL §3.4; rulings 3 and 14; kairos.ui.rail). The rail is 72 px, under the
   bar and sticky, in the sidebar tier only: a 20 px icon over a 10/600 label
   in --k-text-2 (9.34:1) on 60 x 58 buttons (.k-aside-rail__btn, slice 1a).
   From 1440 px an open panel takes its column (4.3b). In the drawer and
   tab-bar tiers the rail is not drawn and its items are the context bar's
   More actions — a native <details> with 44 px rows (frame F), hidden in the
   sidebar tier. The two queries below are the drawer tier's and the tab-bar
   tier's together (§3.4), so the rail and the menu are never both shown. */
.k-aside-rail {
  position: sticky;
  top: var(--k-bar-h);
  align-self: flex-start;
  height: calc(100vh - var(--k-bar-h));
  height: calc(100dvh - var(--k-bar-h));
}
.k-aside-rail__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.k-aside-rail__btn svg { flex: 0 0 auto; width: 20px; height: 20px; }
.k-aside-rail__btn:hover { color: var(--k-text); text-decoration: none; }
.k-aside-rail__label { max-width: 56px; line-height: 12px; text-align: center; overflow-wrap: break-word; }

.k-bar-more { display: none; position: relative; flex: 0 0 auto; }
.k-bar-more > summary { list-style: none; cursor: pointer; }
.k-bar-more > summary::-webkit-details-marker { display: none; }
.k-bar-more[open] > summary { background: var(--k-surface-2); color: var(--k-text); }
.k-bar-more__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  min-width: 220px;
  max-width: calc(100vw - 24px);
  padding: 6px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-box);
  background: var(--k-surface);
  box-shadow: var(--k-shadow-overlay);
}
.k-bar-more__link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--k-r-item);
  color: var(--k-text);
  font-size: var(--k-fs-row);
  font-weight: 600;
  white-space: nowrap;
}
.k-bar-more__link svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--k-text-2); }
.k-bar-more__link:hover { background: var(--k-surface-2); text-decoration: none; }
@media (max-width: 899px), (max-width: 1279px) and (pointer: coarse) {
  /* Scoped to the work area so it outranks the slice-1a rule further down. */
  .k-workarea > .k-aside-rail { display: none; }
  .k-bar-more { display: block; }
  /* The blade's sheet goes back to the page's edge where the rail is not drawn
     (it sits left of the rail in the sidebar tier; 4.3b). Not below 600 px,
     where the panel is full screen and the rule there wins by coming later. */
  .k-panel:has(.k-tools) { right: 0; }
  .k-workarea:has(> .k-panel:not([hidden]) .k-tools) > .k-panel-scrim {
    right: 0;
    width: 100%;
  }
}
/* Full screen below 600 px: the blade covers the top bar too, so top goes back
   to 0. This comes after the drawer-tier rule above so that it wins (Judd,
   30 October 2026). */
@media (max-width: 599px) {
  .k-panel:has(.k-tools),
  .k-workarea:has(> .k-panel:not([hidden]) .k-tools) > .k-panel-scrim {
    top: 0;
  }
}

/* Forms designer: wider tools blade (Judd, 2 November 2026) */
/* The designer page marks itself with data-k-tools-wide; only its tools blade
   (not a rail blade, which has no .k-tools) takes 480 px, by setting the token
   where the shared panel rules read it. As a sheet (600 to 1439 px) it is capped
   so it never passes the rail's left edge; the drawer and phone tiers are
   unchanged (the phone tier is full width, the drawer tier follows the shared
   rules). Inline at 1440 px: 240 sidebar + 72 rail + 480 blade leaves 648 px. */
body:has([data-k-tools-wide]) .k-panel:has(.k-tools) {
  --k-blade-w: 480px;
}
@media (max-width: 1439px) {
  body:has([data-k-tools-wide]) .k-panel:has(.k-tools) {
    --k-blade-w: min(480px, calc(100vw - var(--k-aside-rail-w) - 24px));
  }
}

/* 4.3c-2 Rail blades (Judd's rulings RB1 to RB3, 31 October 2026; DL §3.4 as
   amended; kairos.ui.rail): the rail's New work item and Actions open their
   content (.k-rail-blade, in #k-panel) as the tools blade is drawn — 320 px,
   sliding out from behind the rail over 220 ms and back over 180 ms (still
   under reduced motion), the rail raised above it, the work area clipping the
   slide; a sheet left of the rail from 600 to 1439 px where the rail is drawn,
   at the page's edge in the drawer and tab-bar tiers, full screen below 600
   px. The tools blade's rules above are left as they were; these repeat them
   for the rail's blades, in the same order, so the same tiers win. */
.k-panel:has(.k-rail-blade) {
  flex-basis: var(--k-blade-w);
  width: var(--k-blade-w);
}
.k-panel[data-k-panel-ready]:not([hidden]):has(.k-rail-blade) {
  animation: k-blade-in 220ms cubic-bezier(0.2, 0, 0, 1);
}
.k-workarea:has(> .k-panel:not([hidden]) .k-rail-blade) > .k-aside-rail,
.k-workarea:has(> .k-panel[data-k-panel-closing] .k-rail-blade) > .k-aside-rail {
  z-index: 61;
}
.k-workarea:has(> .k-panel:not([hidden]) .k-rail-blade),
.k-workarea:has(> .k-panel[data-k-panel-closing] .k-rail-blade) {
  overflow-x: clip;
}
.k-panel[hidden][data-k-panel-closing]:has(.k-rail-blade) {
  display: flex;
  animation: k-blade-out 180ms cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .k-panel[data-k-panel-ready]:not([hidden]):has(.k-rail-blade) { animation: none; }
  .k-panel[hidden][data-k-panel-closing]:has(.k-rail-blade) { display: none; }
}
@media (max-width: 1439px) {
  .k-panel:has(.k-rail-blade) {
    top: var(--k-bar-h);
    right: var(--k-aside-rail-w);
  }
  .k-workarea:has(> .k-panel:not([hidden]) .k-rail-blade) > .k-panel-scrim {
    top: var(--k-bar-h);
    right: var(--k-aside-rail-w);
    width: auto;
  }
}
@media (max-width: 899px), (max-width: 1279px) and (pointer: coarse) {
  .k-panel:has(.k-rail-blade) { right: 0; }
  .k-workarea:has(> .k-panel:not([hidden]) .k-rail-blade) > .k-panel-scrim {
    right: 0;
    width: 100%;
  }
}
@media (max-width: 599px) {
  .k-panel:has(.k-rail-blade) {
    top: 0;
    left: 0;
    right: 0;
    width: auto;
  }
  .k-workarea:has(> .k-panel:not([hidden]) .k-rail-blade) > .k-panel-scrim { top: 0; }
}
/* The rail blade's link while its blade is open: More actions' entry as the
   rail's button (the rail's is .k-aside-rail__btn[aria-current], slice 1a). */
.k-bar-more__link[aria-current="true"],
.k-bar-more__link[aria-current="true"]:hover { background: var(--k-ok-bg); color: var(--k-ok-fg); }
.k-bar-more__link[aria-current="true"] svg { color: var(--k-ok-fg); }

/* 4.3c-3 An open panel's own rail actions (Judd's walk of 10 November 2026):
   the rail's slot (#k-rail-panel-actions, ui/components/aside_rail.html) is
   empty on every page and takes no room; the editable work-item panel sends
   its Details, Tags, Description and Custom fields into it out of band
   (ui/components/panel_rail_actions.html), drawn as the page's section buttons.
   While that panel is open it is a sheet left of the rail from 600 to 1439
   px where the rail is drawn, as the tools blade is, so the actions stay
   usable; at the page's edge in the drawer and tab-bar tiers, where the
   panel draws the same links as a segmented row at its head instead. */
.k-aside-rail__slot:empty { display: none; }
.k-item-panel__sections--narrow { display: none; }
.k-workarea:not(:has(> .k-aside-rail)) .k-item-panel__sections--narrow { display: block; }
.k-workarea:has(> .k-panel:not([hidden]) .k-item-panel[data-k-item-sections]) > .k-aside-rail {
  z-index: 61;
}
@media (max-width: 1439px) {
  .k-panel:has(.k-item-panel[data-k-item-sections]) {
    top: var(--k-bar-h);
    right: var(--k-aside-rail-w);
  }
  .k-workarea:has(> .k-panel:not([hidden]) .k-item-panel[data-k-item-sections]) > .k-panel-scrim {
    top: var(--k-bar-h);
    right: var(--k-aside-rail-w);
    width: auto;
  }
}
@media (max-width: 899px), (max-width: 1279px) and (pointer: coarse) {
  .k-panel:has(.k-item-panel[data-k-item-sections]) {
    top: 0;
    right: 0;
  }
  .k-workarea:has(> .k-panel:not([hidden]) .k-item-panel[data-k-item-sections]) > .k-panel-scrim {
    top: 0;
    right: 0;
    width: 100%;
  }
  .k-item-panel__sections--narrow { display: block; }
}

/* Inside a rail blade (320 px; nothing scrolls sideways): the pick, the
   quick-add rows stacked — the summary and the owner each on their own line,
   then the due date beside ↵ — "Created here" / "Added here" (not drawn while
   empty) and the open actions, each the Work home's row with its due date
   under the title. */
.k-rail-blade { display: flex; flex-direction: column; min-width: 0; }
.k-rail-blade__region { min-width: 0; }
.k-rail-blade__pick .k-field:last-of-type { margin-bottom: 0; }
.k-rail-blade__pick .k-field-input { width: 100%; max-width: 100%; }
.k-rail-blade__apply { margin-top: 12px; }
.k-rail-blade__made:not(:has(li)) { display: none; }
.k-rail-blade__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.k-rail-blade__made-row { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.k-rail-blade__made-link { display: flex; gap: 6px; min-width: 0; font-size: var(--k-fs-row); }
.k-rail-blade__made-key { flex: 0 0 auto; font-weight: 600; }
.k-rail-blade__made-title { min-width: 0; overflow-wrap: anywhere; }
.k-rail-blade__more { font-size: var(--k-fs-meta); font-weight: 600; }
.k-rail-blade__counts { margin: 0 0 4px; }
.k-rail-blade__actions { list-style: none; margin: 0; padding: 0; }
.k-rail-blade__actions > li + li { border-top: 1px solid var(--k-divider); }
.k-rail-blade__actions .k-my-action { padding: 10px 0; }
.k-rail-blade__actions .k-my-action__main { flex: 1 1 0; }
.k-rail-blade__actions .k-my-action__due { flex: 1 1 100%; padding-left: 44px; }
.k-quickadd--blade { margin-top: 12px; }
.k-quickadd--blade .k-quickadd__fields .k-quickadd__summary,
.k-quickadd--blade .k-quickadd__fields .k-quickadd__assignee { flex: 1 1 100%; min-width: 0; }
.k-quickadd--blade .k-quickadd__fields .k-quickadd__due { flex: 1 1 0; min-width: 0; }
/* Raise a request's row (Judd's ruling RB4, 31 October 2026): "What do you
   need?" on its own line, then the one-line Details beside the save button. */
.k-quickadd--blade .k-quickadd__fields .k-quickadd__details { flex: 1 1 0; min-width: 0; }
.k-quickadd--blade:not(:has([data-k-quickadd-row])) [data-k-quickadd-cancel] { display: none; }
.k-quickadd--blade .k-quickadd__open { margin-right: auto; }

/* 4.3d The wizard (Phase 21 slice 1b, design note §5; ruling 12;
   kairos.ui.wizard; frames C, C2, D and G2): a stage strip, the answers so
   far, the question, its choices as link rows, then Back and Cancel. The
   same markup in the panel and on a step's own page. */
.k-wizard__head { padding-bottom: 0; border-bottom: 0; }
.k-wizard__stages {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.k-wizard__stage {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--k-fs-meta);
  color: var(--k-muted);
  white-space: nowrap;
}
.k-wizard__stage + .k-wizard__stage { flex: 1 1 auto; }
.k-wizard__stage + .k-wizard__stage::before {
  content: "";
  flex: 1 1 16px;
  min-width: 12px;
  height: 1px;
  margin-right: 2px;
  background: var(--k-control);
}
.k-wizard__dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: var(--k-r-pill);
  background: var(--k-divider);
  border: 1px solid var(--k-control);
}
.k-wizard__stage--done .k-wizard__dot,
.k-wizard__stage--current .k-wizard__dot { background: var(--k-brand); border-color: var(--k-brand); }
.k-wizard__stage--skipped .k-wizard__dot { background: var(--k-surface); border-color: var(--k-brand); }
.k-wizard__stage--done,
.k-wizard__stage--skipped { color: var(--k-text-2); }
.k-wizard__stage--current { color: var(--k-text); font-weight: 600; }
.k-wizard__stage-note { color: var(--k-muted); font-weight: 400; }
/* Below 600 px the strip has about 320 px: "Workspace (only one)" pushed
   "Details" onto a second line. The visible "(only one)" goes; the hollow
   dot still marks the step, the answer row below still says "Only one you
   can use", and the visually hidden ", skipped: …" keeps it in the
   accessible text (slice 1b stage 5). */
@media (max-width: 599px) {
  .k-wizard__stage-note { display: none; }
}
.k-wizard__answer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: var(--k-r-box);
  background: var(--k-surface-2);
  font-size: var(--k-fs-row);
}
.k-wizard__answer-stage { color: var(--k-muted); font-size: var(--k-fs-meta); }
.k-wizard__answer-value { min-width: 0; font-weight: 600; color: var(--k-text); overflow-wrap: anywhere; }
.k-wizard__change,
.k-wizard__answer-note { margin-left: auto; }
.k-wizard__answer-note { color: var(--k-muted); font-size: var(--k-fs-meta); }
.k-wizard__title { margin: 0 0 4px; font-size: var(--k-fs-panel); font-weight: 600; line-height: 1.3; color: var(--k-text); }
.k-wizard__lede { margin: 0 0 12px; font-size: var(--k-fs-row); color: var(--k-muted); }
.k-wizard__group { margin: 16px 0 8px; }
.k-wizard__empty { margin: 8px 0 0; font-size: var(--k-fs-body); color: var(--k-text-2); }
.k-choices {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-card);
  background: var(--k-surface);
  overflow: hidden;
}
.k-choices > li + li { border-top: 1px solid var(--k-divider); }
.k-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 12px 14px;
  color: var(--k-text);
}
.k-choice:hover { background: var(--k-surface-2); text-decoration: none; }
.k-choice:focus-visible { outline: 2px solid var(--k-brand); outline-offset: -2px; }
.k-choice__icon {
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--k-r-item);
  background: var(--k-neutral-bg);
  color: var(--k-neutral-fg);
}
.k-choice__icon svg { width: 18px; height: 18px; }
.k-choice__icon--success { background: var(--k-ok-bg); color: var(--k-ok-fg); }
.k-choice__icon--warning { background: var(--k-warn-bg); color: var(--k-warn-fg); }
.k-choice__icon--error { background: var(--k-bad-bg); color: var(--k-bad-fg); }
.k-choice__icon--info { background: var(--k-info-bg); color: var(--k-info-fg); }
.k-choice__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.k-choice__label { font-size: var(--k-fs-body); font-weight: 600; overflow-wrap: anywhere; }
.k-choice__meta { font-size: var(--k-fs-meta); color: var(--k-muted); }
.k-choice__chevron { flex: 0 0 auto; display: inline-flex; color: var(--k-faint); }
.k-choice__chevron svg { width: 16px; height: 16px; }
.k-wizard__foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.k-wizard__back,
.k-wizard__cancel,
.k-wizard__change {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--k-r-pill);
  color: var(--k-ok-fg);
  font-size: var(--k-fs-row);
  font-weight: 600;
}
.k-wizard__change { padding: 0 4px; min-height: 0; }
.k-wizard__back:hover,
.k-wizard__cancel:hover { background: var(--k-surface-2); text-decoration: none; }
.k-wizard__cancel { margin-left: auto; }
@media (max-width: 599px), (pointer: coarse) {
  .k-wizard__back,
  .k-wizard__cancel { min-height: 44px; }
  .k-wizard__change { min-height: 44px; padding: 0 8px; }
}

/* The progress line (DL §10; design note §4): 2 px of brand under the bar
   while a request kairos.js counts as the reader's own is loading into
   #k-main or #k-panel — the region it targets carries aria-busy="true" —
   and never for a background poll. With reduced motion it is static (the
   htmx loading indicator's reduced-motion block, under Utilities). */
.k-progress-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--k-brand);
  transform-origin: left;
  transform: scaleX(0);
  opacity: 0;
  pointer-events: none;
}
.k-app:has(#k-main[aria-busy="true"], #k-main [aria-busy="true"], #k-panel[aria-busy="true"], #k-panel [aria-busy="true"]) .k-progress-line {
  opacity: 1;
  transform: scaleX(.8);
  transition: transform 1.2s ease-out;
}

/* Bottom tab bar (<600px) */
.k-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--k-sidebar);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.k-tabbar-list {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}
.k-tabbar-list > li { flex: 1 1 0; min-width: 0; }
.k-tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 2px 9px;
  width: 100%;
  color: rgba(255,255,255,.78);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.k-tabbar-item svg { width: 20px; height: 20px; }
.k-tabbar-item.is-active { color: #ffffff; }
.k-tabbar-item:hover { text-decoration: none; color: #ffffff; }
/* More is a native <details> (Phase 18 Wave 2): its summary is drawn as a
   tab, without the disclosure triangle, and its panel floats above the bar. */
.k-tabbar-more-menu { position: static; }
.k-tabbar-more-menu > summary { list-style: none; }
.k-tabbar-more-menu > summary::-webkit-details-marker { display: none; }
.k-tabbar-more-menu[open] > summary { color: #ffffff; }
.k-tabbar-more {
  position: fixed;
  right: 8px;
  bottom: 58px;
  z-index: 51;
  min-width: 180px;
  background: var(--k-surface);
  border-radius: var(--k-r-box);
  box-shadow: var(--k-shadow-overlay);
  padding: 6px;
}
.k-tabbar-more a {
  display: flex;
  align-items: center;
  gap: 10px;
  /* A 44 px target (WCAG 2.2 2.5.8, ruling 25). */
  min-height: 44px;
  box-sizing: border-box;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--k-text);
  font-size: 13px;
  font-weight: 600;
}
.k-tabbar-more a:hover { background: var(--k-surface-2); text-decoration: none; }
.k-tabbar-more a.is-active { background: var(--k-selected); color: var(--k-brand); }
.k-tabbar-more svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   §3.4 Responsive behaviour
   -------------------------------------------------------------------------- */

/* The navigation's three tiers (§3.4, as amended 12 and 15 October 2026).
   Each tier's query also sets --k-nav-tier, which ui/kairos.js reads, so the
   script never repeats a breakpoint.

   The sidebar tier — from 1280 px, and from 900 px with a mouse: the
   navigation stays expanded at --k-sidebar-w by default, and a person's own
   collapse preference is honoured (ruling 28). Its collapse rules are the
   block in 4.1a above; it needs nothing here.

   The drawer tier — 600–899 px, and a touch screen (pointer: coarse) from
   600 to 1279 px, so an iPad in either orientation (ruling 46 Q3): one
   drawer holds the whole navigation, opened from the top bar. A desktop
   window at 900–1279 px keeps the sidebar. With scripting off, ui/nojs.css
   puts the navigation in the page instead, under the same query. */
@media (min-width: 600px) and (max-width: 899px), (min-width: 600px) and (max-width: 1279px) and (pointer: coarse) {
  :root { --k-nav-tier: drawer; }
  .k-rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    height: auto;
    width: var(--k-sidebar-w);
    transform: translateX(-100%);
    transition: transform .18s ease;
    z-index: 46;
  }
  .k-app.k-drawer-open .k-rail {
    transform: translateX(0);
    box-shadow: var(--k-shadow-overlay);
  }
  .k-app.k-drawer-open .k-scrim { display: block; }
  .k-rail-toggle { display: none; }
  .k-drawer-toggle { display: inline-flex; }
}

/* 600–899px: tables scroll with a sticky first column. By width alone — a
   table's fit is the width it has, not the pointer (Wave 3's W2 decides the
   900 px-and-up fit). */
@media (min-width: 600px) and (max-width: 899px) {
  .k-table-scroll { overflow-x: auto; }
  .k-table-scroll table { min-width: 640px; }
  .k-table th:first-child,
  .k-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--k-surface);
  }
  .k-table thead th:first-child { background: var(--k-surface-2); }
  .k-table tbody tr:hover td:first-child { background: var(--k-surface-2); }
  .k-table tbody tr.is-selected td:first-child { background: var(--k-selected); }
}

/* From 600 px, wherever a table scrolls sideways (Phase 18 Wave 3 repairs):
   its first column stays in view — the row checkbox, and on a selectable
   table the key beside it, so a scrolled row still says which item it is.
   kairos.js marks a box that overflows (.is-scrolling-x) and gives the key
   its offset, the checkbox column's measured width (--k-table-check-w); a
   table that fits is never marked and is drawn exactly as before. That
   covers a mouse at 1024 px with the sidebar open (reading (g)), a saved
   column choice wider than the screen, and the 600–899 px tier above, which
   keeps its width-only rule for scripting off. W2's fold-to-fit runs first,
   so a folded table that fits is not marked; below 600 px the stacked cards
   replace the table. */
@media (min-width: 600px) {
  .k-table-scroll.is-scrolling-x .k-table th:first-child,
  .k-table-scroll.is-scrolling-x .k-table td:first-child,
  .k-table-scroll.is-scrolling-x .k-table .k-table-check + .k-col--key {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--k-surface);
  }
  .k-table-scroll.is-scrolling-x .k-table .k-table-check + .k-col--key { left: var(--k-table-check-w, 50px); }
  .k-table-scroll.is-scrolling-x .k-table thead th:first-child,
  .k-table-scroll.is-scrolling-x .k-table thead .k-table-check + .k-col--key { background: var(--k-surface-2); }
  .k-table-scroll.is-scrolling-x .k-table tbody tr:hover :is(td:first-child, .k-table-check + .k-col--key) { background: var(--k-surface-2); }
  .k-table-scroll.is-scrolling-x .k-table tbody tr.is-selected :is(td:first-child, .k-table-check + .k-col--key) { background: var(--k-selected); }
}

/* <600px: rail becomes a bottom tab bar; tables render as stacked cards;
   slide-overs go full screen */
@media (max-width: 599px) {
  :root { --k-nav-tier: tabbar; }
  /* The phone's menu button opens the same drawer as the 600–899 px tier
     (Judd, 8 November 2026): the whole rail slides in over the page and the
     tab bar, so each module's sub-pages are reachable. It sits above the
     tab bar (z-index 50) through the two phone tokens. */
  .k-rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    height: auto;
    width: min(var(--k-sidebar-w), calc(100vw - 56px));
    transform: translateX(-100%);
    transition: transform .18s ease;
    z-index: var(--k-z-phone-drawer);
  }
  .k-app.k-drawer-open .k-rail {
    transform: translateX(0);
    box-shadow: var(--k-shadow-overlay);
  }
  .k-scrim { z-index: var(--k-z-phone-scrim); }
  .k-app.k-drawer-open .k-scrim { display: block; }
  .k-drawer-toggle { display: inline-flex; }
  .k-tabbar { display: block; }
  .k-page { padding-bottom: 88px; }
  /* The fixed tab bar never hides focus (WCAG 2.2 2.4.11, ruling 25): the
     page reserves its height at the bottom (the padding above), and anything
     scrolled into view — a focused control, a fragment target — stops short
     of the bar by its height and a margin. The bar is 59 px tall plus the
     device's safe area. */
  html { scroll-padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 16px); }
  /* The context bar on a phone (ruling 5; design note §2, frame G): search
     is an icon here too — the always-visible search row retired — and the
     bar shows the breadcrumb's current item only, at 15/600, then search,
     the bell and the page's actions. The trail stays reachable through the
     page and the tab bar. The pill, opened, spans the bar; the "Esc" hint —
     a key a phone has none of — goes. A secondary page action that carries
     an icon is drawn as that icon (its words stay its accessible name), and
     a record's Actions menu as "⋯", so a record's bar fits 360 px. */
  .k-topbar { gap: 4px; padding: 0 12px; }
  .k-crumbs li:not(:last-child) { display: none; }
  .k-crumbs li + li::before { content: none; }
  .k-crumbs [aria-current="page"] { font-size: var(--k-fs-card); }
  .k-topbar.is-searching .k-search {
    position: absolute;
    left: 12px;
    right: 12px;
    z-index: 1;
    width: auto;
    max-width: none;
  }
  .k-topbar.is-searching .k-breadcrumbs { visibility: hidden; }
  /* On the results page the pill is the page's own, open from the start: it
     takes the breadcrumb's room in the row instead, so the bell stays. */
  .k-topbar[data-k-search-pinned] .k-search {
    position: relative;
    left: auto;
    right: auto;
    flex: 1 1 auto;
  }
  .k-topbar[data-k-search-pinned] .k-breadcrumbs { display: none; }
  .k-search input[type="search"] { padding-right: 12px; }
  .k-search-kbd { display: none; }
  .k-bar-divider { display: none; }
  .k-topbar-action { gap: 4px; }
  /* Square: the 16 px icon and 14 px each side, the 18 px glyph and 13 —
     as wide as the 44 px height the touch rule below gives them. */
  .k-topbar .k-topbar-action > .k-btn--secondary:has(svg) {
    padding: 0 14px;
    gap: 0;
    font-size: 0;
  }
  .k-topbar .k-actions-trigger--bar {
    padding: 0 13px;
    gap: 0;
  }
  .k-topbar .k-actions-trigger--bar .k-actions-trigger-label,
  .k-topbar .k-actions-trigger--bar > svg:not(.k-actions-trigger-glyph) { display: none; }
  .k-topbar .k-actions-trigger--bar .k-actions-trigger-glyph { display: block; width: 18px; height: 18px; transform: none; }

  .k-table-scroll { display: none; }
  .k-table-cards { display: flex; }

  .k-slideover-panel {
    width: 100vw !important;
    max-width: none !important;
  }
  .k-toast-region { left: 12px; right: 12px; bottom: 76px; align-items: stretch; }
}

/* Touch targets (§3.3 as amended 15 October 2026, ruling 46 C): the 44 px
   minimum Phase 18 built below 600 px applies wherever the main pointer is
   coarse, at any width. Every 44 px rule in this file sits under this one
   query, "(max-width: 599px), (pointer: coarse)", so a narrow mouse window
   keeps exactly what it had and a touch screen gets the same at every width;
   rules only a touch screen needs (the navigation, a table's row controls)
   are under "(pointer: coarse)" alone, in 5.9 near the end of the file. With
   a mouse, nothing here applies above 599 px.

   The context bar's targets (§3.4, C11; Phase 21 slice 1b): the search
   icon and its pill, the bell, the page actions and the breadcrumb trail's
   links; and the drawer's toggle, which shows only in the drawer tier. A
   trail link stays a block so a long one still ellipsises. */
@media (max-width: 599px), (pointer: coarse) {
  .k-search input[type="search"] { min-height: 44px; }
  .k-bar-btn,
  .k-bell-btn { width: 44px; height: 44px; }
  .k-topbar-action .k-btn { min-height: 44px; }
  .k-crumbs li > a { display: block; min-height: 44px; line-height: 44px; }
  .k-crumbs li > a { min-width: 44px; text-align: center; }
  .k-drawer-toggle { width: 44px; height: 44px; }
  /* The panel's close control (Phase 21 slice 1b, 4.3b). */
  .k-panel__close { width: 44px; height: 44px; }
}

/* ≥600px: stacked-card rendering hidden, real table shown */
@media (min-width: 600px) {
  .k-table-cards { display: none; }
}

/* --------------------------------------------------------------------------
   5. Components — §3.3
   -------------------------------------------------------------------------- */

/* k-card ------------------------------------------------------------------
   Restyled in place to the design language in Phase 21 slice 2 (DL §5.4 and
   §9): radius 12, a 1 px --k-border border and no drop shadow. Only those
   properties move. The padding stays, because the card holds its content
   directly (the DL's head and body padding arrive with the first card built
   in the DL's head-and-body structure), and there is no overflow: hidden,
   which would clip the combobox, Actions and due-chip popovers that hang
   out of dozens of cards. */
.k-card {
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-card);
  padding: 18px 20px;
}
.k-card > .k-heading { margin-bottom: 8px; }



/* Card grids (Phase 18 Wave 3, W6): the cards — a
   module landing's register cards, the Work home's team cards, the Helpdesk
   home's workspace cards, the workspace overview's epics, the reports index
   and the Governance landing's compact cards. They fill their
   row up to six across: each track at least 240 px (the whole row on a phone)
   and at least a sixth of the row, unused tracks folded away. A card holds
   words, though, and one or two of them stretched across a 2,560 px screen
   read as a banner with its numbers a metre from their labels, so one card,
   or two, stop at a third of the row each — or 560 px, if that is more — and
   sit on the left; the board's one- and two-column rule (W3) is the same.
   Three or more always fill. In a row
   narrower than 840 px (an iPad in portrait, a 1024 px window), where 560 px
   would leave a strip too narrow to mean anything, the cap is the whole row:
   the clamp's last term is hugely positive below 840 px and hugely negative
   above it, the four-tile rule's trick. */
.k-card-grid {
  --k-grid-gap: 14px;
  --k-card-cap: max((100% - 2 * var(--k-grid-gap)) / 3, min(100%, 560px + max(0px, (840px - 100%) * 999)));
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(max(min(100%, 240px), (100% - 5 * var(--k-grid-gap)) / 6), 1fr));
  gap: var(--k-grid-gap);
}
@media (min-width: 600px) {
  .k-card-grid:has(> :only-child) {
    --k-card-cap: max((100% - 2 * var(--k-grid-gap)) / 3, min(100%, 560px + max(0px, (840px - 100%) * 999)));
    grid-template-columns: minmax(0, var(--k-card-cap));
  }
  .k-card-grid:has(> :nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, var(--k-card-cap)));
  }
}

/* A card rendered as <a href> (``k_card ... href=``) rather than <article> —
   a card that leads somewhere. */
.k-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: border-color 120ms ease;
}
.k-card--link:hover { border-color: var(--k-control); }
.k-card--link:focus-visible {
  outline: 2px solid var(--k-brand);
  outline-offset: 2px;
}

/* The page never scrolls sideways (§3.4; Phase 18 Wave 1 walk) ------------- */
/* A closed popover takes no layout. A browser renders nothing of a closed
   <details> but its summary, yet Chromium still lays the rest out, so a
   closed chip popover, ⓘ bubble or menu panel hanging off a control near the
   right edge widened the page by its own width — 163 px on the items list at
   768 px with scripting off. Every popover-shaped <details> is named here:
   the filter bar's chips and Columns, ⓘ notes and bubbles and the fact chips
   ([data-k-popover]), and the Actions, row and "More moves" menus
   (.k-actions). A blade or a disclosure is not: its closed body stays in the
   layout, so the browser's find-in-page can still reach it. */
details[data-k-popover]:not([open]) > :not(summary),
details.k-actions:not([open]) > :not(summary) {
  display: none;
}
/* A popover that would run past the viewport's right edge hangs from its
   trigger's right edge instead: ui/kairos.js measures it as it opens and sets
   .k-popover-end (the assignee combobox at 768 px ran to 776). */
details.k-popover-end > :not(summary) {
  left: auto;
  right: 0;
}
/* A wide table or matrix scrolls inside its own box, never the page. The box
   is positioned, so an absolutely positioned descendant — a visually hidden
   label, a closed menu's panel — is clipped by it rather than escaping to
   widen the page (the admin lists' "Actions" header label did, 106 px at
   768 px with scripting off; the board's card labels, 19 px). .k-scroll-x is
   the same box for a table that is not a k_table, which stays a table at
   every width: the risk matrix, the heat map, an import's preview and report.
   The other scrolling strips, the tab row and the board, are positioned for
   the same reason. */
.k-table-scroll,
.k-scroll-x {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
}
.k-tabs,
.k-board { position: relative; }

/* k-table ------------------------------------------------------------------ */
/* A table wider than its card scrolls inside the card, at every width, rather
   than widening the page (C1: one-line cells make a many-column register
   wider than a laptop screen). */
.k-table-scroll { overflow-x: auto; }
/* A header filter's popover hangs below the header band, and a scrolling box
   clips what overflows it, so on a page of one or two rows the box grows while
   a popover is open rather than hiding the control. */
.k-table-scroll:has(.k-th-popover:not([x-cloak]):not([style*="display: none"])) {
  min-height: 300px;
}
/* The table's card and the table, restyled in place to the design language
   in Phase 21 slice 2 (DL §5.4, §5.5 and §9): the card is radius 12 with a
   1 px --k-border border and no drop shadow; the header band is 11/600
   uppercase --k-muted on --k-surface-2; a cell is 13 px with 12 px side
   padding, the first and last 20 px from the card's edge. The vertical
   padding is not the design language's (cells 9, header 12) but ruling 16
   (21 October 2026): 7.5 px on a cell and 6 px on the header band, so a
   mouse row is 40 px and the band about 32 px and the items table and the
   queue keep 15 rows in the first screen at 1440 x 900; a touch screen's
   44-45 px rules, in 5.9, are unchanged. Hover is
   --k-surface-2 and every row state (hover, ticked, and the sticky first, key
   and quick-view cells, which must repeat it) reads --k-selected for a ticked
   row. The DL draft's min-width: 960px is not taken: the fit-to-screen rules
   below and spec §3.4's tiers decide when a table scrolls. The overflow is
   as before, and opens while a row menu is open (below). */
.k-table-wrap {
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-card);
  overflow: hidden;
}
.k-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--k-fs-row);
  line-height: 18px;
  color: var(--k-text);
}
.k-table caption {
  text-align: left;
  padding: 14px 16px 4px;
  font-weight: 600;
  font-size: 15px;
  line-height: 20px;
  color: var(--k-text);
}
.k-table thead th {
  background: var(--k-surface-2);
  border-bottom: 1px solid var(--k-divider);
  padding: 6px 12px;
  text-align: left;
  font-weight: 600;
  font-size: var(--k-fs-label);
  line-height: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--k-muted);
  white-space: nowrap;
}
.k-table td {
  padding: 7.5px 12px;
  border-bottom: 1px solid var(--k-divider);
  vertical-align: middle;
}
.k-table th:first-child,
.k-table td:first-child { padding-left: 20px; }
.k-table th:last-child,
.k-table td:last-child { padding-right: 20px; }
.k-table tbody tr:last-child td { border-bottom: 0; }
.k-table tbody tr:hover { background: var(--k-surface-2); }
.k-table tbody tr.is-selected { background: var(--k-selected); }
.k-table tbody tr.is-selected:hover { background: var(--k-selected); }
/* An items-table cell that opens its editor in place (ED2, Judd 9 November
   2026): the button looks like the plain cell and fills it, so the whole cell
   is the hit area and a click there never selects the row. The negative
   margins cancel the cell's own padding (7.5px 12px, above). */
.k-table td > .k-cell-edit,
.k-table td > .k-cell-clip > .k-cell-edit {
  display: block;
  width: calc(100% + 24px);
  margin: -7.5px -12px;
  padding: 7.5px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  /* A button's own user-agent style does not wrap; the cell's text must, or
     the button widens the table beyond the plain content. Inherit the cell's
     white-space so k-col--date, --nowrap, --person and --pill columns keep
     their nowrap (a td computes normal elsewhere, so other cells still wrap). */
  white-space: inherit;
  overflow-wrap: inherit;
  word-break: inherit;
  min-width: 0;
  max-width: none;
}
.k-table td > .k-cell-edit:hover,
.k-table td > .k-cell-clip > .k-cell-edit:hover { background: var(--k-selected); }
.k-table td > .k-cell-edit:focus-visible,
.k-table td > .k-cell-clip > .k-cell-edit:focus-visible {
  outline: 2px solid var(--k-brand);
  outline-offset: -2px;
  background: var(--k-selected);
}
/* The one host a cell's control is drawn into; kairos.js unhides it and sets
   its left and top under the cell. Above the sheet and rail (z-index 61). */
.k-cell-editor {
  position: fixed;
  z-index: 70;
  min-width: 220px;
  max-width: calc(100vw - 16px);
  overflow: visible;
  padding: 8px;
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-box);
  box-shadow: var(--k-shadow-overlay);
}
.k-cell-editor[hidden] { display: none; }
/* Open, a chip's (or the State menu's) panel sits in the host's own flow, so
   the host is sized to it and never scrolls: no inner scroll bars. */
.k-cell-editor details[data-k-popover] > :not(summary),
.k-cell-editor details.k-actions > .k-actions-panel {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  width: auto;
  max-height: none;
  overflow: visible;
  margin: 6px 0 0;
  box-shadow: none;
}
.k-cell-editor .k-more-moves { display: block; width: auto; }
.k-table .is-numeric { text-align: right; font-variant-numeric: tabular-nums; }
.k-table thead th.is-numeric { text-align: right; }
.k-table-cell-secondary {
  display: block;
  font-weight: 300;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-muted);
}
.k-table-rowlink { color: var(--k-text); font-weight: 600; }
/* A table inside a card body or the panel, which already pad it: no extra
   side padding, header labels may wrap and long names break, so it never
   scrolls sideways (Phase 25 slice 4, the attendance lists). */
.k-table--inset th:first-child,
.k-table--inset td:first-child { padding-left: 0; }
.k-table--inset th:last-child,
.k-table--inset td:last-child { padding-right: 0; }
.k-table--inset thead th { white-space: normal; }
.k-table--inset td { overflow-wrap: anywhere; }
/* The OFIs already raised from a record, in the 320 px panel (Judd, 13 November 2026):
   Key, the statement (one line, an ellipsis, with raised and owner as a muted line
   under it) and State, so it never scrolls sideways. The title keeps no minimum: the
   selectors carry two classes so they beat the later `.k-table .k-col--title` (260 px)
   and the narrow-width rules (200 px), the table is fixed-layout so Key and State keep
   their widths, and the title link ends in an ellipsis (its title attribute has the
   whole statement). */
.k-table.k-table--record-ofis { width: 100%; table-layout: fixed; }
.k-table.k-table--record-ofis .k-col--key { width: 72px; }
.k-table.k-table--record-ofis th:last-child,
.k-table.k-table--record-ofis td:last-child { width: 96px; white-space: nowrap; }
.k-table.k-table--record-ofis .k-col--title { width: auto; min-width: 0; max-width: none; }
.k-table.k-table--record-ofis .k-title-link {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.k-table--record-ofis .k-table-cell-secondary { white-space: normal; }

/* Column kinds (C1) — one CSS contract per kind, named on each <th>/<td> as
   k-col--<kind> by k_table. Every cell is one line, the title included (it
   ends in an ellipsis), so a row stays about 40 px and fifteen fit a 1440×900
   screen. */
.k-table .k-col--key {
  width: 80px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.k-key {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--k-muted);
}
/* S2-P6a: the Controls table's Protects column (kind key). */
.k-protects-link { text-decoration: none; }
.k-protects-link:hover { color: var(--k-text); text-decoration: underline; }
.k-protects-more { color: var(--k-muted); }
/* At least 260 px, and the column that takes the table's slack: every other
   kind is one line, so the title is the one that grows. max-width: 0 stops a
   long unbroken title widening the column; width and min-width still win. */
.k-table .k-col--title {
  width: 100%;
  min-width: 260px;
  max-width: 0;
}
/* A table of ten or more columns is wider than a laptop screen and scrolls in
   its card whatever the title does, so there the title keeps 360 px and fewer
   titles are cut short — a narrower title would buy no width back. */
.k-table--wide .k-col--title { min-width: 360px; }
.k-title-cell {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
/* One line ending in an ellipsis (Judd, 13 October 2026), so a row stays about
   40 px and fifteen fit a 1440×900 screen; the full title is in the cell's
   title attribute and in the quick view. */
.k-title-link,
.k-title-text {
  line-height: 16px;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.k-table .k-col--person { white-space: nowrap; }
.k-person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  vertical-align: middle;
}
.k-col--person .k-person { max-width: 190px; }
.k-person > .k-avatar { flex: 0 0 auto; }
/* The assignee chip's avatar, apart from the name so the name is the chip's
   visible text (WCAG 2.5.3); absent when nobody is assigned. */
.k-fact-avatar { display: inline-flex; flex: 0 0 auto; }
.k-fact-avatar:empty { display: none; }
.k-person-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.k-table .k-col--date { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Column option ``nowrap`` (k_table): the cell stays on one line, whatever its
   kind. k_table sets it on every column of no kind too, so the title is the
   one column that flexes and nothing beside it is squashed (DL §5.1). A
   caption under the cell (a list's description) still wraps, at the width
   the one-line text gives the column. */
.k-table .k-col--nowrap { white-space: nowrap; }
.k-table .k-col--nowrap .k-table-cell-secondary { white-space: normal; }
/* Column option ``wrap`` (k_table): prose or a run of lines that must be read
   whole — a rule's sentence, a history entry's changes. It wraps, and keeps
   240 px (the width ``clip`` cuts at), so a title beside it cannot squash it
   to one word a line. Its header stays one line. */
.k-table .k-col--wrap { min-width: 240px; }
.k-table td.k-col--wrap { white-space: normal; }
/* Overdue: error-toned text after a 6 px dot, not a stacked pill. The word
   "overdue" is in the cell as visually hidden text, so colour is never the
   only signal. */
.k-date.is-overdue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--k-bad-fg);
  font-weight: 600;
}
.k-date.is-overdue::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--k-bad-fg);
}
/* Due soon (the one rule, kairos.core.due): amber text, a date cell asked
   to be ``due``; the muted date stays the default. */
.k-date.is-soon { color: var(--k-warn-fg); font-weight: 600; }
.k-table .k-col--pill { white-space: nowrap; }
.k-table .k-col--number {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* A free-text cell (a custom field) stays on one line, clipped with an
   ellipsis at 240 px; the full text is in its title attribute. */
.k-cell-clip {
  display: block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* A clipped cell that edits in place (U38, Phase 33): the button inside the
   clip is the whole-cell hit area, so its negative margins must not be cut off;
   the clip moves from the wrapper onto the button, which still ends in an
   ellipsis at the same width. */
.k-table td > .k-cell-clip:has(> .k-cell-edit) { overflow: visible; }
.k-table td > .k-cell-clip > .k-cell-edit {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* A cell's list that may run long — the workflow list's workspaces under
   its Item types count (Phase 18 Wave 3 repairs): it wraps, stops at two
   lines and 24em, and the whole list is in its title attribute. Without it
   one 390-character run in a one-line column widened /workflows/ to
   2,649 px. The max-width also caps what the column asks of the table. */
.k-table .k-cell-lines {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  max-width: 24em;
  white-space: normal;
}

/* Inline cell content that must stay on one line (a pill beside a pill). */
.k-row--nowrap { flex-wrap: nowrap; }

/* The item-type marker (C2): a 16 px tinted square holding a 12 px icon from
   the work-type set, before the title. Tinted by the type's semantic colour
   token; neutral when it has none. */
.k-type-marker {
  display: inline-flex;
  flex: 0 0 16px;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 4px;
  background: var(--k-page);
  box-shadow: inset 0 0 0 1px var(--k-border);
  color: var(--k-muted);
}
.k-type-marker svg { width: 12px; height: 12px; }
.k-type-marker--success { background: var(--k-ok-bg); box-shadow: none; color: var(--k-ok-fg); }
.k-type-marker--warning { background: var(--k-warn-bg); box-shadow: none; color: var(--k-warn-fg); }
.k-type-marker--error   { background: var(--k-bad-bg);   box-shadow: none; color: var(--k-bad-fg); }
.k-type-marker--info    { background: var(--k-info-bg);    box-shadow: none; color: var(--k-info-fg); }

/* The quick view (C2): a trailing eye button, a real link to the record that
   carries the peek trigger. In the DOM and the tab order on every row; shown
   on row hover and whenever focus is within the row — the one stated exception
   to "nothing appears only on hover", because a click on the row body is the
   pointer and touch route to the same view. Always shown where there is no
   hover at all. */
.k-table .k-col--quickview {
  position: sticky;
  right: 0;
  width: 40px;
  padding-left: 4px;
  padding-right: 10px;
  text-align: right;
  background: var(--k-surface);
}
/* Stays at the right edge of a table wider than its card, so the eye is
   never scrolled out of reach. */
.k-table thead th.k-col--quickview { background: var(--k-surface-2); }
.k-table tbody tr:hover td.k-col--quickview { background: var(--k-surface-2); }
.k-table tbody tr.is-selected td.k-col--quickview { background: var(--k-selected); }
.k-table-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--k-muted);
  opacity: 0;
}
.k-table tbody tr:hover .k-table-eye,
.k-table tbody tr:focus-within .k-table-eye { opacity: 1; }
.k-table-eye:hover { background: var(--k-selected); color: var(--k-brand); text-decoration: none; }
.k-table tbody tr[data-row-id]:has(.k-table-eye) { cursor: pointer; }
@media (hover: none) {
  .k-table-eye { opacity: 1; }
}

/* An admin row's "⋯" (Phase 18 C10): a trailing column on a configuration
   list, a held-by table — never on a data table. Always visible, unlike the
   eye. The table's scrolling box and its card clip whatever overflows them,
   and a row menu's panel hangs below its row, so while one is open neither
   clips. */
.k-table .k-col--menu {
  width: 44px;
  padding-left: 4px;
  padding-right: 10px;
  text-align: right;
}
.k-table-wrap:has(.k-actions[open]),
.k-table-scroll:has(.k-actions[open]) { overflow: visible; }
/* Except a box that does scroll sideways (kairos.js marks it .is-scrolling-x):
   at 900 px, beside the navigation and the rail, the registers and fields
   lists are wider than their card, the "⋯" column out of view until the box
   is scrolled. Unclipped, the table snapped back to its start and spilled out
   of the card, so the page scrolled sideways and the menu hung past the
   screen (Phase 21 slice 3's closing walk). Such a box keeps its scroll while
   a menu is open and makes room under its rows for the menu, whose list
   scrolls inside it beyond 240 px. With scripting off nothing is marked and
   the rule above stands. */
.k-table-scroll.is-scrolling-x:has(.k-actions[open]) { overflow-x: auto; padding-bottom: 248px; }
.k-table-scroll.is-scrolling-x .k-actions-panel { max-height: 240px; }

/* Fitting the screen (Phase 18 Wave 3, W2; §3.3 and §3.4 as amended
   15 October 2026, ruling 46). A list's table — one drawn with its Columns
   control (k_table's ``picker``) — is a size container, so its columns
   answer to the width the table has, whatever the navigation is doing:

   * a column marked ``wide`` (the items table's and the queue's Item type,
     Requester, Epic and Updated) shows by default only where the table is
     about 1600 px or wider — from about 1920 px screens. A saved choice
     beats it: the server stops marking a column the choice names;
   * from 860 px of table (every window from 900 px except a mouse at
     1024 px with the sidebar open, which keeps §3.4's sideways scroll) the
     title may narrow to 200 px, and below 1120 px of table the people
     columns and the SLA countdown tighten (the countdown drops the half it
     names, kept for a screen reader and in its title);
   * if it still cannot fit, kTableFit (kairos.js) folds the columns with
     the highest data-fold behind the Columns control, and only with no
     saved choice. --k-table-fold tells it whether this width folds at all,
     so the threshold is written once, here.

   With scripting off nothing folds, and the table scrolls in its card as
   before; everything else here is CSS and holds. */
.k-table-wrap--fit { container: k-table / inline-size; }
.k-sla-short { display: none; }
.k-table .is-folded { display: none; }
/* The added columns' own widths: an epic is its key and the start of its
   title, a type its name. */
.k-table td.k-col--wide .k-cell-clip { max-width: 180px; }
.k-epic-link { font-weight: 400; color: var(--k-text); }
.k-epic-link:hover { color: var(--k-brand); }
@container k-table (max-width: 1599px) {
  .k-table .k-col--wide { display: none; }
}
/* Just wide enough for them (a 1920 px screen with the sidebar open): the
   added columns and the people tighten — a name ends in an ellipsis, the
   whole of it in its title — so all four fit and the title keeps 200 px. */
@container k-table (min-width: 1600px) and (max-width: 1999px) {
  .k-table td.k-col--wide .k-cell-clip { max-width: 120px; }
  .k-table .k-col--person .k-person { max-width: 130px; }
}
@container k-table (min-width: 860px) {
  .k-table-scroll { --k-table-fold: on; }
  .k-table .k-col--title { min-width: 200px; }
}
@container k-table (min-width: 860px) and (max-width: 1119px) {
  .k-table .k-col--person .k-person { max-width: 140px; }
  .k-table .k-sla-full {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
  }
  .k-table .k-sla-short { display: inline; }
}
/* A record page's embedded table (k_table's ``fold``: a task's subtasks, an
   epic's tasks, an entry's contained records and open incidents; Phase 18
   Wave 3 repairs). It sits in the record's main column — 644 px on a
   1032 px iPad held upright, about 745 px on the landscape iPads — so it
   fits from about 600 px of table, not 860: the title narrows to 200 px and
   the people and SLA cells compact there too, and if it still cannot fit,
   kTableFit folds its lowest-priority columns (key and title never) and
   names them in the note under it. Under 600 px of table (a mouse at
   1024 px with the sidebar, where the main column is 396 px) it scrolls
   with its first column held, as a list does there. */
@container k-table (min-width: 600px) {
  .k-table-wrap--fold .k-table-scroll { --k-table-fold: on; }
  .k-table-wrap--fold .k-table .k-col--title { min-width: 200px; }
}
@container k-table (min-width: 600px) and (max-width: 859px) {
  .k-table-wrap--fold .k-table .k-col--person .k-person { max-width: 140px; }
  .k-table-wrap--fold .k-table .k-sla-full {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
  }
  .k-table-wrap--fold .k-table .k-sla-short { display: inline; }
}
.k-table-fold-note { margin: 0; padding: 6px 16px 10px; }
.k-table-fold-note[hidden] { display: none; }
@media (max-width: 599px) {
  .k-table-fold-note { display: none; }
}
.k-table-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

/* An ⓘ's facts (Phase 18 C10): the explainers that used to sit in a card
   under a configuration list — what retiring does, why there is no delete —
   collapsed into one disclosure, beside the heading since ruling 89 (the
   caption row that held it left in slice 16). Each fact is a paragraph-like
   span inside the bubble (the bubble is inline markup). */
.k-info-para { display: block; }
.k-info-para + .k-info-para { margin-top: 6px; }

/* The Columns panel (C3, ruling 2): the POST form that shows, hides and
   orders a list's columns. Its control, k_columns' popover in the filter bar,
   left in Phase 21 slice 16; a list's Columns is the side panel's
   (ui/panel/columns.html). */
.k-columns-panel {
  position: absolute;
  top: auto;
  right: 0;
  margin-top: 6px;
  z-index: 35;
  width: 290px;
  max-width: 100%;
  padding: 12px;
  background: var(--k-surface);
  border-radius: var(--k-r-box);
  box-shadow: var(--k-shadow-overlay);
}
.k-columns-panel fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.k-columns-panel legend {
  padding: 0;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 12px;
  color: var(--k-text);
}
.k-columns-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 360px;
  overflow-y: auto;
}
.k-columns-list > li {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
}
.k-columns-list label {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12.5px;
  line-height: 18px;
}
.k-columns-note {
  display: block;
  font-size: 11px;
  line-height: 14px;
  color: var(--k-muted);
}
.k-columns-move {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--k-border);
  border-radius: 6px;
  background: var(--k-surface);
  color: var(--k-muted);
  cursor: pointer;
}
.k-columns-move:hover { border-color: var(--k-control); color: var(--k-brand); }
.k-columns-move:disabled { opacity: .35; cursor: default; }
.k-columns-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
/* The item-type icon picker (C2): one radio per work-type icon, each drawn as
   the marker it gives a row. */
.k-icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px 12px;
}
.k-icon-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font-size: 12.5px;
  cursor: pointer;
}
/* The tile layout (Kairos Learn's lesson icons, 12 November 2026): a grid of marks with the name
   under each, the radio itself hidden and the chosen tile ringed. */
.k-icon-picker-grid--tiles { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.k-icon-picker-grid--tiles .k-icon-option { position: relative; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 8px 4px; border: 1px solid var(--k-border); border-radius: var(--k-r-card); background: var(--k-surface); text-align: center; overflow-wrap: anywhere; line-height: 1.2; }
.k-icon-picker-grid--tiles .k-icon-option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.k-icon-picker-grid--tiles .k-icon-option:hover { background: var(--k-surface-2); }
.k-icon-picker-grid--tiles .k-icon-option:has(input:checked) { border-color: var(--k-brand); background: var(--k-selected); }
.k-icon-picker-grid--tiles .k-icon-option:has(input:focus-visible) { outline: 2px solid var(--k-brand); outline-offset: 1px; }
.k-icon-picker-grid--tiles .k-type-marker { flex-basis: 24px; width: 24px; height: 24px; margin-top: 0; }
.k-icon-picker-grid--tiles .k-type-marker svg { width: 16px; height: 16px; }

/* A field whose one answer is said rather than asked (Judd, 31 October 2026:
   the intake form's Workspace when there is one to raise in, and its Type
   when the workspace holds one). Body text on the control's line, as tall as
   a control, so a row of selects beside it stays level. */
.k-field-static {
  display: flex;
  align-items: center;
  min-height: var(--k-ctl-h);
  margin: 0;
  font-size: var(--k-fs-row);
  line-height: 20px;
  color: var(--k-text);
}

/* Sortable headers */
.k-table-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  text-decoration: none;
}
.k-table-sort:hover { color: var(--k-text); }
.k-table-sort svg { width: 12px; height: 12px; opacity: .55; }
th[aria-sort="ascending"] .k-table-sort,
th[aria-sort="descending"] .k-table-sort { color: var(--k-brand); }
th[aria-sort="ascending"] .k-table-sort svg,
th[aria-sort="descending"] .k-table-sort svg { opacity: 1; }
th[aria-sort="descending"] .k-table-sort svg { transform: rotate(180deg); }

/* Checkbox column + bulk-action bar */
.k-table .k-table-check { width: 36px; padding-right: 4px; }
/* Restyled to the design language's tokens in Phase 21 slice 2 stage 4: the
   selected-row ground (--k-selected), a --k-divider rule under it and the
   count in --k-ok-fg (6.9:1 on the ground). Global, so the queue's bar changes
   colour too. Its buttons are k_button's restyled variants (slice 15 stage 2):
   the editing verbs secondary, Delete… the danger opener after the divider. */
.k-bulkbar {
  display: none;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px 20px;
  background: var(--k-selected);
  border-bottom: 1px solid var(--k-divider);
}
/* Shown once a row is ticked (kTable sets is-active). Not the `hidden`
   attribute any more (C1): ui/nojs.css shows the bar with scripting off, and an
   attribute would have beaten it. */
.k-bulkbar.is-active { display: flex; }
/* Delete stands apart from the editing verbs, after a divider (C1). */
.k-bulkbar-divider {
  align-self: stretch;
  width: 1px;
  margin: 2px 2px;
  background: var(--k-border);
}
.k-bulkbar-count {
  font-size: var(--k-fs-meta);
  font-weight: 600;
  color: var(--k-ok-fg);
  margin-right: 4px;
}
.k-bulkbar-clear {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--k-muted);
  font-size: var(--k-fs-meta);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.k-bulkbar-clear:hover { color: var(--k-text); background: var(--k-surface); }

/* Stacked-card rendering (<600px, template-level alternative) */
.k-table-cards {
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.k-table-cards > li {
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-card);
  padding: 14px 16px;
}

/* The stacked card's three lines (Phase 18 C11): key and state pill, then the
   title full width and left-aligned, then one meta caption with the empty
   fields left out. */
.k-table-card-head { align-items: center; justify-content: flex-start; }
.k-table-card-key {
  font-size: 12px;
  font-weight: 600;
  color: var(--k-muted);
  white-space: nowrap;
}
.k-table-card-pill { display: inline-flex; min-width: 0; }
.k-table-card-head > .k-table-card-eye,
.k-table-card-head > .k-actions { margin-left: auto; }
.k-table-card-head > .k-table-card-eye + .k-actions { margin-left: 0; }
.k-table-card-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: -12px -12px -12px auto;
  opacity: 1;
}
.k-table-card-title {
  margin: 6px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 19px;
  text-align: left;
  color: var(--k-text);
  overflow-wrap: anywhere;
}
.k-table-card-head > .k-table-card-title { margin: 0; flex: 1 1 auto; min-width: 0; }
/* The whole title on a phone: the card has the width the table cell lacked. */
.k-table-card-title .k-title-link,
.k-table-card-title .k-title-text {
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 19px;
}
.k-table-card-meta {
  margin: 4px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0;
  row-gap: 2px;
}
.k-table-card-dot { white-space: pre; }
.k-table-card-meta .k-avatar { display: none; }
.k-table-card-meta .k-person { gap: 0; }
/* A grouped list's heading between its cards (Phase 28 slice 8d: Audit's OFIs and controls): the group
   row's words, outside any card, as the design language puts a group header (DL 4.2, item 3). */
.k-table-cards > li.k-table-cards__group {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 6px 2px 0;
  font-size: var(--k-fs-row);
  font-weight: 600;
  color: var(--k-muted);
}

/* k-chip ---------------------------------------------------------------------
   The design language's chip (DL §5.1) — 11/600, padding 2 8, a pill, never
   wrapping, always a semantic pair, no neutral border. A status pill was drawn
   as the chip from Phase 21 slice 2 and is the chip since slice 16 stage 3
   (ruling 96): k_pill and the old pill builders draw k-chip, their tones by
   the DL map — success and green → ok, warning → warn, error → bad, info →
   info, neutral → neutral. Every pair is at least 6.3:1
   (ui/tests/test_dl_contrast.py). */
.k-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: var(--k-r-pill);
  font-weight: 600;
  font-size: var(--k-fs-label);
  line-height: 16px;
  white-space: nowrap;
  background: var(--k-neutral-bg);
  color: var(--k-neutral-fg);
}
.k-chip--ok      { background: var(--k-ok-bg);      color: var(--k-ok-fg); }
.k-chip--warn    { background: var(--k-warn-bg);    color: var(--k-warn-fg); }
.k-chip--bad     { background: var(--k-bad-bg);     color: var(--k-bad-fg); }
.k-chip--info    { background: var(--k-info-bg);    color: var(--k-info-fg); }
.k-chip--neutral { background: var(--k-neutral-bg); color: var(--k-neutral-fg); }

/* A tag (DL §5.1): a filled chip, white text, its colour the workspace's own
   label. Used with .k-chip, which gives the radius, 11 / 600 and padding. */
.k-tag { color: var(--k-on-brand); }
.k-tag--0 { background: var(--k-tag-0); }
.k-tag--1 { background: var(--k-tag-1); }
.k-tag--2 { background: var(--k-tag-2); }
.k-tag--3 { background: var(--k-tag-3); }
.k-tag--4 { background: var(--k-tag-4); }
.k-tag--5 { background: var(--k-tag-5); }
.k-tag--6 { background: var(--k-tag-6); }
.k-tag--7 { background: var(--k-tag-7); }
.k-tag--8 { background: var(--k-tag-8); color: var(--k-text); }
.k-tag--9 { background: var(--k-tag-9); color: var(--k-text); }
.k-tag--10 { background: var(--k-tag-10); color: var(--k-text); }
.k-tag--11 { background: var(--k-tag-11); color: var(--k-text); }
.k-tag--12 { background: var(--k-tag-12); color: var(--k-text); }
.k-tag--13 { background: var(--k-tag-13); color: var(--k-text); }
.k-tag--14 { background: var(--k-tag-14); color: var(--k-text); }
.k-tag--15 { background: var(--k-tag-15); color: var(--k-text); }
.k-tag--16 { background: var(--k-tag-16); color: var(--k-text); }
.k-tag--17 { background: var(--k-tag-17); color: var(--k-text); }
.k-tag--18 { background: var(--k-tag-18); color: var(--k-text); }
.k-tag--19 { background: var(--k-tag-19); color: var(--k-text); }
.k-tag--20 { background: var(--k-tag-20); color: var(--k-text); }
.k-tag--21 { background: var(--k-tag-21); color: var(--k-text); }
.k-tag--22 { background: var(--k-tag-22); color: var(--k-text); }
.k-tag--23 { background: var(--k-tag-23); color: var(--k-text); }
/* A disabled tag still on an item: muted, never hidden (TG3). */
.k-tag--disabled { opacity: .62; }
.k-tag-more { white-space: nowrap; }
/* Tag dot (CAL3): a calendar's tag, as a small dot filled in the tag colour (k-tag--N sets
   the fill). The --k-muted edge keeps the lightest colours at 3:1 on white. */
.k-tag-dots { display: inline-flex; flex: none; align-items: center; }
.k-tag-dots__row { display: inline-flex; align-items: center; gap: 3px; }
.k-tag-dot { flex: none; width: 8px; height: 8px; border: 1px solid var(--k-muted); border-radius: var(--k-r-pill); }
.k-wcal-card > .k-tag-dots { align-self: flex-start; }
/* A card's or row's tags (TG6): the first chip and "+N", wrapping rather than widening the
   card; in a row's label column and a time block they stay on one line and shorten. */
.k-tags-inline { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; max-width: 100%; margin-top: 2px; }
.k-tags-inline .k-tag { display: inline-block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-gantt-title__line > .k-tags-inline, .k-cal-block .k-tags-inline { flex: 0 1 auto; flex-wrap: nowrap; margin: 0 0 0 8px; overflow: hidden; }
.k-cal-block .k-tags-inline { margin: 2px 0 0; }

/* Configuration → Tags: the reorderable list and the panel's colour choice. */
.k-tag-list__rows { list-style: none; margin: 0; padding: 0; }
.k-tag-row {
  display: grid;
  grid-template-columns: 28px minmax(6rem, 16rem) minmax(0, 1fr) 6rem 72px 22rem;
  align-items: center;
  column-gap: 12px;
  min-height: 52px;
  padding: 6px 16px 6px 8px;
  border-top: 1px solid var(--k-border);
}
.k-tag-row:first-child { border-top: 0; }
.k-tag-row:hover,
.k-tag-row:focus-within { background: var(--k-surface-2); }
.k-tag-row:hover .k-designer-row__moves,
.k-tag-row:focus-within .k-designer-row__moves { opacity: 1; }
.k-tag-row.is-disabled .k-tag-row__chip { opacity: .62; }
.k-tag-row.is-dragging { opacity: .6; background: var(--k-surface); box-shadow: var(--k-shadow-overlay); transform: scale(.995); }
.k-tag-row.is-drop-before { box-shadow: inset 0 3px 0 var(--k-brand); background: var(--k-selected); }
.k-tag-row.is-drop-after { box-shadow: inset 0 -3px 0 var(--k-brand); background: var(--k-selected); }
.k-tag-row__handle { justify-self: center; }
.k-tag-row__chip { min-width: 0; }
.k-tag-row__chip .k-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-tag-row__meta { min-width: 0; }
.k-tag-row__count { white-space: nowrap; }
.k-tag-row__moves-cell { display: flex; align-items: center; }
.k-tag-row__moves-cell form { margin: 0; display: inline-flex; }
.k-tag-row__moves-cell .k-designer-row__moves { display: inline-grid; grid-template-columns: var(--k-ctl-h) var(--k-ctl-h); }
.k-tag-row__move-gap { display: block; width: var(--k-ctl-h); height: var(--k-ctl-h); }
@media (max-width: 599px), (pointer: coarse) {
  .k-tag-row__moves-cell .k-designer-row__moves { grid-template-columns: 44px 44px; }
  .k-tag-row__move-gap { width: 44px; height: 44px; }
}
.k-tag-row__actions { display: flex; align-items: center; gap: 8px; }
.k-tag-row__actions form { margin: 0; display: inline-flex; }
@media (max-width: 599px) {
  .k-tag-row { grid-template-columns: 28px minmax(0, 1fr) 90px; row-gap: 6px; }
  .k-tag-row__meta { grid-column: 2 / 4; }
  .k-tag-row__count { grid-column: 2 / 4; }
  .k-tag-row__moves-cell { grid-column: 3; grid-row: 1; }
  .k-tag-row__actions { grid-column: 2 / 4; flex-wrap: wrap; }
}
@media (hover: none) and (pointer: coarse) {
  .k-tag-row__handle { visibility: hidden; }
}
.k-tag-merge__list { margin: 0; padding-left: 20px; }
.k-tag-pick { border: 0; margin: 0; padding: 0; }
.k-tag-pick__options { display: grid; gap: 8px; margin-top: 6px; }
.k-tag-pick__row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.k-tag-pick__option { cursor: pointer; display: block; border-radius: var(--k-r-item); }
.k-tag-pick__option .k-chip { display: flex; align-items: center; justify-content: center; height: 32px; padding: 0; border-radius: var(--k-r-item); outline: 2px solid transparent; outline-offset: 2px; }
.k-tag-pick__option input:checked + .k-chip { outline-color: var(--k-text); }
.k-tag-pick__option input:checked + .k-chip::after { content: "\2713"; font-size: 14px; font-weight: 700; }
.k-tag-pick__option input:focus-visible + .k-chip { box-shadow: var(--k-focus); outline: 2px solid var(--k-brand); outline-offset: 2px; }
.k-tag-pick__current { margin: 6px 0 0; }

/* An outlined chip: a removable or plain chip (k_pill's variant="chip",
   bulk_confirm's item keys, .k-chip--outline). This was the
   whole of .k-chip before slice 2; it moved here, unchanged, before .k-chip
   became the DL status chip, so the twelve filter bars not yet migrated to
   the DL filter row look exactly as they did. */
.k-chip--outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--k-border);
  background: var(--k-surface);
  border-radius: var(--k-r-pill);
  font-weight: 600;
  font-size: 11px;
  line-height: 16px;
  padding: 3px 6px 3px 10px;
  color: var(--k-text);
  white-space: normal;  /* .k-chip now holds a DL chip on one line; this one never did */
}
.k-chip-remove {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--k-muted);
  cursor: pointer;
  padding: 0;
}
.k-chip-remove:hover { background: var(--k-bad-bg); color: var(--k-bad-fg); }
.k-chip-remove svg { width: 10px; height: 10px; }

/* k-button ----------------------------------------------------------------- */
/* Restyled in place to the design language in Phase 21 slice 15 stage 2 (DL
   §5.2 and §2.3; Judd's ruling 87): a pill at least --k-ctl-h tall (36),
   13/600, every colour a token. The height is a min-height, never a height,
   so a later explicit size still wins (.login-button's 42 px, slice 2's icon
   buttons). --s is at least --k-ctl-h-sm (32), 12/600; --l draws as --m (the
   design language has no large size). The opener of a destructive act is
   k-btn--danger, in slice 15's block; k-btn--destructive is the act itself,
   filled dark red. */
.k-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--k-ctl-h);
  padding: 0 16px;
  border-radius: var(--k-r-pill);
  border: 1px solid transparent;
  font-size: var(--k-fs-row);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}
.k-btn:hover { text-decoration: none; }
.k-btn svg { width: 16px; height: 16px; }

.k-btn--s { min-height: var(--k-ctl-h-sm); padding: 0 12px; font-size: var(--k-fs-meta); }
.k-btn--m { font-size: var(--k-fs-row); }
.k-btn--l { font-size: var(--k-fs-row); }

.k-btn--primary { background: var(--k-brand); color: var(--k-on-brand); }
.k-btn--primary:hover { background: var(--k-brand-hover); }
.k-btn--secondary {
  background: var(--k-surface);
  color: var(--k-ok-fg);
  border-color: var(--k-control);
}
.k-btn--secondary:hover { background: var(--k-surface-2); }
.k-btn--ghost { background: transparent; color: var(--k-brand); padding: 0 10px; }
.k-btn--ghost:hover { background: var(--k-ok-bg); }
.k-btn--destructive { background: var(--k-bad-fg); color: var(--k-on-brand); }
.k-btn--destructive:hover { background: var(--k-bad-hover); }

.k-btn:disabled,
.k-btn--disabled,
.k-btn[aria-disabled="true"] {
  background: var(--k-surface-2);
  color: var(--k-muted);
  border-color: var(--k-border);
  cursor: not-allowed;
  pointer-events: none;
}

/* k-field ------------------------------------------------------------------ */
/* Field widths by what the field holds (Phase 18 Wave 3, W5; criterion
   clause 6; amended by Judd, 29 October 2026). A text input, a select, a
   textarea and the rich-text editor have no width cap: each fills the column
   it is in, wherever that is (a card, the Activity composer, a panel, a
   notes tab). The earlier 480, then 720 px, cap on controls and 611 px cap
   on textareas and editors are gone. A field that holds something short is
   still drawn short:

   * dates, times and numbers take their natural width (below), so a due
     date is not a full-width box with ten characters in it;
   * a select whose choices are short (Priority, Order) opts in with
     k_field's width="short" (.k-field--short): sized to its longest choice,
     never under 12em;
   * help and error captions under a field are running text and keep a 42em
     measure. */
.k-field { display: block; margin-bottom: 16px; }
.k-field-help,
.k-field-error { max-width: 42em; }
.k-field > .k-field-input:is([type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"], [type="number"]) {
  width: auto;
  max-width: 100%;
}
.k-field > .k-field-input[type="number"] { width: 12em; }
/* A date or time box's own editor is a line taller than text in Chromium, so
   it is held to the control's 36 px (Phase 21 slice 15); a touch screen's
   44 px minimum still wins over it. */
input.k-field-input:is([type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"]) { height: var(--k-ctl-h); }
.k-field.k-field--short > select,
.k-field.k-field--short > .k-field-input { width: auto; min-width: 12em; max-width: 100%; }
.k-field-label {
  display: block;
  font-weight: 600;
  font-size: var(--k-fs-meta);
  line-height: 16px;
  color: var(--k-text);
  margin-bottom: 5px;
}
.k-field-required { color: var(--k-bad-fg); margin-left: 2px; }
/* The label row an "info"-placement field uses instead of a bare label: the
   label text plus the k-info disclosure, side by side. The row carries the
   margin the label used to carry alone (reset to 0 below) so the gap to the
   control underneath is unchanged, and the info button's own padding is
   trimmed so the row is no taller than a label-only row was. */
.k-field-labelrow {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 5px;
}
/* .k-field-label is the only child that carries a bottom margin of its own
   (.k-check and .k-toggle have none), and left in place it would double the
   row's. */
.k-field-labelrow > .k-field-label { margin-bottom: 0; }
.k-field-labelrow .k-info { margin-left: 0; }
/* A fieldset's legend with its ⓘ: the ⓘ follows the <legend> (a <details>
   may not sit inside one), so the legend floats and the ⓘ shares its line;
   everything after the pair starts on a line of its own. */
.k-field--legend-info > legend { float: left; margin-right: 4px; }
.k-field--legend-info > .k-info { margin: 0 0 5px; }
.k-field--legend-info > :not(legend):not(.k-info) { clear: left; }
/* The control (Phase 21 slice 15, Judd's rulings 86 and 91): as tall as a
   button (--k-ctl-h, 36), slightly rounded (--k-r-item, spec §3.3's "rounded
   8px input"), its edge --k-control-edge (3.4:1 on white, the DL §2.1
   amendment of version 1.4), 13/400 --k-text; on focus the DL's glow with a
   --k-brand edge (DL §2.3). The same in the side panel: no panel size. The
   select keeps the browser's arrow. A textarea is the DL's composer box
   (§5.11: 84 minimum, radius 10).
   Focus (review follow-up, 28 October 2026): the glow alone is 1.2:1 against
   white, so a 1 px --k-brand ring sits outside the --k-brand edge — a 2 px
   ring at 7:1 (WCAG 2.4.7, 1.4.11) — with the glow beyond it. The transparent
   outline is what Windows' forced colours draws, since it drops box-shadow. */
.k-field-input,
.k-field select,
.k-field textarea {
  display: block;
  width: 100%;
  min-height: var(--k-ctl-h);
  padding: 7px 12px;
  border: 1px solid var(--k-control-edge);
  border-radius: var(--k-r-item);
  background: var(--k-surface);
  font-size: var(--k-fs-row);
  font-weight: 400;
  line-height: 20px;
  color: var(--k-text);
}
.k-field-input::placeholder,
.k-field textarea::placeholder { color: var(--k-muted); }
.k-field-input:focus,
.k-field select:focus,
.k-field textarea:focus {
  outline: 2px solid transparent;
  outline-offset: 0;
  box-shadow: 0 0 0 1px var(--k-brand), var(--k-focus);
  border-color: var(--k-brand);
}
.k-field textarea { min-height: 84px; padding: 10px 12px; line-height: 1.5; border-radius: var(--k-r-box); resize: vertical; }
/* A control with the k-field look outside a k-field column (C12): a matrix
   cell's band, a list's scope chooser, a no-script fallback beside its button.
   Sized to its content rather than to the column. */
.k-field-input--inline { display: inline-block; width: auto; max-width: 100%; padding: 5px 10px; }
.k-field-help {
  font-weight: 400;
  font-size: var(--k-fs-meta);
  line-height: 16px;
  color: var(--k-muted);
  margin-top: 4px;
}
.k-field-error {
  font-weight: 600;
  font-size: var(--k-fs-meta);
  line-height: 16px;
  color: var(--k-bad-fg);
  margin-top: 4px;
}
/* An error: the box dark red, at rest and on focus. On focus the ring is
   dark red too, so a box in error still visibly takes focus (its 1 px edge
   becomes 2 px; review follow-up, 28 October 2026). A tick box, a radio and
   a switch in error: slice 15's block. */
.k-field.has-error .k-field-input,
.k-field.has-error select,
.k-field.has-error textarea,
.k-field.has-error .k-field-input:focus,
.k-field.has-error select:focus,
.k-field.has-error textarea:focus { border-color: var(--k-bad-fg); }
.k-field.has-error .k-field-input:focus,
.k-field.has-error select:focus,
.k-field.has-error textarea:focus { box-shadow: 0 0 0 1px var(--k-bad-fg); }

/* Checkbox / radio. The box is the design language's 18 px (DL §2.3, Phase 21
   slice 2; it was 16), centred on the 20 px line. Kairos still draws the box
   itself (appearance: none) because a touch screen's 44 px tap area is a
   transparent border round it (5.9 below), which the browser's own drawing
   cannot take; accent-color carries the brand to any control the browser
   draws, as the DL asks. The label's class shape is kept: the DL's
   input-level class is not adopted. */
.k-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: var(--k-fs-row);
  line-height: 20px;
  color: var(--k-text);
  cursor: pointer;
  accent-color: var(--k-brand);
}
.k-check input[type="checkbox"],
.k-check input[type="radio"] {
  appearance: none;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  border: 1px solid var(--k-control-edge);
  background: var(--k-surface);
  cursor: pointer;
}
.k-check input[type="checkbox"] { border-radius: 4px; }
.k-check input[type="radio"] { border-radius: 50%; }
.k-check input:checked {
  background-color: var(--k-brand);
  border-color: var(--k-brand);
  background-repeat: no-repeat;
  background-position: center;
}
.k-check input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.k-check input[type="radio"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3' fill='white'/%3E%3C/svg%3E");
}

/* Toggle: k_field's switch. One switch look (Phase 21 slice 15, ruling 86;
   plan reading 11): the Mandatory toggle's geometry (button.k-toggle's
   track, below) — a 30 x 18 track with a 1 px outline and a 12 px knob 2 px
   inside it, moved 12 px when on — on the DL's tokens: off, the outline and
   knob --k-muted (5.9:1, so the control reads at 3:1, WCAG 1.4.11) on
   --k-surface; on, track and outline --k-brand, the knob --k-on-brand. The
   track and knob are drawn by ::before and ::after, centred in the input's
   box, so the touch rules' 44 px box round it (5.9 below) moves neither. */
.k-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: var(--k-fs-row);
  line-height: 20px;
  color: var(--k-text);
}
.k-toggle input {
  appearance: none;
  width: 30px;
  height: 18px;
  margin: 0;
  border: 0;
  border-radius: var(--k-r-pill);
  background: transparent;
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
}
.k-toggle input::before,
.k-toggle input::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  box-sizing: border-box;
  border-radius: var(--k-r-pill);
}
.k-toggle input::before {
  width: 30px;
  height: 18px;
  margin: -9px 0 0 -15px;
  border: 1px solid var(--k-muted);
  background: var(--k-surface);
  transition: background-color .12s ease;
}
.k-toggle input::after {
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -12px;
  background: var(--k-muted);
  transition: transform .12s ease;
}
.k-toggle input:checked::before { background: var(--k-brand); border-color: var(--k-brand); }
.k-toggle input:checked::after { background: var(--k-on-brand); transform: translateX(12px); }

/* k-tabs ------------------------------------------------------------------- */
.k-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--k-border);
  overflow-x: auto;
  /* Windows renders a classic scrollbar that reserves its own space, so an
     `overflow-x: auto` strip showed a permanently visible bar under the
     reports tabs whether or not there was anything to scroll to. Scrolling
     stays — the strip still swipes and still moves with the keyboard — only
     the gutter goes. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.k-tabs::-webkit-scrollbar { display: none; }
.k-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 9px 14px;
  margin-bottom: -1px;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  color: var(--k-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.k-tab:hover { color: var(--k-text); text-decoration: none; }
.k-tab.is-active,
.k-tab[aria-selected="true"] {
  color: var(--k-brand);
  border-bottom-color: var(--k-brand);
}
.k-tabpanel { padding-top: 16px; }

/* k-blade ------------------------------------------------------------------ */
.k-agenda-card__fold {
  background: var(--k-surface);
  border-radius: var(--k-r-box);
}
.k-agenda-card__fold + .k-agenda-card__fold { margin-top: 10px; }
.k-agenda-card__fold-title { font-weight: 600; font-size: 15px; line-height: 20px; color: var(--k-text); }
.k-tools__summary {
  font-weight: 300;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-muted);
}
/* The Linked records blade's "+ Create linked task ▾" (Phase 18 Wave 2), above the panel body. */
.k-link-spawn { padding: 2px 18px 10px 46px; }
/* Its panel hangs from the trigger's left edge and keeps to the blade body's
   width, so in the 320 px rail it opens over the blade rather than off it. */
@media (min-width: 600px) {
  .k-link-spawn .k-actions-panel { left: 0; right: auto; width: 256px; }
}
/* Ruling 37's offer slot (Phase 18 Wave 2), under a control's custom fields
   card: a live region from first paint that takes no room in the rail's stack
   while it is empty, and a banner without its page margin when it is not. */
.k-stack-16 > .k-entry-offer:empty { margin-top: 0; }
.k-entry-offer .k-banner { margin-bottom: 0; }

/* k-slideover -------------------------------------------------------------- */
.k-slideover { position: fixed; inset: 0; z-index: 90; }
.k-overlay-scrim {
  position: absolute;
  inset: 0;
  background: var(--k-scrim);
  border: 0;
  padding: 0;
  width: 100%;
  cursor: default;
}
.k-slideover-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: clamp(420px, 36vw, 560px);
  background: var(--k-surface);
  box-shadow: var(--k-shadow-overlay);
  display: flex;
  flex-direction: column;
}
.k-slideover-head,
.k-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--k-divider);
}
.k-overlay-close {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--k-muted);
  cursor: pointer;
}
.k-overlay-close:hover { background: var(--k-page); color: var(--k-text); }
.k-overlay-close svg { width: 15px; height: 15px; }
.k-slideover-body { flex: 1 1 auto; overflow-y: auto; padding: 18px 20px; }
.k-slideover-foot,
.k-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--k-divider);
}

/* k-modal ------------------------------------------------------------------ */
.k-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
/* Never taller than the window (Judd's ruling 92): at most the height inside
   .k-modal's padding, and a column, so a confirmation's body scrolls between
   its title and its buttons (.k-confirm, slice 15's block). Corners as the
   cards' (DL §2.3). */
.k-modal-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 460px;
  max-height: 100%;
  background: var(--k-surface);
  border-radius: var(--k-r-card);
  box-shadow: var(--k-shadow-overlay);
}
.k-modal-body { padding: 18px 20px; }

body.k-overlay-locked { overflow: hidden; }

/* k-expand ----------------------------------------------------------------- *
   A field or a block of text that can fill the window (kExpand; plan review
   notes, 10 November 2026). There is one copy of the content: closed, the
   window is just the block in the flow; open, the same element is a modal
   <dialog> filling the viewport in the top layer, above the shell, with a head (title and Done) and, for an
   editor, a foot. */
.k-expand { position: relative; }
/* The button sits in the field's label row (the 16 px line the "Notes" label
   occupies, as in .k-field-labelrow), right-aligned, and is no taller than that
   row plus a little, so it never reaches the toolbar or editor beneath. */
.k-expand .k-expand__open {
  position: absolute;
  top: -2px;
  right: 0;
  z-index: 1;
  width: 20px;
  height: 20px;
  min-height: 0;
  padding: 0;
}
.k-expand:not(.is-open) .k-expand__window > .k-expand__body > .k-field > .k-field-label,
.k-expand:not(.is-open) > dt { padding-right: 28px; }
.k-expand__window {
  position: static;
  inset: auto;
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.k-expand__head,
.k-expand__foot { display: none; }
.k-expand.is-open .k-expand__window {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--k-surface);
}
.k-expand__window::backdrop { background: var(--k-surface); }
.k-expand.is-open .k-expand__head,
.k-expand.is-open .k-expand__foot { display: flex; flex: 0 0 auto; }
.k-expand.is-open .k-expand__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px;
}
.k-expand.is-open .k-expand__body .k-rt-prosemirror { min-height: 50vh; }
.k-expand.is-open .k-expand__body .k-rt .k-rt-prosemirror { max-width: none; }

/* k-toast ------------------------------------------------------------------ */
.k-toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
/* Restyled in place to the design language in Phase 21 slice 15 stage 4
   (Judd's ruling 88; plan §2.7, reading 20): the dark surface on --k-text
   with --k-on-brand words (16.3:1), 13/18, the inner box's radius, and no
   coloured stripe (DL §9: no left-border accent) — the tone is the mark
   before the message (.k-toast-mark, slice 15's block), so colour never
   carries it alone (DL §8). The padding is unchanged, so the touch rule's
   44 px ✕ and its negative block margins still fit. */
.k-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 380px;
  background: var(--k-text);
  color: var(--k-on-brand);
  font-size: var(--k-fs-row);
  line-height: 18px;
  border-radius: var(--k-r-box);
  box-shadow: var(--k-shadow-overlay);
  padding: 11px 14px;
  animation: k-toast-in .18s ease;
}
.k-toast.is-leaving { opacity: 0; transition: opacity .2s ease; }
.k-toast-dismiss {
  border: 0;
  background: transparent;
  color: var(--k-on-brand);
  opacity: .7;
  cursor: pointer;
  padding: 2px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
}
.k-toast-dismiss:hover { opacity: 1; }
.k-toast-dismiss svg { width: 12px; height: 12px; }
@keyframes k-toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* k-banner ----------------------------------------------------------------- */
/* A full-width page notice (spec §3.3) on the design language's semantic pairs
   (DL §2.1: "Always use background and foreground together"; Phase 21 slice
   15, plan §2.4 and reading 12). The 1 px border is transparent, so the
   geometry, and the padding the touch rules' ✕ is measured against, hold. */
.k-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 16px;
  border-radius: var(--k-r-box);
  border: 1px solid transparent;
  font-size: var(--k-fs-row);
  line-height: 18px;
  margin-bottom: 14px;
}
.k-banner--info    { background: var(--k-info-bg); color: var(--k-info-fg); }
.k-banner--success { background: var(--k-ok-bg);   color: var(--k-ok-fg); }
.k-banner--warning { background: var(--k-warn-bg); color: var(--k-warn-fg); }
.k-banner--error   { background: var(--k-bad-bg);  color: var(--k-bad-fg); }
.k-banner-message { flex: 1 1 auto; min-width: 200px; font-weight: 600; }
/* The action sits at the banner's right edge (just left of a dismiss button,
   which stays last); at phone width it wraps under the message. The message
   is not capped at the prose measure (Judd, 12 November 2026). */
.k-banner-action { margin-left: auto; font-weight: 600; text-decoration: underline; color: inherit; }
.k-banner-action--external { display: inline-flex; align-items: center; gap: 4px; }
.k-banner-action--external svg { width: 12px; height: 12px; stroke-width: 2; }
.k-banner-dismiss {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 3px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  opacity: .75;
}
.k-banner-dismiss:hover { opacity: 1; }
.k-banner-dismiss svg { width: 12px; height: 12px; }

/* The View as banner (Phase 29, plan §6.2; DL §5.14b): the k-banner in the warning
   tone as the shell's top strip, above the context bar, the full width of the content
   column with no radius or margin. Stop is a POST form's button at its right edge; at
   phone width it wraps under the message, as a banner's action does. From 900 px it is
   one line and sticky, and the context bar sticks below it; under 900 px it wraps and
   scrolls away with the page. The distance to the end is plain text, and a rose chip in
   the last five minutes. */
.k-view-as-bar {
  border-radius: 0;
  border-width: 0 0 1px;
  border-color: var(--k-border);
  margin-bottom: 0;
  padding: 6px var(--k-gutter);
  box-sizing: border-box;
}
.k-view-as-bar__form { margin: 0 0 0 auto; }
.k-view-as-bar__relative { font-weight: 400; }
@media (min-width: 900px) {
  .k-view-as-bar {
    position: sticky;
    top: 0;
    z-index: 31;
    min-height: var(--k-view-as-h);
  }
  .k-content:has(.k-view-as-bar) { --k-bar-h: calc(var(--k-topbar-h) + var(--k-view-as-h)); }
  .k-content:has(.k-view-as-bar) .k-topbar { top: var(--k-view-as-h); }
  html:has(.k-view-as-bar) { scroll-padding-top: calc(var(--k-view-as-h) + var(--k-topbar-h) + 8px); }
}

/* k-avatar ----------------------------------------------------------------- */
.k-avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #e7eae8;
  color: var(--k-text);
  font-weight: 600;
  flex: 0 0 auto;
  /* Staff grey ring by default */
  box-shadow: 0 0 0 2px #cfd4d1;
  user-select: none;
}
.k-avatar--24 { width: 24px; height: 24px; font-size: 9px; }
.k-avatar--32 { width: 32px; height: 32px; font-size: 11px; }
.k-avatar--44 { width: 44px; height: 44px; font-size: 15px; }
/* House rings identify people only — never UI state (spec §3.1) */
.k-avatar--dalrymple  { box-shadow: 0 0 0 2px var(--k-house-dalrymple); }
.k-avatar--mulligan   { box-shadow: 0 0 0 2px var(--k-house-mulligan); }
.k-avatar--leichhardt { box-shadow: 0 0 0 2px var(--k-house-leichhardt); }
.k-avatar--kennedy    { box-shadow: 0 0 0 2px var(--k-house-kennedy); }

/* --------------------------------------------------------------------------
   5a. Work plane — record pages, progress, history, comments (§8.1)
   -------------------------------------------------------------------------- */

/* Record pages — two-column main + side rail (§8.1). Stacks below 900px so it
   matches the context-sidebar-as-drawer breakpoint in §3.4. */
.k-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}
.k-record-main { min-width: 0; }
@media (max-width: 899px) {
  .k-record { grid-template-columns: minmax(0, 1fr); }
}
/* The prose measure (clause 5): a description's, a comment's or any other
   rich-text body's lines stop short of 100 characters (46em of 13 px text is
   598 px: about 92 Montserrat characters of ordinary prose, and 92 by the
   audit's width-over-half-the-font-size measure), however wide the main
   column is.
   The block, not its card: the card keeps the column's width. */
.k-record-main .k-body { max-width: 46em; }
/* The person page's duties list flows to the card's width and has no bullet (Phase 33, D1, U30). */
#k-position-body > ul { list-style: none; margin: 0; padding: 0; }
#k-position-body > ul > li { max-width: none; }

/* History trail inside a blade */
.k-history { list-style: none; margin: 0; padding: 0; }
.k-history > li { padding: 8px 0; border-bottom: 1px solid var(--k-divider); }
.k-history > li:last-child { border-bottom: 0; }
.k-history ul { margin: 4px 0 0; padding-left: 18px; }

/* Comment thread — §8.1 */
.k-comment { padding-bottom: 14px; border-bottom: 1px solid var(--k-divider); }
.k-comment > * + * { margin-top: 6px; }
.k-comment:last-child { border-bottom: 0; padding-bottom: 0; }
/* The newest reply's wrapper (ruling 35): the fragment a requester's links
   land on. It holds one comment, so that comment is its wrapper's last child
   — keep its rule unless the wrapper is itself the list's last (the agent's
   newest-first thread, where the newest is first). */
.k-newest-reply { scroll-margin-top: 16px; }
/* The list is where the requester's "Show earlier/newer replies" land. */
.k-comment-list { scroll-margin-top: 16px; }
.k-newest-reply:not(:last-child) > .k-comment:last-child { padding-bottom: 14px; border-bottom: 1px solid var(--k-divider); }
.k-mention { white-space: nowrap; }
/* A mention node in the editor (editor/schema.js's Mention, stored as
   span[data-mention] with no class): drawn as the page's mention chip, so a
   person picked from the @ list looks the same before and after posting. */
.k-rt-prosemirror span[data-mention] {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border-radius: var(--k-r-pill);
  background: var(--k-info-bg);
  color: var(--k-info-fg);
  font-weight: 600;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   5b. Work plane — board (§8.1)
   -------------------------------------------------------------------------- */

/* States as columns, items as cards. One row of columns on a wide screen;
   below 600px the same markup stacks into full-width sections (§3.4) — a
   re-flow of "heading, then a list of cards", not a CSS trick standing in
   for a different rendering.

   The columns share the board's width (Phase 18 Wave 3, W3; ruling 46,
   design record §14.3.1 rule 3): each grows equally from a floor of 260 px
   (240 px below 900 px, today's tablet width), so from about 1920 px every
   column of a workspace's board shows without scrolling sideways, and the
   cards widen with them, or sit two or three across in a wide column
   (below). Only where the floors cannot all fit does the row
   scroll sideways, as §3.4 has it for a board. A board of one or two
   columns stops each column at a third of the board (560 px at least) and
   sits left, so its cards do not stretch across an ultrawide screen; a
   board of three or more always fills. */
.k-board {
  --k-board-gap: 12px;
  --k-board-col-min: 260px;
  --k-board-col-max: max(560px, calc((100% - 2 * var(--k-board-gap)) / 3));
  display: flex;
  gap: var(--k-board-gap);
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 10px;
}
@media (max-width: 899px) {
  .k-board { --k-board-col-min: 240px; }
}
.k-board-col {
  flex: 1 1 0;
  min-width: var(--k-board-col-min);
  max-width: var(--k-board-col-max);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
  padding: 12px;
  background: var(--k-surface-2);
  border: 1px solid var(--k-divider);
  border-radius: var(--k-r-box);
  /* Each column is a size container, so its cards answer to the column's
     own width (below). */
  container: k-board-col / inline-size;
}
.k-board-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.k-board-cards { list-style: none; margin: 0; padding: 0; }
.k-board-cards > li + li { margin-top: 8px; }
/* A column wide enough for two cards of 300 px lays its cards out as a grid
   rather than stretching each one (Phase 18 Wave 3, W3): a 531 px column at
   1920 px stays one card across, a 733 px column at 2560 holds two and a
   1,027 px column at 3440 three. Cards fill each row left to right, then
   down, which is their order in the page, so reading and Tab order are
   unchanged; a card whose "⋯" is open grows on its own, its neighbours
   keeping their height. Narrower columns, and every phone, are as before. */
@container k-board-col (min-width: 608px) {
  .k-board-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 8px;
    align-items: start;
  }
  .k-board-cards > li + li { margin-top: 0; }
}
.k-board-empty { display: block; }

.k-board-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-box);
}
.k-board-card[draggable="true"] { cursor: grab; }
.k-board-card.is-dragging { opacity: .45; }
.k-board-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.k-board-card-key { font-weight: 600; font-size: 11.5px; color: var(--k-brand); }
.k-board-card-title { font-size: 12.5px; line-height: 18px; color: var(--k-text); }
/* The card's moves (Phase 18 Wave 2; MK10): the k_actions row "⋯" — 28 px,
   44 px below 600 px (the component's own rule, WCAG 2.2 2.5.8 and C11) —
   right-aligned on the card's last line. Open, its panel sits in the card's
   own flow at the card's width, not floating: a floating panel would be
   clipped by the board's horizontally scrolling row and would cover the
   next card. */
.k-board-card-moves { display: flex; justify-content: flex-end; }
.k-board-card-moves > .k-actions--row[open] { flex: 1 1 100%; display: flex; flex-direction: column; }
.k-board-card-moves > .k-actions--row[open] > summary { align-self: flex-end; }
.k-board-card-moves > .k-actions--row > .k-actions-panel {
  position: static;
  width: 100%;
  max-height: none;
  margin-top: 6px;
  box-shadow: none;
  border: 1px solid var(--k-border);
}

/* Drag feedback. Set on the columns while a card is in the air: where it can
   land, where it cannot, and where two named transitions both land — which
   the drag refuses to choose between and hands to the card's "⋯" menu. */
.k-board-col.is-droppable { outline: 2px dashed var(--k-brand); outline-offset: 2px; }
.k-board-col.is-blocked { opacity: .55; }
.k-board-col.is-choose { outline: 2px dotted var(--k-info-fg); outline-offset: 2px; }

@media (max-width: 599px) {
  .k-board { flex-direction: column; overflow-x: visible; }
  .k-board-col { flex: 1 1 auto; width: 100%; min-width: 0; max-width: none; }
}

/* --------------------------------------------------------------------------
   5c. Work plane — timeline / Gantt (§8.1, Phase 14 WS-A)
   -------------------------------------------------------------------------- */

/* The chart is an ordinary .k-table; only the Chart column gets its own
   rules. Geometry is computed server-side in a 0..1000 viewBox
   (kairos/work/timeline.py) and the <svg> is stretched to the cell's real
   width here — resolution independence lives entirely in this one rule. */
/* The mock-up of 30 October 2026: a fixed layout, so a long title truncates
   with an ellipsis rather than widening its column, every row one 36 px line.
   Key 84, Item the rest, the assignee 44, Due 92, the chart a share. Below
   760 px of card the table scrolls inside its card (.k-table-scroll), never
   the page. */
.k-gantt-table { table-layout: fixed; min-width: 760px; }
.k-gantt-col--key { width: 84px; }
.k-gantt-col--who { width: 44px; }
.k-gantt-col--due { width: 92px; }
.k-gantt-col--chart { width: 52%; }
/* The chart fills the page's width, and on a wide screen the spare width
   goes to the chart rather than to the title (Phase 18 Wave 3, W3; design
   record §14.3.1 rule 3): the chart is its own size container, so the share
   answers to the width the chart has, whatever the navigation is doing. A
   wider chart draws the same days larger rather than more of them. */
.k-gantt-chart { container: k-gantt / inline-size; }
@container k-gantt (max-width: 1000px) {
  .k-gantt-col--chart { width: 46%; }
}
@container k-gantt (min-width: 1500px) {
  .k-gantt-col--chart { width: 58%; }
}
@container k-gantt (min-width: 2100px) {
  .k-gantt-col--chart { width: 64%; }
}
.k-gantt {
  display: block;
  width: 100%;
  height: 36px;
  overflow: visible;
}
/* A row is one 36 px line (the chart cell has no padding, so the row's <svg>
   fills it and the today line and gridlines run on from row to row). */
.k-gantt-table tbody td { height: 36px; padding-top: 0; padding-bottom: 0; }
.k-gantt-table td.k-gantt-cell,
.k-gantt-table th.k-gantt-cell { position: relative; padding: 0; }
.k-gantt-table td.k-gantt-cell:last-child,
.k-gantt-table th.k-gantt-cell:last-child { padding-right: 0; }
/* The chart-level axis definitions (NOTE 10): weekend shading, gridline
   ticks and the today marker live here exactly once, in a <defs> block, and
   every row's own .k-gantt <svg> pulls them in with a single <use>. This
   <svg> itself draws nothing and must take no layout space. */
.k-gantt-axis-defs { display: block; width: 0; height: 0; overflow: hidden; }
.k-gantt-band { fill: var(--k-surface-2); }
.k-gantt-tick { stroke: var(--k-divider); stroke-width: 1; }
.k-gantt-tick.is-major { stroke: var(--k-border); }
/* Today (the mock-up): one dark line down the chart, under a dark pill. */
.k-gantt-today { stroke: var(--k-text); stroke-width: 1.5; }

/* Bars. Tone is a class, never a `fill=`/`style=` attribute (CSP, §10.5):
   outline = not started, fill = started, is-done overrides both to a muted
   fill, is-overdue tints red regardless of which shape it is drawn as. */
.k-gantt-bar {
  fill: var(--k-selected);
  stroke: var(--k-brand);
  stroke-width: 1.5;
  /* DEFECT D1 (exit proof §4, 17 September 2026). SVG's default
     `pointer-events: visiblePainted` hit-tests only where a shape is
     actually PAINTED, so `.k-gantt-outline` below — which is every
     unstarted item, the state every newly raised item is in — responded
     on its 1.5px stroke and nowhere else, and the `cursor: grab` beside
     it was drawn over an area no pointer could grab. `all` hit-tests the
     interior and the perimeter regardless of what `fill` and `stroke`
     resolve to, which is the one value that leaves `fill: none` meaning
     exactly what it says visually. Chromium and Firefox both honour it.
     It sits on the base rule rather than on `[data-gantt-bar]` so that
     the hit area is the same shape for every bar and a bar becoming
     draggable never also changes where the pointer lands. */
  pointer-events: all;
}
.k-gantt-bar.k-gantt-outline { fill: none; stroke: var(--k-brand); stroke-width: 1.5; }
.k-gantt-bar.k-gantt-fill { fill: var(--k-brand); stroke: none; }
.k-gantt-bar.is-done { fill: var(--k-faint); stroke: none; }
.k-gantt-bar.is-overdue { fill: var(--k-bad-bg); stroke: var(--k-bad-fg); }
.k-gantt-bar.is-overdue.k-gantt-fill { fill: var(--k-bad-fg); stroke: none; }
.k-gantt-bar[data-gantt-bar] {
  cursor: grab;
  touch-action: none;
  /* Without this a drag across the chart selects the neighbouring cells'
     text instead of moving the bar (NOTE 12) — the board block above sets
     the same pair for the same reason. */
  user-select: none;
  -webkit-user-select: none;
}
/* The clamp notch is decoration and is drawn AFTER the bar, so it is on
   top of it; it is also a SIBLING of the <rect>, which means
   `closest("[data-gantt-bar]")` in kairos.js returns null for it however
   plainly the pointer is on the bar underneath. A clamped bar is four
   units wide and the notch is seven, so the notch covered the bar
   entirely and no overdue item could be dragged at all — the second half
   of defect D1. It is inert: the pointer falls through to the bar. */
.k-gantt-notch { fill: var(--k-muted); pointer-events: none; }

/* The running day-delta while a bar is dragged: over the cell's top right,
   so it never adds to the row's 36 px. */
.k-gantt-preview {
  position: absolute;
  top: 1px;
  right: 6px;
  font-size: 10.5px;
  line-height: 12px;
  color: var(--k-muted);
  pointer-events: none;
}

/* Late (the mock-up of 30 October 2026): the due date to today, hatched rose
   by the one <pattern> in the axis definitions; its label right of today. */
.k-gantt-late { stroke: var(--k-bad-fg); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.k-gantt-hatch-bg { fill: var(--k-bad-bg); }
.k-gantt-hatch-line { stroke: var(--k-bad-fg); stroke-width: 1.5; }
/* An epic's summary bar (TL1): thin, dark and solid; greyed once done. */
.k-gantt-bar.k-gantt-summary { fill: var(--k-sidebar); stroke: none; }
.k-gantt-bar.k-gantt-summary.is-done { fill: var(--k-faint); }
/* A bar's label: "81 d late" (rose) right of today, "in 3 weeks" (muted)
   right of the due date. Its own <svg>, laid over the cell with no viewBox,
   so the text keeps its shape. */
.k-gantt-labels { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.k-gantt-label { fill: var(--k-muted); font-size: 11px; font-weight: 600; }
.k-gantt-label.is-bad { fill: var(--k-bad-fg); }

/* The header: the columns, then the axis — month names at month starts, the
   dark "Today · 30 Oct" pill and the today line. */
.k-gantt-table thead th { vertical-align: bottom; }
/* The header band's uppercase and tracking are the column names', not the
   axis's: "Aug" and "Today · 30 Oct" keep their case. */
.k-gantt-axis-head { display: block; width: 100%; height: 44px; overflow: visible; text-transform: none; letter-spacing: normal; }
.k-gantt-axislabel { fill: var(--k-muted); font-size: 11px; font-weight: 600; }
.k-gantt-headtick { stroke: var(--k-border); stroke-width: 1; }
.k-gantt-pill rect { fill: var(--k-text); }
.k-gantt-pill text { fill: var(--k-surface); font-size: 10.5px; font-weight: 700; }
.k-gantt-who { text-align: center; }
.k-gantt-who svg { color: var(--k-muted); vertical-align: middle; }

/* Groups (the mock-up): each epic a <tbody>, its header row the grey band;
   collapsed (kairos.js), its tasks are hidden. */
.k-gantt-group + .k-gantt-group { border-top: 1px solid var(--k-divider); }
.k-gantt-table tbody tr.k-gantt-grouprow { background: var(--k-surface-2); }
.k-gantt-table tbody tr.k-gantt-grouprow:hover { background: var(--k-surface-2); }
.k-gantt-group.is-collapsed > tr.k-gantt-member { display: none; }
.k-gantt-toggle {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-right: 4px; padding: 0; border: 0; border-radius: var(--k-r-pill);
  background: transparent; color: var(--k-text-2); cursor: pointer;
}
.k-gantt-toggle::after { content: ""; position: absolute; inset: -6px; }
.k-gantt-toggle:hover { background: var(--k-divider); }
.k-gantt-toggle:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 1px; }
.k-gantt-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.k-gantt-grouptitle { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--k-text); }
.k-gantt-tally { flex: none; margin-left: 10px; font-size: var(--k-fs-meta); color: var(--k-muted); white-space: nowrap; }
/* A task sits indented under its epic. */
.k-gantt-member .k-gantt-title__line { padding-left: 28px; }
.k-gantt-title__line > .k-table-rowlink { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-gantt-row.is-done .k-table-rowlink,
.k-gantt-row.is-done .k-key { color: var(--k-muted); }

/* The assignee: the 22 px avatar, or the dashed "+" that opens Assign in the
   panel (DL §5.2: unassigned slots use a dashed border). */
.k-gantt-who .k-avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.k-gantt-assign {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border: 1px dashed var(--k-faint); border-radius: 50%;
  color: var(--k-muted); text-decoration: none;
}
.k-gantt-assign::after { content: ""; position: absolute; inset: -8px; }
.k-gantt-assign:hover { border-color: var(--k-brand); color: var(--k-brand); background: var(--k-selected); }
.k-gantt-assign:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 2px; }

/* The Due chip on a row: compact, its date alone ("10 Aug"). */
.k-gantt-due .k-fact__chip { min-height: 22px; padding: 1px 8px; font-size: var(--k-fs-label); }
.k-gantt-due .k-fact__chip.is-editor svg { display: none; }

/* The keyboard/no-JS/touch reschedule path: the row's Due chip (Phase 18
   Wave 2), the record's own component. It lives in the Due cell, not the
   Chart cell, so it survives the <600px rule below; open, its panel sits in
   the cell's own flow rather than floating, because a floating panel would
   be clipped by the chart's scrolling wrapper — as the Reschedule form it
   replaced did — and it is wider than the narrow Due column, so it spills
   over the chart beside it, above the bars. */
.k-gantt-due .k-fact-panel,
.k-gantt-unscheduled .k-fact-panel {
  position: relative;
  z-index: 2;
  width: max-content;
  min-width: 0;
  margin: 6px 0;
  box-shadow: none;
  border: 1px solid var(--k-border);
}

/* The unscheduled strip (the mock-up): under the table, inside its card. */
.k-gantt-unscheduled { display: flex; align-items: flex-start; gap: 8px 16px; padding: 10px 20px; border-top: 1px solid var(--k-divider); }
.k-gantt-unscheduled__label { flex: none; margin: 0; padding-top: 4px; font-size: var(--k-fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }
.k-gantt-unscheduled__list { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; list-style: none; }
.k-gantt-unscheduled__item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 32px; }
.k-gantt-unscheduled__title { flex: 1 1 200px; min-width: 0; font-weight: 600; color: var(--k-text); }
.k-gantt-unscheduled__item > .k-due-chip { margin-left: auto; }
.k-gantt-unscheduled-card { margin-top: 12px; }
.k-gantt-unscheduled-card > .k-gantt-unscheduled { border-top: 0; }

/* The legend (the mock-up, less the milestone, TL3). */
.k-gantt-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 12px 0 0; padding: 0; list-style: none; font-size: var(--k-fs-meta); color: var(--k-muted); }
.k-gantt-legend > li { display: inline-flex; align-items: center; gap: 6px; }
.k-gantt-swatch { width: 24px; height: 12px; flex: none; }
.k-gantt-swatch--fill { fill: var(--k-brand); }
.k-gantt-swatch--outline { fill: none; stroke: var(--k-brand); stroke-width: 1.5; }
.k-gantt-swatch--done { fill: var(--k-faint); }

/* The toolbar (the mock-up): one row in place of the range row and the
   filter row — the pager, Today, Days · Weeks · Months, then the summary,
   Search and Filter at the right. It wraps by flex on a narrow screen. */
.k-gantt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.k-gantt-toolbar > .k-filters[data-k-filter-summary] { flex: 1 1 280px; justify-content: flex-end; margin-top: 0; }
.k-gantt-toolbar > .k-filters > .k-spacer { display: none; }
.k-gantt-toolbar + .k-section-gap { margin-top: 16px; }
.k-gantt-pager { display: inline-flex; align-items: center; height: var(--k-ctl-h); padding: 0 4px; background: var(--k-surface); border: 1px solid var(--k-control); border-radius: var(--k-r-pill); }
.k-gantt-pager__step { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--k-r-pill); color: var(--k-text-2); }
.k-gantt-pager__step::after { content: ""; position: absolute; inset: -4px -2px; }
.k-gantt-pager__step:hover { background: var(--k-surface-2); }
.k-gantt-span { position: relative; }
.k-gantt-span > summary { list-style: none; }
.k-gantt-span > summary::-webkit-details-marker { display: none; }
.k-gantt-span__label { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; border-radius: var(--k-r-pill); font-size: 12px; color: var(--k-text-2); cursor: pointer; white-space: nowrap; }
.k-gantt-span__label b { font-weight: 600; color: var(--k-text); }
.k-gantt-span__label:hover { background: var(--k-surface-2); }
.k-gantt-span__label:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 1px; }
.k-gantt-span__label svg { width: 10px; height: 10px; }
.k-gantt-span__weeks { color: var(--k-muted); }
.k-gantt-span__panel { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; padding: 14px 16px; background: var(--k-surface); border: 1px solid var(--k-border); border-radius: var(--k-r-card); box-shadow: var(--k-shadow-overlay); }
.k-gantt-span__panel .k-range-row { flex-wrap: nowrap; margin: 0; }
.k-gantt-span__panel .k-range-row__field { flex: 0 0 170px; min-width: 0; }
.k-range-row__actions { display: flex; align-items: center; gap: 12px; }
.k-gantt-scale .k-seg__btn[aria-current="true"],
.k-gantt-scale .k-seg__btn[aria-current="true"]:hover { background: var(--k-sidebar); color: var(--k-on-brand); }
.k-text-bad { color: var(--k-bad-fg); }
@media (max-width: 599px) {
  .k-gantt-span__panel { position: fixed; left: 16px; right: 16px; top: auto; }
  .k-gantt-span__panel .k-range-row { flex-wrap: wrap; }
  .k-gantt-span__weeks { display: none; }
  /* A phone draws no bars (the cards replace the chart), so no legend. */
  .k-gantt-legend { display: none; }
}

/* <600px (§3.4): the whole .k-table-scroll — table, chart cell and all — is
   already hidden by the shared rule in §2's media queries above, and
   timeline_chart.html's own <ul class="k-table-cards"> is what a reader sees
   instead (styled by the generic stacked-card rules in §5). There used to be
   a rule here hiding only the Chart cell and leaving the rest of the row
   visible with no card list to fall back to, which produced BLOCKER 1 — a
   blank page below 600px — because the row was still there but its parent
   was display:none. Nothing needs to be written here now that the card list
   exists; this comment exists so nobody re-adds a cell-level rule that would
   quietly never run. */

/* --------------------------------------------------------------------------
   6. Utilities
   -------------------------------------------------------------------------- */
.k-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* Not drawn below 600 px (Phase 28 slice 8d): a page's second bar button that is a print or desktop job, so the
   phone's bar keeps its one primary. The page still reaches it another way (Audit's OFI pack: Reports). */
@media (max-width: 599px) {
  .k-hide-phone { display: none !important; }
}

.k-stack-16 > * + * { margin-top: 16px; }
.k-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.k-section-gap { margin-top: 32px; }

/* The description block's heading + Edit control (spec §11 Phase 17). ``.k-row``
   already gives the flex row; this is the one thing it does not — pushing
   the control to the far edge of the card — and it earns a class of its own
   rather than an inline style, which the CSP (spec §10.5) forbids outright. */
.k-description-head { justify-content: space-between; }

/* htmx request indicator (indicator styles are ours; the htmx-injected
   inline <style> is disabled via the htmx-config meta for CSP, so these are
   the ONLY .htmx-indicator rules in the product — nothing supplies a fallback
   if they are wrong).

   The class carries its own appearance rather than only its own opacity.
   Before Phase 9 it set opacity and nothing else, so the markup the design
   asks for — a spinner element carrying class="htmx-indicator" inside each
   composer, beside each redact control and on the thread's pagination links —
   would have faded a zero-by-zero box from invisible to invisible. An element
   with this class is now a 14px ring that spins while its request is in
   flight; markup adds the element and the class, nothing else.

   opacity, not display: none, deliberately. An indicator inside a composer
   would otherwise reflow the form every time somebody posts, so the space is
   reserved permanently and only the paint changes. Mark the element
   aria-hidden and put the announcement on the control being disabled: this is
   a paint, and a screen reader has nothing to read in a ring. */
.htmx-indicator {
  display: inline-block;
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--k-border);
  border-top-color: var(--k-brand);
  opacity: 0;
  transition: opacity .15s ease;
  animation: k-htmx-spin .7s linear infinite;
  vertical-align: -2px;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { opacity: 1; }

@keyframes k-htmx-spin { to { transform: rotate(360deg); } }

/* The ring still appears and still disappears without the motion — the
   loading state is the opacity change, and the rotation is decoration. */
@media (prefers-reduced-motion: reduce) {
  .htmx-indicator { animation: none; transition: none; }
  /* The progress line under the bar (4.3b) is drawn whole and still. */
  .k-app:has(#k-main[aria-busy="true"], #k-main [aria-busy="true"], #k-panel[aria-busy="true"], #k-panel [aria-busy="true"]) .k-progress-line {
    transform: scaleX(1);
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   7. Style-guide support (/style-guide/ only — no inline styles under CSP)
   -------------------------------------------------------------------------- */
.k-sg-section { margin-top: 36px; }
/* The reference page keeps the rules it demonstrates (Phase 18 Wave 3
   repairs): its running text stops at the prose measure, rather than running
   440 characters across a 3440 px screen. A control in a demonstration row
   fills its column, as a field does everywhere (29 October 2026). A table
   cell keeps its own rules. */
.k-sg-section :is(p, .k-meta):not(td *, th *) { max-width: 42em; }
.k-sg-section > .k-label { display: block; margin-bottom: 2px; }
/* The guide's section titles: the design language's section title, 24/300
   (DL §2.2; slice 16 stage 4), not the page title's 30. */
.k-sg-section > .k-title { margin-bottom: 14px; font-size: var(--k-fs-section); }
.k-sg-subhead { margin: 18px 0 10px; }
.k-sg-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px 24px;
}
.k-sg-actions-grid .k-sg-subhead { margin-top: 0; margin-bottom: 4px; }
.k-sg-rowgap { margin-top: 14px; }
/* The "Jump to" row's specimen, drawn as a phone draws it at every width
   (at 600 px and wider the real row is a skip link, off screen until focused). */
.k-sg-jump .k-jump { position: static; left: auto; }
.k-sg-jump .k-jump-label { display: inline; }
.k-sg-jump .k-jump-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-pill);
}
/* The navigation specimen (C14): the shell's own classes, held still. */
.k-sg-nav-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.k-rail.k-sg-nav {
  display: flex;
  position: static;
  transform: none;
  box-shadow: none;
  height: auto;
  width: var(--k-sidebar-w);
  flex: 0 0 auto;
  padding: 8px 0;
  border-radius: var(--k-r-box);
  z-index: auto;
}
.k-sg-nav-icons { display: flex; align-items: flex-start; }
.k-rail.k-sg-nav--icons { width: var(--k-sidebar-w-collapsed); border-radius: var(--k-r-box) 0 0 var(--k-r-box); }
.k-sg-nav--icons .k-rail-item { justify-content: center; padding: 9px 0; }
.k-rail.k-sg-nav--flyout {
  width: 248px;
  padding: 16px 10px;
  border-left: 1px solid rgba(255,255,255,.14);
  border-radius: 0 var(--k-r-box) var(--k-r-box) 0;
}
.k-sg-nav-flyout-head { display: block; padding: 4px 8px 8px; color: #ffffff; font-weight: 600; font-size: 15px; }
/* The page-width specimens (Wave 3, W1): a 3440 px screen in miniature, the
   navigation 240/3440 of it and a reading page's content 2400/3200 of the
   space beside it, centred. */
/* The style guide's one-column board: the column takes the specimen's full
   width (a real board of one column stops at a third of it), so the card
   grid shows at any desktop width. */
.k-sg-board-one > .k-board-col { max-width: none; }
.k-sg-screen {
  display: flex;
  height: 56px;
  margin-top: 8px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-item);
  overflow: hidden;
  background: var(--k-page);
}
.k-sg-screen-nav { flex: 0 0 calc(100% * 240 / 3440); background: var(--k-sidebar); }
.k-sg-screen-area { flex: 1 1 auto; display: flex; justify-content: center; padding: 8px; }
.k-sg-screen-content {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--k-surface);
  box-shadow: inset 0 0 0 1px var(--k-border);
  color: var(--k-muted);
  font-size: 11.5px;
}
.k-sg-screen-content--data { flex: 1 1 auto; }
.k-sg-screen-content--reading { flex: 0 0 75%; }
/* The record-page specimens (Phase 18 Wave 3, W4): the header across the
   top, then two columns, or three with History. */
.k-sg-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22%;
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-item);
  background: var(--k-page);
}
.k-sg-record > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  border-radius: 6px;
  background: var(--k-surface);
  box-shadow: inset 0 0 0 1px var(--k-border);
  color: var(--k-muted);
  font-size: 11.5px;
  text-align: center;
  padding: 4px;
}
.k-sg-record > .k-sg-record-head { grid-column: 1 / -1; min-height: 32px; }
.k-sg-measure { border-top: 1px dashed var(--k-border); padding-top: 8px; }
/* The form specimens (Phase 18 Wave 3, W5): the proportions of "Form
   layout" — two columns of fields and a panel; one 760 px column and a
   panel; a definition and its related lists. */
.k-sg-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-item);
  background: var(--k-page);
}
.k-sg-form--two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 24%; }
.k-sg-form--two > .k-sg-form-wide { grid-column: 1 / 3; }
.k-sg-form--two > .k-sg-form-side { grid-column: 3; grid-row: 1 / 3; }
.k-sg-form--short { grid-template-columns: 34% 24%; justify-content: start; }
/* The narrow, centred form (W5b): two columns at their natural width, the
   page's spare width shared out either side. */
.k-sg-form--narrow { grid-template-columns: 31% 31%; justify-content: center; }
.k-sg-form--narrow > .k-sg-form-wide { grid-column: 1 / -1; }
.k-sg-form--detail { grid-template-columns: 34% minmax(0, 1fr); }
.k-sg-form > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  border-radius: 6px;
  background: var(--k-surface);
  box-shadow: inset 0 0 0 1px var(--k-border);
  color: var(--k-muted);
  font-size: 11.5px;
  text-align: center;
  padding: 4px;
}
.k-sg-form > .k-sg-form-wide { min-height: 32px; }
.k-sg-form > .k-sg-form-side { background: var(--k-selected); }
.k-sg-measure .k-body { max-width: 46em; }
/* The touch-target specimens: the dashed 44 px tap area, the drawn control
   inside it at its real size. */
.k-sg-taps { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.k-sg-tap {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px dashed var(--k-brand);
  border-radius: 6px;
  background: var(--k-selected);
}
.k-sg-tap--wide { width: auto; padding-inline: 8px; }
.k-sg-tap-drawn--check {
  width: 16px;
  height: 16px;
  border: 1px solid var(--k-border);
  border-radius: 4px;
  background: var(--k-surface);
}
.k-sg-tap-drawn--icon { display: inline-grid; place-items: center; width: 24px; height: 24px; color: var(--k-muted); }
.k-sg-tap-drawn--link { color: var(--k-text); font-weight: 600; font-size: 12.5px; }
.k-sg-typerow { padding: 10px 0; border-bottom: 1px solid var(--k-divider); }
.k-sg-typerow:last-child { border-bottom: 0; }
.k-sg-typemeta { display: block; margin-bottom: 2px; }
.k-sg-toasts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   8. Sign-in page (accounts/login.html — standalone, outside the app shell)
   -------------------------------------------------------------------------- */
.login-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--k-page);
  font-family: var(--k-font);
  color: var(--k-text);
  font-size: 13px;
  line-height: 20px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--k-surface);
  border-radius: var(--k-r-box);
  padding: 32px 28px 28px;
}
.login-mark {
  margin: 0 0 4px;
}
.login-lockup { display: block; height: auto; max-height: 48px; max-width: 100%; }
.login-lede {
  margin: 0 0 24px;
  color: var(--k-muted);
  font-size: 11.5px;
  line-height: 16px;
  font-weight: 300;
}
.login-banner {
  border-radius: var(--k-r-item);
  padding: 10px 14px;
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 18px;
}
.login-banner p { margin: 0; }
.login-banner--info {
  background: var(--k-info-bg);
  color: var(--k-info-fg);
}
.login-banner--error {
  background: var(--k-bad-bg);
  color: var(--k-bad-fg);
}
.login-button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  border-radius: var(--k-r-pill);
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.login-divider {
  display: block;
  margin: 24px 0 16px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  /* "Local administrator sign-in" is meaningful text, not decoration — the
     hint tone fails AA here (3.16:1 on white); see the token note above. */
  color: var(--k-muted);
}
/* "Kairos administrator? Sign in locally" (Phase 18 Wave 2): a native
   <details>, so it opens with scripting off. The summary is a 44 px target
   (WCAG 2.2 2.5.8) in the meaningful-text tone, not the hint tone. */
/* On a touch screen the sign-in button is a 44 px target too (Phase 18
   Wave 3 repairs; it was 42): its real box, not a pseudo-element. A mouse
   keeps the button it had. */
@media (max-width: 599px), (pointer: coarse) {
  .login-button { display: flex; align-items: center; justify-content: center; min-height: 44px; }
}
.login-local { margin: 20px 0 0; }
.login-local-summary {
  display: block;
  box-sizing: border-box;
  padding: 12px 0;
  text-align: center;
  line-height: 20px;
  min-height: 44px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--k-brand);
  list-style: none;
}
.login-local-summary::-webkit-details-marker { display: none; }
/* The chevron is drawn, not typed, so it adds nothing to the accessible name. */
.login-local-summary::after {
  content: "";
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.login-local[open] > .login-local-summary { margin-bottom: 12px; }
.login-local[open] > .login-local-summary::after { transform: translateY(2px) rotate(-135deg); }
.login-local-summary:focus-visible {
  outline: 2px solid var(--k-brand);
  outline-offset: 2px;
  border-radius: var(--k-r-item);
}
.login-field { margin: 0 0 14px; }
.login-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--k-text);
  margin: 0 0 4px;
}
.login-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-item);
  padding: 6px 12px;
  font: inherit;
  color: var(--k-text);
  background: var(--k-surface);
}
.login-field input:focus {
  outline: 2px solid var(--k-brand);
  outline-offset: 0;
  border-color: var(--k-brand);
}
.login-field .login-field-error {
  margin: 4px 0 0;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-bad-fg);
}
.login-help {
  margin: 16px 0 0;
  font-size: 11.5px;
  line-height: 16px;
  font-weight: 300;
  /* Instructional text ("Local sign-in is reserved for…"), not decoration —
     the hint tone fails AA here (3.16:1 on white); see the token note above. */
  color: var(--k-muted);
}

/* --------------------------------------------------------------------------
   9. Configuration → Permissions (spec §7.4)

   The authorisation-line reader and the grant-line editor. Everything here
   builds on the §3.1 tokens and the §3.3 components; nothing introduces a
   colour, and no state is ever carried by a house colour.
   -------------------------------------------------------------------------- */

/* One authored line, read as a sentence -------------------------------- */
.k-lines {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.k-line {
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-box);
  padding: 16px 18px;
}
.k-line + .k-line { margin-top: 12px; }
.k-line-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.k-line-target {
  font-weight: 600;
  font-size: 13px;
  line-height: 18px;
  color: var(--k-text);
}
.k-line-reaches {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--k-text);
}

.k-line-keys {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.k-line-keys > li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 4px 0;
  border-top: 1px solid var(--k-divider);
}
.k-line-keys > li:first-child { border-top: 0; }
.k-line-key-label {
  font-weight: 600;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--k-text);
}
.k-line-key-desc {
  font-weight: 300;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-muted);
}
/* A stored key the registry does not know: inert, and shown so it can go. */
.k-line-keys > li.is-unknown .k-line-key-label { color: var(--k-bad-fg); }

/* Inside a checkbox/radio label (the grant-line editor's action list and its
   Administrative permissions groups), the label and description share one
   plain inline <span> rather than the .k-line-keys list's flex row above, so
   they run together without their own stacking rule. .k-check itself is
   display:flex, which only blockifies that wrapping span, not its children. */
.k-check .k-line-key-label,
.k-check .k-line-key-desc {
  display: block;
}
.k-check .k-line-key-desc { margin-top: 2px; }

/* A remark on one line — a wildcard that misses a restricted type, or
   create's register scope. Tinted rather than shouted: it is context, not a
   failure. */
.k-line-remark {
  margin: 10px 0 0;
  padding: 6px 12px;
  border-radius: var(--k-r-item);
  background: var(--k-info-bg);
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-text);
}
.k-line-note {
  margin: 10px 0 0;
  font-weight: 300;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-muted);
  border-left: 2px solid var(--k-border);
  padding-left: 10px;
}

/* The grant-line editor ------------------------------------------------- */
.k-scope-option { padding: 10px 0; }
.k-scope-option + .k-scope-option { border-top: 1px solid var(--k-divider); }
.k-scope-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  line-height: 18px;
  color: var(--k-text);
}
.k-scope-caption {
  display: block;
  margin-top: 2px;
  font-weight: 300;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-muted);
}

/* A control that is offered and refused: a wildcard over a restricted
   target. Greyed rather than hidden, because the caption beside it is what
   teaches the rule at the moment it bites (design point 6). */
.k-check.is-disabled,
.k-check input:disabled,
.k-check input:disabled + span {
  cursor: not-allowed;
  color: var(--k-faint);
}
.k-check input:disabled {
  background-color: var(--k-surface-2);
  border-color: var(--k-divider);
}

/* The restricted item types a workspace wildcard will not cover. */
.k-excluded {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.k-excluded > li {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--k-surface-2);
  border: 1px dashed var(--k-border);
  /* Meaningful text, not decoration: these are the restricted item types a
     workspace wildcard will not cover, named beside RESTRICTED_TYPES_EXCLUDED.
     --k-faint fails AA at this size (and the --k-surface-2 ground is
     marginally worse than white), so this takes --k-muted like every
     other caption in the phase. See §10.5 and the note at the top of this
     file. */
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-muted);
}

/* ==========================================================================
   Configuration → Master data (Phase 2.5d)
   Domains and item types. Semantic tokens only — no house colours, which
   identify people and never UI state (spec §3.1).
   ========================================================================== */

/* Facts about a row, read rather than edited: item counts, numbering,
   the workflow a type is pinned to. */
.k-deflist {
  display: grid;
  grid-template-columns: minmax(140px, auto) 1fr;
  gap: 4px 16px;
  margin: 0 0 12px;
}
.k-deflist dt {
  font-weight: 600;
  font-size: 11.5px;
  line-height: 18px;
  color: var(--k-muted);
}
.k-deflist dd {
  margin: 0;
  font-weight: 300;
  font-size: 13px;
  line-height: 18px;
  color: var(--k-text);
}

/* Roles and lines that reach a piece of master data. Never people. */
.k-usage-list {
  list-style: none;
  margin: 4px 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 300;
  font-size: 13px;
  line-height: 18px;
  color: var(--k-text);
}
.k-usage-list > li { padding-left: 0; }

/* The restriction preview. Tinted warning rather than error: it is a
   statement of consequence, not a failure, and it sits above a button that
   has not been pressed yet. */
.k-impact {
  padding: 14px 16px;
  border-radius: var(--k-r-item);
  background: var(--k-warn-bg);
  border: 1px solid var(--k-border);
}
.k-impact > .k-label { display: block; margin-bottom: 6px; }
.k-impact > .k-body { margin: 0 0 8px; }
.k-impact > .k-body:last-of-type { margin-bottom: 0; }

/* ==========================================================================
   Custom fields (Phase 3, spec §4.3)
   The controls themselves reuse .k-field wholesale — a custom text field and
   a built-in one are the same control. What is here is only what a custom
   field adds: the cascading chain, the read-only value list, and the two
   markers a grid cell needs.
   ========================================================================== */

/* The chained selects. Inline on a wide rail, stacked when there is no room:
   three selects and two separators do not fit a 238px sidebar, and a control
   that overflows its card is worse than one that wraps. */
.k-cascade {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.k-cascade-level { display: flex; flex-direction: column; min-width: 0; flex: 1 1 150px; }
.k-cascade-select {
  display: block;
  width: 100%;
  padding: 6px 12px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-item);
  background: var(--k-surface);
  font-size: 13px;
  line-height: 20px;
  color: var(--k-text);
}
.k-cascade-select:focus {
  outline: 2px solid var(--k-brand);
  outline-offset: 0;
  border-color: var(--k-brand);
}
.k-cascade-select:disabled {
  background: var(--k-surface-2);
  color: var(--k-muted);
  cursor: not-allowed;
}
.k-field.has-error .k-cascade-select { border-color: var(--k-bad-fg); }
/* The breadcrumb separator between levels (§8.3 "Kewarra › B Block › B2"),
   decoration only — aria-hidden in the markup. */
.k-cascade-sep {
  flex: 0 0 auto;
  color: var(--k-muted);
  font-size: 13px;
  line-height: 20px;
}

/* In the item panel every custom-field control is one column wide: the levels
   stack, full width, and the breadcrumb chevron is dropped (the labels and the
   order carry the hierarchy), so a cascading field matches its neighbours
   (Judd's walk, 9 November 2026). */
.k-panel__section .k-cascade { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
.k-panel__section .k-cascade-level { flex: 0 0 auto; width: 100%; }
.k-panel__section .k-cascade-sep { display: none; }

/* Tick-box multi-select: the boxes stack, the fieldset carries no chrome of
   its own so it sits in the form like every other k-field. */
.k-fieldset { border: 0; margin: 0; padding: 0; }
.k-fieldset > .k-check + .k-check { margin-top: 6px; }
.k-fieldset > .k-check:first-of-type { margin-top: 6px; }
.k-field-listbox {
  display: block;
  width: 100%;
  padding: 6px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-item);
  background: var(--k-surface);
  font-size: 13px;
  line-height: 20px;
  color: var(--k-text);
}
.k-field-listbox:focus {
  outline: 2px solid var(--k-brand);
  outline-offset: 0;
  border-color: var(--k-brand);
}

/* "Saved." beside the card's own controls — a status line rather than a
   toast, because an HTMX swap of one card never re-renders the toast region. */
.k-field-saved {
  font-weight: 600;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-ok-fg);
  margin: 0;
}

/* Read-only custom field values on a record page. */
.k-fieldvalues { margin: 0; display: flex; flex-direction: column; gap: 12px; }
/* The record card's read mode: label/value pairs fill the card's own width
   (DL §3.5, "keyed on the container"). auto-fill tracks size off the dl's
   width, not the viewport: 3-4 across in a wide main column, about 2 at
   900 px, 1 on a phone. Wide types (long text, links, multi-values) take
   the whole row. Edit mode stays one column. */
.k-fieldvalues--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px 24px;
}
.k-fieldvalue--wide { grid-column: 1 / -1; }
.k-fieldvalue > dt {
  font-weight: 600;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-muted);
}
.k-fieldvalue > dd {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--k-text);
  overflow-wrap: anywhere;
}
.k-fieldvalue > dd.is-empty { color: var(--k-muted); }
.k-value-link { color: var(--k-brand); }
/* Details card (Phase 32 P7): domain chips that link to By domain, the amber untagged prompt
   (GV4) and the one-line count of fields not set. */
.k-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
a.k-chip--link { text-decoration: none; }
a.k-chip--link:hover { text-decoration: underline; }
.k-fieldvalue > dd.k-fieldvalue__prompt,
.k-fieldvalue > dd.k-fieldvalue__prompt a { color: var(--k-warn-fg); font-weight: 600; }
.k-fields-unset { margin: 0; }

/* Retired custom fields on a record page (spec §4.3: values persist and go
   on rendering, tagged). Collapsed by default — they are part of the record
   but not part of everyday reading — and a native <details> so the keyboard
   path needs no script under the CSP. */
.k-disclosure { border-top: 1px solid var(--k-divider); padding-top: 12px; }
.k-disclosure > summary { cursor: pointer; color: var(--k-muted); }
.k-disclosure > summary:focus-visible {
  outline: 2px solid var(--k-brand);
  outline-offset: 2px;
  border-radius: 4px;
}
.k-disclosure > summary::marker { color: var(--k-muted); }
.k-disclosure > .k-fieldvalues { margin-top: 12px; }

/* Grid cells. --k-muted rather than --k-faint: both of these are
   meaningful text at 11.5-12.5px, and --k-faint fails AA there (see the note
   at the top of this file). */
.k-cell-empty { color: var(--k-muted); }
.k-cell-retired-tag {
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--k-muted);
  white-space: nowrap;
}

/* ==========================================================================
   Configuration → Option sets (Phase 3)
   The tree editor. Indent is a class per level rather than nested markup:
   the depth cap is three, so one flat list renders the whole set and the
   template needs no recursion. Semantic tokens only (spec §3.1).
   ========================================================================== */

.k-optiontree {
  list-style: none;
  margin: 0;
  padding: 0;
}
.k-optionrow {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 8px 0;
  border-top: 1px solid var(--k-divider);
}
.k-optionrow:first-child { border-top: 0; }

/* One step per level. A child reads as belonging to the row above it without
   the markup pretending to be a hierarchy the cap makes unnecessary. */
.k-optionrow--d1 { padding-left: 0; }
.k-optionrow--d2 { padding-left: 24px; }
.k-optionrow--d3 { padding-left: 48px; }
.k-optionrow--d2,
.k-optionrow--d3 { border-left: 2px solid var(--k-surface-2); }

.k-optionrow-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1 1 240px;
  min-width: 0;
}
.k-optionrow-label {
  font-weight: 600;
  font-size: 13px;
  line-height: 20px;
  color: var(--k-text);
  overflow-wrap: anywhere;
}
.k-optionrow-key {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--k-surface-2);
  border: 1px solid var(--k-border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 16px;
  color: var(--k-text);
}
/* Meaningful text at 11.5px, so --k-muted rather than --k-faint: the
   latter fails AA at this size (see the note at the top of this file). */
.k-optionrow-meta {
  font-weight: 300;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-muted);
  white-space: nowrap;
}
.k-optionrow-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-left: auto;
}
.k-optionrow-actions form { display: inline-flex; gap: 4px; }
.k-optionrow-move { display: inline-flex; gap: 2px; }

/* A retired option stays in the list — this is the screen that brings one
   back — and reads as inactive rather than as a mistake. */
.k-optionrow.is-disabled .k-optionrow-label {
  color: var(--k-muted);
  text-decoration: line-through;
}

@media (max-width: 599px) {
  .k-optionrow-actions { margin-left: 0; width: 100%; }
  .k-optionrow--d2 { padding-left: 12px; }
  .k-optionrow--d3 { padding-left: 24px; }
}

/* ==========================================================================
   Configuration → Workflows (Phase 4, spec §5, §9, §3.4)
   The screens *around* the canvas. The canvas itself is the one JS island and
   brings its own rules; what is here is the frame it mounts into, the
   inspector panel beside it, and the read-only reading of a workflow that
   §3.4 asks for below 1024px.

   Semantic tokens only — no house colours, which identify people and never
   UI state (spec §3.1).
   ========================================================================== */

.k-wf-version {
  font-weight: 300;
  color: var(--k-muted);
}

.k-wf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.k-wf-toolbar form { display: inline-flex; }
/* The page-level Validate and Publish… are hidden by the editor once it has
   started (main.js sets `hidden` on each one its own toolbar offers, and on
   their row when none is left). `hidden` has to win over the inline-flex
   above, or the rule would hide nothing. */
.k-wf-toolbar[hidden],
.k-wf-toolbar [hidden] { display: none; }

/* The editor's body is two columns under its one toolbar row: canvas, then
   the panel beside it (the version page's inspector). Below 1024px the canvas
   does not mount at all — a decision in the editor's own JavaScript, not a
   CSS trick, because a hidden-but-live canvas would keep its listeners and
   its debounced saves running behind a notice saying the workflow cannot be
   edited here — so the body stops being two columns, and the outline and the
   inspector beneath it are the page. */
.k-wfe-body { display: flex; flex-direction: column; gap: 16px; }
.k-wfe-body--aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  align-items: start;
}
.k-wfe-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* The inspector gives the canvas room where the editor is narrow (Phase 18
   follow-up 11): below 1280px of editor width — 1024x768 with the navigation
   at icons, and every iPad, whose touch screens take the drawer — it is 300px
   rather than 380px, which its forms still fit without sideways scroll (the
   longest kind chooser and the role chips wrap). Keyed on the editor's own
   width (container k-wfe), not the window's, because the navigation beside
   it is 64px, 240px or a drawer depending on the pointer and the person.
   Before the 1023px rule below, which stacks the two and must keep winning. */
.k-wfe { container: k-wfe / inline-size; }
@container k-wfe (max-width: 1279px) {
  .k-wfe-body--aside { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1023px) {
  .k-wfe-body--aside { grid-template-columns: minmax(0, 1fr); }
}

.k-wf-inspector {
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-box);
  max-height: 720px;
  overflow-y: auto;
}

.k-wf-panel { padding: 16px 18px; }

/* Below 1024px the inspector is read-only (§3.4; Phase 18 follow-up 10).
   The editor does not open there and its notice says the outline is read
   only, so the panel beside it saves nothing either: every form in it that
   saves, and the sentence about saving, is a .k-wf-edit, hidden here, and a
   draft's state and transition carry a read-only twin (.k-wf-view--twin)
   with the same facts, shown here. The query is the exact complement of the
   one main.js mounts the canvas on, '(min-width: 1024px)', so the canvas and
   the editable panel arrive together when an iPad turns to landscape, and
   leave together. From 1024px the panel edits whether or not the canvas
   started (§9: a complete editing path on its own). */
.k-wf-view--twin { display: none; }
@media not all and (min-width: 1024px) {
  .k-wf-panel .k-wf-edit { display: none; }
  .k-wf-panel .k-wf-view--twin { display: block; }
}
.k-wf-panel-head { margin-bottom: 12px; }
.k-wf-panel-head .k-label { display: block; margin-bottom: 4px; }
.k-wf-panel-head code {
  font-family: inherit;
  font-weight: 600;
  color: var(--k-muted);
}
.k-wf-panel-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--k-divider);
}
.k-wf-flags { border: 0; margin: 0; padding: 0; }
.k-wf-flags > .k-field-label { display: block; margin-bottom: 8px; }

/* The chip picker (§9). Checkboxes rendered as chips, so the control works
   with no JavaScript at all and is keyboard-reachable by default. */
.k-wf-chips { border: 0; margin: 16px 0 0; padding: 0; }
.k-wf-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.k-wf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-pill);
  font-weight: 600;
  font-size: 11px;
  line-height: 16px;
  color: var(--k-text);
  cursor: pointer;
}
.k-wf-chip:hover { border-color: var(--k-control); }
.k-wf-chip:focus-within {
  outline: 2px solid var(--k-brand);
  outline-offset: 2px;
}
.k-wf-chip:has(input:checked) {
  background: var(--k-selected);
  border-color: var(--k-control);
  color: var(--k-brand);
}

/* Authored guards and effects: one row each, with its own remove control. */
.k-wf-guards {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.k-wf-guard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 8px 10px;
  background: var(--k-surface-2);
  border: 1px solid var(--k-divider);
  border-radius: var(--k-r-item);
}
.k-wf-guard-text {
  font-weight: 300;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--k-text);
  flex: 1 1 180px;
}
.k-wf-guard form { display: inline-flex; margin-left: auto; }

/* A create_item action's `when` sub-condition list (§5.3) — the same editor,
   nested, rather than a second dialect of one idea. */
.k-wf-when {
  flex: 1 1 100%;
  margin-top: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--k-border);
}
.k-wf-when .k-label { display: block; margin-bottom: 4px; }

.k-wf-add {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--k-border);
}

/* Validation findings (§5.5). Each row carries its rule code and the nodes it
   is about, which is what the canvas highlights from. */
.k-wf-findings { margin-top: 16px; }
.k-wf-finding {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--k-divider);
}
.k-wf-finding-text { flex: 1 1 240px; }
/* A finding is prose, so it keeps the prose measure (Phase 18 Wave 3
   repairs): a row ran 271 characters across the Publish page at 2560 px. */
.k-wf-finding { max-width: 42em; }

/* The publish page's Before → After summary (Phase 18 Wave 2), painted by the
   workflow editor's bundle (summary_dom.js). Each change carries its kind as
   a pill in words — Added, Changed, Removed — so colour never carries it. */
.k-wf-change-summary .k-label { display: block; margin-top: 16px; }
.k-wf-before-after {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--k-muted);
}
.k-wf-before-after-arrow { color: var(--k-text); }
.k-wf-change-list { margin: 6px 0 0; padding: 0; list-style: none; }
.k-wf-change {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--k-divider);
  font-size: 13px;
  line-height: 20px;
  color: var(--k-text);
}
.k-wf-change .k-chip { flex: none; min-width: 64px; justify-content: center; }
.k-wf-change-text { flex: 1 1 auto; min-width: 0; }

/* The workflow in words (§3.4). Also what a published version shows, since it
   is immutable and there is nothing to edit. */
.k-wf-state {
  padding: 12px 14px;
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-box);
}
.k-wf-state-name { font-weight: 600; font-size: 13px; color: var(--k-text); }
.k-wf-edge-link { color: var(--k-brand); font-weight: 600; }
.k-wf-back {
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 11px;
  color: var(--k-muted);
}
.k-wf-back:hover { color: var(--k-brand); }

/* The host the editor's own mount partial sits inside. It carries the two
   inspector URL templates the canvas needs to load a panel for whatever the
   person selected; the canvas module owns everything below it. */
.k-wf-canvas-host { min-width: 0; }

/* --------------------------------------------------------------------------
   Workflow editor canvas — the one JS island (§9)

   The canvas is SVG, so its geometry lives in attributes rather than here (a
   `d`, a `transform`, an `x`); everything a person sees the colour or weight
   of is in this block. Nothing in the editor writes element.style and no
   template it renders carries a style attribute — the CSP forbids both, and
   kairos/ui/tests/test_template_csp.py enforces it (§10.5).

   Desktop-only (§3.4): the shell is hidden until main.js mounts, and main.js
   only mounts at 1024px and above. The notice and the outline are what a
   narrow screen — or a browser with JavaScript off — gets instead.
   -------------------------------------------------------------------------- */

.k-wfe {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Hidden the moment the editor mounts; visible in both the cases where it
   does not — a narrow screen, and no JavaScript at all. */
.k-wfe[data-mounted="true"] .k-wfe-narrow { display: none; }

/* Words that only make sense beside a canvas — "click a state on the
   canvas" — and their canvas-less twins (Phase 18 Wave 3, criterion clause
   8: below 1024px no canvas-only text shows). Keyed on data-mounted, which
   main.js sets while the canvas runs and clears when it suspends, so a
   rotation past the breakpoint swaps them with the canvas. Hidden by
   default, so a fragment rendered outside the editor — the inspector opened
   on its own address with scripting off — shows only the canvas-less one. */
.k-wfe-canvas-only { display: none; }
.k-wfe[data-mounted="true"] .k-wfe-canvas-only { display: inline; }
.k-wfe[data-mounted="true"] div.k-wfe-canvas-only { display: block; }
.k-wfe[data-mounted="true"] .k-wfe-no-canvas { display: none; }

.k-wfe-shell,
.k-wfe-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* `hidden` has to keep winning: a display rule above it would put the canvas
   on every narrow screen, which is the one thing §3.4 asks it not to do. */
.k-wfe-shell[hidden],
.k-wfe-stage[hidden] { display: none; }

/* Toolbar ---------------------------------------------------------------- */

/* One row (Phase 18 Wave 2). The toolbar spans the canvas and the panel
   beside it, so at the narrowest width the editor opens at (1024px, the
   navigation collapsed to icons) its groups still fit on one line; nothing
   wraps, and only the save status gives way, ending in an ellipsis — it is
   aria-live, so a screen reader still hears it whole. */
.k-wfe-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-box);
  box-shadow: var(--k-shadow-menu);
}
.k-wfe-group { display: inline-flex; flex: none; align-items: center; gap: 4px; }
.k-wfe-group--end { margin-left: auto; }
.k-wfe-group-label {
  margin-right: 2px;
  font-weight: 600;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-muted);
}
/* Select | Connect | Pan as one segmented control: three buttons joined,
   the pressed one filled. Each is still its own button with aria-pressed. */
.k-wfe-segmented { gap: 0; }
.k-wfe-segmented .k-btn { border-radius: 0; }
.k-wfe-segmented .k-btn:first-child { border-radius: 999px 0 0 999px; }
.k-wfe-segmented .k-btn:last-child { border-radius: 0 999px 999px 0; }
.k-wfe-segmented .k-btn + .k-btn { margin-left: -1px; }
.k-wfe-segmented .k-btn:focus-visible { position: relative; z-index: 1; }
.k-wfe-toolbar .k-btn[aria-pressed="true"] {
  background: var(--k-brand);
  border-color: var(--k-brand);
  color: #fff;
}
.k-wfe-palette { cursor: grab; }
.k-wfe-status {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-weight: 300;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Canvas ----------------------------------------------------------------- */

/* The canvas runs to the foot of the window (Phase 18 Wave 3, criterion
   clause 8): the viewport's height less where the canvas starts on the page
   (`--k-wfe-canvas-top`, measured by the island's page.js placeCanvas, since
   CSS cannot know how much page sits above it) and one 24px gutter, and never
   under 420px. It was min(68vh, 720px), which left 486px of a 1440px-tall
   screen empty under it. What sits under the canvas in its stage — the
   keyboard hint, and any findings showing when it was measured — is taken
   off too (`--k-wfe-canvas-foot`, measured by placeCanvas with the top), so
   the hint is in the window rather than cut off at its foot (Wave 3
   repairs) — but only where at least 560px of canvas is left after it;
   otherwise placeCanvas sets the foot to 0 and the hint sits just under the
   fold (repair R2). `svh`, not `dvh`: a touch browser's collapsing
   toolbar would otherwise resize — and refit — the drawing as the page
   scrolls. Its width is the body grid's first column: everything right of
   the navigation, less the page gutters and the inspector. A bigger canvas is
   more room, not bigger cards: Fit never zooms past 1 (geometry.fitView). */
.k-wfe-canvas {
  position: relative;
  height: calc(100vh - var(--k-wfe-canvas-top, 258px) - var(--k-wfe-canvas-foot, 0px) - 24px);
  height: calc(100svh - var(--k-wfe-canvas-top, 258px) - var(--k-wfe-canvas-foot, 0px) - 24px);
  min-height: 420px;
  background: var(--k-page);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-box);
  overflow: hidden;
}
.k-wfe-svg {
  display: block;
  width: 100%;
  height: 100%;
  /* A drag on the canvas moves a card or pans the view; without this it also
     sweeps a text selection across the card labels and out into the page
     behind them, which is what a drag on ordinary markup means. */
  user-select: none;
  -webkit-user-select: none;
  /* Pointer gestures are handled in JavaScript; without this the browser
     claims the drag for scrolling on a touch screen and the canvas never
     sees a pointermove. */
  touch-action: none;
}
.k-wfe-svg:focus-visible { outline: 2px solid var(--k-brand); outline-offset: -2px; }
.k-wfe-svg[data-mode="pan"] { cursor: grab; }
.k-wfe-svg[data-mode="connect"] { cursor: crosshair; }
.k-wfe-svg.is-panning { cursor: grabbing; }

.k-wfe-gridline { fill: none; stroke: var(--k-divider); stroke-width: 1; }
.k-wfe-connector {
  stroke: var(--k-brand);
  stroke-width: 2;
  stroke-dasharray: 4 4;
  pointer-events: none;
}

/* State cards ------------------------------------------------------------ */

.k-wfe-card {
  position: relative;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-box);
  overflow: hidden;
  cursor: pointer;
}
.k-wfe-card:focus-visible {
  outline: 2px solid var(--k-brand);
  outline-offset: 2px;
}
.k-wfe-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.k-wfe-card-name {
  overflow: hidden;
  font-weight: 600;
  font-size: 13px;
  line-height: 18px;
  color: var(--k-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.k-wfe-card-flags {
  margin: 0;
  padding: 0;
  /* A whole number of lines: the card is a fixed 88px, and clipping the third
     caption halfway through its x-height reads as a rendering fault rather
     than as "there is more here". The full list is on the card's aria-label
     and in the outline, both of which have room. */
  max-height: 30px;
  overflow: hidden;
  list-style: none;
  font-weight: 300;
  font-size: 11.5px;
  line-height: 15px;
  color: var(--k-muted);
}
/* The port a Connect drag starts from: a quiet handle on the right edge,
   shown once the card is worth grabbing. */
.k-wfe-card-port {
  position: absolute;
  right: 3px;
  top: calc(50% - 5px);
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--k-brand);
  opacity: 0;
}
.k-wfe-card:hover .k-wfe-card-port,
.k-wfe-card:focus-visible .k-wfe-card-port { opacity: 1; }
.k-wfe-svg[data-mode="connect"] .k-wfe-card-port { opacity: 1; }

.k-wfe-node.is-selected .k-wfe-card {
  border-color: var(--k-brand);
  box-shadow: 0 0 0 2px var(--k-selected);
}
.k-wfe-node.is-invalid .k-wfe-card {
  border-color: var(--k-bad-fg);
  background: var(--k-bad-bg);
}

/* Edges ------------------------------------------------------------------ */

.k-wfe-edge { cursor: pointer; }
.k-wfe-edge-line {
  fill: none;
  stroke: var(--k-muted);
  stroke-width: 1.5;
}
.k-wfe-edge-arrow { fill: var(--k-muted); stroke: none; }
/* A wide, invisible stroke under the visible one: the line is 1.5px, and
   nobody can be asked to click 1.5px. */
.k-wfe-edge-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 16;
}
/* On a touch screen this band is 44 screen pixels — in the shell's one
   (pointer: coarse) block, near the end of this file. */
/* A transition's name (Phase 18 Wave 2, legible edge labels): body text on an
   opaque white chip, placed BESIDE its line by geometry.js's placeLabels and
   drawn above the cards. No font-size here, deliberately: canvas.js sets the
   `font-size` attribute from labelMetrics so the name stays 12 pixels on the
   screen at every zoom from 0.6 up, and a size in CSS would override it. Every
   text colour below is at least 6.5:1 on the white chip (WCAG 2.2 AA asks
   4.5:1); kairos/workflows/tests/test_editor_wave2.py computes each. */
.k-wfe-label { pointer-events: none; }
.k-wfe-label-chip {
  fill: var(--k-surface);
  stroke: var(--k-border);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}
.k-wfe-edge-label {
  fill: var(--k-text);
  font-weight: 500;
}
.k-wfe-label.is-selected .k-wfe-label-chip { stroke: var(--k-brand); }
.k-wfe-label.is-selected .k-wfe-edge-label { fill: var(--k-brand); }
.k-wfe-label.is-invalid .k-wfe-label-chip { stroke: var(--k-bad-fg); }
.k-wfe-label.is-invalid .k-wfe-edge-label { fill: var(--k-bad-fg); }
.k-wfe-edge:focus-visible { outline: none; }
.k-wfe-edge:focus-visible .k-wfe-edge-line,
.k-wfe-edge.is-selected .k-wfe-edge-line { stroke: var(--k-brand); stroke-width: 2.5; }
.k-wfe-edge:focus-visible .k-wfe-edge-arrow,
.k-wfe-edge.is-selected .k-wfe-edge-arrow { fill: var(--k-brand); }
.k-wfe-edge.is-invalid .k-wfe-edge-line { stroke: var(--k-bad-fg); stroke-width: 2.5; }
.k-wfe-edge.is-invalid .k-wfe-edge-arrow { fill: var(--k-bad-fg); }

/* Validation findings ---------------------------------------------------- */

.k-wfe-issues {
  padding: 12px 16px;
  background: var(--k-bad-bg);
  border: 1px solid var(--k-bad-fg);
  border-radius: var(--k-r-box);
}
.k-wfe-issue-list { margin: 0; padding-left: 18px; }
.k-wfe-issue {
  font-size: 13px;
  line-height: 20px;
  color: var(--k-text);
}
/* An anchored finding is one the canvas is also marking; the different
   marker says so, rather than leaving a reader hunting for a red edge that
   was never drawn. */
.k-wfe-issue.is-anchored { list-style: disclosure-closed; }

.k-wfe-help {
  margin: 0;
  font-weight: 300;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-muted);
}
.k-wfe-help kbd {
  padding: 1px 5px;
  border: 1px solid var(--k-border);
  border-radius: 4px;
  background: var(--k-surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

/* The outline — the read-only rendering, and the canvas's text alternative */

.k-wfe-outline {
  padding: 18px 20px;
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-box);
}
.k-wfe-outline h3 { margin: 18px 0 8px; }
.k-wfe-outline-summary {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--k-text);
}
.k-wfe-outline-list { margin: 0; padding: 0; list-style: none; }
.k-wfe-outline-item {
  padding: 8px 0;
  border-top: 1px solid var(--k-divider);
}
.k-wfe-outline-item:first-child { border-top: 0; }
.k-wfe-outline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.k-wfe-outline-name {
  font-weight: 600;
  font-size: 13px;
  line-height: 18px;
  color: var(--k-text);
}
.k-wfe-outline-meta {
  font-weight: 300;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-muted);
}
.k-wfe-outline-captions {
  margin: 4px 0 0;
  padding-left: 18px;
  font-weight: 300;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-muted);
}
.k-wfe-outline-empty {
  padding: 8px 0;
  font-size: 13px;
  color: var(--k-muted);
}

/* Launch reports (§10.4). Three additions and no new colours: the heat map's
   cells reuse the four semantic status tints §3 already defines, and the tab
   strip reuses .k-tabs. A heat map cell
   must not carry an inline style — the §10.5 CSP forbids one — so the tone
   arrives as a class derived server-side from compliance.rendering.band_tone,
   which is the same function the rating pill reads. */

/* The 5x5 grid. Fixed layout so twenty-five cells of one or four digits stay
   the same size, and centred numbers so the shape of the distribution reads at
   a glance rather than the digits. */
.k-heat { table-layout: fixed; }
.k-heat th[scope="col"],
.k-heat th[scope="row"] {
  font-weight: 600;
  font-size: 10.5px;
  line-height: 14px;
}
/* A column heading wraps inside its fixed-width column rather than running
   into the next: "5 · Almost certain" overprinted "Row total" at the iPad
   and 1024 widths (W6). */
.k-heat thead th { white-space: normal; overflow-wrap: anywhere; }
.k-heat-cell {
  text-align: center;
  vertical-align: middle;
  border-left: 1px solid var(--k-surface);
  border-right: 1px solid var(--k-surface);
}
.k-heat-count {
  display: block;
  font-weight: 300;
  font-size: 20px;
  line-height: 28px;
}
/* The four bands, as the four status tints. An empty cell keeps its band's
   wash at a lower weight: the coordinate is still Extreme whether or not
   anything sits in it, and washing it out entirely would make the matrix look
   like it had holes. */
.k-heat-cell--success { background: var(--k-ok-bg); color: var(--k-ok-fg); }
.k-heat-cell--info    { background: var(--k-info-bg);    color: var(--k-info-fg); }
.k-heat-cell--warning { background: var(--k-warn-bg); color: var(--k-warn-fg); }
.k-heat-cell--error   { background: var(--k-bad-bg);   color: var(--k-bad-fg); }
.k-heat-cell--neutral { background: var(--k-page);       color: var(--k-muted); }
.k-heat-cell.is-empty .k-heat-count { color: var(--k-muted); }

/* Configuration → Scheduler health (§10.3). Two additions, no new colours:
   the job table is a plain .k-table and the verdicts are the existing status
   pills and KPI tones. What needed rules is the log tail — a JobRun excerpt is
   up to four thousand characters of traceback, and a page that let it set its
   own width would push the shell sideways. */
.k-health-log {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 17px;
  color: var(--k-muted);
  background: var(--k-page);
  border: 1px solid var(--k-divider);
  border-radius: 6px;
  padding: 12px;
  margin: 0;
  /* The tail wraps rather than scrolling: an operator reads the last lines,
     and a horizontal scrollbar inside a card hides exactly those. */
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 260px;
  overflow-y: auto;
}

/* ==========================================================================
   PHASE 8 UI PASS
   Filter panels and column-header filters, the info disclosure, the record
   action bar, and the form grid the intake portal uses.
   ========================================================================== */

/* k-info — the ⓘ, the disclosure that replaced the standing paragraphs -----
   A native <details> (C12): the browser opens it with scripting off, and
   kairos.js closes it on an outside click and on Escape (data-k-popover). The
   summary is a 24 px target (WCAG 2.2 SC 2.5.8, ruling 25) drawn round a 13 px
   icon; its negative block margin keeps a label row no taller than a bare
   label, so the larger target costs no height. */

.k-info {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  line-height: 0;
}
.k-info > summary { list-style: none; }
.k-info > summary::-webkit-details-marker { display: none; }
.k-info-btn {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: -4px 0;
  border-radius: 999px;
  color: var(--k-muted);
  cursor: pointer;
}
.k-info-btn svg { width: 13px; height: 13px; }
.k-info-btn:hover,
.k-info[open] > .k-info-btn { color: var(--k-brand); background: var(--k-selected); }
.k-info-btn:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 1px; }
.k-info-bubble {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  /* Wide enough for a sentence, narrow enough to stay a note. min() so it
     never overflows a 360px screen. */
  width: min(320px, 78vw);
  padding: 10px 12px;
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: 8px;
  box-shadow: var(--k-shadow-overlay);
  font-weight: 400;
  font-size: 11.5px;
  line-height: 17px;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
  color: var(--k-text);
  white-space: normal;
}
/* Near the right edge — a table header at the end of a row — the bubble
   hangs off the left instead of pushing the page sideways. */
.k-info--end .k-info-bubble { left: auto; right: 0; }

/* A heading with its ⓘ beside it. The ⓘ cannot sit inside the heading (a
   <details> is not phrasing content), so the pair sits in this row. */
.k-heading-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}
.k-heading-row > .k-info { margin-left: 2px; }


/* Configuration help disclosure --------------------------------------------
   The compact row a configuration card uses in place of a standing wall of
   k-body paragraphs: one short label per fact, each carrying its sentence in
   an info bubble rather than printing it. An admin who built the workspace
   has usually read these already; the fact stays nameable at a glance and
   the sentence stays one click away for whoever has not. A visible action
   (e.g. "Open the permissions module") is never itself a fact, so it sits on
   the row as a plain link rather than behind a bubble. */
.k-fact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
}
.k-fact {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.k-fact .k-info { margin-left: 2px; }
/* The row's one visible action is an anchor, and it takes .k-meta for the
   size that matches the fact labels beside it. That class also sets a colour,
   and a class selector beats the bare `a` rule — so without this the only
   thing on the row somebody can click renders in hint grey, indistinguishable
   from the labels that are merely text. */
a.k-fact { color: var(--k-brand); }

/* A chip's popover, the scope control's and a column header's: about 260 px,
   the overlay shadow, a list of choices with the current one marked. */
.k-chip-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 35;
  width: 260px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  background: var(--k-surface);
  border-radius: var(--k-r-box);
  box-shadow: var(--k-shadow-overlay);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}
.k-chip-popover--th { position: static; box-shadow: none; padding: 0; width: auto; min-width: 200px; }
.k-chip-popover-search {
  width: 100%;
  margin-bottom: 4px;
  padding: 5px 8px;
  border: 1px solid var(--k-border);
  border-radius: 6px;
  font: inherit;
  font-size: 12.5px;
}
.k-chip-choices {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}
.k-chip-choice {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--k-text);
  text-decoration: none;
}
.k-chip-choice:hover,
.k-chip-choice:focus-visible { background: var(--k-surface-2); color: var(--k-text); text-decoration: none; }
.k-chip-choice.is-current { font-weight: 600; color: var(--k-brand); }
.k-chip-choice.is-current::after { content: "\2713"; margin-left: auto; padding-left: 8px; }

.k-chip-choice .k-badge { margin-left: auto; }
.k-chip-choice.is-current .k-badge + * { margin-left: 0; }
.k-chip-popover-caption { margin: 4px 10px 2px; }

/* The multi-picker (multi_picker.html, kMultiPicker; Phase 33 slice 2): chosen
   values as removable chips, then a search box with its suggestions under it.
   Chips wrap, so it never widens the page. It began as the people picker
   (people_picker.html, kPeoplePicker; Judd, 6 November 2026), which is the same
   component with people copy and still draws the old class names, so every
   rule below names both. */
.k-multi-picker, .k-people-picker { display: grid; gap: 10px; max-width: 100%; min-width: 0; }
.k-multi-picker__ui, .k-people-picker__ui { display: grid; gap: 10px; min-width: 0; }
/* Once the script has built the search box it hides the native select with .k-visually-hidden (kairos.js,
   kPeoplePicker). The select is also a .k-field-input, and the form field's sizing (width 100%, the control's
   height and padding, the touch rules' 44 px) out-ranks that utility, so on a full-width form the "hidden"
   select was 1425 px wide at 1440 and the page scrolled sideways (Phase 28 slice 8d). Here the utility wins. */
.k-multi-picker__native.k-visually-hidden, .k-people-picker__native.k-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}
.k-multi-picker__chosen, .k-people-picker__chosen { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.k-multi-picker__chosen .k-chip, .k-people-picker__chosen .k-chip { white-space: normal; padding: 4px 6px 4px 10px; }
.k-multi-picker__list, .k-people-picker__list {
  border: 1px solid var(--k-control-edge);
  border-radius: var(--k-r-box);
  background: var(--k-surface);
  padding: 4px;
  max-height: 240px;
}
.k-multi-picker__ui[hidden], .k-multi-picker__list[hidden], .k-multi-picker__none[hidden], .k-multi-picker__chosen[hidden], .k-people-picker__ui[hidden], .k-people-picker__list[hidden], .k-people-picker__none[hidden], .k-people-picker__chosen[hidden] { display: none; }
.k-multi-picker__option, .k-people-picker__option { cursor: pointer; }
.k-multi-picker__option.is-active, .k-people-picker__option.is-active { background: var(--k-surface-2); color: var(--k-text); }
.k-multi-picker__none, .k-people-picker__none { margin: 0; }
/* Single mode: no chips, so the box and its suggestions sit close, and the
   chosen suggestion carries the tick .k-chip-choice.is-current draws. */
.k-multi-picker--single .k-multi-picker__ui, .k-people-picker--single .k-people-picker__ui { gap: 4px; }
.k-multi-picker--single .k-multi-picker__search:disabled, .k-people-picker--single .k-people-picker__search:disabled { cursor: not-allowed; }
/* Where the picker sits in a tight row: a width that fits a name, never the
   whole line, and shrinking rather than pushing its neighbours off. */
.k-agenda-item-fields .k-people-picker { width: min(100%, 16em); }
.k-meeting-editor-form .k-people-picker { flex: 1 1 14em; width: auto; min-width: 0; }
.k-participants-form .k-people-picker { width: min(100%, 20em); }

/* Column-header filters ---------------------------------------------------- */

/* The label is the sort link; one funnel button after it opens the column's
   filter popover, which lists the filter bar's own choices for it. A sort
   arrow is drawn on the sorted column only. */
.k-th-head { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.k-th-toggle {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: -4px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0;
  color: var(--k-muted);
  cursor: pointer;
}
.k-th-toggle svg { opacity: .6; }
.k-th-toggle:hover { background: var(--k-selected); color: var(--k-brand); }
.k-th-toggle:hover svg { opacity: 1; }
.k-th-toggle[aria-expanded="true"] { color: var(--k-brand); }
/* A filter that is narrowing the list fills its funnel in the brand green, so
   a closed popover never lets a filtered page read as unfiltered. */
.k-th-toggle.is-set { color: var(--k-brand); }
.k-th-toggle.is-set svg { opacity: 1; fill: currentColor; }
/* The popover itself. Positioned rather than in flow so opening one does not
   shove the header band taller and jump every row down the page. */
.k-th-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  padding: 6px;
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-box);
  box-shadow: var(--k-shadow-overlay);
}
/* The last columns sit near the right edge; hang their popover off the left
   so it never pushes the page sideways. */
.k-table th:nth-last-child(-n + 2) .k-th-popover { left: auto; right: 0; }
.k-table thead th { vertical-align: top; }

/* Record action bar -------------------------------------------------------- */

/* The searchable assignee: a text box that narrows a native <select>, rather
   than a combobox widget — Kairos has no JS framework and is not getting one
   (CLAUDE.md), and the select stays the control that carries the value.
   Stacked, so the pair reads as one control rather than two. */
.k-searchselect-input {
  appearance: none;
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: 8px;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--k-text);
  min-width: 170px;
  max-width: 100%;
}
.k-searchselect-input::placeholder { color: var(--k-muted); }
.k-searchselect-input:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 1px; }

/* Comments ----------------------------------------------------------------- */

/* The comment box, the Activity card's composer (.k-composer,
   work/comments/form_dl.html) and a comment's in-place edit form fill their
   column or card at every width: a field has no width cap (29 October 2026;
   it stopped at 720 px from Phase 18 Wave 3 repairs), so the text box and
   the tool row beneath it share one edge. */
.k-comment-form .k-field-input,
.k-comment .k-field-input { width: 100%; }
.k-comment-form textarea.k-field-input { min-height: 96px; resize: vertical; }

/* Form grid ---------------------------------------------------------------- */

/* Forms whose fields are mostly short: the intake portal (§8.2). Short fields
   pair up on a wide screen; a field marked .k-form-wide (a description, a
   title) takes the whole row. Below the grid's own minimum the columns
   collapse to one without a media query. Its fields fill their grid cell, and
   a .k-form-wide field the whole row; they have no width cap of their own
   (29 October 2026; W5 had held them to 720 px and the prose measure). */
.k-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0 20px;
  align-items: start;
}
.k-form-grid .k-form-wide { grid-column: 1 / -1; }
.k-form-grid .k-form-wide textarea.k-field-input { min-height: 120px; resize: vertical; }

/* Form layout (Phase 18 Wave 3, W5; ruling 46, criterion clause 6, and the
   orchestrating session's reading (h)). A form page wraps its form in
   .k-form-layout: the form in .k-form-main, then — where the page already
   has help for the form (a note on what it creates, the record it is raised
   from) or, on a Configuration detail page, the thing's related lists — a
   .k-form-side after it. Below 1920 px nothing moves: the side follows the
   form, as its cards always have.

   From 1920 px:
   * a form of more than six fields (its fields inside .k-form-cols — the
     k_form_cols tag counts them) lays its short fields out in two columns;
     a long field (.k-form-wide: a title, a description, rich text) and
     anything that is not a field (a heading, a caption, a group) spans
     both, and a .k-form-col is a column of its own, so fields and the tab
     order follow the DOM, never a visual reordering. Such a form takes the
     width, and its side panel sits beside it;
   * a shorter form keeps one 760 px column, left-aligned, its side panel
     beside it where it has one, and is not stretched to fill;
   * a Configuration detail page (.k-form-layout--related) puts its
     definition on the left and its related lists on the right, taking the
     rest of the width; there the related cards flow two-up where the
     width allows, and anything holding a table spans the column. A detail
     page with no related lists gives its definition the width (and lays
     it out in two columns). */
.k-form-main,
.k-form-side { min-width: 0; }
/* A form page that has always had a rail beside its form (Create linked
   task, with the entry it is raised from) keeps it from 900 px, as the
   record page's rail does; from 1920 px it is the side panel below. */
@media (min-width: 900px) and (max-width: 1919px) {
  .k-form-layout--rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
  }
}
@media (min-width: 1920px) {
  .k-form-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
    align-items: start;
  }
  .k-form-cols > :not(.k-field, .k-form-col),
  .k-form-cols > .k-form-wide { grid-column: 1 / -1; }
  /* The first row's two columns start level, whatever gap each carries. */
  .k-form-cols > .k-form-col:nth-child(-n + 2),
  .k-form-cols > .k-form-col:nth-child(-n + 2) > .k-section-gap:first-child { margin-top: 0; }
  .k-form-cols .k-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .k-form-cols > .k-fieldset--cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
    align-items: start;
  }

  .k-form-layout {
    display: grid;
    grid-template-columns: minmax(0, var(--k-form-track));
    column-gap: 24px;
    align-items: start;
    justify-content: start;
  }
  .k-form-layout:has(> .k-form-side) {
    grid-template-columns: minmax(0, var(--k-form-track)) minmax(320px, 560px);
  }
  .k-form-layout:has(.k-form-cols) { grid-template-columns: minmax(0, 1fr); }
  .k-form-layout:has(.k-form-cols):has(> .k-form-side) {
    grid-template-columns: minmax(0, 1fr) clamp(320px, 24%, 560px);
  }
  .k-form-layout--related:not(:has(> .k-form-side)) { grid-template-columns: minmax(0, 1fr); }
  .k-form-layout--related:has(> .k-form-side) {
    grid-template-columns: minmax(0, var(--k-form-track)) minmax(0, 1fr);
  }
  .k-form-layout--related:has(.k-form-cols):has(> .k-form-side) {
    grid-template-columns: minmax(0, 1fr) clamp(400px, 36%, 800px);
  }
  .k-form-layout--related > .k-form-side {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr));
    column-gap: 24px;
    align-items: start;
  }
  .k-form-layout--related > .k-form-side > :has(table) { grid-column: 1 / -1; }
}

/* The prose measure on forms and Configuration (clause 6): no line of
   running text — a caption, a lede, a note, a body paragraph, a checkbox's
   label, a permission's description — runs past about 90 characters
   (42em of its own font size: Montserrat's light captions set about 2.1
   characters to the em), however wide the column it sits in. The block
   stops; the card around it keeps its width. The page header's meta line is
   not capped: it spans the header on every page (Judd, 3 November 2026).
   Configuration is the exception (Phase 33, D1): see the override below. */
:is(.k-form-layout, .k-measure) :is(p, .k-meta, .k-body, .k-check, .k-line-keys > li, .k-usage-list > li) { max-width: 42em; }
/* Inside Configuration the measure and the form column do not apply (Phase 33, D1; Judd's UI pass of 16 November 2026): description
   text, forms and detail cards flow to the container width. The pages' own meta line was never capped. */
.k-config-page { --k-form-track: 1fr; }
.k-config-page :is(p, .k-meta, .k-body, .k-check, .k-line-keys > li, .k-usage-list > li) { max-width: none; }

/* ==========================================================================
   Rich-text editor (Phase 17)

   kairos/ui/static_src/richtext/ mounts on {% k_field variant="richtext" %}
   (ui/components/field.html + richtext_toolbar.html). `injectCSS: false` is
   set on every Tiptap/ProseMirror extension that offers it
   (kairos/ui/static_src/richtext/editor/schema.js) — the CSP is
   `default-src 'self'` with no `unsafe-inline` (spec §10.5), and a
   library that injects its own <style> tag the first time it mounts would
   simply fail that silently, per the plan's own CSP risk note. So the base
   ProseMirror rules (gap cursor, selected-cell wash, the editable surface's
   own whitespace handling) live here by hand instead, beside the toolbar and
   the read-rendering rules `render_rich_text()` (kairos/core/html.py) relies
   on for saved content — `.k-body`/`.k-rt-table` below are what a comment or
   a description actually renders with once `|k_rich` has run, not only what
   the live editor shows while typing.
   ========================================================================== */

/* The field wrapper. The `[hidden]` rules below are what makes the no-JS
   path work: an author `display` beats the user agent's own `[hidden]
   { display: none }`, so without them the toolbar (display:flex) showed
   fourteen dead buttons before the bundle mounted and both popovers sat
   open under every mounted editor. main.js removes the toolbar's `hidden`
   on mount and puts it back on destroy; before that, the textarea is the
   whole field, exactly like the plain textarea variant. */
.k-rt { display: flex; flex-direction: column; gap: 0; }
.k-rt .k-rt-source { min-height: 140px; resize: vertical; }
.k-rt.is-enhanced .k-rt-source { display: none; }
.k-rt-toolbar[hidden],
.k-rt-codebar[hidden],
.k-rt-popover[hidden] { display: none; }

/* Toolbar (spec §11 Phase 17; docs/technical/richtext.md "Accessibility
   model"): role=toolbar, roving tabindex applied by editor/toolbar.js, never
   by CSS. */
.k-rt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  padding: 6px 8px;
  background: var(--k-surface-2);
  border: 1px solid var(--k-border);
  border-bottom: 0;
  border-radius: var(--k-r-item) var(--k-r-item) 0 0;
}
.k-rt-toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 6px;
  margin-right: 4px;
  border-right: 1px solid var(--k-border);
}
.k-rt-toolbar-group:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.k-rt-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--k-text);
  cursor: pointer;
}
.k-rt-btn:hover { background: var(--k-surface); border-color: var(--k-border); }
.k-rt-btn:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 1px; }
.k-rt-btn[aria-pressed="true"] { background: var(--k-selected); color: var(--k-brand); border-color: var(--k-control); }
.k-rt-btn svg { width: 16px; height: 16px; }

/* The code-language picker, shown by main.js only while the cursor is in a
   code block. */
.k-rt-codebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--k-surface-2);
  border: 1px solid var(--k-border);
  border-bottom: 0;
  font-size: 12px;
}
.k-rt-codebar-label { font-weight: 600; color: var(--k-muted); }
.k-rt-codebar-select {
  font: inherit;
  padding: 4px 8px;
  border: 1px solid var(--k-border);
  border-radius: 6px;
  background: var(--k-surface);
  color: var(--k-text);
}
.k-rt-codebar-select:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 1px; }

/* The link/alt-text in-page popovers (editor/popover.js: a
   `<div role="group">`, never a nested <form>, and never window.prompt).
   Plain document flow, not an overlay: this island keeps no floating or
   positioned chrome of its own, so there is nothing here for a CSP-blocked
   inline style to have been covering for. */
.k-rt-popover {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  padding: 8px;
  background: var(--k-surface-2);
  border: 1px solid var(--k-border);
  border-top: 0;
}
.k-rt-popover-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--k-muted);
  flex: 1 1 220px;
}
.k-rt-popover-input {
  font: inherit;
  padding: 6px 10px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-item);
  background: var(--k-surface);
  color: var(--k-text);
}
.k-rt-popover-input:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 1px; }

/* The @ picker (editor/mention.js; Judd's mention fix, 30 October 2026): a
   listbox of people under the text box, in document flow like the popovers
   above — never positioned by an inline style. Each option is the name, then
   the address in the muted line beneath; the highlighted one (aria-selected)
   takes the selected-row colour and a brand edge. */
.k-rt-mention[hidden] { display: none; }
.k-rt-mention {
  border: 1px solid var(--k-border);
  border-top: 0;
  background: var(--k-surface);
}
.k-rt-mention__list { list-style: none; margin: 0; padding: 4px; max-height: 288px; overflow-y: auto; }
.k-rt-mention__option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border-radius: var(--k-r-item);
  border-left: 3px solid transparent;
  cursor: pointer;
}
.k-rt-mention__option:hover { background: var(--k-surface-2); }
.k-rt-mention__option[aria-selected="true"] { background: var(--k-selected); border-left-color: var(--k-brand); }
.k-rt-mention__name { font-weight: 600; color: var(--k-text); }
.k-rt-mention__email { font-size: var(--k-fs-meta); color: var(--k-muted); overflow-wrap: anywhere; }

/* The editable surface. ProseMirror's own base stylesheet (normally
   injected at runtime — switched off here, see this block's header) sets
   `white-space: pre-wrap` on the content DOM so soft line breaks and
   multiple spaces survive as typed, and gives the gap cursor and a
   selected-cell wash somewhere to draw; both are reproduced by hand below. */
.k-rt-mount {
  border: 1px solid var(--k-border);
  border-radius: 0 0 var(--k-r-item) var(--k-r-item);
  background: var(--k-surface);
}
.k-rt-prosemirror {
  min-height: 140px;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
  outline: none;
}
/* The editing surface is also a .k-body, which .k-record-main .k-body holds
   to the 46em prose measure: that is for running prose, not for the editor,
   which fills its frame (the toolbar's and the mount's width). Two classes,
   to match that rule's weight; it comes later in the file, so it wins. */
.k-rt .k-rt-prosemirror { max-width: none; }
.k-rt-prosemirror:focus-visible { outline: 2px solid var(--k-brand); outline-offset: -2px; }
.k-rt-prosemirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  height: 0;
  pointer-events: none;
  color: var(--k-muted);
}
.k-rt-prosemirror .ProseMirror-gapcursor {
  display: block;
  pointer-events: none;
  position: relative;
}
.k-rt-prosemirror .ProseMirror-gapcursor::after {
  content: "";
  display: block;
  position: absolute;
  top: -2px;
  width: 20px;
  border-top: 1px solid var(--k-text);
  animation: k-rt-gapcursor-blink 1.1s steps(2, start) infinite;
}
@keyframes k-rt-gapcursor-blink { to { visibility: hidden; } }
.k-rt-prosemirror .selectedCell { background: var(--k-selected); }

/* The live shared notes' carets (ruling 104, plan §3.4B): another editor's
   caret is a 2 px bar in their avatar colour with their name above it, and
   their selection is underlined in the same colour. editor/schema.js draws
   them with these classes only — the library's own builders write a style
   attribute, which the CSP refuses. The label reuses the avatar palette
   (`.k-avatar--{n}`, background only) with --k-on-brand text. */
.k-rt-caret {
  position: relative;
  margin: 0 -1px;
  border-left: 2px solid var(--k-av-0);
  word-break: normal;
  pointer-events: none;
}
.k-rt-caret__label {
  position: absolute;
  bottom: 100%;
  left: -2px;
  padding: 0 4px;
  border-radius: 4px 4px 4px 0;
  color: var(--k-on-brand);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
  user-select: none;
}
.k-rt-caret--1 { border-left-color: var(--k-av-1); }
.k-rt-caret--2 { border-left-color: var(--k-av-2); }
.k-rt-caret--3 { border-left-color: var(--k-av-3); }
.k-rt-caret--4 { border-left-color: var(--k-av-4); }
.k-rt-caret--5 { border-left-color: var(--k-av-5); }
.k-rt-caret--6 { border-left-color: var(--k-av-6); }
.k-rt-caret--7 { border-left-color: var(--k-av-7); }
.k-rt-caret-selection { box-shadow: inset 0 -2px 0 var(--k-av-0); }
.k-rt-caret-selection--1 { box-shadow: inset 0 -2px 0 var(--k-av-1); }
.k-rt-caret-selection--2 { box-shadow: inset 0 -2px 0 var(--k-av-2); }
.k-rt-caret-selection--3 { box-shadow: inset 0 -2px 0 var(--k-av-3); }
.k-rt-caret-selection--4 { box-shadow: inset 0 -2px 0 var(--k-av-4); }
.k-rt-caret-selection--5 { box-shadow: inset 0 -2px 0 var(--k-av-5); }
.k-rt-caret-selection--6 { box-shadow: inset 0 -2px 0 var(--k-av-6); }
.k-rt-caret-selection--7 { box-shadow: inset 0 -2px 0 var(--k-av-7); }

/* Saved and live-editor rendering of rich text (spec §11 Phase 17;
   docs/technical/richtext.md): headings stored as h3/h4 but labelled
   "Heading 1/2" in the toolbar, tables, code blocks (coloured server-side by
   Pygments; the code surface and every `.k-hl-*` colour are the generated
   block at the end of this file, where their contrast is asserted), the
   single-colour highlight, and images capped at the column. `.k-body` is the
   class `render_rich_text()`'s callers already wrap saved comments and
   descriptions in; `.k-rt-prosemirror` reuses the same rules so the editor
   does not visibly disagree with the page the content lands on. */
.k-body h3, .k-rt-prosemirror h3 { font-size: 17px; line-height: 24px; font-weight: 600; color: var(--k-text); margin: 18px 0 6px; }
.k-body h4, .k-rt-prosemirror h4 { font-size: 14.5px; line-height: 21px; font-weight: 600; color: var(--k-text); margin: 14px 0 4px; }
.k-body mark, .k-rt-prosemirror mark {
  /* var(--k-text) (#1D211F) on #fdf1b8 is ~14.3:1 — comfortably past the
     4.5:1 AA floor. */
  background: #fdf1b8;
  color: var(--k-text);
  border-radius: 2px;
  padding: 0 2px;
}
.k-body pre, .k-rt-prosemirror pre {
  /* Background and text colour: the generated highlighting block below. */
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-item);
  padding: 12px 14px;
  overflow-x: auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
  line-height: 19px;
}
.k-body pre code, .k-rt-prosemirror pre code { background: none; padding: 0; }
.k-body img, .k-rt-prosemirror img { max-width: 100%; height: auto; border-radius: 6px; }
.k-rt-prosemirror img.ProseMirror-selectednode { outline: 2px solid var(--k-brand); outline-offset: 2px; }
.k-rt-table, .k-body .k-rt-table { overflow-x: auto; }
.k-body table, .k-rt-prosemirror table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.k-body th, .k-body td, .k-rt-prosemirror th, .k-rt-prosemirror td {
  border: 1px solid var(--k-border);
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}
.k-body th, .k-rt-prosemirror th { background: var(--k-surface-2); font-weight: 600; }
.k-body blockquote, .k-rt-prosemirror blockquote {
  margin: 8px 0;
  padding: 2px 14px;
  border-left: 3px solid var(--k-border);
  color: var(--k-muted);
}

/* k-error-hero, k-error-page ------------------------------------------------
   The illustrated error and maintenance pages (design language §6, version
   2.3; Judd's ruling of 31 October 2026). One hero: a text column (the
   display word "Kairos" on the standalone pages only, the headline as the
   page's one <h1>, one or two short paragraphs, a 40 px rule, and on the
   shell a "Back to Work" button) beside a line-art illustration from
   static/ui/illustrations/, whose tinted disc and ground line are inside the
   SVG. Two columns once the hero itself is 720 px wide, so the 403 and the
   404 on the shell fold by the width of #k-main and not the window; the
   standalone 500 reaches two columns at a 900 px window. Below that the
   illustration sits under the text at a reduced size.

   403.html and 404.html are on the shell (spec §11 Phase 18 D6) and draw
   the hero inside #k-main. 500.html cannot extend base.html, because
   Django's handler500 renders it with no request at all (see its own
   comment), so .k-error-page is its own full-page frame: the Kairos mark
   and the school's name at the top left, the hero centred in what is left.
   scripts/install/maintenance.html and scripts/nginx/kairos-unavailable.html
   are served without Django or /static and carry their own copy of these
   rules in one <style> block; change both when these change. */
.k-error-page {
  box-sizing: border-box;
  min-height: 100vh;
  max-width: 1100px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  padding: 28px 32px 48px;
}
.k-error-page > .k-error-hero {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}
.k-error-hero {
  container: k-error-hero / inline-size;
  padding-block: 24px;
}
.k-error-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  width: 100%;
}
.k-error-hero__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--k-muted);
  font-size: var(--k-fs-row);
  font-weight: 600;
}
.k-error-hero__brand img { display: block; width: 36px; height: 36px; }
.k-error-hero__text { min-width: 0; }
.k-error-hero__title {
  margin: 0 0 8px;
  color: var(--k-brand);
  font-size: 56px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.k-error-hero__headline {
  margin: 0 0 24px;
  color: var(--k-ok-fg);
  font-size: 28px;
  font-weight: 300;
  line-height: 1.2;
}
.k-error-hero__body {
  margin: 0 0 12px;
  max-width: 460px;
  color: var(--k-text-2);
  font-size: 16px;
  line-height: 1.5;
}
.k-error-hero__rule {
  width: 40px;
  height: 2px;
  margin: 28px 0 0;
  background: var(--k-brand);
}
.k-error-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.k-error-hero__art {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
}
@container k-error-hero (min-width: 720px) {
  .k-error-hero__inner {
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
    gap: 48px;
  }
  .k-error-hero__title { font-size: 64px; }
  .k-error-hero__art { max-width: 520px; justify-self: end; }
}
/* The brand row is the page's top, not the hero's: on a short window the
   hero gets less room than it needs and the page simply scrolls. */
.k-error-page > .k-error-hero__brand { flex: none; }

/* --------------------------------------------------------------------------
   k_page_header — one page header (Phase 18, C5)
   Overline, then the title row (the H1, then the secondary slot and
   "Actions ▾" at its right edge, top-aligned), the meta line, the facts and
   the tabs. Page titles use Title (300 · 30, line-height 1.15, the design
   language's page title since Phase 21 slice 2); the Work home greeting
   alone keeps Display. The primary action is the top bar's, never here
   (§3.2). The meta line is the design language's subline: 13/400 muted.
   -------------------------------------------------------------------------- */
.k-page-header { display: block; }
.k-page-header-overline { display: block; margin-bottom: 2px; }
.k-page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.k-page-header-title { min-width: 0; overflow-wrap: anywhere; }
.k-page-header-titlewrap { min-width: 0; flex-wrap: nowrap; }
.k-page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-top: 1px;
}
.k-page-header-meta {
  font-weight: 400;
  font-size: var(--k-fs-row);
  line-height: 18px;
  color: var(--k-muted);
}
.k-page-header-meta > p + p { margin-top: 2px; }
.k-page-header-facts { margin-top: 6px; }
.k-page-header-tabs { margin-top: 2px; }
@media (max-width: 599px) {
  /* The Actions menu renders in the page flow below 600 px, so the title
     row wraps it onto its own line rather than squeezing the title. */
  .k-page-header-row { flex-wrap: wrap; }
  .k-page-header-actions { flex: 1 1 100%; align-items: flex-start; }
  .k-page-header-actions > .k-actions { flex: 1 1 auto; width: auto; }
  .k-page-header-actions > [data-k-page-secondary] { margin-top: 3px; }
}

/* --------------------------------------------------------------------------
   k_actions — the Actions menu and the rows' "⋯" menus (Phase 18, C5)
   A native <details>: the panel opens below its trigger, right-aligned, and
   flips above it (kMore adds .is-up) when less than 240 px remains below.
   Five fixed groups separated by hairlines, a heavier one before the
   destructive group, whose entries take the error tone. Below 600 px the
   panel sits in the page flow, full width, with 44 px rows.
   -------------------------------------------------------------------------- */
.k-actions { position: relative; display: inline-block; }
.k-actions > summary { list-style: none; }
.k-actions > summary::-webkit-details-marker { display: none; }
.k-actions-trigger {
  min-height: 32px;
  font-size: 13px;
  line-height: 18px;
  padding: 6px 12px 6px 14px;
  gap: 6px;
}
.k-actions-trigger svg { width: 12px; height: 12px; transition: transform .12s ease; }
.k-actions[open] > .k-actions-trigger svg { transform: rotate(180deg); }
.k-actions-trigger--row {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--k-muted);
  cursor: pointer;
}
.k-actions-trigger--row:hover,
.k-actions--row[open] > .k-actions-trigger--row { background: var(--k-selected); color: var(--k-brand); }
.k-actions-trigger--row svg { width: 16px; height: 16px; }
.k-actions[open] > .k-actions-trigger--row svg { transform: none; }
.k-actions > summary:focus-visible {
  outline: 2px solid var(--k-brand);
  outline-offset: 2px;
}
.k-actions-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 60;
  width: 280px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
  background: var(--k-surface);
  border-radius: var(--k-r-box);
  box-shadow: var(--k-shadow-overlay);
  text-align: left;
}
.k-actions--row .k-actions-panel { width: 240px; }
.k-actions.is-up .k-actions-panel { top: auto; bottom: calc(100% + 4px); }
.k-actions-group { list-style: none; margin: 0; padding: 2px 0; }
.k-actions-group + .k-actions-group { border-top: 1px solid var(--k-divider); }
.k-actions-group--destructive,
.k-actions-group + .k-actions-group--destructive { border-top: 2px solid var(--k-border); }
.k-actions-group:first-child { border-top: 0; }
.k-actions-form { margin: 0; }
.k-actions-entry {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--k-text);
  font: inherit;
  font-size: 13px;
  line-height: 18px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.k-actions-entry:hover,
.k-actions-entry:focus-visible { background: var(--k-surface-2); text-decoration: none; }
.k-actions-entry:focus-visible { outline: 2px solid var(--k-brand); outline-offset: -2px; }
.k-actions-entry.is-destructive { color: var(--k-bad-fg); }
.k-actions-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 14px;
  width: 14px;
  height: 18px;
  color: currentColor;
}
.k-actions-icon svg { width: 14px; height: 14px; }
.k-actions-text { display: flex; flex-direction: column; min-width: 0; }
.k-actions-note {
  font-size: 11.5px;
  line-height: 16px;
  font-weight: 300;
  color: var(--k-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.k-actions-solo { display: inline; margin: 0; }
@media (max-width: 599px) {
  .k-actions:not(.k-actions--row) { display: block; width: 100%; }
  .k-actions-panel,
  .k-actions--row .k-actions-panel {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 6px;
    box-shadow: none;
    border: 1px solid var(--k-border);
  }
  /* A stacked card's open "⋯" menu takes the card's full width on the line
     below its head, in the page flow, rather than squeezing the head. */
  .k-table-card-head { flex-wrap: wrap; }
  .k-table-card-head > .k-actions--row[open] { flex: 1 1 100%; display: flex; flex-direction: column; }
  .k-table-card-head > .k-actions--row[open] > summary { align-self: flex-end; }
  /* The record's Actions menu in the context bar (Phase 21 slice 1b) stays
     in the bar's row: its panel drops from the bar, the bar's width less its
     gutters, over the page rather than in its flow. */
  .k-topbar .k-actions:not(.k-actions--row) { display: inline-block; width: auto; position: static; }
  .k-topbar .k-actions-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 12px;
    right: 12px;
    width: auto;
    max-height: 70vh;
    margin-top: 0;
    border: 0;
    box-shadow: var(--k-shadow-overlay);
  }
}
/* 44 px targets (ruling 46 C: below 600 px, and on any touch screen). */
@media (max-width: 599px), (pointer: coarse) {
  .k-actions-entry { min-height: 44px; align-items: center; }
  /* A row's "⋯" is a 44 px target too (Phase 18 C11), in the table's stacked
     card as in the page header, and the board card's (ruling 46 C). */
  .k-actions-trigger--row { min-width: 44px; min-height: 44px; }
}

/* A chip's menu below 600 px (Phase 18 C11): in the page flow,
   full width under the chip, with 44 px choices — as the Actions menu above.
   A column header's popover is not reached on a phone (the cards have no
   headers), so it is left as it is. */
@media (max-width: 599px) {
  details[open] > .k-chip-popover:not(.k-chip-popover--th) {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 6px;
    box-shadow: none;
    border: 1px solid var(--k-border);
  }
  /* The Columns panel likewise: in the page flow, with 44 px rows, moves and
     buttons (the targets in the block after this one). */
  .k-columns-panel {
    position: static;
    width: 100%;
    max-width: none;
    box-shadow: none;
    border: 1px solid var(--k-border);
  }
}
/* 44 px targets (ruling 46 C: below 600 px, and on any touch screen): the
   chip choices and the Columns panel's rows, moves and buttons. */
@media (max-width: 599px), (pointer: coarse) {
  .k-chip-choice { min-height: 44px; }
  .k-columns-list > li { min-height: 44px; }
  .k-columns-list label { min-height: 44px; }
  .k-columns-move { width: 44px; height: 44px; }
  .k-columns-actions .k-btn { min-height: 44px; }
}

/* --------------------------------------------------------------------------
   k_confirm — a confirmed act's confirmation (Phase 18): the panel the
   shared modal (#k-confirm) is filled with, and the same form as a page.
   -------------------------------------------------------------------------- */
.k-confirm { margin: 0; }
.k-confirm .k-modal-body > * + * { margin-top: 12px; }
/* A confirmation page is a centred card (Q5; Phase 18 Wave 3 repairs): the
   card stands in the middle of the content area with its title directly
   above it, rather than at the left edge of a 2,400 px page. */
.k-confirm-page { max-width: 560px; margin-inline: auto; }
.k-page:has(> .k-confirm-page) > .k-page-header { max-width: 560px; margin-inline: auto; }
.k-confirm-page-body > * + * { margin-top: 12px; }
.k-confirm-page-foot { justify-content: flex-end; margin-top: 18px; }
/* A Configuration confirmation's notes — what sat behind its closing card's
   ⓘ icons (C10) — each under its label. */
.k-confirm-notes { margin: 0; }
.k-confirm-notes dt { margin-top: 10px; }
.k-confirm-notes dd { margin: 2px 0 0; }

/* --------------------------------------------------------------------------
   The work item record page (Phase 18 Wave 1, C6/C7/C11/C12; design record
   §12.7, MK1, MK3, MK4, MK13). The meta line (P3), the facts line (P4,
   k_fact), the record strip (P5), section headers, compact empty rows, the
   rail's <details> blades, skip links and the reference slide-over (P8).
   DOM order is the reading order at every width (ruling 14): nothing here
   uses `order`.
   -------------------------------------------------------------------------- */
.k-meta-line { margin: 0; display: flex; flex-wrap: wrap; gap: 0 6px; font-size: 13px; line-height: 20px; color: var(--k-muted); }
/* The separator belongs to the end of the item before it, not the start of the
   one after: an item that wraps onto its own line then begins with its words,
   not a stray "·". Same 6 px either side as before. */
.k-meta-line > :not(:last-child)::after { content: "·"; margin-left: 6px; color: var(--k-muted); }

/* P4 — the facts line. Chips are 26 px tall and 8 px apart; an editor chip
   carries a 1 px border and a chevron, a statement neither. */
.k-record-head { margin-top: 12px; }
.k-fact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.k-fact { position: relative; display: inline-block; }
.k-fact > summary { list-style: none; }
.k-fact > summary::-webkit-details-marker { display: none; }
.k-fact__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: var(--k-r-pill);
  background: var(--k-page);
  color: var(--k-text);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}
.k-fact__chip svg { width: 10px; height: 10px; flex: 0 0 auto; }
.k-fact__chip .k-avatar { width: 20px; height: 20px; font-size: 9px; }
.k-fact__chip.is-editor { border: 1px solid var(--k-border); background: var(--k-surface); cursor: pointer; }
.k-fact__chip.is-editor:hover { border-color: var(--k-control); }
.k-fact > summary:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 2px; }
.k-fact[open] > .k-fact__chip svg { transform: rotate(180deg); }
.k-fact__chip--bad { color: var(--k-bad-fg); background: var(--k-bad-bg); }
.k-fact__chip--warn { color: var(--k-warn-fg); background: var(--k-warn-bg); }
.k-fact__chip--info { color: var(--k-info-fg); background: var(--k-info-bg); }
.k-fact__chip--ok { color: var(--k-ok-fg); background: var(--k-ok-bg); }
.k-fact__chip.is-editor.k-fact__chip--bad,
.k-fact__chip.is-editor.k-fact__chip--warn,
.k-fact__chip.is-editor.k-fact__chip--info,
.k-fact__chip.is-editor.k-fact__chip--ok { border-color: currentColor; }
.k-fact-label { font-weight: 300; color: var(--k-muted); }

/* An ⓘ note (ui/components/note.html; C6/C12): a native <details> beside a
   fact — the domain on the meta line, the state on the facts line or the
   strip — disclosing one sentence in a small panel. Opens with scripting
   off; ui/kairos.js closes it on a click outside and on Escape. */
.k-note { position: relative; display: inline-block; vertical-align: middle; }
.k-note > summary { list-style: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--k-muted); cursor: pointer; }
.k-note > summary::-webkit-details-marker { display: none; }
.k-note > summary:hover { color: var(--k-brand); background: var(--k-selected); }
.k-note > summary:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 1px; }
.k-note > summary svg { width: 13px; height: 13px; }
.k-note-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 60;
  width: max-content;
  max-width: 280px;
  padding: 8px 10px;
  background: var(--k-surface);
  border-radius: var(--k-r-box);
  box-shadow: var(--k-shadow-overlay);
  color: var(--k-text);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 18px;
  white-space: normal;
}
.k-meta-line__note { display: inline-flex; align-items: center; gap: 2px; }
.k-meta-line__note::after { align-self: center; }
/* The note is a flex row whose own 2 px gap already sits before the dot. */
.k-meta-line > .k-meta-line__note:not(:last-child)::after { margin-left: 4px; }
.k-fact-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 60;
  min-width: 200px;
  padding: 8px;
  background: var(--k-surface);
  border-radius: var(--k-r-box);
  box-shadow: var(--k-shadow-overlay);
}
.k-fact-panel > * + * { margin-top: 8px; }
.k-fact-options { list-style: none; margin: 4px 0 0; padding: 0; }
.k-fact-option,
.k-combobox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--k-text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.k-fact-option svg,
.k-combobox-option svg { width: 12px; height: 12px; flex: 0 0 auto; }
.k-fact-option:hover,
.k-fact-option:focus-visible,
.k-combobox-option:hover,
.k-combobox-option:focus-visible,
.k-combobox-option.is-highlighted { background: var(--k-surface-2); }
.k-fact-option:focus-visible,
.k-combobox-option:focus-visible { outline: 2px solid var(--k-brand); outline-offset: -2px; }
.k-fact-option.is-current,
.k-combobox-option.is-current { font-weight: 600; }
.k-combobox-panel { width: 280px; }
.k-combobox-input { width: 100%; }
.k-combobox-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }

/* P5 — the record strip: a card holding the moves, the assignee combobox
   and the approval groups, 24 px apart, wrapping. Renamed from .k-strip in
   Phase 21 slice 8 (the collision table: .k-strip is the design language's
   property and summary strip); the .k-strip-group, -controls and -reasons
   children keep their names, which collide with nothing. */
.k-moves {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 24px;
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--k-surface);
  border: 1px solid var(--k-divider);
  border-radius: 10px;
}
.k-strip-group { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.k-strip-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; }
.k-strip-reasons { list-style: none; margin: 4px 0 0; padding: 0; max-width: 60ch; }
.k-strip-reasons > li + li { margin-top: 2px; }
.k-move { gap: 4px; }
.k-move-flag { display: inline-grid; place-items: center; }
.k-move-flag svg { width: 12px; height: 12px; }
.k-more-moves .k-actions-panel { width: 240px; }
.k-moves .k-searchselect-input { min-width: 170px; }

/* P6 — one section header in the main column: a 15/600 heading, a count and
   one right-aligned verb; and C7's compact one-line empty row. */
.k-section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.k-section-title { margin: 0; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--k-text); }
.k-section-verb { margin-left: auto; gap: 4px; }
.k-section-verb svg { width: 14px; height: 14px; }
/* Restyled in place in Phase 21 slice 15 stage 4 (Judd's ruling 90; plan
   §2.6, readings 15 and 16): the design language's dashed k-empty box —
   one row, the sentence taking the room (.k-empty-row-text, slice 15's
   block) and the next step at its end as a small ghost button. */
.k-empty-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--k-control);
  border-radius: var(--k-r-box);
  font-size: var(--k-fs-meta);
  line-height: 18px;
  color: var(--k-muted);
}
.k-empty-row-caption { font-size: 12px; }
.k-card-head { justify-content: space-between; }
.k-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--k-muted);
}
.k-icon-btn:hover { background: var(--k-surface-2); color: var(--k-text); }
.k-icon-btn:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 2px; }
.k-icon-btn svg { width: 14px; height: 14px; }
.k-comment-actions { gap: 6px; }

/* P7 — blades are native <details name=record> (§3.3 as amended): the browser
   keeps one open at a time, and they open with scripting off. */
details.k-agenda-card__fold > summary { list-style: none; }
details.k-agenda-card__fold > summary::-webkit-details-marker { display: none; }
details.k-agenda-card__fold > summary:focus-visible { outline: 2px solid var(--k-brand); outline-offset: -2px; }
.k-checklist-card { border-top: 1px solid var(--k-divider); padding-top: 10px; }
.k-checklist-card > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; cursor: pointer; list-style: none; }
.k-checklist-card > summary::-webkit-details-marker { display: none; }
.k-checklist-name { font-size: 13px; font-weight: 600; color: var(--k-text); }
.k-checklist-card-body { margin-top: 8px; }
.k-checklist-card-meta { justify-content: space-between; align-items: flex-start; }
.k-checklist-lines { list-style: none; margin: 0; padding: 0; }
.k-checklist-line { padding: 6px 0; }
.k-add-checklist > summary { display: inline-flex; gap: 4px; list-style: none; }
.k-add-checklist > summary::-webkit-details-marker { display: none; }
.k-add-checklist { border-top: 0; padding-top: 0; }
.k-add-checklist-body { margin-top: 10px; }
.k-link-rows { list-style: none; margin: 0; padding: 0; }
.k-link-row { padding: 4px 0; flex-wrap: nowrap; }
.k-link-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.k-history-head { margin: 0 0 8px; }
.k-watchers { gap: 8px; }
.k-narrow { max-width: 760px; }
/* The reference pages (History, Watchers) and the panel pages (a record's
   Checklists and Linked records as pages of their own) use the full content
   width (Phase 18 Wave 3, W4; criterion clause 5; the design record's
   §14.2.4 found their 760 px column the worst pages in the audit). History
   and Watchers are tables now (kairos.work.views.record.history_table); a
   panel page sets its cards side by side, each at least 480 px and sharing
   the row (a wrapping flex row), so one card fills the width and many fill
   rows of two, three or four; its add forms fill their row (they were held
   to 720 px until 29 October 2026), and a checklist line or a linked
   record's title keeps the prose measure. */
.k-panel-page > .k-stack-16 {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}
.k-panel-page > .k-stack-16 > * { flex: 1 1 480px; min-width: 0; }
.k-panel-page > .k-stack-16 > * + * { margin-top: 0; }
.k-panel-page > .k-stack-16 > :is(.k-field-error, .k-add-checklist, .k-link-add, .k-empty-row) {
  flex-basis: 100%;
}
.k-panel-page > .k-stack-16 > .k-checklist-card { border: 1px solid var(--k-divider); border-radius: var(--k-r-box); background: var(--k-surface); padding: 12px 16px; }
.k-panel-page .k-checklist-line,
.k-panel-page .k-link-title { max-width: 46em; }
#k-history-table .k-col--title { width: auto; max-width: 28em; min-width: 200px; white-space: normal; }
#k-history-table td:last-child { width: 100%; }
.k-history-change { display: block; max-width: 46em; }
.k-history-change + .k-history-change { margin-top: 2px; }

/* P8 — the reference slide-over (History, Watchers): 480 px, full screen
   below 600 px (the slide-over's own rule). */
.k-slideover[data-overlay="work-reference"] .k-slideover-panel { width: min(480px, 100%); }

/* Skip links (C11): shown on focus from 600 px up; below 600 px a visible
   "Jump to" row of 44 px links, so touch users get them too. */
.k-jump { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.k-jump-label { font-size: 11px; font-weight: 600; color: var(--k-muted); text-transform: uppercase; letter-spacing: .06em; }
@media (min-width: 600px) {
  .k-jump { position: absolute; left: -9999px; }
  .k-jump:focus-within { position: static; left: auto; margin-bottom: 8px; }
  .k-jump-label { display: none; }
}
@media (max-width: 599px) {
  .k-jump { margin-bottom: 12px; }
  .k-jump-link { padding: 0 12px; border: 1px solid var(--k-border); border-radius: var(--k-r-pill); }
  /* Menus and chip editors render in the page flow below 600 px (C11), with
     44 px targets (the block after this one). */
  .k-strip-group,
  .k-strip-controls { width: 100%; }
  /* An open chip's editor takes the row it opened on (two chips a row at rest). */
  .k-fact[open] { flex: 1 1 100%; }
  .k-combobox { width: 100%; }
  .k-fact-panel { position: static; width: 100%; margin-top: 6px; box-shadow: none; border: 1px solid var(--k-border); }
  .k-note-panel { max-width: calc(100vw - 32px); }
  .k-combobox-panel { width: 100%; }
  .k-moves .k-move { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .k-more-moves { width: 100%; }
}
/* 44 px targets (ruling 46 C: below 600 px, and on any touch screen). */
@media (max-width: 599px), (pointer: coarse) {
  .k-jump-link { display: inline-flex; align-items: center; min-height: 44px; }
  .k-fact__chip { min-height: 44px; padding: 8px 14px; }
  .k-note > summary { width: 44px; height: 44px; }
  .k-fact-option,
  .k-combobox-option { min-height: 44px; }
  .k-moves .k-move { min-height: 44px; }
  .k-section-verb,
  .k-icon-btn { min-height: 44px; min-width: 44px; }
}

/* Every target in the page is 44 px below 600 px (§3.4, Phase 18 C11). One
   sweep rather than a rule per editor, because the Wave 1 walk found the
   per-editor rules had missed the page header's "Actions" (32 px), the due
   date's Save (26 px) and date input (40 px) and the assignee search (38 px),
   and the checklist editors, the comment composer and the filter bar had the
   same gaps: every button, field, select, checkbox row and disclosure summary
   in the page, the rich-text toolbar's buttons, and the filter bar's search,
   chips, ✕ and "Clear all". A link inside running text is exempt (WCAG 2.2's
   inline exception), as are the navigation and top bar, which have their own
   phone forms. */
@media (max-width: 599px), (pointer: coarse) {
  .k-page .k-btn,
  .k-page .k-field-input,
  .k-page select,
  .k-page textarea,
  .k-page input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
    min-height: 44px;
  }
  .k-page .k-check { padding-block: 12px; }
  .k-page details > summary { min-height: 44px; }
  .k-page .k-disclosure > summary { padding-block: 12px; line-height: 20px; }
  /* A link standing on its own — the meta line's, a row's link, "See all"
     beside a heading — rather than inside a sentence. */
  .k-page a.k-table-rowlink,
  .k-page a.k-board-card-key,
  .k-page .k-row > a:not(.k-btn) { display: inline-flex; min-height: 44px; align-items: center; }
  /* The meta line's links hold a date beside their words, so they stay
     inline (a flex box would drop the spaces between them). */
  /* Its tap area is 44 px tall, with the padding taken back in negative
     margins so the line box stays 20 px and the link's text sits on the
     line with the facts beside it (W1 left it 12 px low on an iPad). */
  .k-page .k-meta-line a { display: inline-block; padding-block: 12px; margin-block: -12px; }
  /* A link that stands alone in its paragraph — "Back to INC-22" under a
     History, Watchers or checklists page, a blade's "Open the linked
     records", "Go back and fix the mapping" (Phase 18 Wave 3 repairs) —
     is a target of its own, not a link inside a sentence: k-link-standalone
     makes its real box 44 px. */
  .k-page .k-link-standalone { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  /* Slice 1b stage 5's closing walk, on an iPad and at 360 px (each the same
     at 0a24df7, so older than Phase 21): the sign-in page's fields (38 px,
     outside .k-page so the field rule above missed them; the ticket's SLA
     fact link's rule left in slice 16, nothing drawing it). The links that
     stand alone in their line — Meetings' "to prepare" rows, "Print the
     previous minutes", "Carried forward to/from …" and a coverage gap — now
     carry k-link-standalone in their templates. */
  .login-field input { min-height: 44px; }
  .k-page .k-rt-btn { width: 44px; height: 44px; }
  .k-page .k-tab { display: inline-flex; align-items: center; min-height: 44px; }
  /* A stacked card's title is its row's link: the whole title, 44 px at least. */
  .k-table-card-title .k-title-link { display: flex; align-items: center; min-height: 44px; }
  /* Phase 18 Wave 2's walk #1 at 360 px: every target Wave 2 added, and the
     standalone links beside them, at least 44 px each way. A link inside a
     sentence (a caption's "Open the register to read…", a comment's or a
     description's prose) keeps WCAG 2.5.8's inline exception. */
  .k-page a.k-table-rowlink,
  .k-page a.k-board-card-key { min-width: 44px; }
  .k-page .k-row > a:not(.k-btn) { flex-shrink: 0; min-width: 44px; }
  .k-page a.k-board-card-title { display: flex; align-items: center; min-height: 44px; }
  .k-page .k-tools__item-link { min-height: 44px; align-items: center; }
  .k-page a.k-meta,
  .k-page a.k-band-legend-item,
  .k-page .k-banner-action { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .k-page .k-toggle { min-height: 44px; }
  /* The ⓘ: 44 px wide as well as high, its extra width taken back by its
     margins so the icon and everything beside it stay where they were. */
  .k-page .k-info-btn { width: 44px; margin-inline: -10px; }
  /* Walk #2 at 360 px. A notification row's title link (130 x 36 unread, 18
     px high on one line) and its "Mark read" (86 x 32), on the list page and
     in the bell's dropdown alike, read or unread. The title's padding makes
     its first line 44 px however many lines it wraps to, and a stub's title
     (no link) takes the same, so every row's dot and "Mark read" stay level
     with its first line. The dropdown sits outside the page, so these are
     unscoped. */
  .k-notification-title { min-height: 44px; margin-block: 0; padding-block: 13px; }
  .k-notification-dot { margin-top: 18px; }
  .k-notification-read { min-height: 44px; }
  /* The dropdown's "Mark all read" and its foot's two links (20 px high):
     the head and foot give up their vertical padding to the 44 px targets. */
  .k-bell-menu-head,
  .k-bell-menu-foot { padding-block: 0; }
  .k-bell-menu-action,
  .k-bell-menu-foot a { display: inline-flex; align-items: center; min-height: 44px; }
  /* A card's link to another entry (the spawn form's source card, an OFI's
     Derived-from card), 20 px high: padding, not a flex box, which would drop
     the space between its key and its title. */
  .k-page .k-link-card-link { padding-block: 12px; line-height: 20px; }
  /* A banner's ✕ (18 px; the OFI offer's, B9): 44 px, its extra height taken
     back by margins equal to the banner's padding, so a banner without an
     action keeps its height. */
  .k-page .k-banner-dismiss { width: 44px; height: 44px; margin-block: -11px; }
  /* The two panels (Phase 21 slice 4; Judd's rulings 19 (2) and 32). The
     shell's #k-panel and #k-confirm-panel sit beside #k-main, not inside
     .k-page, so the sweep above missed what htmx loads into them — the
     assignee search in the ticket panel (34 px), the sample panel's Done and
     a confirmation's Cancel and Delete (34 px). Every .k-page rule above,
     repeated for the two panels; the .k-page rules themselves are unchanged. */
  #k-panel .k-btn,
  #k-panel .k-field-input,
  #k-panel select,
  #k-panel textarea,
  #k-panel input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  #k-confirm-panel .k-btn,
  #k-confirm-panel .k-field-input,
  #k-confirm-panel select,
  #k-confirm-panel textarea,
  #k-confirm-panel input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
    min-height: 44px;
  }
  #k-panel .k-check,
  #k-confirm-panel .k-check { padding-block: 12px; }
  #k-panel details > summary,
  #k-confirm-panel details > summary { min-height: 44px; }
  #k-panel .k-disclosure > summary,
  #k-confirm-panel .k-disclosure > summary { padding-block: 12px; line-height: 20px; }
  #k-panel a.k-table-rowlink,
  #k-panel a.k-board-card-key,
  #k-panel .k-row > a:not(.k-btn),
  #k-confirm-panel a.k-table-rowlink,
  #k-confirm-panel a.k-board-card-key,
  #k-confirm-panel .k-row > a:not(.k-btn) { display: inline-flex; min-height: 44px; align-items: center; }
  #k-panel .k-meta-line a,
  #k-confirm-panel .k-meta-line a { display: inline-block; padding-block: 12px; margin-block: -12px; }
  #k-panel .k-link-standalone,
  #k-confirm-panel .k-link-standalone { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  #k-panel .k-rt-btn,
  #k-confirm-panel .k-rt-btn { width: 44px; height: 44px; }
  #k-panel .k-tab,
  #k-confirm-panel .k-tab { display: inline-flex; align-items: center; min-height: 44px; }
  #k-panel a.k-table-rowlink,
  #k-panel a.k-board-card-key,
  #k-confirm-panel a.k-table-rowlink,
  #k-confirm-panel a.k-board-card-key { min-width: 44px; }
  #k-panel .k-row > a:not(.k-btn),
  #k-confirm-panel .k-row > a:not(.k-btn) { flex-shrink: 0; min-width: 44px; }
  #k-panel a.k-board-card-title,
  #k-confirm-panel a.k-board-card-title { display: flex; align-items: center; min-height: 44px; }
  #k-panel .k-tools__item-link,
  #k-confirm-panel .k-tools__item-link { min-height: 44px; align-items: center; }
  #k-panel a.k-meta,
  #k-panel a.k-band-legend-item,
  #k-panel .k-banner-action,
  #k-confirm-panel a.k-meta,
  #k-confirm-panel a.k-band-legend-item,
  #k-confirm-panel .k-banner-action { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  #k-panel .k-toggle,
  #k-confirm-panel .k-toggle { min-height: 44px; }
  #k-panel .k-info-btn,
  #k-confirm-panel .k-info-btn { width: 44px; margin-inline: -10px; }
  #k-panel .k-link-card-link,
  #k-confirm-panel .k-link-card-link { padding-block: 12px; line-height: 20px; }
  #k-panel .k-banner-dismiss,
  #k-confirm-panel .k-banner-dismiss { width: 44px; height: 44px; margin-block: -11px; }
  /* The rail blades' standing links (Judd's rulings RB1 and RB2, 31 October
     2026): "More options" under the rows and "My actions" by the list. */
  #k-panel .k-quickadd__more,
  #k-panel .k-rail-blade__more { display: inline-flex; align-items: center; min-height: 44px; }
}

/* --------------------------------------------------------------------------
   The attachment drop zone (Phase 18 C12; attachments/picker.html)
   The zone IS the file input: a dashed box the browser drops files onto
   natively, labelled "Attach files or drop here" by a <label> drawn over its
   top (pointer-events: none, so a click lands on the input beneath), with the
   input's own "No file chosen" / "3 files" line showing what was chosen even
   with scripting off. kFilePicker only adds the tint while dragging.
   -------------------------------------------------------------------------- */
.k-dropzone { position: relative; }
.k-dropzone-label {
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  color: var(--k-text);
  pointer-events: none;
}
.k-dropzone-icon { display: inline-grid; place-items: center; color: var(--k-brand); }
.k-dropzone-icon svg { width: 16px; height: 16px; }
.k-dropzone-input {
  display: block;
  width: 100%;
  min-height: 84px;
  padding: 42px 16px 12px;
  border: 1px dashed var(--k-faint);
  border-radius: 10px;
  background: var(--k-surface);
  font-size: 12px;
  line-height: 18px;
  color: var(--k-muted);
  cursor: pointer;
}
.k-dropzone-input::file-selector-button {
  margin-right: 10px;
  padding: 4px 10px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-item);
  background: var(--k-surface);
  font: inherit;
  font-weight: 600;
  color: var(--k-text);
  cursor: pointer;
}
.k-dropzone-input:hover,
.k-dropzone.is-dragging .k-dropzone-input {
  border-color: var(--k-brand);
  background: var(--k-selected);
}
.k-dropzone-input:focus-visible {
  outline: 2px solid var(--k-brand);
  outline-offset: 1px;
  border-color: var(--k-brand);
}

/* k-technical (Phase 18 C9): a superadmin's operator detail — commands, file
   paths, environment variables — collapsed under "Technical detail" so the
   page reads in plain words until somebody opens it. */
.k-technical {
  margin-top: 12px;
  border-top: 1px solid var(--k-divider);
  padding-top: 8px;
}
.k-technical-summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--k-muted);
  min-height: 24px;
}
.k-technical-body { margin-top: 6px; }
.k-technical-body > * + * { margin-top: 6px; }
.k-technical-body code { overflow-wrap: anywhere; }
.k-technical-body ul { margin: 0; padding-left: 18px; }

/* --------------------------------------------------------------------------
   Helpdesk, Phase 18 Wave 2: a ticket opened from a queue, the queue's quick
   view (ruling 38) and the Helpdesk home's queue summary.
   -------------------------------------------------------------------------- */
/* Previous and Next through the queue, above the record's header. */
.k-queue-pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.k-queue-pager .k-btn { display: inline-flex; align-items: center; gap: 4px; }
.k-queue-pager .k-btn svg { width: 12px; height: 12px; }
.k-queue-pager-end { padding: 4px 0; }
/* The quick view's triage: the record strip's own groups, stacked in the
   panel's width. Targets stay at least 24 px (the chips 26 px, the moves
   26 px) and become 44 px below 600 px with the record page's own rules. */
.k-peek-strip { flex-direction: column; gap: 12px; margin-top: 0; padding: 12px; box-shadow: none; }
.k-peek-strip .k-strip-group { width: 100%; }
.k-peek-actions { flex-wrap: wrap; gap: 8px; }
.k-peek-actions .k-btn { display: inline-flex; align-items: center; gap: 4px; }
.k-peek-actions .k-btn svg { width: 12px; height: 12px; }
@media (max-width: 599px), (pointer: coarse) {
  .k-overlay-close { width: 44px; height: 44px; }
}

/* ---------------------------------------------------------------------------
   Phase 18 Wave 2, B8 — Assets, Compliance and Governance
   (docs/ui-refinement-design.md §7.3, §8.5–§8.7). Each pattern is in the
   style guide (/style-guide/#sg-assessment, #sg-band-bar, #sg-cascade,
   #sg-compact-cards) with its first use.
   ------------------------------------------------------------------------ */

/* The risk Assessment card (§7.3): two 5x5 mini grids, an arrow between,
   the band line under both. The cells take the heat map's own band tones
   (.k-heat-cell--<tone>): the tint as a quiet wash, the scored cell the
   band's full colour (its currentColor) with a 2 px ink outline. */
.k-assessment-review { font-size: 12px; line-height: 16px; color: var(--k-muted); }
.k-assessment-review--warning { color: var(--k-warn-fg); font-weight: 600; }
.k-assessment-review--error { color: var(--k-bad-fg); font-weight: 600; }
.k-assessment-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 12px;
}
.k-assessment-half { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.k-assessment-half .k-label { display: block; }
.k-assessment-arrow { color: var(--k-muted); display: inline-flex; }
.k-mini-matrix {
  display: grid;
  grid-template-columns: repeat(5, 18px);
  grid-auto-rows: 18px;
  gap: 2px;
  width: max-content;
}
.k-mini-cell { display: block; border-radius: 2px; opacity: .85; }
.k-mini-cell.is-scored {
  opacity: 1;
  background: currentColor;
  outline: 2px solid var(--k-text);
  outline-offset: 0;
}
.k-assessment-bands { margin: 12px 0 0; font-size: 13px; line-height: 22px; }
.k-assessment-band { display: inline-flex; align-items: center; gap: 4px; }
.k-assessment-pair { font-variant-numeric: tabular-nums; color: var(--k-muted); }
.k-assessment-then { color: var(--k-muted); margin: 0 6px; }

/* Lists inside a rail blade (the risk's Controls and Treatments blades). */
.k-tools__list { list-style: none; margin: 0; padding: 0; }
.k-tools__item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border-bottom: 1px solid var(--k-divider);
}
.k-tools__item:last-child { border-bottom: 0; }
.k-tools__item-link {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 6px;
  align-items: baseline;
  color: var(--k-text);
  text-decoration: none;
}
.k-tools__item-link:hover .k-tools__item-title,
.k-tools__item-link:focus-visible .k-tools__item-title { text-decoration: underline; }
.k-tools__item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A Controls-blade row (ruling 44): the link, and under it, in caption type,
   how the control relates to the risk — "Mitigates", "Contained", or both. */
.k-tools__item-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

/* Compliance landing KPIs (§8.6): a stacked bar of the residual bands and
   its legend, or one linked metric. The bar is an aria-hidden SVG whose
   widths are geometry attributes; the legend is the content. */
.k-landing-kpi { border-top: 1px solid var(--k-divider); padding-top: 12px; }
.k-landing-kpi > .k-label { display: block; margin-bottom: 6px; }
.k-band-bar { display: block; border-radius: 4px; overflow: hidden; background: var(--k-page); }
.k-band-seg--error { fill: var(--k-bad-fg); }
.k-band-seg--warning { fill: var(--k-warn-fg); }
.k-band-seg--info { fill: var(--k-info-fg); }
.k-band-seg--success { fill: var(--k-ok-fg); }
.k-band-seg--neutral { fill: var(--k-border); }
.k-band-legend {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 12px;
}
.k-band-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  color: var(--k-text);
  text-decoration: none;
}
a.k-band-legend-item:hover,
a.k-band-legend-item:focus-visible { text-decoration: underline; }
.k-band-swatch { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.k-band-swatch--error { background: var(--k-bad-fg); }
.k-band-swatch--warning { background: var(--k-bar-warn); }
.k-band-swatch--info { background: var(--k-bar-info); }
.k-band-swatch--success { background: var(--k-bar-ok); }
.k-band-swatch--neutral { background: var(--k-border); }
.k-landing-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--k-text);
  text-decoration: none;
}
.k-landing-metric:hover .k-landing-metric-value,
.k-landing-metric:focus-visible .k-landing-metric-value { text-decoration: underline; }
.k-landing-metric-value { font-weight: 300; font-size: 28px; line-height: 34px; color: var(--k-text); }
.k-landing-metric-value--warning { color: var(--k-warn-fg); }
.k-landing-metric-value--error { color: var(--k-bad-fg); }

/* Phase 18 Wave 2, stage B9 — Improvement, CSV import, the spawn form and
   the reports (docs/ui-refinement-design.md §8.8–§8.11). No new colours:
   every tone is a §3.1 token, and every SVG is drawn with geometry
   attributes and classes only (the CSP forbids an inline style; §8.1). */

/* An ordinal scale (k_scale; §8.8): Benefit and Effort. One ink and no tinted
   wash, so it never reads as a status pill; the level rises in three ways at
   once — more filled bars, taller bars, a heavier word. */
.k-scale { display: inline-flex; align-items: center; gap: 6px; color: var(--k-text); white-space: nowrap; }
.k-scale-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.k-scale-bar { display: inline-block; width: 4px; border-radius: 1px; background: var(--k-border); }
.k-scale-bar--1 { height: 5px; }
.k-scale-bar--2 { height: 8px; }
.k-scale-bar--3 { height: 12px; }
.k-scale-bar.is-filled { background: var(--k-text); }
.k-scale--1 .k-scale-text { font-weight: 300; }
.k-scale--2 .k-scale-text { font-weight: 400; }
.k-scale--3 .k-scale-text { font-weight: 600; }

/* A link card (§8.8, §8.10): an OFI's "Derived from" and the spawn form's
   source entry — a short list of records, each a whole link with its kind
   and its state. */
.k-link-card { display: flex; flex-direction: column; gap: 10px; }
/* The empty, hidden card an OFI entry draws until it has a visible source
   (registers/entry.html, #k-derived-from): the display above would otherwise
   override [hidden] and show an empty bordered box (Judd's leave, R-8). */
.k-link-card[hidden] { display: none; }
.k-link-card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.k-link-card-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.k-link-card-link { color: var(--k-text); text-decoration: none; min-width: 0; }
.k-link-card-link:hover .k-link-card-title,
.k-link-card-link:focus-visible .k-link-card-title { text-decoration: underline; }
.k-link-card-key { font-weight: 600; color: var(--k-muted); }
.k-link-card-title { font-weight: 600; }
.k-link-card-meta { display: inline-flex; align-items: center; gap: 8px; }

/* The Coverage card (§8.5; Phase 20 stage A2): a 4Ps entry's risks, each
   with its controls beneath it, and the gaps, in the rail. The gaps are sentences with a quiet
   error rule beside them — the words say what is wrong, the rule only groups
   them; the rows reuse the rail blade's list. */
.k-coverage { display: flex; flex-direction: column; gap: 8px; }
.k-coverage > .k-label { margin: 8px 0 0; }
.k-coverage-summary { margin: 0; font-size: 13px; line-height: 20px; font-variant-numeric: tabular-nums; }
.k-coverage-gaps { list-style: none; margin: 0; padding: 0 0 0 10px; border-left: 2px solid var(--k-bad-fg); display: flex; flex-direction: column; gap: 4px; }
.k-coverage-gap { font-size: 12.5px; line-height: 18px; }
.k-coverage-where { overflow-wrap: anywhere; }
.k-coverage-control { flex-wrap: wrap; padding-block: 4px; }
/* Under each risk, its controls (Judd, 17 October 2026): one item per risk,
   ruled off from the next; its controls indented beneath it on a quiet rule. */
.k-coverage-risk { border-bottom: 1px solid var(--k-divider); padding-bottom: 4px; }
.k-coverage-risk:last-child { border-bottom: 0; }
.k-coverage-risk > .k-tools__item { border-bottom: 0; }
.k-coverage-controls { margin: 0 0 0 6px; padding-left: 10px; border-left: 2px solid var(--k-divider); }
.k-coverage-none { margin: 0; }
/* A risk with controls is a native details; its summary lays out as the plain risk row. */
.k-coverage-details > summary { cursor: pointer; list-style: none; border-bottom: 0; }
.k-coverage-details > summary::-webkit-details-marker { display: none; }
.k-coverage-details > summary:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 2px; border-radius: var(--k-r-item); }
.k-coverage-chevron { flex: 0 0 16px; width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; color: var(--k-muted); }
.k-coverage-chevron__icon { transition: transform .15s ease; }
.k-coverage-details[open] > summary .k-coverage-chevron__icon { transform: rotate(90deg); }
.k-coverage-details > .k-coverage-controls { margin-left: 24px; }
@media (prefers-reduced-motion: reduce) { .k-coverage-chevron__icon { transition: none; } }
/* A risk's Controls and treatments card (Phase 32 P2): rows reuse the tools list. */
.k-risk-card__row { flex-wrap: wrap; padding-block: 4px; }
/* A risk's four grids (Phase 32 slice 1 walk, Judd 16 Nov 2026): Controls in place, Treatments
   planned, Governed by, Raised OFIs, each a headed card over a grid table. Only the title column
   flexes; the rest is one line. Below 600 px (720 px for the five-column Treatments) a row folds to
   a card whose cells carry their labels (data-label). */
.k-risk-grids { display: flex; flex-direction: column; gap: 16px; }
.k-risk-grid { container-type: inline-size; }
.k-risk-grid__empty { margin: 0; }
.k-risk-grid .k-grid-row:last-child { border-bottom: 0; }
.k-risk-grid .k-grid-row > * { min-width: 0; white-space: nowrap; }
.k-risk-grid__key { font-size: var(--k-fs-meta); color: var(--k-muted); font-variant-numeric: tabular-nums; }
.k-risk-grid__title { font-size: var(--k-fs-row); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.k-risk-grid [data-label]::before { content: attr(data-label); display: none; font-size: var(--k-fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }
.k-grid--risk-controls .k-grid-head,
.k-grid--risk-controls .k-grid-row { grid-template-columns: 80px minmax(120px, 1fr) 140px 190px; }
.k-grid--risk-treatments .k-grid-head,
.k-grid--risk-treatments .k-grid-row { grid-template-columns: 80px minmax(120px, 1fr) 130px 190px 190px; }
.k-grid--risk-governed .k-grid-head,
.k-grid--risk-governed .k-grid-row { grid-template-columns: 80px minmax(120px, 1fr) 160px 140px; }
.k-grid--risk-ofis .k-grid-head,
.k-grid--risk-ofis .k-grid-row { grid-template-columns: 80px minmax(120px, 1fr) 140px; }
/* A control's grids (Phase 32 slice 1, Judd's walk 16 Nov 2026) reuse .k-risk-grid: Risks it
   protects (key, risk, band, owner, next review) folds like the five-column Treatments grid. */
.k-grid--control-risks .k-grid-head,
.k-grid--control-risks .k-grid-row { grid-template-columns: 80px minmax(120px, 1fr) 130px 190px 190px; }
.k-grid--control-obligations .k-grid-head,
.k-grid--control-obligations .k-grid-row { grid-template-columns: 80px minmax(120px, 1fr) 140px; }
@container (max-width: 599px) {
  .k-risk-grid .k-grid-head { display: none; }
  .k-risk-grid .k-grid-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .k-risk-grid [data-label]::before { display: inline-block; min-width: 104px; margin-right: 8px; }
}
@container (min-width: 600px) and (max-width: 719px) {
  .k-grid--risk-treatments .k-grid-head,
  .k-grid--risk-treatments .k-grid-row,
  .k-grid--control-risks .k-grid-head,
  .k-grid--control-risks .k-grid-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .k-grid--risk-treatments .k-grid-head,
  .k-grid--control-risks .k-grid-head { display: none; }
  .k-grid--risk-treatments [data-label]::before,
  .k-grid--control-risks [data-label]::before { display: inline-block; min-width: 104px; margin-right: 8px; }
}
.k-coverage-flags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.k-affected-ofi__chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }

/* The stepper (k_stepper; §8.9): an ordered list of numbered steps. The
   current step is heavier and outlined, a finished step carries a tick. */
.k-stepper {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 12.5px;
}
.k-stepper-step { display: inline-flex; align-items: center; gap: 8px; color: var(--k-muted); }
.k-stepper-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--k-r-pill);
  border: 1px solid var(--k-border);
  background: var(--k-surface);
  font-weight: 600;
  font-size: 11px;
}
.k-stepper-step.is-done { color: var(--k-text); }
.k-stepper-step.is-done .k-stepper-mark { background: var(--k-ok-bg); border-color: var(--k-border); color: var(--k-brand); }
.k-stepper-step.is-current { color: var(--k-text); font-weight: 600; }
.k-stepper-step.is-current .k-stepper-mark { border: 2px solid var(--k-brand); color: var(--k-brand); }

/* The mapping's required fields (§8.9): ticked when mapped, crossed and in
   the error tone when not — the words say it either way. */
.k-import-required { margin-bottom: 12px; }
.k-import-required-list { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.k-import-required-item { display: flex; align-items: center; gap: 6px; }
.k-import-required-item.is-mapped { color: var(--k-ok-fg); }
.k-import-required-item.is-missing { color: var(--k-bad-fg); }
.k-import-required-item strong { color: var(--k-text); }
.k-import-mapping th[scope="row"] { font-weight: 600; text-transform: none; letter-spacing: 0; }
.k-import-mapping select { min-width: 200px; }

/* Report tables (§8.11): a zero reads as a quiet dash. */
.k-quiet-zero { color: var(--k-muted); }

/* The weekly bar chart (§8.11). Raised is a solid bar, Closed an outlined
   one. Its x geometry is percentages and its heights pixels, so it takes its
   card's whole width — the bars stretch and the labels keep their size (Wave
   2's walk #1 found it 350 px wide in a full-width card) — but never less than
   its natural width (its width attribute, a week's slot at a time): narrower
   than that, on a phone or with fourteen weeks on a tablet, .k-scroll-x
   scrolls it rather than squeezing its labels together. The plot box's
   gutters hold the axis labels and the last week's label; the SVG does not
   clip them (overflow: visible). */
.k-chart-plot { width: max-content; min-width: 100%; padding: 0 28px 0 40px; }
.k-chart-svg { min-width: 100%; max-width: none; }
.k-chart { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.k-chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.k-chart-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; }
.k-chart-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.k-chart-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
/* Phase 21 slice 14 (plan reading 7): Raised on the design language's ok bar
   token, Closed its info tint outlined in the info bar token — the reports'
   chart and the style guide's sample are the only users. */
.k-chart-swatch--raised { background: var(--k-bar-ok); }
.k-chart-swatch--closed { background: var(--k-info-bg); border: 2px solid var(--k-bar-info); }
.k-chart-svg { display: block; overflow: visible; }
.k-chart-grid { stroke: var(--k-divider); stroke-width: 1; }
.k-chart-grid.is-base { stroke: var(--k-border); }
.k-chart-bar--raised { fill: var(--k-bar-ok); }
.k-chart-bar--closed { fill: var(--k-info-bg); stroke: var(--k-bar-info); stroke-width: 2; }
.k-chart-axis { fill: var(--k-muted); font-size: 10.5px; text-anchor: end; }
.k-chart-value { fill: var(--k-text); font-size: 10.5px; font-weight: 600; text-anchor: middle; }
.k-chart-label { fill: var(--k-muted); font-size: 10.5px; text-anchor: middle; }

/* The heat map, tidied (§8.11): axis titles outside the grid, linked cells,
   one legend, and the axis words dropped to numbers below 600 px. */
.k-heat-frame {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 8px;
}
.k-heat-axis-title {
  font-weight: 600;
  font-size: 10.5px;
  line-height: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--k-muted);
}
.k-heat-axis-title--across { grid-column: 2; grid-row: 1; text-align: center; }
.k-heat-axis-title--down {
  grid-column: 1;
  grid-row: 2;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  align-self: center;
}
.k-heat-grid { grid-column: 2; grid-row: 2; }
.k-heat-corner { background: transparent; }
.k-heat-link { display: block; color: inherit; text-decoration: none; border-radius: 4px; }
.k-heat-link:hover .k-heat-count,
.k-heat-link:focus-visible .k-heat-count { text-decoration: underline; }
.k-heat-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; border: 1px solid var(--k-border); }
/* A table's caption that is a caption (the heat map's and the risk matrix's
   "Consequence down, likelihood across"): meta type, not the 15 px/600
   heading type .k-table caption gives a table's title (walk #1). The meta's
   12 / 400 since slice 16 stage 4 (ruling 94; was the launch caption's
   11.5 / 300); the 16 px line stays this rule's own. */
.k-table caption.k-meta {
  padding: 0 0 8px;
  font-weight: 400;
  font-size: var(--k-fs-meta);
  line-height: 16px;
  color: var(--k-muted);
}
@media (max-width: 599px) {
  .k-heat-word {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  /* The grid fits a 360 px screen (walk #1 found it 298 px wide in a 250 px
     box, "Row total" clipped): the two axis titles share one line above it,
     the card's padding narrows, the row-number and total columns take what
     they need, and each of the five likelihood columns keeps a 44 px link. */
  .k-heat-card { padding-inline: 8px; }
  .k-heat-frame { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
  .k-heat-axis-title--down { writing-mode: horizontal-tb; transform: none; }
  .k-heat-axis-title--down::after { content: " \2193"; }
  .k-heat-axis-title--across { text-align: right; }
  .k-heat-axis-title--across::after { content: " \2192"; }
  .k-heat-grid { flex: 1 1 100%; }
  .k-heat th,
  .k-heat td { padding: 4px 2px; }
  .k-heat thead th { letter-spacing: 0; vertical-align: bottom; }
  .k-heat .k-heat-corner { width: 20px; }
  .k-heat .k-heat-total { width: 46px; }
  .k-heat td.k-heat-cell { padding: 0; }
  .k-heat-count { font-size: 16px; line-height: 24px; }
}
/* Each likelihood column's link is a 44 px target (ruling 46 C). */
@media (max-width: 599px), (pointer: coarse) {
  .k-heat-link { display: flex; align-items: center; justify-content: center; min-height: 44px; }
}

/* ==========================================================================
   Phase 18 Wave 2 — Configuration (stage B10). The four navigation groups and
   the grouped home; the one list template's status pills and meta line; the
   Mandatory toggle; the risk matrix's coloured cells and sticky save bar; the
   workspace calendar's day rows and holiday picker; scheduler health's tone
   tiles. Semantic tokens only; each pattern is on /style-guide/.
   ========================================================================== */

/* The four groups in the navigation (on the green surface): 16 px between
   groups, each headed by its label (the rail's existing label style). */
.k-rail .k-sidebar-section--group + .k-sidebar-section--group { margin-top: 16px; }

/* The list template's subline (DL §4.2; Phase 21 slice 3): one 13 px muted
   line of counts, the workspace first on a workspace-scoped list — the page
   header's meta line as it is, so neither weight nor a line of its own. The
   plain sentence that followed it (k-list-lead) is the footnote's now. */
.k-list-count { display: inline; font-weight: 400; color: inherit; }

/* The Mandatory toggle: a real button with aria-pressed. The state is the
   knob's position and the word beside it, never colour alone; the off track
   is outlined in --k-muted (5.9:1) so the control reads at 3:1 (1.4.11).
   Every selector names button.k-toggle (Phase 21 slice 15, ruling 86: one
   switch look), so none of it dresses k_field's <label class="k-toggle">;
   the track takes the field switch's tokens. */
button.k-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 2px 10px 2px 4px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-pill);
  background: var(--k-surface);
  color: var(--k-text);
  font: inherit;
  font-size: 12.5px;
  line-height: 18px;
  cursor: pointer;
}
button.k-toggle:hover { border-color: var(--k-control); background: var(--k-selected); }
button.k-toggle:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 2px; }
button.k-toggle .k-toggle-track {
  position: relative;
  flex: 0 0 auto;
  width: 30px;
  height: 18px;
  border: 1px solid var(--k-muted);
  border-radius: var(--k-r-pill);
  background: var(--k-surface);
}
button.k-toggle .k-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--k-muted);
  transition: transform .12s ease;
}
button.k-toggle[aria-pressed="true"] .k-toggle-track { background: var(--k-brand); border-color: var(--k-brand); }
button.k-toggle[aria-pressed="true"] .k-toggle-track::after { background: var(--k-on-brand); transform: translateX(12px); }
button.k-toggle .k-toggle-state { font-weight: 600; color: var(--k-muted); }
button.k-toggle[aria-pressed="true"] .k-toggle-state { color: var(--k-brand); }

/* The risk matrix: each cell one select drawn in its band's tone
   (.k-heat-cell--<tone>, the register's own), its band named in the select. */
.k-matrix-td { padding: 4px; }
.k-matrix-cell {
  width: 100%;
  min-width: 112px;
  font-weight: 600;
  border-color: transparent;
}
.k-matrix-cell:focus { border-color: var(--k-brand); }

/* The sticky save bar: at the foot of the viewport while its form is on
   screen. The page reserves its height as scroll padding, so a focused
   control is scrolled clear of the bar, never under it (WCAG 2.2 2.4.11). */
.k-savebar {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 16px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-box);
  background: var(--k-surface);
  box-shadow: var(--k-shadow-overlay);
}
.k-savebar-status { margin-right: auto; font-size: 13px; line-height: 20px; color: var(--k-muted); }
.k-savebar.is-dirty .k-savebar-status { color: var(--k-warn-fg); font-weight: 600; }
html:has(.k-has-savebar) { scroll-padding-bottom: 96px; }
@media (max-width: 599px) {
  /* Above the fixed tab bar, which is 59 px plus the device's safe area. */
  .k-savebar { bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  html:has(.k-has-savebar) { scroll-padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 112px); }
}

/* The workspace calendar: one row per day — the day, its Open box, its
   windows — then the holiday picker. */
.k-dayrows,
.k-holidays { margin: 0; padding: 0; border: 0; min-width: 0; }
.k-dayrows > legend,
.k-holidays > legend { padding: 0; margin-bottom: 6px; }
.k-dayrow-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.k-dayrow {
  display: grid;
  grid-template-columns: 110px 90px minmax(0, 1fr);
  align-items: center;
  gap: 4px 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--k-divider);
}
.k-dayrow-name { font-weight: 600; font-size: 13px; color: var(--k-text); }
.k-dayrow-windows { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.k-dayrow-window { display: inline-flex; align-items: center; gap: 6px; }
.k-dayrow-time { width: 118px; }
.k-dayrow-more > summary { cursor: pointer; min-height: 24px; display: inline-flex; align-items: center; }
.k-dayrow-more[open] > summary { margin-bottom: 4px; }
.k-dayrow-error { grid-column: 1 / -1; margin: 0; }
.k-dayrow.has-error { border-bottom-color: var(--k-bad-fg); }
@media (max-width: 599px) {
  .k-dayrow { grid-template-columns: minmax(0, 1fr) auto; }
  .k-dayrow-windows { grid-column: 1 / -1; }
}
.k-holiday-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.k-holiday-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.k-holiday-new-label { font-size: 12px; font-weight: 600; color: var(--k-text); }

/* ==========================================================================
   Phase 18 Wave 2 — Automations and Permissions (stage B12). The rule cards
   and their groups; the rule builder's summary and three stacked cards; the
   roles grouped by owning workspace; the grant-line editor's two columns, its
   live summary and its verb chips. Semantic tokens only; each pattern is on
   /style-guide/.
   ========================================================================== */

/* The rule builder: the summary, then When / If / Then as stacked cards and
   one Save. Each card's first word is the step, in the brand green. */
.k-rule-summary {
  padding: 14px 18px;
  border-radius: var(--k-r-box);
  border: 1px solid var(--k-border);
  background: var(--k-selected);
}
.k-rule-summary > .k-label { margin: 0 0 4px; }
.k-rule-summary > .k-body { margin: 0; max-width: 80ch; }
.k-rule-builder { margin-top: 16px; }
.k-rule-builder > * + * { margin-top: 16px; }
.k-rule-identity {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.k-rule-identity > * + * { margin-top: 16px; }
.k-rule-step > * + * { margin-top: 16px; }
.k-rule-step > .k-subheading,
.k-rule-step > .k-heading-row > .k-subheading { font-size: 15px; line-height: 20px; }
.k-rule-step-word { color: var(--k-brand); }
.k-rule-step #k-rule-when-state:empty,
.k-rule-step #k-rule-when-link:empty { display: none; }
.k-rule-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--k-divider);
}
.k-rule-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--k-divider);
}
.k-rule-row-number {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--k-r-pill);
  background: var(--k-surface-2);
  border: 1px solid var(--k-border);
  font-size: 12px;
  font-weight: 600;
  color: var(--k-muted);
}
.k-rule-row-text {
  flex: 1 1 240px;
  min-width: 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--k-text);
}
.k-rule-add {
  padding: 12px 14px;
  border-radius: var(--k-r-item);
  border: 1px dashed var(--k-border);
}
.k-rule-add > * + * { margin-top: 12px; }
.k-rule-add #k-automation-condition-params:empty,
.k-rule-add #k-automation-action-params:empty { display: none; }
.k-rule-save {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.k-rule-facts { margin: 0; }
.k-rule-facts > div {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--k-divider);
}
.k-rule-facts dt { min-width: 180px; font-size: 12px; font-weight: 600; color: var(--k-muted); }
.k-rule-facts dd { margin: 0; font-size: 13px; color: var(--k-text); }

/* The role list: one collapsible group per owning workspace, global first. */
.k-role-group + .k-role-group { margin-top: 16px; }
.k-role-group > summary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 8px 0;
  cursor: pointer;
  list-style-position: outside;
}
.k-role-group > summary:focus-visible {
  outline: 2px solid var(--k-brand);
  outline-offset: 2px;
  border-radius: var(--k-r-item);
}
.k-role-group-count { font-size: 12px; color: var(--k-muted); }
.k-role-group > .k-meta { margin: 0 0 8px; }

/* The role page: the description under the header; each section's heading
   with its count and repeated verb; each line's facts under the line
   editor's own headings; the reading's permissions grouped the same way. */
.k-role-description { margin: 8px 0 0; max-width: 80ch; }
.k-line-facts { margin: 10px 0 0; }
.k-line-facts > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 6px 0;
  border-top: 1px solid var(--k-divider);
}
.k-line-facts > div:first-child { border-top: 0; }
.k-line-facts dt {
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  color: var(--k-muted);
}
.k-line-facts dd { margin: 0; }
.k-line-facts dd > .k-line-reaches,
.k-line-facts dd > .k-line-note,
.k-line-facts dd > .k-line-keys { margin-top: 0; }
@media (min-width: 900px) {
  .k-line-facts > div { grid-template-columns: 200px minmax(0, 1fr); gap: 12px; }
}
.k-verb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.k-verb-tag {
  padding: 2px 10px;
  border-radius: var(--k-r-pill);
  background: var(--k-selected);
  border: 1px solid var(--k-border);
  font-size: 12px;
  line-height: 18px;
  color: var(--k-brand);
}
.k-role-reading-group { margin-top: 12px; }
.k-role-reading-group > .k-label { margin: 0 0 2px; }
.k-grant-other > summary { font-weight: 600; }

/* The grant-line editor: two columns — the numbered cards, and the summary
   in plain words with the Save beside it — stacking below 900 px. */
.k-line-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.k-line-editor-main { min-width: 0; }
@media (min-width: 900px) {
  .k-line-editor { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); }
  /* Below the sticky context bar (Phase 21 slice 1b). */
  .k-line-editor-aside { position: sticky; top: calc(var(--k-bar-h) + 16px); }
}
/* From 1920 px the plain-words summary — the line editor's side panel —
   grows with the screen (Phase 18 Wave 3, W5), and the administrative
   permission groups pair up (.k-form-cols in _line_fields.html). */
@media (min-width: 1920px) {
  .k-line-editor { grid-template-columns: minmax(0, 1fr) clamp(320px, 22%, 480px); }
}
.k-line-summary > * + * { margin-top: 12px; }
.k-line-summary > .k-label { margin: 0; }
.k-line-summary-sentence {
  margin: 0;
  font-size: 14px;
  line-height: 21px;
  color: var(--k-text);
}
.k-line-summary-note { margin: 6px 0 0; }
.k-line-summary-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* The verbs as chips: each a real, labelled checkbox inside a pill, the
   ticked state drawn from the input itself (:has), never from colour alone —
   the tick box stays visible inside the chip. */
.k-verb-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.k-verb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.k-verb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 12px 4px 10px;
  border-radius: var(--k-r-pill);
  border: 1px solid var(--k-border);
  background: var(--k-surface);
  font-size: 12.5px;
  line-height: 18px;
  color: var(--k-text);
  cursor: pointer;
}
.k-verb-chip:has(input:checked) {
  border-color: var(--k-brand);
  background: var(--k-selected);
  color: var(--k-brand);
}
.k-verb-chip:has(input:focus-visible) {
  outline: 2px solid var(--k-brand);
  outline-offset: 2px;
}
.k-verb-chip:has(input:disabled) {
  cursor: not-allowed;
  color: var(--k-faint);
  background: var(--k-surface-2);
}
.k-verb-chip--view { font-weight: 600; }
.k-verb-chip input { margin: 0; accent-color: var(--k-brand); }
@media (max-width: 599px), (pointer: coarse) {
  .k-verb-chip { min-height: 44px; }
}

/* --------------------------------------------------------------------------
   5.9 A touch screen's targets (§3.3 as amended 15 October 2026, ruling 46 C)

   What only a touch screen needs, at any width: the targets that were never
   under 44 px below 600 px because the tab bar and stacked cards replace
   them there — the navigation, a table's row and header controls, and the
   checkbox itself. The real box grows, so getBoundingClientRect() measures
   the tap area, and where the drawn layout must not move, negative margins
   take the growth back. With a mouse (a fine pointer) nothing here applies,
   so a desktop table keeps its rows and density.
   -------------------------------------------------------------------------- */
@media (pointer: coarse) {
  /* The item panel's section row, drawn where the rail is not (Judd's walk
     of 10 November 2026). */
  .k-item-panel__sections .k-seg__btn { height: 44px; }
  /* Rating and NPS score tiles (Phase 24 slice 8). */
  .k-choice-tiles--scale .k-choice-tile { min-height: 44px; }
  /* The navigation: module entries, their sections, the disclosure toggles,
     the collapse control and Sign out. */
  .k-rail-item { min-height: 44px; }
  .k-nav-module.has-body > .k-rail-item { padding-right: 48px; }
  .k-nav-toggle { top: 2px; right: 0; width: 44px; height: 44px; }
  .k-rail .k-sidebar-link { min-height: 44px; }
  /* The open workspace's third level (slice 1b stage 2) is 30 px with a mouse;
     its rule outranks the one above, so it is named here too (stage 5's walk:
     216 x 30 on an iPad in landscape, the sidebar tier). */
  .k-rail .k-sidebar-nav--sub .k-sidebar-link { min-height: 44px; }
  .k-rail-toggle { width: 44px; height: 44px; }
  .k-rail-signout-btn { width: 44px; height: 44px; }

  /* A short or icon-only button ("+", "−") is 44 px wide as well as high. */
  .k-page .k-btn { min-width: 44px; }

  /* A checkbox or radio: a 44 px box whose 13 px transparent border is the
     extra tap area, the 18 px square (slice 2; DL §2.3) drawn in its padding
     box exactly where it was (the margins take the growth back), its edge an
     inset shadow. */
  .k-check input[type="checkbox"],
  .k-check input[type="radio"] {
    width: 44px;
    height: 44px;
    margin: -12px -13px -13px;
    border: 13px solid transparent;
    background-clip: padding-box;
    box-shadow: inset 0 0 0 1px var(--k-control-edge);
    outline-offset: -11px;
  }
  .k-check input[type="checkbox"] { border-radius: 17px; }
  .k-check input:checked {
    border-color: transparent;
    box-shadow: inset 0 0 0 1px var(--k-brand);
  }
  .k-check input:disabled {
    border-color: transparent;
    box-shadow: inset 0 0 0 1px var(--k-divider);
  }

  /* Any other checkbox or radio on a page (W5b): a form widget written out
     raw ({{ form.field }}, a choice's tag inside its label), the verb chips,
     the icon picker's radios, the type cards' radios. A real 44 px box like
     .k-check's above — its 14 px transparent border the extra tap area, a
     16 px control drawn in its padding box (these raw controls keep 16 px;
     only .k-check took the DL's 18 in slice 2), the margins taking the
     growth back so the line it sits on does not move — and, since the
     browser's own drawing cannot be given a transparent border, drawn as
     .k-check draws its control. A toggle (its own switch), a visually
     hidden input and a control inside .k-check are left to their rules. */
  .k-page input:is([type="checkbox"], [type="radio"]):not(.k-check input, .k-toggle input, .k-visually-hidden) {
    appearance: none;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    margin: -14px -6px -14px -14px;
    border: 14px solid transparent;
    background: var(--k-surface) no-repeat center / 16px 16px;
    background-clip: padding-box;
    box-shadow: inset 0 0 0 1px var(--k-border);
    outline-offset: -12px;
    vertical-align: middle;
    cursor: pointer;
  }
  .k-page input[type="checkbox"]:not(.k-check input, .k-toggle input, .k-visually-hidden) { border-radius: 18px; }
  .k-page input[type="radio"]:not(.k-check input, .k-toggle input, .k-visually-hidden) { border-radius: 50%; }
  .k-page input:is([type="checkbox"], [type="radio"]):checked:not(.k-check input, .k-toggle input, .k-visually-hidden) {
    background-color: var(--k-brand);
    box-shadow: inset 0 0 0 1px var(--k-brand);
  }
  .k-page input[type="checkbox"]:checked:not(.k-check input, .k-toggle input, .k-visually-hidden) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  .k-page input[type="radio"]:checked:not(.k-check input, .k-toggle input, .k-visually-hidden) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3' fill='white'/%3E%3C/svg%3E");
  }
  .k-page input:is([type="checkbox"], [type="radio"]):disabled:not(.k-check input, .k-toggle input, .k-visually-hidden) {
    cursor: not-allowed;
    background-color: var(--k-surface-2);
    box-shadow: inset 0 0 0 1px var(--k-divider);
  }
  /* The label around such a control is at least as tall as its tap area,
     so a list of them (a register's parent and link choices, the icon
     picker) does not overlap one control's area with the next. */
  .k-page label:not(.k-check, .k-toggle):has(> input:is([type="checkbox"], [type="radio"]):not(.k-visually-hidden)) {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  /* A select is never narrower than a fingertip (the SLA policy's item-type
     list, empty when the workspace has no type to offer). */
  .k-page select { min-width: 44px; }
  /* A toast's ✕: 44 px, its negative block margins keeping the toast's
     height what the message makes it. */
  .k-toast-dismiss { min-width: 44px; min-height: 44px; margin-block: -12px; }
  /* A chip's ✕ (the filter bar's has its own rule, after the chip) and a
     toggle's switch: real 44 px boxes, the drawn 16 px ✕ and 36 × 20 px
     switch where they were, the margins taking the growth back. */
  .k-page .k-chip-remove:not(.k-chip--filter .k-chip-remove) { width: 44px; height: 44px; margin: -14px; }
  .k-page .k-toggle input {
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    margin: -12px -4px;
    border: solid transparent;
    border-width: 12px 4px;
    background-clip: padding-box;
  }

  /* A table's rows are 44 px, every cell's padding given to the controls in
     it: the row checkbox, the key or title link, the quick-view eye and the
     "⋯"; the header's sort links and filter funnels likewise. */
  .k-table tbody td,
  .k-table thead th { padding-block: 0; height: 44px; }
  /* Every header label on one baseline: a plain label (a column that does
     not sort and has no funnel — the queue's Checklist and SLA) is centred
     in the 44 px band as the sort links and funnels are, rather than sitting
     at its top (Phase 18 Wave 3, W2). */
  .k-table thead th { vertical-align: middle; }
  .k-table .k-table-check { padding-left: 14px; vertical-align: middle; }
  .k-table .k-table-check .k-check { padding: 0; align-items: center; }
  .k-table .k-table-check input[type="checkbox"] { margin: -13px; }
  .k-table .k-title-cell { align-items: center; }
  .k-table .k-title-link { padding-block: 14px; }
  .k-table a.k-table-rowlink { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  /* The title link keeps its block box, so it still ends in an ellipsis
     (ruling 32) — a flex box drops it; its padding above makes it 44 px. */
  .k-table a.k-title-link { display: block; }
  /* The Epic cell's link (ruling 46 Q2): 44 px tall, and clipped with an
     ellipsis like the cell around it. */
  .k-table a.k-epic-link {
    display: block;
    padding-block: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .k-table-eye { width: 44px; height: 44px; margin-inline: -10px; }
  .k-table-sort { min-height: 44px; min-width: 44px; }
  .k-th-toggle { width: 44px; height: 44px; margin: 0 -10px; }
  /* The workflow editor's transitions (W7, criterion clause 9): the
     invisible hit stroke under each line is 44 screen pixels at every zoom —
     `non-scaling-stroke`, because the stroke is otherwise in world units and
     a fitted drawing at 0.6 would give a finger 26 px. The press itself is
     resolved in JavaScript (geometry.transitionAt, with edgeHitTolerance's
     same 44 px band for a `touch` pointer); this keeps the DOM's answer —
     which element is under the finger — the same. A mouse keeps its 16. */
  .k-wfe-edge-hit { stroke-width: 44px; vector-effect: non-scaling-stroke; }
  /* The List shell's filter row (Phase 21 slice 3): the status group's
     options, the menu buttons and their rows, and the part of the filter
     panel a Configuration list adds (a set filter's Clear link). */
  .k-filters__status .k-seg__btn { height: 44px; }
  .k-filters__menu-btn { min-height: 44px; }
  .k-filters__menu-panel .k-chip-choice { min-height: 44px; }
  .k-panel-filters__fixed a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }

  /* The two panels (Phase 21 slice 4; Judd's rulings 19 (2) and 32): every
     .k-page rule above, repeated for #k-panel and #k-confirm-panel, which sit
     beside #k-main rather than inside .k-page — a short button's width, a
     raw checkbox or radio (the Columns panel's ticks) and the label round
     it, a select's width, a chip's ✕ and a toggle's switch. */
  #k-panel .k-btn,
  #k-confirm-panel .k-btn { min-width: 44px; }
  #k-panel input:is([type="checkbox"], [type="radio"]):not(.k-check input, .k-toggle input, .k-visually-hidden),
  #k-confirm-panel input:is([type="checkbox"], [type="radio"]):not(.k-check input, .k-toggle input, .k-visually-hidden) {
    appearance: none;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    margin: -14px -6px -14px -14px;
    border: 14px solid transparent;
    background: var(--k-surface) no-repeat center / 16px 16px;
    background-clip: padding-box;
    box-shadow: inset 0 0 0 1px var(--k-border);
    outline-offset: -12px;
    vertical-align: middle;
    cursor: pointer;
  }
  #k-panel input[type="checkbox"]:not(.k-check input, .k-toggle input, .k-visually-hidden),
  #k-confirm-panel input[type="checkbox"]:not(.k-check input, .k-toggle input, .k-visually-hidden) { border-radius: 18px; }
  #k-panel input[type="radio"]:not(.k-check input, .k-toggle input, .k-visually-hidden),
  #k-confirm-panel input[type="radio"]:not(.k-check input, .k-toggle input, .k-visually-hidden) { border-radius: 50%; }
  #k-panel input:is([type="checkbox"], [type="radio"]):checked:not(.k-check input, .k-toggle input, .k-visually-hidden),
  #k-confirm-panel input:is([type="checkbox"], [type="radio"]):checked:not(.k-check input, .k-toggle input, .k-visually-hidden) {
    background-color: var(--k-brand);
    box-shadow: inset 0 0 0 1px var(--k-brand);
  }
  #k-panel input[type="checkbox"]:checked:not(.k-check input, .k-toggle input, .k-visually-hidden),
  #k-confirm-panel input[type="checkbox"]:checked:not(.k-check input, .k-toggle input, .k-visually-hidden) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  #k-panel input[type="radio"]:checked:not(.k-check input, .k-toggle input, .k-visually-hidden),
  #k-confirm-panel input[type="radio"]:checked:not(.k-check input, .k-toggle input, .k-visually-hidden) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3' fill='white'/%3E%3C/svg%3E");
  }
  #k-panel input:is([type="checkbox"], [type="radio"]):disabled:not(.k-check input, .k-toggle input, .k-visually-hidden),
  #k-confirm-panel input:is([type="checkbox"], [type="radio"]):disabled:not(.k-check input, .k-toggle input, .k-visually-hidden) {
    cursor: not-allowed;
    background-color: var(--k-surface-2);
    box-shadow: inset 0 0 0 1px var(--k-divider);
  }
  #k-panel label:not(.k-check, .k-toggle):has(> input:is([type="checkbox"], [type="radio"]):not(.k-visually-hidden)),
  #k-confirm-panel label:not(.k-check, .k-toggle):has(> input:is([type="checkbox"], [type="radio"]):not(.k-visually-hidden)) {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  #k-panel select,
  #k-confirm-panel select { min-width: 44px; }
  #k-panel .k-chip-remove:not(.k-chip--filter .k-chip-remove),
  #k-confirm-panel .k-chip-remove:not(.k-chip--filter .k-chip-remove) { width: 44px; height: 44px; margin: -14px; }
  #k-panel .k-toggle input,
  #k-confirm-panel .k-toggle input {
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    margin: -12px -4px;
    border: solid transparent;
    border-width: 12px 4px;
    background-clip: padding-box;
  }
}

/* The collapsed rail's flyout control (Phase 18 Wave 3 repairs): on a touch
   screen in the sidebar tier — an iPad at 1376 px, where the workflow
   editor opens with the navigation collapsed — the current module's icon
   is the <summary> that opens its sections, and it covers the icon's row
   less 2 px top and bottom, 42 px. It takes the whole row instead, at
   least the 44 px a rail item is there. */
@media (pointer: coarse) and (min-width: 1280px) {
  .k-app.k-rail-collapsed .k-nav-module.is-current > .k-nav-disclosure > .k-nav-toggle {
    top: 0;
    bottom: 0;
    min-height: 44px;
  }
}

/* --------------------------------------------------------------------------
   Meetings (Phase 19, Wave 1)
   -------------------------------------------------------------------------- */

/* Where a meeting or series stands with Outlook, under its header. A link
   that no longer syncs says so in the warning tone, in words. */
.k-meeting-sync { margin-top: 12px; }
.k-meeting-sync > * + * { margin-top: 8px; }
.k-meeting-sync-line { margin: 0; font-size: 13px; line-height: 20px; color: var(--k-muted); }
.k-meeting-sync-line.is-warning { color: var(--k-warn-fg); font-weight: 600; }
.k-meeting-editor-form .k-field-input { flex: 1 1 auto; min-width: 0; }
.k-meeting-later { margin-top: 12px; }
/* Copy agenda link: the address in a read-only box the width of its card. */
.k-copy-input { width: 100%; }

/* --------------------------------------------------------------------------
   Meetings (Phase 19, Wave 2): the agenda and the standing items
   -------------------------------------------------------------------------- */

.k-stack-8 > * + * { margin-top: 8px; }
/* An item is a blade (a native <details>) beside its own "⋯" menu — a menu
   cannot sit inside a <summary> — and, for a writer, a drag handle. The grid
   places each by column, so an item without a handle (or a menu) keeps the
   same blade width as one with. */
.k-agenda-list > .k-agenda-item + .k-agenda-item { margin-top: 10px; }
.k-agenda-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 8px;
}
.k-agenda-item > .k-agenda-handle { grid-column: 1; grid-row: 1; }
.k-agenda-item > .k-agenda-blade { grid-column: 2; grid-row: 1; min-width: 0; }
.k-agenda-item > .k-agenda-menu { grid-column: 3; grid-row: 1; padding-top: 10px; }
.k-agenda-item--editing { display: block; }
.k-agenda-item.is-withdrawn .k-agenda-card__fold-title { color: var(--k-muted); }
.k-agenda-item.is-dragging { opacity: .45; }
.k-agenda-item.is-drop-before > .k-agenda-blade { box-shadow: 0 -3px 0 var(--k-brand); }
.k-agenda-item.is-drop-after > .k-agenda-blade { box-shadow: 0 3px 0 var(--k-brand); }
.k-agenda-handle {
  width: 20px;
  padding-top: 14px;
  color: var(--k-muted);
  text-align: center;
  line-height: 20px;
  user-select: none;
  cursor: grab;
}
.k-agenda-handle::before { content: "\22EE\22EE"; letter-spacing: -4px; }
.k-agenda-handle:active { cursor: grabbing; }
/* A touch screen never fires the drag events, so the handle would promise
   what it cannot do; "Move up" and "Move down" are the way there. */
@media (hover: none) and (pointer: coarse) {
  .k-agenda-handle { display: none; }
}
.k-agenda-facts > span + span::before { content: " · "; }
.k-agenda-slot:empty { display: none; }
.k-agenda-lasttime > summary,
.k-agenda-withdrawn > summary {
  cursor: pointer;
  font-size: 13px;
  line-height: 20px;
  color: var(--k-muted);
}
.k-agenda-withdrawn { margin-top: 16px; }
.k-agenda-withdrawn > .k-agenda-list { margin-top: 10px; }
.k-agenda-add { margin-top: 16px; }
.k-agenda-add > summary { list-style: none; cursor: pointer; display: inline-flex; }
.k-agenda-add > summary::-webkit-details-marker { display: none; }
.k-agenda-add[open] > summary { margin-bottom: 12px; }

/* --------------------------------------------------------------------------
   Meetings (Phase 19, Wave 3): outcomes — decisions, actions, attendance
   -------------------------------------------------------------------------- */

.k-decision-list,
.k-action-list,
.k-print-list { margin: 0; padding: 0; list-style: none; }
.k-decision-list > li + li,
.k-action-list > li + li { margin-top: 10px; }
/* A withdrawn decision stays where it was, struck through, with who and why. */
.k-decision--withdrawn { color: var(--k-muted); }
.k-reason-quote {
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--k-border);
}
.k-action-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.k-action-main { min-width: 0; }
.k-action-title { margin: 0; }
.k-action-facts { margin: 2px 0 0; }
.k-action-facts > span + span::before { content: " · "; }
.k-action-controls { flex: 0 0 auto; align-items: center; }
.k-outcome-form { margin-top: 8px; }
.k-attendance-lists { margin: 0; }
.k-attendance-lists > dt { margin-top: 8px; }
.k-attendance-lists > dd { margin: 2px 0 0; }

/* The minutes' print page (meetings/meeting_print.html, on base_print.html):
   one column, the house type, no shell. */
.k-print-body { background: var(--k-surface); }
.k-print-page { max-width: 210mm; margin: 0 auto; padding: 24px 16px; }
.k-print-tools { justify-content: space-between; margin-bottom: 16px; }
/* The Print button is drawn `hidden` and shown by kairos.js: `.k-btn`'s own display
   would otherwise beat the user agent's `[hidden]` and leave a dead button with
   scripting off. */
[data-k-print][hidden] { display: none; }
/* Scripting-only and scripting-off-only parts (kairos.js: data-k-js-only is drawn
   hidden and shown, data-k-js-hide drawn shown and hidden), for the same reason:
   a class's own display must not beat `[hidden]`. */
[data-k-js-only][hidden], [data-k-js-hide][hidden] { display: none; }
.k-print-section { margin-top: 24px; }
.k-print-item { margin-top: 16px; }
.k-print-item > * + * { margin-top: 6px; }
.k-print-list > li + li { margin-top: 4px; }

/* The OFI pack (Phase 28 slice 3b; audit/ofi_pack.html, on base_print.html): one
   domain to a page, each OFI with its statement, written evidence and standard,
   then ruled space the SLT writes in by hand (the view of the current state, and
   the controls in place). Tokens only; the page-break rules are in the print block. */
.k-pack-domain { margin-top: 24px; }
.k-pack-head { display: flex; align-items: flex-end; gap: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--k-sidebar); }
.k-pack-head__main { flex: 1 1 auto; min-width: 0; }
.k-pack-head__side { flex: 0 0 auto; text-align: right; font-size: var(--k-fs-meta); color: var(--k-text-2); }
.k-pack-ofi { margin-top: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--k-border); }
.k-pack-ofi > * + * { margin-top: 10px; }
.k-pack-facts { margin: 0; font-size: var(--k-fs-row); font-weight: 600; color: var(--k-text-2); }
.k-pack-statement { margin: 0; font-size: var(--k-fs-panel); font-weight: 600; line-height: 1.3; }
.k-pack-label { margin: 0; font-size: var(--k-fs-meta); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--k-text-2); }
.k-pack-line { height: 34px; border-bottom: 1px solid var(--k-faint); }
.k-pack-grid { width: 100%; border-collapse: collapse; }
.k-pack-grid th { padding: 6px 8px; text-align: left; font-size: var(--k-fs-meta); font-weight: 600; border-bottom: 1.5px solid var(--k-text); }
.k-pack-grid td { height: 44px; border-bottom: 1px solid var(--k-faint); }
.k-pack-grid td + td { border-left: 1px solid var(--k-control); }

/* --------------------------------------------------------------------------
   Control tests and the control report (Phase 28 slice 4b)
   A test block on the control page (criterion, method, sample, evidence, rating, finding),
   the rating as a segmented control in a form (radios, so it posts with scripting off), and the
   printed control report (the OFI pack's heads, plus a two-column facts grid and a rating that
   prints as a box, so it reads on a black-and-white printer). Tokens only.
   -------------------------------------------------------------------------- */
.k-test { padding-top: 14px; border-top: 1px solid var(--k-divider); }
.k-test:first-child { padding-top: 0; border-top: 0; }
.k-test > * + * { margin-top: 10px; }
.k-test__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.k-test__title { margin: 0; font-size: var(--k-fs-row); font-weight: 600; }
.k-test__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.k-test__grid > div { min-width: 0; }
.k-test__grid dd { margin: 0; }
.k-test-earlier { margin-top: 12px; }
@media (max-width: 600px) { .k-test__grid { grid-template-columns: minmax(0, 1fr); } }

.k-seg--field { display: flex; flex-wrap: wrap; gap: 2px; border-radius: var(--k-r-item); }
.k-seg__opt { position: relative; display: inline-flex; }
.k-seg__opt > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.k-seg__opt > .k-seg__btn { pointer-events: none; }
.k-seg__opt > input:checked + .k-seg__btn { background: var(--k-sidebar); color: var(--k-on-brand); }
.k-seg__opt > input:focus-visible + .k-seg__btn { outline: 2px solid var(--k-brand); outline-offset: 2px; }

.k-report-section { margin-top: 18px; }
.k-report-section > * + * { margin-top: 8px; }
.k-report-test { padding-top: 10px; border-top: 1px solid var(--k-border); }
.k-report-test > * + * { margin-top: 8px; }
.k-report-test__head { display: flex; align-items: center; gap: 10px; }
.k-report-test__title { margin: 0; flex: 1 1 auto; font-size: var(--k-fs-panel); font-weight: 600; }
.k-report-rating { flex: 0 0 auto; padding: 1px 8px; border: 1.5px solid var(--k-text); border-radius: 4px; font-size: var(--k-fs-row); font-weight: 600; white-space: nowrap; }
.k-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.k-report-grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.k-report-grid dd { margin: 0; }
.k-report-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.k-report-table th { padding: 6px 8px; text-align: left; vertical-align: bottom; font-size: var(--k-fs-meta); font-weight: 600; border-bottom: 1.5px solid var(--k-text); }
.k-report-table td { padding: 8px; vertical-align: top; border-bottom: 1px solid var(--k-border); }

/* --------------------------------------------------------------------------
   The committee report (Phase 20 stage B2; spec §10.4 as amended)
   Four headline figures and six sections, the draft and an issued snapshot
   alike. Each figure prints its definition beneath it.
   -------------------------------------------------------------------------- */
.k-committee-noscript,
.k-committee-refusal { margin: 8px 0 0; max-width: 60em; }
/* Phase 21 slice 14 (ruling 84 A; DL §1.5, §9): on screen the withdrawal is
   a plain meta line under the title, its state carried by the chip over the
   title, so no rose edge or tint; on paper the boxed, bold note is unchanged
   (the margin and padding here, the print block's black border). */
.k-committee-withdrawn {
  margin: 12px 0 0;
  padding: 10px 14px;
  max-width: 60em;
}
@media screen {
  .k-committee-withdrawn { margin: 4px 0 0; padding: 0; font-size: var(--k-fs-meta); color: var(--k-muted); }
  .k-committee-withdrawn strong { font-weight: inherit; }
}
/* Phase 21 slice 14 (ruling 84 A, plan reading 23): the four figures two by
   two from 600 px and one column below — a document's figure cards, each
   with its definition, two across as on paper (the print block's rule). */
.k-committee-figures {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 12px;
}
@media (min-width: 600px) {
  .k-committee-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.k-committee-figure { display: flex; flex-direction: column; gap: 6px; }
.k-committee-figure .k-label { margin: 0; }
.k-committee-of { font-size: 14px; font-weight: 400; color: var(--k-muted); }
.k-committee-number { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.k-committee-beside { list-style: none; margin: 0; padding: 0; font-size: 12.5px; line-height: 18px; }
.k-committee-parts { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.k-committee-part { display: flex; flex-direction: column; }
.k-committee-part dt { font-size: 12.5px; color: var(--k-muted); }
.k-committee-part dd { margin: 0; }
.k-committee-definition { margin-top: auto; padding-top: 6px; border-top: 1px solid var(--k-border); }

/* ==========================================================================
   DESIGN LANGUAGE — components (Phase 21, slice 1a)

   The draft stylesheet's classes (docs/ui/design-language.md §5) that no
   rule above defines and no template, Python module or script uses today,
   merged as written with block 1a's tokens (plan §4). Nothing renders them
   yet, so nothing on screen moved. Not merged here:
   - a class that collides — defined above, or used anywhere today
     (k-avatar, k-badge, k-btn, k-card, k-check, k-chip, k-empty, k-link,
     k-person, k-progress, k-row, k-search, k-section-title, k-strip, k-table,
     k-table-wrap, k-title and their draft children and modifiers). Each is
     restyled in place, to the DL values, in the slice that first migrates a
     page to it. Slice 2 restyled k-card, k-table, k-table-wrap, k-chip (and
     k-pill with it), k-check and k-title in place, in their own sections
     above; k-row and k-section-title wait (the technical page says why);
   - the shell (k-app, k-sidebar, k-brand, k-nav, k-foot, k-content, k-bar,
     k-crumb, k-body, k-main, k-panel itself): slice 1b, on Judd's sign-off;
   - the draft's base resets (body, a, :focus-visible, h1–h4) and its two
     @media blocks: block 3 and the §3.4 tiers above govern those;
   - .k-prep's three-column grid: prep cards lay out in k-card-grid (plan §3).
   The full list, with where each is used, is in
   docs/technical/ui-design-language.md ("The design-language layer").
   ========================================================================== */

/* Utilities. .k-meta and .k-label are defined with the type scale (block 3):
   slice 16 folded .k-caption and .k-overline into them (.k-sr, which
   overlapped .k-visually-hidden, is gone). */
.k-spacer { flex: 1 1 auto; }

/* The right rail (DL §3.4). The draft's .k-rail, renamed: .k-rail is the
   green navigation in this file (plan §4, ruling 3). */
.k-aside-rail {
  flex: 0 0 var(--k-aside-rail-w); border-left: 1px solid var(--k-border); background: var(--k-surface);
  display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 4px;
}
.k-aside-rail__btn {
  position: relative; width: 60px; height: 58px; border: 0; background: transparent; border-radius: var(--k-r-box);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  color: var(--k-text-2); font-size: var(--k-fs-micro); font-weight: 600; cursor: pointer; text-decoration: none;
}
.k-aside-rail__btn:hover { background: var(--k-surface-2); }
.k-aside-rail__btn[aria-current="true"],
.k-aside-rail__btn[aria-current="true"]:hover { background: var(--k-ok-bg); color: var(--k-ok-fg); }
.k-aside-rail__btn .k-dot { position: absolute; top: 6px; right: 10px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--k-r-pill); background: var(--k-bad-fg); color: var(--k-on-brand); font-size: var(--k-fs-micro); font-weight: 700; display: grid; place-items: center; }

/* Panel sections (DL §3.4, §5.8). The .k-panel
   container itself arrives with the shell in slice 1b. */
.k-panel__body { flex: 1 1 auto; min-width: 0; border-right: 1px solid var(--k-divider); display: flex; flex-direction: column; }
.k-panel__head { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--k-divider); }
.k-panel__title { font-size: var(--k-fs-card); font-weight: 600; flex: 1 1 auto; }
.k-panel__object-title { font-size: var(--k-fs-panel); font-weight: 600; line-height: 1.3; }
.k-panel__section { padding: 16px 20px; border-bottom: 1px solid var(--k-divider); }
.k-panel__section:last-child { border-bottom: 0; }
.k-panel__label-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.k-panel__label-row .k-label { flex: 1 1 auto; }

/* Day or group header inside a card */
.k-row-head { padding: 6px 20px; background: var(--k-surface-2); border-bottom: 1px solid var(--k-divider); font-size: var(--k-fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }

/* Group header outside a card (DL §6) */
.k-group { display: flex; flex-direction: column; gap: 8px; }
.k-group__head { display: flex; align-items: baseline; gap: 10px; padding: 0 4px; }
.k-group__title { font-size: var(--k-fs-row); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--k-text-2); }
.k-group__title--bad { color: var(--k-bad-fg); }

/* Mini stat */
.k-stat-mini { font-size: 22px; font-weight: 300; line-height: 1.2; }

/* Segmented control (DL §5.7) */
.k-seg { display: inline-flex; background: var(--k-surface); border: 1px solid var(--k-border); border-radius: var(--k-r-pill); padding: 3px; }
.k-seg__btn { height: 28px; padding: 0 12px; border-radius: var(--k-r-pill); border: 0; background: transparent; color: var(--k-text-2); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.k-seg__btn[aria-pressed="true"] { background: var(--k-sidebar); color: var(--k-on-brand); }

/* Inputs. The draft's controls drop the outline and leaned on its global
   :focus-visible reset, which is not merged; their focus ring is the DL §2.3
   one, given here so the ring never disappears. Focus (review follow-up 2,
   28 October 2026): the glow alone is 1.2:1 against white, so the field's
   own standard — a 1 px --k-brand ring outside the --k-brand edge (2 px at
   7:1), the glow beyond, and a transparent outline for forced colours. */
.k-input { height: var(--k-ctl-h); border: 1px solid var(--k-control); background: var(--k-surface); color: var(--k-text); padding: 0 14px; font-size: 13px; border-radius: var(--k-r-pill); outline: 0; }
.k-input:focus-visible { outline: 2px solid transparent; outline-offset: 0; box-shadow: 0 0 0 1px var(--k-brand), var(--k-focus); border-color: var(--k-brand); }

/* Filter row (DL §5.6) */
.k-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.k-filters .k-meta b { font-weight: 600; color: var(--k-text); }

/* Grid rows for selectable tables (DL §5.5). The draft set the columns with
   an inline --k-cols, which the CSP forbids (plan F4): each table names its
   column set with a .k-grid--<table> modifier on the container instead. */
.k-grid-head, .k-grid-row { display: grid; gap: 12px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--k-divider); }
.k-grid-head { font-size: var(--k-fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }
.k-grid-row { padding: 12px 20px; }
/* Governance · Overview's cascade. Slice 13 checked the widths against the
   board and amended them in place (nothing drew the class before it): the
   eye select button 40, key 72, title (its level tag before it), status 112,
   domain 140, approved 112, review due 150. The folding under 900 px of card
   is slice 13's container query. */
.k-grid--gov-cascade .k-grid-head,
.k-grid--gov-cascade .k-grid-row { grid-template-columns: 40px 72px minmax(0, 1fr) 112px 140px 112px 150px; }

/* Avatar palette (DL §2.1, §5.12): background only, so .k-avatar is not
   restyled until a template adds one. The server-side hash of the person's
   id picks N (CSP: replaces the draft's inline --k-av). */
.k-avatar--0 { background: var(--k-av-0); }
.k-avatar--1 { background: var(--k-av-1); }
.k-avatar--2 { background: var(--k-av-2); }
.k-avatar--3 { background: var(--k-av-3); }
.k-avatar--4 { background: var(--k-av-4); }
.k-avatar--5 { background: var(--k-av-5); }
.k-avatar--6 { background: var(--k-av-6); }
.k-avatar--7 { background: var(--k-av-7); }

/* Decision outcome row (DL §5.10) */
.k-outcome { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--k-r-item); background: var(--k-selected); }

/* Agenda item rail: tabs inside an item (DL §5.9) */
.k-item-rail { flex: 0 0 150px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--k-divider); padding-right: 12px; }
.k-item-rail__tab { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: var(--k-r-item); color: var(--k-text-2); text-decoration: none; font-size: 13px; font-weight: 500; }
.k-item-rail__tab[aria-current="true"] { background: var(--k-ok-bg); color: var(--k-ok-fg); font-weight: 600; }
.k-item-rail__count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--k-r-pill); background: var(--k-neutral-bg); color: var(--k-neutral-fg); font-size: var(--k-fs-label); font-weight: 600; display: grid; place-items: center; }
.k-item-rail__tab[aria-current="true"] .k-item-rail__count { background: var(--k-surface); color: var(--k-ok-fg); }

/* Prep card (meetings). The cards sit in a .k-card-grid, not the draft's
   three-column .k-prep grid (plan §3, "Prep cards"). */
.k-prep__card { background: var(--k-surface); border: 1px solid var(--k-border); border-radius: var(--k-r-card); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.k-prep__actions { margin-top: auto; display: flex; gap: 8px; }

/* Two-column body (DL §4.1) */
.k-cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.k-cols__main { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.k-cols__side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
/* A card's always-drawn out-of-band wrapper takes no box of its own, so an empty one adds no column gap. */
.k-oob-slot { display: contents; }

/* ==========================================================================
   DESIGN LANGUAGE — shared parts (Phase 21, slice 2 stage 2)

   Additive: nothing used these before, so no page moved. The items list
   takes them in stage 3; the rest follow as their slices migrate them
   (docs/technical/ui-design-language.md, "Slice 2, stage 2").
   ========================================================================== */

/* Icon and outlined buttons (DL §5.2, §5.6). Modifiers of the old .k-btn,
   which has no height of its own (its sizes are padding), so the icon button
   sets both sides: a 36 px circle, 44 px on a coarse pointer (below). */
.k-btn--icon { position: relative; width: var(--k-ctl-h); height: var(--k-ctl-h); padding: 0; color: var(--k-text-2); }
.k-btn--icon:hover { background: var(--k-surface-2); }
.k-btn--icon svg { width: 16px; height: 16px; }
/* The menu pin on a workspace Overview's and a helpdesk queue's bar (Judd's
   navigation rulings N3 and N7, 29 October 2026): an icon button in the bar,
   which the bar's text padding must not widen, filled while pressed. */
.k-topbar .k-btn--icon.k-pin { padding: 0; }
.k-pin[aria-pressed="true"] { background: var(--k-ok-bg); color: var(--k-ok-fg); }
.k-pin[aria-pressed="true"]:hover { background: var(--k-ok-bg); }
/* The panel's workspace search (the menu's "All workspaces" / "All
   helpdesks"): the box, then a plain link per workspace. */
.k-shortcut-results { margin-top: 12px; }
.k-shortcut-results__list { list-style: none; margin: 0; padding: 0; }
.k-shortcut-results__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 8px 0;
  border-bottom: 1px solid var(--k-divider);
  color: var(--k-text);
  font-size: var(--k-fs-row);
  text-decoration: none;
}
.k-shortcut-results__list li:last-child .k-shortcut-results__link { border-bottom: 0; }
.k-shortcut-results__link:hover { color: var(--k-brand); text-decoration: underline; }
.k-btn--outline { background: var(--k-surface); border-color: var(--k-control); color: var(--k-text-2); }
.k-btn--outline:hover { background: var(--k-surface-2); color: var(--k-text); }
/* An icon button that may carry a short count ("Columns · 2 hidden"): a
   circle while the count is empty, a pill once it is not. */
.k-btn--icon-text { width: auto; min-width: var(--k-ctl-h); padding: 0 10px; gap: 6px; font-size: var(--k-fs-meta); }
.k-btn--icon-text .k-btn__count { font-weight: 600; color: var(--k-muted); }
.k-btn--icon-text .k-btn__count:empty { display: none; }
/* A count on an icon button (the Filter button's set filters). Colour never
   alone: the button's aria-label says the number too. */
.k-btn__badge {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: var(--k-r-pill); background: var(--k-brand); color: var(--k-on-brand);
  font-size: var(--k-fs-micro); font-weight: 700; line-height: 16px; display: grid; place-items: center;
}

/* The filter row's parts (DL §4.2, §5.6): the sentence, and the search, a
   native <details> whose form opens beside its button. */
.k-filters__sentence { min-width: 0; }
.k-filters__search { position: relative; }
.k-filters__search > summary { list-style: none; }
.k-filters__search > summary::-webkit-details-marker { display: none; }
.k-filters__search[open] > summary { background: var(--k-selected); border-color: var(--k-brand); color: var(--k-brand); }
.k-filters__search-form {
  position: absolute; top: 0; right: calc(100% + 8px); z-index: 35;
  display: flex; align-items: center; gap: 6px;
}
.k-filters__search-form .k-input { width: 240px; max-width: 60vw; }
@media (max-width: 599px) {
  .k-filters__search-form { top: calc(100% + 6px); right: 0; padding: 6px; background: var(--k-surface); border: 1px solid var(--k-border); border-radius: var(--k-r-pill); }
}

/* The view toggle as links (ruling 15): k_page_header view=… draws a .k-seg
   whose options are <a href>, the current one aria-current="page". */
a.k-seg__btn { text-decoration: none; }
a.k-seg__btn:hover { text-decoration: none; background: var(--k-surface-2); color: var(--k-text); }
.k-seg__btn[aria-current="page"],
.k-seg__btn[aria-current="page"]:hover { background: var(--k-sidebar); color: var(--k-on-brand); }
.k-page-header-view { flex: 0 0 auto; }
/* A view toggle too wide for the title's line (six tabs at 900 px) drops to its
   own line and, if it is still wider than the page, scrolls inside itself. */
.k-page-header-row:has(.k-page-header-view) { flex-wrap: wrap; }
.k-page-header-actions:has(> .k-page-header-view) { max-width: 100%; }
.k-page-header-view { max-width: 100%; overflow-x: auto; }

/* Due dates with their distance, k_due (DL §6, §5.5; ruling 15). Plain is
   the 12 px muted date; overdue and soon take the chip look of
   .k-chip--bad / .k-chip--warn, the word ("late", "in 3 weeks") carrying the
   meaning as well. */
.k-due { font-size: var(--k-fs-meta); color: var(--k-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.k-due--bad,
.k-due--warn {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--k-r-pill);
  font-size: var(--k-fs-label); font-weight: 600; line-height: 16px;
}
.k-due--bad { background: var(--k-bad-bg); color: var(--k-bad-fg); }
.k-due--warn { background: var(--k-warn-bg); color: var(--k-warn-fg); }

/* Team plans table (Judd's walk, 10 November 2026): the end and next-review
   dates read as body text, the same 13 px tabular figures as Start, with the
   due colour on the text and no pill. Scoped to this table; .k-chip and .k-due
   are unchanged everywhere else. The visually hidden "(overdue)" stays, and
   the tinted dates are semibold so colour is not the only cue. */
.k-tone { font-size: inherit; font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-tone--warn { color: var(--k-warn-fg); font-weight: 600; }
.k-tone--bad { color: var(--k-bad-fg); font-weight: 600; }
#k-team-plans-table .k-due { font-size: inherit; font-weight: 400; line-height: inherit; }
#k-team-plans-table .k-due--bad,
#k-team-plans-table .k-due--warn { display: inline; padding: 0; border-radius: 0; background: none; font-size: inherit; line-height: inherit; font-weight: 600; }
#k-team-plans-table .k-due--bad { color: var(--k-bad-fg); }
#k-team-plans-table .k-due--warn { color: var(--k-warn-fg); }
#k-team-plans-table td:has(> .k-due) { white-space: nowrap; }

/* A list's footnote (DL §4.2): what the list shows and what a tick does. */
.k-footnote { margin: 0; font-size: var(--k-fs-meta); color: var(--k-muted); }

/* The row avatar (DL §2.3, §5.12): 22 px, initials 9/700 white on the palette
   colour a .k-avatar--0 … --7 class gives it (always paired with one), no
   ring. In rows its initials sit beside the name and are aria-hidden. */
.k-avatar--22 { width: 22px; height: 22px; font-size: 9px; font-weight: 700; color: var(--k-on-brand); box-shadow: none; }

/* Touch targets (ruling 46 C, DL §3.5): 44 px on a coarse pointer and below
   600 px, as every other control. */
@media (max-width: 599px), (pointer: coarse) {
  .k-btn--icon { width: 44px; height: 44px; }
  .k-btn--icon-text { width: auto; min-width: 44px; }
  .k-page-header-view .k-seg__btn { height: 44px; }
}

/* ==========================================================================
   DESIGN LANGUAGE — the items list (Phase 21, slice 2 stage 3)

   The first page on the List archetype (DL §4.2): work/items.html, its
   filter row, its DL rows and its two panels. Rulings 15 and 16
   (docs/technical/ui-design-language.md, "Slice 2, stage 3").
   ========================================================================== */

/* The filter row under the heading, and the table 16 px under it, as C4's
   bar had them (.k-filterbar + .k-section-gap): the two are one unit, and the
   16 px is part of what keeps fifteen rows in a 1440×900 screen (ruling 16). */
.k-filters[data-k-filter-summary] { margin-top: 14px; }
.k-filters + .k-section-gap { margin-top: 16px; }
.k-items-footnote { margin-top: 12px; }
/* A phone: the sentence takes its own line, so the four buttons share the next. */
@media (max-width: 599px) {
  .k-filters[data-k-filter-summary] .k-filters__sentence { flex: 1 1 100%; }
}

/* A done row (ruling 15): no opacity, which took muted cells to 2.66:1. The
   title is muted at 400 and every chip keeps its full colour; cancelled is a
   terminal state too and reads the same. */
.k-table tr.k-row-done .k-title-link,
.k-table tr.k-row-done .k-title-text,
.k-table-card.k-row-done .k-title-link,
.k-table-card.k-row-done .k-title-text { color: var(--k-muted); font-weight: 400; }

/* The row person (DL §5.5): the 22 px avatar, then the name at 12 px; nobody
   is "Unassigned", muted. */
.k-person--22 { gap: 6px; }
.k-person--22 .k-person-name { font-size: var(--k-fs-meta); }
.k-unassigned { font-size: var(--k-fs-meta); color: var(--k-muted); white-space: nowrap; }

/* The filter panel (?panel=filters): each filter's control, stacked; it
   applies on change, Apply only with scripting off (in <noscript>). */
.k-panel-filters { display: flex; flex-direction: column; gap: 4px; }
.k-panel-filters__group { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.k-panel-filters__group > legend { padding: 0; margin-bottom: 4px; }
.k-panel-filters__fixed { margin: 0; font-size: var(--k-fs-meta); color: var(--k-text-2); }
.k-panel-filters__clear { font-size: var(--k-fs-meta); font-weight: 600; color: var(--k-brand); white-space: nowrap; }
.k-panel-filters__apply { margin-top: 4px; }
/* Touch targets in the slice's panels (stage 5's closing walk). #k-panel is a
   sibling of #k-main, not inside .k-page, so the page-wide 44 px sweep
   (".k-page select", ".k-page .k-btn", Phase 18 C11) does not reach what
   htmx loads into it: on an iPad and at 360 px the filter selects were
   32 px, "Clear all" 20 px and the item panel's "Open full record" 26 px.
   The same sizes, for the parts this slice puts in the panel. The item
   panel's buttons take theirs from #k-panel's own twins of the sweep (slice
   4), so their copy here left in slice 16 stage 4 (ruling 99 (7)). */
@media (max-width: 599px), (pointer: coarse) {
  .k-panel-filters select,
  .k-panel-filters .k-btn,
  .k-panel-filters input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]) { min-height: 44px; }
  .k-panel-filters .k-btn { min-width: 44px; }
  .k-panel-filters__clear { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
}

/* The Columns panel (?panel=columns): C3's form, in the panel's flow rather
   than in k_columns' popover. */
.k-columns-host .k-columns-panel { position: static; width: auto; max-width: none; margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.k-columns-host .k-columns-list { max-height: none; }

/* ==========================================================================
   DESIGN LANGUAGE — row selection into the panel (Phase 21, slice 2 stage 4)

   DL §6 "selection on a list loads the panel; the row shows --k-selected".
   The items list's row select is a <button type="button" data-k-row-select
   aria-pressed> in the eye's place (ui/components/table.html), loading
   work:item_panel into #k-panel; kairos.js presses one row at a time. The
   pressed row's wash is repeated on the cells that paint their own ground —
   the sticky first and key cells and the quick-view cell — as the ticked
   row's is. docs/technical/ui-design-language.md, "Slice 2, stage 4".
   ========================================================================== */
.k-table-select {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.k-table-select[aria-pressed="true"] { opacity: 1; color: var(--k-brand); background: var(--k-ok-bg); }
.k-table tbody tr:has([data-k-row-select][aria-pressed="true"]),
.k-table tbody tr:has([data-k-row-select][aria-pressed="true"]) > td,
.k-table tbody tr:has([data-k-row-select][aria-pressed="true"]) > td.k-col--quickview,
.k-table-scroll.is-scrolling-x .k-table tbody tr:has([data-k-row-select][aria-pressed="true"]) :is(td:first-child, .k-table-check + .k-col--key) { background: var(--k-selected); }
.k-table-cards > li:has([data-k-row-select][aria-pressed="true"]) { background: var(--k-selected); }

/* The selected item in the panel (work/partials/item_panel.html): its title,
   then the facts as label and value pairs. The title takes focus when the
   panel opens (tabindex="-1", not a control), so it draws no ring, as the
   panel's own title does not. */
.k-item-panel .k-panel__object-title { margin: 0; }
.k-item-panel .k-panel__object-title:focus { outline: none; }
.k-item-panel__facts { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px 12px; margin: 14px 0 0; }
.k-item-panel__fact { display: contents; }
.k-item-panel__fact > dt { align-self: center; }
.k-item-panel__fact > dd { margin: 0; min-width: 0; font-size: var(--k-fs-meta); color: var(--k-text-2); }
.k-item-panel__description { overflow-wrap: anywhere; }

/* The editable panel (work/partials/item_panel.html, Judd's ED1 of 9 November
   2026): the title with its edit button, then the record strip's own cells
   (State, Assignee, Due, Priority, Estimated effort) in two columns. The
   cells' border and padding are the strip's; here they sit on the panel. */
.k-item-panel__sections { display: flex; width: 100%; box-sizing: border-box; }
.k-item-panel__sections .k-seg__btn { flex: 1 1 auto; justify-content: center; padding: 0 8px; }
.k-item-panel__title { display: flex; align-items: flex-start; gap: 8px; }
.k-item-panel__title .k-panel__object-title { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.k-item-panel__controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; margin: 14px 0 0; }
.k-item-panel__controls > .k-strip__cell { padding: 0; border: 0; }

/* ==========================================================================
   DESIGN LANGUAGE — the List shell (Phase 21, slice 3)

   The shared parts configuration/list_page.html moves onto in slice 3 (DL
   §4.2; Judd's rulings 20 to 24): the filter row's status group and its menu
   buttons, and the list's footnote. Additive in stage 1: no page draws them
   until stage 2. Their 44 px touch sizes sit in the @media (pointer: coarse)
   block above.
   ========================================================================== */

/* The status group as a segmented control of links (DL §5.7; ruling 24):
   the current option carries aria-current="true" and takes the active look,
   as the view toggle's aria-current="page" does; its count beside the word. */
.k-seg__btn[aria-current="true"],
.k-seg__btn[aria-current="true"]:hover { background: var(--k-sidebar); color: var(--k-on-brand); }
.k-seg__count { font-weight: 400; font-variant-numeric: tabular-nums; }
.k-filters__status { flex: 0 0 auto; }

/* A menu button (ui/components/filter_menu.html): the workspace scope, "ICT
   Service Delivery ▾" (ruling 23), and a status group of five or more,
   "Status: Live ▾" (ruling 24). A 36 px outlined pill; its menu is the chip
   popover's panel and rows (.k-chip-popover, .k-chip-choice), hung from the
   button's right edge, since the button sits at the row's right. */
.k-filters__menu { position: relative; min-width: 0; max-width: 100%; }
.k-filters__menu-btn { height: var(--k-ctl-h); max-width: 100%; padding: 0 12px 0 14px; gap: 6px; font-size: var(--k-fs-row); list-style: none; }
.k-filters__menu-btn::-webkit-details-marker { display: none; }
.k-filters__menu-btn svg { width: 12px; height: 12px; flex: 0 0 auto; color: var(--k-muted); }
.k-filters__menu-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.k-filters__menu[open] > .k-filters__menu-btn { background: var(--k-selected); border-color: var(--k-brand); color: var(--k-brand); }
.k-filters__menu-panel { left: auto; right: 0; }
.k-filters__menu-count { margin-left: 8px; color: var(--k-muted); font-variant-numeric: tabular-nums; }
.k-chip-choice.is-current .k-filters__menu-count { color: inherit; }

/* The footnote under a Configuration list's table (DL §4.2), 12 px under it
   as the items list's is. */
.k-list-footnote { margin-top: 12px; }

/* An empty Configuration list's one line (DL §6) is the table card's whole
   body: the page's prose measure, meant for running text, does not cap it to
   half the card (stage 2 of slice 3; the dashed k-empty box since slice 15). */
.k-config-page :is(.k-table-wrap, [data-k-config-list]) > .k-empty-row { max-width: none; }

/* A phone: the status group takes a line of its own where the source puts it,
   after the search and before the scope and the buttons, its options sharing
   the line (no order, so the screen's order is the Tab order); an open menu
   takes the row's width, its panel in the page flow under the button (the chip
   popover's rule below 600 px). */
@media (max-width: 599px) {
  .k-filters__status { flex: 1 1 100%; }
  .k-filters__status .k-seg__btn { flex: 1 1 0; justify-content: center; }
  .k-filters__menu[open] { flex: 1 1 100%; display: flex; flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   DESIGN LANGUAGE — the queue (Phase 21, slice 4)

   The helpdesk queue on the List archetype and its ticket panel (DL §4.2,
   §6; Judd's rulings 26 to 35). The ticket panel's 44 px touch sizes are the
   page's own, widened to #k-panel and #k-confirm-panel inside the phone
   sweep and the @media (pointer: coarse) block above (rulings 19 (2), 32).
   ========================================================================== */

/* Menus open in place in the panel (ruling 33). The panel's sections are a
   scrolling box (.k-panel__sections, overflow-y: auto), so a menu hung over
   the panel — the Priority chip's, the Assignee combobox's and "More moves"
   — was clipped by it, and "More moves", hung from its button's right edge,
   ran off the panel's left. Inside #k-panel, at every width, each opens in
   the flow, full width, and pushes what follows down: the phone's rule
   (below 600 px, the record page's), scoped to the panel. */
#k-panel .k-fact[open] { flex: 1 1 100%; width: 100%; }
#k-panel .k-combobox,
#k-panel .k-combobox-panel,
#k-panel .k-more-moves { width: 100%; }
#k-panel .k-more-moves { display: block; }
#k-panel .k-fact-panel,
#k-panel .k-more-moves .k-actions-panel {
  position: static;
  width: 100%;
  max-height: none;
  margin-top: 6px;
  box-shadow: none;
  border: 1px solid var(--k-border);
}

/* The queue's footnote (DL §4.2): "Showing 1–50 of 120 · sorted by …", then
   the queue's own description, which moved there from the heading, a line
   below it in the same 12 px muted type (.k-footnote). */
.k-queue-description { margin-top: 4px; }

/* ==========================================================================
   DESIGN LANGUAGE — the registers lists (Phase 21, slice 5)

   A register's entries, Improvement and By topic on the List archetype (DL
   §4.2, §6; Judd's rulings 36 to 39). The entries and Improvement pages draw
   shared parts only; By topic (ruling 39, "Board's shape, no new actions")
   adds its coverage strip, its groups' "View all" and its gaps card here.
   Not .k-strip, which is still the moves row, and not .k-coverage, which is
   the entry page's coverage card (Phase 20): .k-topic-coverage. No touch
   rule: the strip's cells are larger than 44 px, and "View all" is a
   .k-link-standalone, which the existing touch blocks already size.
   ========================================================================== */

/* By topic's coverage strip: one card, a cell per register shown, each a link
   to its group or its gaps line. An auto-fit grid of at least 140 px, so the
   seven sit on one line on a desktop and two across on a phone, at every
   width with no @media. Cells are divided by --k-divider: each draws its own
   left and top rule, pulled 1 px over its neighbour, and the card's
   overflow clips the rules on its outer edge (the strip holds no popover). */
.k-topic-coverage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  padding: 0;
  overflow: hidden;
}
.k-topic-coverage__cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  margin: -1px 0 0 -1px;
  padding: 14px 16px;
  border-left: 1px solid var(--k-divider);
  border-top: 1px solid var(--k-divider);
  color: var(--k-text);
  text-decoration: none;
}
.k-topic-coverage__cell:hover { background: var(--k-surface-2); text-decoration: none; }
/* Its focus: the global 2 px --k-brand ring, drawn inside the cell, since
   the grid clips what lies outside it (review follow-up 2, 28 October 2026:
   the inset glow it had was 1.2:1 against white). */
.k-topic-coverage__cell:focus-visible { outline: 2px solid var(--k-brand); outline-offset: -2px; }
.k-topic-coverage__num { font-size: var(--k-fs-section); font-weight: 300; line-height: 1.15; color: var(--k-text); font-variant-numeric: tabular-nums; }
.k-topic-coverage__num--zero { color: var(--k-faint); }

/* A group's "View all n", at the group header's right (DL §6), 12 px. */
.k-topic-group__all { font-size: var(--k-fs-meta); font-weight: 600; }

/* The gaps card: one line per register that carries nothing, divided. */
.k-topic-gaps { list-style: none; margin: 0; padding: 0; }
.k-topic-gaps__line { padding: 8px 0; border-top: 1px solid var(--k-divider); font-size: var(--k-fs-row); color: var(--k-text-2); }
.k-topic-gaps__line:first-child { border-top: 0; }

/* ==========================================================================
   DESIGN LANGUAGE — domains (Phase 31)

   A domain's label as the code, then its name ("D3 Promoting a culture of learning"): the ACER
   School Improvement Tool's nine, whose option has no code column, so the code is the label's
   first word. At phone width only the code stays (k_domain in kairos_ui, which also puts the full
   label in the span's title).
   ========================================================================== */
@media (max-width: 599px) {
  .k-domain__name { display: none; }
}

/* ==========================================================================
   DESIGN LANGUAGE — the meetings lists (Phase 21, slice 6)

   The reader's meetings, My actions, the series list and a series'
   decisions on the List archetype (DL §4.2, §6, §12; Judd's rulings 40 to
   43). Stage 1 adds the parts; each page adopts them in its own stage. Not
   .k-strip (the moves row) and not .k-group* (slice 1a's, reused as they
   are). No media query and no touch rule: the tick is a 44 px button at every
   width, its 20 px box drawn inside by padding, and the My actions row
   wraps by flex, so no .k-page rule needs #k-panel and #k-confirm-panel
   twins. Tokens only, and no reordering of the source.
   ========================================================================== */

/* A cancelled meeting's row: the title struck through and muted, never
   faded (DL §6's .55 opacity fails 4.5:1, as the done rows' did — ruling
   15 (2)); its neutral "Cancelled" chip stays at full colour. */
.k-table tr.k-row-cancelled .k-title-link,
.k-table tr.k-row-cancelled .k-title-text,
.k-table-card.k-row-cancelled .k-table-card-title { text-decoration: line-through; color: var(--k-muted); font-weight: 400; }

/* A week group's range beside its name ("This week  19 – 25 Oct"), and the
   prep cards' line under their header (DL §6's group header). */
.k-group__range { font-size: var(--k-fs-meta); color: var(--k-muted); font-variant-numeric: tabular-nums; }
.k-prep__lede { margin: 0; font-size: var(--k-fs-meta); color: var(--k-muted); }
.k-prep__when { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--k-fs-meta); color: var(--k-text-2); }
.k-prep__line { margin: 0; font-size: var(--k-fs-meta); color: var(--k-muted); }
.k-prep__title { margin: 0; font-size: var(--k-fs-row); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }

/* My actions' row (ruling 41): the tick, the title over its facts, the due
   date and the controls. A wrapping flex row, so below about 600 px the due
   date and the controls drop under the title with no media query. */
.k-my-action { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 20px; border-bottom: 1px solid var(--k-divider); }
.k-my-action:last-child { border-bottom: 0; }
.k-my-action__tick { flex: 0 0 32px; display: flex; justify-content: center; margin: 0; }
.k-my-action__main { flex: 1 1 240px; min-width: 0; }
.k-my-action__title { margin: 0; font-size: var(--k-fs-row); font-weight: 600; color: var(--k-text); overflow-wrap: anywhere; }
.k-my-action.is-closed .k-my-action__title { text-decoration: line-through; color: var(--k-muted); font-weight: 400; }
.k-my-action__facts { margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 0 6px; }
.k-my-action__facts > :not(:last-child)::after { content: "·"; margin-left: 6px; color: var(--k-muted); }
.k-my-action__due { flex: 0 0 auto; margin: 0; }
.k-my-action__controls { flex: 0 0 auto; }
/* The page's group card: a list of those rows, flush to the card's edge, one
   divider between rows (each row is the last child of its own item). */
.k-my-actions { list-style: none; margin: 0; padding: 0; }
.k-my-actions > li + li { border-top: 1px solid var(--k-divider); }

/* The tick: a 20 px box on a 44 px button (the padding is the hit area at
   every width), drawn on --k-brand once pressed, which means done. */
.k-tick { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -12px; padding: 12px; border: 0; border-radius: var(--k-r-item); background: transparent; color: var(--k-on-brand); cursor: pointer; }
.k-tick__box { display: grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid var(--k-control); border-radius: 6px; background: var(--k-surface); color: var(--k-on-brand); }
.k-tick:hover .k-tick__box { border-color: var(--k-brand); }
.k-tick[aria-pressed="true"] .k-tick__box,
.k-tick__box.is-ticked { background: var(--k-brand); border-color: var(--k-brand); }
/* Its focus: the global 2 px --k-brand ring, drawn 10 px inside the 44 px
   button so it hugs the 20 px box (review follow-up, 28 October 2026: the
   glow it had was 1.2:1 against white). */
.k-tick:focus-visible { outline-offset: -10px; }

/* The series list: a run of chips (the next three agendas) and the
   open-actions numeral, faint at nought (as By topic's coverage). */
.k-chip-run { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.k-series-num { font-size: 20px; font-weight: 300; line-height: 1.2; color: var(--k-text); font-variant-numeric: tabular-nums; }
.k-series-num--zero { color: var(--k-faint); }

/* The meeting panel (ruling 40): the state chip and why it was cancelled
   under the subject, and the agenda as a numbered list with its times. */
.k-meeting-panel__state { margin: 10px 0 0; }
.k-meeting-panel__why { margin: 6px 0 0; }
.k-meeting-panel__agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.k-meeting-panel__item { display: flex; align-items: baseline; gap: 10px; font-size: var(--k-fs-row); }
.k-meeting-panel__num { flex: 0 0 18px; color: var(--k-muted); font-variant-numeric: tabular-nums; text-align: right; }
.k-meeting-panel__title { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; color: var(--k-text); }
.k-meeting-panel__time { flex: 0 0 auto; font-size: var(--k-fs-meta); color: var(--k-muted); font-variant-numeric: tabular-nums; }
.k-meeting-panel__actions { margin: 12px 0 0; }

/* The rail's Actions badge in More actions (ruling 44): the rail draws the
   count as slice 1a's .k-aside-rail__btn .k-dot, over the icon's corner; in
   the menu the same rose count sits in the row, beside the label. Hidden
   from assistive technology: the entry's name carries it. */
.k-bar-more__link .k-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--k-r-pill); background: var(--k-bad-fg); color: var(--k-on-brand); font-size: var(--k-fs-micro); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   DESIGN LANGUAGE — the remaining lists (Phase 21, slice 7)

   The board, the timeline, the workspace Checklists page, notifications,
   search, My requests, the issued committee reports and a rule's run
   history on the List archetype (DL §4.2, §5.2, §6, §12; Judd's rulings 45
   to 48). Stage 1 adds the parts; each page adopts them in its own stage.
   Not .k-strip (the moves row; the item panel's Assignee sits in the
   existing .k-strip.k-peek-strip, as the ticket panel's does — renamed
   .k-moves.k-peek-strip in slice 8) and not
   .k-group* or .k-tick (slices 1a and 6, reused as they are). The board's
   Wave 3 rules above are not touched: the card's select button and the
   dashed Assign sit inside its existing flex lines. No media query and no
   .k-page touch rule: every new control keeps a 44 px hit area by padding
   or a hit box at every width, so no rule needs #k-panel and
   #k-confirm-panel twins. Tokens only, and no reordering of the source.
   ========================================================================== */

/* The dashed Assign (ruling 45; DL §5.2 "Unassigned slots use a dashed
   --k-faint border"): a 28 px pill in a row or on a card, its hit area
   44 px tall by an invisible box around it. The border is decoration; the
   word carries the meaning, in --k-ok-fg. */
.k-assign-slot { position: relative; display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border: 1px dashed var(--k-faint); border-radius: var(--k-r-pill); background: transparent; color: var(--k-ok-fg); font-size: var(--k-fs-meta); font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap; }
.k-assign-slot::after { content: ""; position: absolute; inset: -8px -2px; }
.k-assign-slot:hover { border-color: var(--k-brand); background: var(--k-selected); }
/* Its focus, and the card's select button's below: the global 2 px
   --k-brand ring (review follow-up 2, 28 October 2026: the glow they had was
   1.2:1 against white). */
.k-assign-slot:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 2px; }

/* A board card in the design language (rulings 45, 46): the facts line — the
   22 px person or the dashed Assign, and the due date — and the card's select
   button, which loads the item panel. A pressed card is on --k-selected, as a
   selected row is. */
.k-board-card:has([data-k-row-select][aria-pressed="true"]) { background: var(--k-selected); }
.k-board-card__effort { color: var(--k-muted); white-space: nowrap; }
.k-board-card__facts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; min-width: 0; font-size: var(--k-fs-meta); color: var(--k-text-2); }
/* The card head's right end: the priority chip, then the select button. */
.k-board-card__end { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.k-board-card__select { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--k-r-item); background: transparent; color: var(--k-muted); cursor: pointer; }
.k-board-card__select::after { content: ""; position: absolute; inset: -6px; }
.k-board-card__select:hover,
.k-board-card__select[aria-pressed="true"] { color: var(--k-brand); background: var(--k-ok-bg); }
.k-board-card__select:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 2px; }
/* The column's count as a neutral chip beside its name (13 / 600 --k-text-2). */
.k-board-col__name { margin: 0; font-size: var(--k-fs-row); font-weight: 600; color: var(--k-text-2); }

/* The timeline's range row (reading 7): From and To in one compact row under
   the filter row, outside the filters, as Judd instructed; a date keeps a
   date's width (190 to 240 px) and the row wraps by flex. */
.k-range-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; margin: 0 0 12px; }
.k-range-row__field { flex: 0 1 240px; min-width: 190px; }
/* Stage 3: the field's own bottom margin would lift the dates above Reset,
   and the input fills its field, as it did in the range card's grid. */
.k-range-row__field > .k-field { margin-bottom: 0; }
.k-range-row__field .k-field > .k-field-input { width: 100%; }
.k-range-row__note { margin: 0; font-size: var(--k-fs-meta); color: var(--k-muted); }
/* "Reset to default" (stage 3): a 36 px link level with the dates, its hit
   area 44 px tall by an invisible box, as the dashed Assign's. */
.k-range-row__reset { position: relative; display: inline-flex; align-items: center; min-height: 36px; font-size: var(--k-fs-meta); }
.k-range-row__reset::after { content: ""; position: absolute; inset: -4px -2px; }
/* A timeline row's select button sits in its title cell, after the link, on
   the link's own line (stage 3: a flex line, so a long title wraps beside the
   button rather than pushing it onto a line of its own). */
.k-gantt-title__line { display: flex; align-items: center; min-width: 0; }
.k-gantt-select { flex: none; margin-left: 4px; }

/* The Checklists page's line (ruling 47): the tick, the line's text, then
   its item, owner and due date; a wrapping flex row, so below about 600 px
   the facts drop under the text with no media query. Ticked: struck through
   and muted, never faded (ruling 15 (2)). */
.k-check-lines { list-style: none; margin: 0; padding: 0; }
.k-check-lines > li + li { border-top: 1px solid var(--k-divider); }
.k-check-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 20px; }
.k-check-line__tick { flex: 0 0 32px; display: flex; justify-content: center; margin: 0; }
.k-check-line__main { flex: 1 1 240px; min-width: 0; margin: 0; font-size: var(--k-fs-row); color: var(--k-text); overflow-wrap: anywhere; }
.k-check-line.is-ticked .k-check-line__main { text-decoration: line-through; color: var(--k-muted); }
.k-check-line__facts { flex: 0 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: var(--k-fs-meta); color: var(--k-text-2); }
.k-check-line__item { color: var(--k-ok-fg); font-weight: 600; text-decoration: none; }
.k-check-line__item:hover { text-decoration: underline; }

/* The notification page's own rows (_page_row.html): one card per day, the
   rows flush to it, the time 12 px muted; "Mark read" a 32 px button whose
   hit area is 44 px by an invisible box. */
.k-notification-card { list-style: none; margin: 0; padding: 0; }
.k-notification-card > li + li { border-top: 1px solid var(--k-divider); }
.k-notification-time { margin: 2px 0 0; font-size: var(--k-fs-meta); color: var(--k-muted); }
.k-notification-row__read { position: relative; min-height: 32px; }
.k-notification-row__read::after { content: ""; position: absolute; inset: -6px 0; }
.k-notifications-counts,
.k-requests-counts,
.k-checklists-counts { font-variant-numeric: tabular-nums; }
/* Stage 5: "Mark all read" sits in the notification page's title row (the
   page header's secondary slot); its wrapper is there even when nothing is
   unread, so a Mark read's answer has a place to swap it back out of band. */
.k-notifications-mark-all { display: inline-flex; align-items: center; }
.k-notifications-mark-all > form { margin: 0; }

/* A search result's kind before its title (stage 5): a register entry's
   module icon, 14 px and decorative (--k-faint, DL §5.5; the title's second
   line says where the entry lives). A work item carries its type marker. */
.k-result-marker { display: inline-flex; flex: 0 0 14px; align-items: center; justify-content: center; color: var(--k-faint); }

/* A rule's run history (ruling 48): a failed run's error as its row's second
   line, in the rose text tone. */
.k-run-error { display: block; margin: 2px 0 0; font-size: var(--k-fs-meta); color: var(--k-bad-fg); overflow-wrap: anywhere; }

/* ==========================================================================
   DESIGN LANGUAGE — the Detail page (Phase 21, slice 8)

   The reference Detail page's shared parts (DL §3.4, §4.3, §5.4, §5.8,
   §5.11, §6; Judd's rulings 49 to 53 of 24 October 2026). Stage 1 adds the
   parts; the task page adopts them from stage 2 and the epic in stage 6, so
   nothing here styles a page that draws them yet, except the style guide's
   ?home=1 sample.
   - A page's own panel (ruling 49): kept out of sight below 1440 px until
     kPanel has started and closed it (ui/nojs.css draws it under the page
     with scripting off), and the rail's and More actions' section buttons
     under a divider.
   - The eyebrow; the property strip (.k-strip, the design language's —
     the moves row is .k-moves since this slice, the collision table), its
     cells keyed on the strip's own width, not the page's; the State menu
     (ruling 50) on "More moves"' construct; today's chips restyled inside
     a cell only (the queue, the item panel and the timeline keep theirs);
     the Tasks cell's 6 px bar scoped to the cell (decision Q6: .k-progress
     is slice 12's).
   - The tools panel's sections (labels with counts, people, files, History
     with its 60 px time column, the Checklists and Linked records adds)
     and its icon rail.
   - The record's headed cards (stage 3): Description and Subtasks, a head
     over a padded body; the requester's page with no rail beside it.
   - The Activity card and its composer's tool row, scoped to .k-activity.
   - The workflow preview: the wide sheet on the page-level slide-over
     (ruling 53 B, beside work-reference's width rule — no shell change)
     and the server-drawn diagram's classes (kairos.workflows.diagram).
   Nothing reordered (DOM order is the reading order, Phase 18 ruling 14), no
   colour but tokens. Two media queries (the page's own panel kept out of
   sight until kPanel starts; the workflow sheet no wider than the main area
   in the sidebar tier) and the strip's container queries; no .k-page touch
   rule: every new control is a .k-btn, a <details> summary or a 44 px
   button already, so the existing sweeps give it its touch target and no
   #k-panel or #k-confirm-panel twin is owed.
   ========================================================================== */

/* A page's own panel (ruling 49): out of sight below 1440 px until kPanel
   marks it ready (it then decides), so a sheet never flashes open. */
@media (max-width: 1439px) {
  .k-panel[data-k-panel-home]:not([data-k-panel-ready]) { display: none; }
}
.k-aside-rail__sections { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--k-divider); }
.k-bar-more__sep { display: block; height: 1px; margin: 6px 4px; background: var(--k-divider); }
.k-panel__count { font-variant-numeric: tabular-nums; }

/* The eyebrow (DL §4.3): one row of chips over the title. */
.k-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.k-eyebrow .k-chip { white-space: nowrap; }
.k-eyebrow__type { display: inline-flex; align-items: center; gap: 4px; }
.k-eyebrow__sla { display: inline-flex; text-decoration: none; }
.k-eyebrow__parent { white-space: nowrap; }
/* The parent's or ancestors' titles (Phase 32 P3): from 900 px up; keys only below. */
.k-eyebrow__title { display: inline-block; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
@media (max-width: 899px) {
  .k-eyebrow__title { display: none; }
}
/* k_page_header's eyebrow slot (stage 2): where the overline would be. */
.k-page-header-eyebrow { margin-bottom: 6px; }

/* The property strip (DL §4.3, §5.3): one card, its cells divided, label
   over value. Keyed on the strip's own width (DL §3.5 "Summary strip"):
   one row of five, then two across, then one. */
.k-record-head--dl { margin-top: 12px; container-type: inline-size; }
/* A strip that sits straight in the page with no margin of its own (the Audit pages'): the container its phone rules key on, and nothing else. */
.k-strip-host { container-type: inline-size; }
.k-strip {
  display: grid;
  grid-template-columns: repeat(var(--k-strip-cols, 5), minmax(0, 1fr));
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-card);
}
.k-strip--4 { --k-strip-cols: 4; }
.k-strip--5 { --k-strip-cols: 5; }
.k-strip--6 { --k-strip-cols: 6; }
.k-strip__cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 14px 18px;
  border-left: 1px solid var(--k-divider);
}
.k-strip__cell:first-child { border-left: 0; }
.k-strip__value { font-size: var(--k-fs-row); font-weight: 600; color: var(--k-text); min-width: 0; }
.k-strip__none { font-weight: 400; color: var(--k-muted); }
.k-strip__none--warn,
.k-strip__none--warn a { color: var(--k-warn-fg); font-weight: 600; }
.k-strip__meta { font-size: var(--k-fs-meta); color: var(--k-muted); }
.k-strip__meta--bad { color: var(--k-bad-fg); font-weight: 600; }
.k-strip__num { font-size: 22px; font-weight: 300; line-height: 1.2; color: var(--k-text); }
.k-strip__note { margin: 6px 0 0; }
.k-strip__approvals { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 8px; }
@container (max-width: 762px) {
  .k-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-strip__cell { border-left: 0; border-top: 1px solid var(--k-divider); }
  .k-strip__cell:nth-child(-n + 2) { border-top: 0; }
  .k-strip__cell:nth-child(2n) { border-left: 1px solid var(--k-divider); }
}
@container (max-width: 360px) {
  .k-strip { grid-template-columns: minmax(0, 1fr); }
  .k-strip__cell:nth-child(2n) { border-left: 0; }
  .k-strip__cell:nth-child(2) { border-top: 1px solid var(--k-divider); }
}
/* The Tasks cell's bar (DL §6: a 6 px pill on --k-divider), scoped to the
   cell (decision Q6). */
.k-strip__bar {
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: var(--k-r-pill);
  background: var(--k-divider);
  color: var(--k-brand);
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
}
.k-strip__bar::-webkit-progress-bar { background: var(--k-divider); border-radius: var(--k-r-pill); }
.k-strip__bar::-webkit-progress-value { background: var(--k-brand); border-radius: var(--k-r-pill); }
.k-strip__bar::-moz-progress-bar { background: var(--k-brand); border-radius: var(--k-r-pill); }
/* Today's editors inside a cell (plan §7 reading 19): the chip becomes the
   cell's value — no pill, the value's weight, a chevron — keeping every
   behaviour. The assignee partial's own "Assignee" overline is the cell's
   label. Nothing outside a cell moves. */
.k-strip__cell .k-strip-group { gap: 6px; width: 100%; }
.k-strip__cell .k-strip-group > .k-label { font-size: var(--k-fs-label); font-weight: 600; letter-spacing: .08em; color: var(--k-muted); }
.k-strip__cell .k-fact__chip.is-editor {
  max-width: 100%;
  padding: 2px 6px 2px 0;
  border: 0;
  background: transparent;
  color: var(--k-text);
  font-size: var(--k-fs-row);
  font-weight: 600;
}
.k-strip__cell .k-fact__chip.is-editor:hover { color: var(--k-brand); }
.k-strip__cell .k-fact__chip.is-editor.k-fact__chip--bad { color: var(--k-bad-fg); }

/* The State menu (ruling 50): the state chip, with its arrow, opens the
   moves; "More moves"' panel, held under the pill. */
.k-state-menu { position: relative; }
.k-state-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.k-state-menu > summary::-webkit-details-marker { display: none; }
.k-state-menu .k-state-menu__panel { left: 0; right: auto; min-width: 240px; }
.k-state-menu__now { display: flex; align-items: center; gap: 6px; margin: 4px 8px 6px; }
.k-state-menu__note { margin: 4px 8px 8px; max-width: 32ch; }
.k-state-menu__form { margin: 0; }
.k-state-menu__workflow { border-top: 1px solid var(--k-divider); margin-top: 4px; padding-top: 4px; }

/* The record's cards (DL §5.4; stage 3): a head — the title, its count,
   an icon button — over a padded body. Description, Subtasks. */
.k-card--headed { padding: 0; }
.k-card--headed > .k-card__body { padding: 16px 20px; min-width: 0; }
.k-card--headed > .k-card__head .k-heading { margin: 0; font-size: var(--k-fs-card); font-weight: 600; }
.k-card__count { font-weight: 400; color: var(--k-muted); }
/* The requester's own page has no rail beside the main column. */
.k-record--single { grid-template-columns: minmax(0, 1fr); }

/* The tools panel's sections (DL §5.8, §6). */
.k-tools__body { min-width: 0; }
.k-tools__people,
.k-tools__files,
.k-tools__history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.k-tools__file { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.k-tools__file-name { font-size: var(--k-fs-row); font-weight: 600; overflow-wrap: anywhere; }
/* A follower's row (Judd, 13 November 2026): the name, then "reason · added" under it,
   and Remove at the right of the same row; it wraps only at phone width. The two-class
   selector beats `.k-tools__file`, which stacks its children in a column. */
.k-tools__file.k-follower { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; min-width: 0; }
.k-follower__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 160px; }
.k-follower form { margin: 0; flex: none; }
/* A participant's row (Phase 23): the person, and the owner's Remove beside them. */
.k-tools__person { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.k-tools__person form { margin: 0; flex: none; }
.k-tools__sla-half { display: flex; flex-direction: column; gap: 2px; }
.k-tools__history { gap: 10px; font-size: var(--k-fs-meta); }
.k-tools__history-row { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; }
.k-tools__history-time { display: flex; flex-direction: column; color: var(--k-muted); font-variant-numeric: tabular-nums; }
.k-tools__history-what { margin: 0; color: var(--k-text); font-weight: 600; }
.k-tools__history-line > p { margin: 0; }
/* Checklists and Linked records in the panel (stage 4): the label row's
   add, which their bodies send ("Add", "Link"), and the add forms the panel
   keeps closed until it is pressed. */
.k-tools__add { display: inline-flex; }
.k-tools__add:empty { display: none; }
.k-tools [data-k-section-region][hidden] { display: none; }

/* The Activity card (DL §5.4, §5.11; ruling 9): its head, then the
   composer's tool row — Attach, the spacer, the edit rule, the two named
   buttons — and the thread. Scoped to .k-activity, so the register entry's
   thread is unchanged. */
.k-card > .k-card__head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--k-divider); }
.k-card > .k-card__head > .k-card__head-action { margin-left: auto; }
/* A head with several buttons (Phase 28 slice 8d: the OFI page's Controls card) wraps them under the title
   when the card is too narrow, instead of widening the page. */
.k-card > .k-card__head.k-card__head--wrap { flex-wrap: wrap; row-gap: 8px; }
.k-card > .k-card__head--wrap > .k-heading { flex: 1 1 auto; min-width: 0; }
.k-activity > .k-card__head .k-heading { margin: 0; font-size: var(--k-fs-card); font-weight: 600; }
/* The card's own padding is zero, as .k-card--headed's is: the head and the
   body carry the 20 px, so the card's content lines up with Description and
   Subtasks (a card padding on top of theirs made a 40 px inset). */
.k-activity { padding: 0; }
.k-activity__body { padding: 16px 20px; }
.k-activity.is-dragging { outline: 2px dashed var(--k-brand); outline-offset: -4px; }
.k-composer { display: flex; flex-direction: column; gap: 10px; }
/* The composer's own 10 px gap is the only space between the text box and
   the tool row: the field's form margin (16 px) would make it 26 px
   (Judd's spacing report, 30 October 2026). */
.k-composer .k-field { margin-bottom: 0; }
.k-composer__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
/* The send buttons keep to the right edge, on the first line or on a line
   of their own when the row wraps (at 900 px). */
.k-composer__send { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
/* Attach is a ghost button: its 10 px padding is drawn only on hover, so it
   is pulled back by that much for its icon to start on the text box's left
   edge, as the send buttons end on its right. */
.k-composer__tools .k-attach__btn { margin-left: -10px; }
/* What follows the composer — the thread or its one-line empty state —
   stands 16 px below it, as the card's stack does elsewhere. .k-empty-row
   sets margin 0 after .k-stack-16's rule, so the stack alone gave 0 px. */
.k-activity__body > .k-composer + * { margin-top: 16px; }
.k-composer__info { margin: 0; }
.k-attach { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; position: relative; }
.k-attach__btn { cursor: pointer; }
/* The file input is hidden behind its label, so the label takes the global
   2 px --k-brand ring while the input has focus (review follow-up 2,
   28 October 2026: the glow it had was 1.2:1 against white). */
.k-attach:focus-within .k-attach__btn { outline: 2px solid var(--k-brand); outline-offset: 2px; }
.k-attach__input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.k-attach .k-field-error { flex: 1 1 100%; margin: 0; }

/* The workflow preview (rulings 50 and 53 B): the page-level slide-over,
   widened to the main area for it, beside work-reference's own width rule;
   its drawing scrolls sideways when wider than the sheet. Ruling 53's "up to
   the main area's width" (stage 3): at most 1200 px and never over the
   navigation — in the sidebar tier (the query is the navigation's own, 4.1)
   the window less the sidebar as drawn, 240 px or 64 px collapsed; in the
   drawer and tab-bar tiers, where no sidebar is drawn, the window. */
.k-slideover[data-overlay="work-workflow"] .k-slideover-panel { width: min(1200px, 100%); }
@media (min-width: 1280px), (min-width: 900px) and (pointer: fine), (min-width: 900px) and (pointer: none) {
  .k-slideover[data-overlay="work-workflow"] .k-slideover-panel { width: min(1200px, calc(100% - var(--k-sidebar-w))); }
  .k-app.k-rail-collapsed .k-slideover[data-overlay="work-workflow"] .k-slideover-panel { width: min(1200px, calc(100% - var(--k-sidebar-w-collapsed))); }
}
.k-workflow-preview__drawing { overflow-x: auto; max-width: 100%; padding-bottom: 4px; }

/* The server-drawn diagram (kairos.workflows.diagram;
   workflows/partials/diagram.html): category tones as classes, the item's
   state ringed and marked "Now" (colour never alone, DL §8), the moves out
   of it emphasised and those the reader may take picked out. */
.k-wf-diagram { display: block; max-width: none; flex: none; font-family: var(--k-font); }
.k-wf-edge { color: var(--k-faint); }
.k-wf-edge-line { stroke: currentColor; stroke-width: 1.25; }
.k-wf-edge-head { fill: currentColor; stroke: none; }
.k-wf-edge-label { fill: var(--k-muted); font-size: 11px; paint-order: stroke; stroke: var(--k-surface); stroke-width: 3px; stroke-linejoin: round; }
.k-wf-edge--out { color: var(--k-text-2); }
.k-wf-edge--out .k-wf-edge-line { stroke-width: 1.75; }
.k-wf-edge--out .k-wf-edge-label { fill: var(--k-text-2); }
.k-wf-edge--offered { color: var(--k-brand); }
.k-wf-edge--offered .k-wf-edge-line { stroke-width: 2.5; }
.k-wf-edge--offered .k-wf-edge-label { fill: var(--k-brand); font-weight: 600; }
.k-wf-card { fill: var(--k-neutral-bg); stroke: var(--k-border); stroke-width: 1; }
.k-wf-state-name { fill: var(--k-text); font-size: 13px; font-weight: 600; }
.k-wf-state-meta { fill: var(--k-muted); font-size: 11px; }
.k-wf-state--green .k-wf-card { fill: var(--k-ok-bg); stroke: var(--k-ok-fg); }
.k-wf-state--warning .k-wf-card { fill: var(--k-warn-bg); stroke: var(--k-warn-fg); }
.k-wf-state--info .k-wf-card { fill: var(--k-info-bg); stroke: var(--k-info-fg); }
.k-wf-state--neutral .k-wf-card { fill: var(--k-surface); stroke: var(--k-control); }
.k-wf-ring { fill: none; stroke: var(--k-brand); stroke-width: 2.5; }
.k-wf-state.is-current .k-wf-card { stroke: var(--k-brand); stroke-width: 1.5; }
.k-wf-now { fill: var(--k-brand); font-size: 11px; font-weight: 700; }

/* ==========================================================================
   DESIGN LANGUAGE — the register entry (Phase 21, slice 9)

   The register entry's Detail page (DL §3.4, §4.3, §5.4, §5.8, §6; Judd's
   rulings 54 to 58 of 24 October 2026), on slice 8's parts: the eyebrow,
   the property strip, the State menu, the tools panel's sections, the
   headed cards and the Activity card are slice 8's classes, unchanged.
   Stage 1 adds the parts; the entry page adopts them from stage 2 (the
   head) and stage 3 (the cards and the panel).
   - The strip with fewer boxes (ruling 57: a box whose field the reader may
     not see is left out, not blank) — three and two across — and a due
     date's amber distance (ruling 38: a review inside 12 months).
   - The eyebrow's module icon and its residual band.
   - The panel's register sections: Coverage wrapped, not restyled
     (decision R5) — the card's own frame flattened inside its section and
     its heading set as the section's label; the Controls and Treatments
     rows and the overdue line; the Contained records lines (ruling 58);
     the Linked records section's "+ Create linked task".
   - Stage 3: a risk's Assessment card on the design language's head
     (``k-card__head``, decision R5's opt-in key), its grids starting at the
     top of the card's body.
   Nothing reordered (DOM order is the reading order, Phase 18 ruling 14), no
   colour but tokens, no media query (the strip's container queries are
   slice 8's), and no .k-page touch rule: every new control is a .k-btn, a
   k_actions trigger or a link the existing sweeps already size, so no
   #k-panel or #k-confirm-panel twin is owed.
   ========================================================================== */

/* The strip with fewer boxes (ruling 57), and the amber due line (ruling 38). */
.k-strip--3 { --k-strip-cols: 3; }
.k-strip--2 { --k-strip-cols: 2; }
.k-strip__meta--warn { color: var(--k-warn-fg); font-weight: 600; }

/* The eyebrow: the register's module icon inside its chip, and the band. */
.k-eyebrow__type > svg { flex: none; }
.k-eyebrow__band { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* Coverage in the panel (decision R5): the card's frame goes, its heading
   reads as the section's 11 px label. */
.k-tools__coverage > .k-coverage { padding: 0; background: none; border: 0; border-radius: 0; }
.k-tools__coverage > .k-coverage > .k-heading { margin: 0; font-size: var(--k-fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }

/* Controls and Treatments: the blades' rows, in a section. */
.k-tools__rows { margin-top: 4px; }
.k-tools__rows > .k-tools__item { padding-block: 4px; }
.k-tools__alert { margin: 4px 0 0; color: var(--k-bad-fg); font-weight: 600; }
.k-tools__line { margin: 4px 0 0; }

/* Contained records (ruling 58): one line per register filed here. */
.k-tools__contained { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

/* Linked records: "+ Create linked task" over the section's body. */
.k-tools__spawn { margin-bottom: 8px; }

/* Stage 3: the Assessment card's head on k-card__head; the review line sits
   at the head's end, and the grids start at the top of the body. */
.k-assessment > .k-card__head .k-assessment-review { text-align: right; }
.k-assessment > .k-card__body > .k-assessment-body { margin-top: 0; }

/* ==========================================================================
   DESIGN LANGUAGE — the meeting's and the series' Detail pages (Phase 21, slice 10)

   The meeting's and the series' Detail pages (DL §3.4, §4.3, §5.3, §5.8,
   §5.9, §5.10, §6; Judd's rulings 59 to 63 of 25 October 2026), on slice
   8's parts: the eyebrow, the property strip, the tools panel's sections
   and the headed cards are slice 8's classes, unchanged. Stage 1 adds the
   parts; the meeting page adopts them from stage 2 (the head), stage 3
   (the panel) and stages 4 and 5 (the agenda), the series page in stage 6.
   - The meeting's strip (ruling 62 A): two cells, Agenda time the wider,
     its 10 px bar of one segment per timed item (an aria-hidden SVG whose
     widths are attributes, the k-band-bar pattern); one cell before a
     build. The series' strip is slice 8's four across.
   - The eyebrow's sync chip; Previous and Next in the title row (k-occ-nav).
   - The agenda as a card (DL §5.9): the item card's 22 px number badge,
     brand while open; the dashed footer row with the unplanned time and
     "Add an item"; an open item's tab rail beside its panels, keyed on
     the item's own width (a container query, never the page's): under
     520 px the rail runs across over the panels.
   - The decision card (ruling 61 A): its head, the 14 / 600 sentence and
     the outcome row on .k-outcome (slice 1a's), "Withdraw…" in rose words.
   - The tools panel's people rows (ruling 63 A), the nominate disclosure,
     and the copy box (the attendance sheet's slot and the Series section's
     neighbours left on Judd's walk of 29 October 2026: see the walk
     fixes' block below).
   Nothing reordered (DOM order is the reading order, Phase 18 ruling 14), no
   colour but tokens, one media query — stage 4's 44 px item rail tab on a
   touch screen or a phone, the touch sweep's own query — beside the
   strip's and the item's container queries, and no .k-page touch rule:
   every other control is a .k-btn, a k_actions trigger, a <details>
   summary or a link the existing sweeps already size, and the item rail is
   drawn only in the page, never in a panel, so no #k-panel or
   #k-confirm-panel twin is owed.
   ========================================================================== */

/* The meeting's strip (ruling 62 A): Agenda time twice Attendance's width;
   one cell, the whole width, before the agenda is built. */
.k-meeting-head { margin-top: 12px; container-type: inline-size; }
.k-strip--budget { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.k-strip--budget.k-strip--1 { grid-template-columns: minmax(0, 1fr); }
.k-strip__of { font-weight: 400; color: var(--k-muted); }
.k-strip__facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.k-budget-bar { display: block; width: 100%; height: 10px; border-radius: var(--k-r-pill); overflow: hidden; background: var(--k-divider); }
.k-budget-seg--ok { fill: var(--k-bar-ok); }
.k-budget-seg--over { fill: var(--k-bar-warn); }
@container (max-width: 520px) {
  .k-strip--budget { grid-template-columns: minmax(0, 1fr); }
  .k-strip--budget > .k-strip__cell + .k-strip__cell { border-left: 0; border-top: 1px solid var(--k-divider); }
}

/* The eyebrow's sync chip, and Previous / Next in the title row: a pill of
   two links (the board's "Prev Mon 26 Oct | Next Mon 9 Nov"). */
.k-eyebrow__sync { white-space: nowrap; }
.k-occ-nav { display: inline-flex; align-items: stretch; border: 1px solid var(--k-control); border-radius: var(--k-r-pill); background: var(--k-surface); overflow: hidden; }
.k-occ-nav__link { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 12px; font-size: var(--k-fs-meta); font-weight: 600; color: var(--k-ok-fg); text-decoration: none; white-space: nowrap; }
.k-occ-nav__link + .k-occ-nav__link { border-left: 1px solid var(--k-divider); }
.k-occ-nav__link:hover { background: var(--k-selected); }
@media (max-width: 599px) {
  /* Three links in a nowrap pill reach about 417 px; at phone width the pill
     fits the line and stacks its links, so the page never scrolls sideways. */
  .k-page-header-actions { flex-wrap: wrap; }
  .k-occ-nav { flex-direction: column; max-width: 100%; border-radius: var(--k-r-item); }
  .k-occ-nav__link { white-space: normal; }
  .k-occ-nav__link + .k-occ-nav__link { border-left: 0; border-top: 1px solid var(--k-divider); }
}

/* The agenda as a card (DL §5.9): the items, then the dashed footer row. */
.k-agenda-card > .k-card__head { flex-wrap: wrap; }
.k-agenda-badge {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--k-control);
  border-radius: var(--k-r-pill);
  font-size: var(--k-fs-label);
  font-weight: 600;
  color: var(--k-text-2);
  font-variant-numeric: tabular-nums;
}
details[open] > summary .k-agenda-badge { background: var(--k-brand); border-color: var(--k-brand); color: var(--k-on-brand); }
.k-agenda-card__title { font-size: 15px; font-weight: 600; color: var(--k-text); min-width: 0; overflow-wrap: anywhere; }
.k-agenda-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 10px;
  padding: 12px 16px;
  border: 1px dashed var(--k-control);
  border-radius: var(--k-r-item);
  color: var(--k-muted);
  font-size: var(--k-fs-meta);
}
.k-agenda-footer > .k-agenda-add { margin-top: 0; }

/* An open item's tabs (ruling 60 A; DL §5.9): the 150 px rail of tabs beside
   one panel, keyed on the item's own width; under 520 px the rail runs
   across over the panel. Panels are hidden by kTabs, never by the server,
   so with scripting off every panel shows under the rail's anchors. */
.k-item-tabs { display: flex; align-items: flex-start; gap: 16px; margin-top: 12px; }
/* The container is the item's body, not the tabs themselves: a container
   query styles a container's descendants, never the container (stage 4's
   browser walk found the rail running across beside an empty panel). */
.k-agenda-card__body { container-type: inline-size; }
.k-item-tabs__panels { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.k-item-tabs__panel[hidden] { display: none; }
@container (max-width: 520px) {
  .k-item-tabs { flex-direction: column; align-items: stretch; }
  .k-item-rail { flex: 0 0 auto; flex-direction: row; flex-wrap: wrap; border-right: 0; padding-right: 0; border-bottom: 1px solid var(--k-divider); padding-bottom: 8px; }
}

/* The agenda's item cards (stage 4; ruling 60 A; DL §5.9). Each item is a
   card: the drag handle, the item's <details> (its summary the badge, the
   title, the facts in words and the chevron), the pencil and the "⋯" menu
   across one header row; the body under the summary — the description,
   then the tabs. The blade keeps its classes for the hooks; on the card it
   draws no shadow or wash of its own (DL §9: no drop shadows on cards). */
.k-agenda-item--card {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  column-gap: 4px;
  padding: 2px 6px 2px 2px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-item);
  background: var(--k-surface);
}
.k-agenda-item--card > .k-agenda-blade { grid-column: 2; box-shadow: none; background: transparent; border-radius: 0; }
/* The handle, the pencil and the "⋯" share the card's first grid row, which
   is as tall as the whole card once the item is open. Each is therefore
   pinned to the top and given the summary row's height (--k-agenda-head-h,
   which the summary holds as a minimum), then centred inside it, so they
   stay level with the title and badge whether the item is open or shut. */
.k-agenda-item--card { --k-agenda-head-h: 64px; --k-agenda-edit-h: var(--k-ctl-h); }
.k-agenda-item--card > .k-agenda-card__edit { grid-column: 3; grid-row: 1; align-self: start; margin-top: calc((var(--k-agenda-head-h) - var(--k-agenda-edit-h)) / 2); }
.k-agenda-item--card > .k-agenda-menu { grid-column: 4; grid-row: 1; align-self: start; display: flex; align-items: center; height: var(--k-agenda-head-h); padding-top: 0; }
.k-agenda-item--card > .k-agenda-handle { align-self: start; display: flex; align-items: center; justify-content: center; height: var(--k-agenda-head-h); padding-top: 0; }
.k-agenda-card__summary { display: flex; align-items: center; gap: 10px; min-height: var(--k-agenda-head-h); padding: 10px 8px; border-radius: var(--k-r-item); cursor: pointer; }
.k-agenda-card__summary:hover { background: var(--k-surface-2); }
.k-agenda-card__titles { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.k-agenda-card__facts { font-size: var(--k-fs-meta); color: var(--k-muted); }
.k-agenda-card__chevron { flex: 0 0 auto; display: inline-flex; color: var(--k-muted); transition: transform .15s ease; }
details[open] > .k-agenda-card__summary .k-agenda-card__chevron { transform: rotate(180deg); }
.k-agenda-card__body { padding: 4px 8px 14px; }
/* "Expand all" and "Collapse all": drawn hidden, shown by script. */
.k-agenda-card__toggles { display: inline-flex; align-items: center; gap: 4px; }
.k-agenda-card__toggles[hidden] { display: none; }
/* The footer row's overrun sentence, in amber words; an open "Add an item"
   takes the row's whole width, its form under the time words. */
.k-agenda-footer__over { color: var(--k-warn-fg); font-weight: 600; }
.k-agenda-footer > .k-agenda-add[open] { flex: 1 1 100%; }
/* The item rail's tabs on a touch screen or a phone: 44 px high. */
@media (max-width: 599px), (pointer: coarse) {
  .k-item-rail__tab { height: auto; min-height: 44px; }
}

/* The decision card (ruling 61 A; DL §5.10 without its tally; DR1 and DR2 bring its stages back). */
.k-decision-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--k-border); border-radius: var(--k-r-item); background: var(--k-surface); }
.k-decision-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.k-decision-card__text { margin: 0; font-size: 14px; font-weight: 600; color: var(--k-text); overflow-wrap: anywhere; }
.k-decision-card.k-decision--withdrawn .k-decision-card__text { color: var(--k-muted); font-weight: 400; }
.k-decision-card__outcome { justify-content: flex-end; flex-wrap: wrap; }
.k-decision-card__outcome > .k-meta { margin-right: auto; }
/* The decision card's stage strip (Judd's rulings DR1 and DR2, 30 October
   2026; DL §5.10 with no vote): For review → its outcome, 10 px dots joined
   by a 1 px line, a reached stage's dot filled with the brand. */
.k-decision-stages { display: flex; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--k-muted); }
.k-decision-stages__step { display: inline-flex; align-items: center; gap: 6px; }
.k-decision-stages__step + .k-decision-stages__step::before { content: ""; display: inline-block; width: 28px; height: 1px; margin: 0 8px; background: var(--k-control); }
.k-decision-stages__dot { display: inline-block; width: 10px; height: 10px; border-radius: var(--k-r-pill); border: 1px solid var(--k-control); background: var(--k-surface); }
.k-decision-stages__step--done .k-decision-stages__dot { background: var(--k-brand); border-color: var(--k-brand); }
.k-decision-stages__step[aria-current="step"] { color: var(--k-text); font-weight: 600; }

/* Stage 5: an item's Decisions and Actions tab panels. Each head is the
   half's name and its count in words with its ghost add at the end; with
   nothing in it the half is one empty row whose next step is that add. An
   action is a card as a decision is: the title (with "Done" or "Cancelled"
   as a chip), then the owner and the due date in words (k-due: rose once
   late, never amber), its "Edit" and "⋯" at the end. */
.k-item-tab__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.k-item-tab__head > .k-heading { margin: 0; }
.k-item-tab__head > .k-btn { margin-left: auto; }
.k-action-row--card { padding: 12px 14px; border: 1px solid var(--k-border); border-radius: var(--k-r-item); background: var(--k-surface); }
.k-action-row--card .k-action-title { font-weight: 600; overflow-wrap: anywhere; }

/* The tools' people (ruling 63 A): avatar and name, then the facts — the
   place on the invite, the attendance and response chips — and the row's ⋯
   or "Remove…" at its end. */
.k-meeting-tools__person { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; }
.k-meeting-tools__person > .k-person { grid-column: 1; min-width: 0; }
.k-meeting-tools__facts { grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding-left: 30px; }
.k-meeting-tools__person > :is(.k-actions, .k-btn) { grid-column: 2; grid-row: 1 / span 2; }
.k-meeting-tools__nominate { margin-top: 10px; }
.k-meeting-tools__nominate > summary { list-style: none; }
.k-meeting-tools__nominate > summary::-webkit-details-marker { display: none; }
.k-meeting-tools__nominate[open] > summary { margin-bottom: 8px; }
.k-meeting-tools__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.k-meeting-tools__copy > .k-copy-input { width: 100%; }

/* Stage 6: the series page (plan §2.7). Its Standing items card is the
   agenda card (DL §5.9 without tabs: the same classes, so the same header
   row, badge, footer row and "Retired standing items"); a special item's
   kind is a chip at the top of its body. The Next and Past meetings cards
   hold the home page's rows in the card's body. */
.k-standing-item__kind { margin: 0; }

/* ==========================================================================
   Meetings: Judd's walk fixes (29 October 2026, ruling 104's staging walk)

   - The agenda item card's body takes the card's whole width. The card is
     a grid of the handle, the item's <details>, the pencil and the "⋯"
     menu; the open body sat inside the <details>' column, so the pencil's
     and the menu's columns ran the card's full height and left an empty
     strip down its right side beside every tab panel (decisions, actions,
     files, links). The <details> now spans to the card's end and the two
     controls sit over its summary's right end, which keeps room for them
     (--k-agenda-card-edit, --k-agenda-card-more: their widths and the
     4 px gap; 44 px targets on a touch screen or a phone). The series'
     standing items draw the same card and gain the same. The description
     keeps the prose measure (.k-record-main .k-body, 46em): it is running
     text.
   - The notes editors (Shared notes, live and scripting off; My notes) fill
     the tab (.k-notes-editor). The editing surface is also a .k-body, which
     the record column holds to 46em; the editor here is the page's work,
     not running text, so that measure does not apply. Its height follows the window — at least 55% of it,
     never under 240 px — and grows with what is written. In the Meetings
     list's side panel (.k-notes-editor--panel) it fills the panel's width
     and starts at 35% of the window, never under 200 px.
   - The Attendees section: one line a person — the avatar, whose ring is
     the Outlook response for those who may see it (k-avatar--ring-ok,
     -bad, -neutral, on tokens; the avatar's own words say it too, so
     colour never carries it alone), the name, the invite place where it is
     not Required, then "Present" as a tick box for those who write the
     minutes, and the organiser's "⋯".
   - History folds closed (k-meeting-tools__fold): its label row is the
     <details>' summary, its chevron turned while open.
   ========================================================================== */
.k-agenda-item--card { --k-agenda-card-edit: 0px; --k-agenda-card-more: 0px; }
.k-agenda-item--card:has(> .k-agenda-card__edit) { --k-agenda-card-edit: calc(var(--k-ctl-h) + 4px); }
.k-agenda-item--card:has(> .k-agenda-menu) { --k-agenda-card-more: 32px; }
.k-agenda-item--card > .k-agenda-blade { grid-column: 2 / -1; }
.k-agenda-item--card > .k-agenda-blade > .k-agenda-card__summary { padding-right: calc(8px + var(--k-agenda-card-edit) + var(--k-agenda-card-more)); }

/* The agenda item form's first row: Title takes what is left, Minutes and
   Presenter keep their own width. Flex-wrap does the narrow case, with no
   query: when Title's basis plus the other two no longer fit the space the
   form actually has (the centre pane, the panel), the fields stack. */
.k-agenda-item-fields { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 16px; }
.k-agenda-item-fields > .k-field { min-width: 0; }
.k-agenda-item-fields > .k-field:first-child { flex: 1 1 18em; }
.k-agenda-item-fields > .k-field:nth-child(2) { flex: 0 0 auto; }
.k-agenda-item-fields > .k-field:nth-child(2) > .k-field-input { width: 7em; max-width: 100%; }
.k-agenda-item-fields > .k-field:nth-child(3) { flex: 0 1 auto; max-width: 100%; }

.k-notes-editor .k-rt .k-rt-prosemirror { max-width: none; }
.k-notes-editor .k-rt .k-rt-prosemirror,
.k-notes-editor .k-rt .k-rt-source { min-height: max(240px, 55vh); }
.k-notes-editor.k-notes-editor--panel .k-rt .k-rt-prosemirror,
.k-notes-editor.k-notes-editor--panel .k-rt .k-rt-source { min-height: max(200px, 35vh); }

.k-avatar.k-avatar--ring-ok { box-shadow: 0 0 0 1px var(--k-surface), 0 0 0 3px var(--k-ok-fg); }
.k-avatar.k-avatar--ring-bad { box-shadow: 0 0 0 1px var(--k-surface), 0 0 0 3px var(--k-bad-fg); }
.k-avatar.k-avatar--ring-neutral { box-shadow: 0 0 0 1px var(--k-surface), 0 0 0 3px var(--k-faint); }
.k-meeting-tools__attendee { display: flex; align-items: center; gap: 8px; min-height: var(--k-ctl-h-sm); }
.k-meeting-tools__attendee > .k-person { flex: 1 1 auto; min-width: 0; }
.k-meeting-tools__kind { flex: 0 0 auto; white-space: nowrap; }
.k-meeting-tools__present { flex: 0 0 auto; align-items: center; }
.k-meeting-tools__present > input[type="checkbox"] { margin: 0; }
.k-meeting-tools__attendance-note { margin: 8px 0 0; }
.k-meeting-tools__attendance-save { margin-top: 10px; }

.k-meeting-tools__fold > summary { list-style: none; cursor: pointer; }
.k-meeting-tools__fold > summary::-webkit-details-marker { display: none; }
.k-meeting-tools__fold:not([open]) > summary { margin-bottom: 0; }
.k-meeting-tools__fold > summary:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 2px; border-radius: var(--k-r-item); }
.k-meeting-tools__chevron { flex: 0 0 auto; display: inline-flex; color: var(--k-muted); transition: transform .15s ease; }
.k-meeting-tools__fold[open] > summary .k-meeting-tools__chevron { transform: rotate(180deg); }

@media (max-width: 599px), (pointer: coarse) {
  .k-agenda-item--card:has(> .k-agenda-card__edit) { --k-agenda-card-edit: 48px; }
  .k-agenda-item--card:has(> .k-agenda-menu) { --k-agenda-card-more: 48px; }
  .k-agenda-item--card { --k-agenda-edit-h: 44px; }
  .k-meeting-tools__present { min-width: 44px; min-height: 44px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .k-meeting-tools__chevron { transition: none; }
}

/* ==========================================================================
   DESIGN LANGUAGE — the Configuration Detail shell (Phase 21, slice 11)

   A Configuration record's Detail page (DL §3.4, §4.3, §5.3, §5.8; Judd's
   rulings 65 to 69 of 25 October 2026), on slices 8 to 10's parts: the
   eyebrow, the property strip, the tools panel's sections and the headed
   cards are their classes, unchanged. Stage 1 adds the parts; the fifteen
   pages of configuration/detail_page.html take the head in stage 2
   (ruling 67 A), the records their strips, one column and panels in
   stages 3 to 6.
   - The head: the strip under the title in its own container, so its
     container queries (slice 8's: four across, then two, then one) key on
     the strip's width, never the page's; a box's value may be a link, and
     a box's tone colours its value as its meta (stage 5: a role's
     "Drifted" in rose, ruling 68 A).
   - The record in one column (plan §7 reading 11): no
     .k-form-layout--related on a record page; its cards take the column's
     width (Phase 33, D1: they were held to the 760 px form column).
   - The tools' bodies in the panel; a role's Holders rows (ruling 68 A):
     avatar and name, then the path and the membership on one meta line,
     the row's "⋯" at its end (24 px avatars: k_avatar draws 24, 32 or 44).
   - A workflow's Live version card (ruling 69 A): the server's drawing in a
     box that scrolls sideways inside its card, never the page, then the
     outline; the never-published line and its one next step.
   Nothing reordered (DOM order is the reading order), no colour but
   tokens, one media query — the touch sweep's own, for the strip's links
   and the tools' label-row links, each #k-panel and #k-confirm-panel rule
   first with its .k-page twin (the tools page draws the same sections in
   the page) — beside the strip's container queries. No print rule: these
   pages have no print view.
   ========================================================================== */

/* The head (ruling 66 A): the strip, keyed on its own width. */
.k-config-head { margin-top: 12px; container-type: inline-size; }
.k-strip__link { overflow-wrap: anywhere; }
.k-strip__value--bad,
.k-strip__value--bad > .k-strip__link { color: var(--k-bad-fg); }

/* The record in one column (plan §7 reading 11). */
.k-config-detail { display: flex; flex-direction: column; min-width: 0; }

/* The tools' bodies (ruling 65 A): a card's body, drawn in a 320 px section. */
.k-config-tools__body { min-width: 0; overflow-wrap: anywhere; }
.k-config-tools__body > :first-child { margin-top: 0; }

/* A role's Holders (ruling 68 A). */
.k-holders__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; }
.k-holders__row > .k-person { grid-column: 1; min-width: 0; }
.k-holders__facts { grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding-left: 30px; }
.k-holders__row > .k-actions { grid-column: 2; grid-row: 1 / span 2; }
/* "Grant to a group instead…" under a direct grant (Permissions slice 4). */
.k-holders__convert { grid-column: 1; justify-self: start; margin-left: 30px; }
.k-convert__person { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.k-config-tools__body > .k-holders + .k-card,
.k-config-tools__body > .k-holders + .k-disclosure,
.k-config-tools__body > .k-empty-row + .k-card { margin-top: 16px; }

/* A workflow's Live version card (ruling 69 A; plan §7 reading 16). */
.k-live-version__drawing { overflow-x: auto; max-width: 100%; padding-bottom: 4px; }
.k-live-version__drawing + .k-wfe-outline { margin-top: 16px; }
.k-live-version__none { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.k-live-version__none > .k-empty-row { margin: 0; }

/* Touch: the strip's links and the tools' label-row links, 44 px. */
@media (max-width: 599px), (pointer: coarse) {
  #k-panel .k-strip__link,
  #k-panel .k-config-tools__link,
  #k-confirm-panel .k-strip__link,
  #k-confirm-panel .k-config-tools__link { display: inline-flex; align-items: center; min-height: 44px; }
  .k-page .k-strip__link,
  .k-page .k-config-tools__link { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ==========================================================================
   DESIGN LANGUAGE — the Overview pages (Phase 21, slice 12)

   The Overview archetype (DL §4.1, §5.3, §5.4, §5.5, §6; Judd's rulings 72
   to 76 of 25 October 2026) for the Work home and a workspace's home, on
   slices 1a to 11's parts: .k-cols for the two columns, the property strip
   for the summary strip, .k-card > .k-card__head for the cards, .k-grid-row
   for the queue rows, .k-band-bar's SVG segments for every bar, .k-row-head
   for a day, .k-my-action and .k-tick for an action. Stage 1 adds the parts,
   unused; the home takes them in stage 2, a workspace's home in stage 3.
   - The summary strip: a modifier (.k-strip--summary), so no Detail strip
     moves — cells padded 16 24, the numeral 30 / 300, warn when a count
     above zero asks for attention, a faint dash when there is nothing to
     count — in a container of its own, so slice 8's container queries key on
     the strip's width (four across, 2 × 2 under a 762 px row, DL §3.5).
   - The queues (.k-grid--queue): key 72, title, person 160, due 128; under
     600 px of card the person folds under the title.
   - The team rows, Workload and By state, Epics in flight's compact rows,
     Yours in this workspace, Coming up.
   Nothing reordered (DOM order is the reading order), no colour but tokens,
   no media query but the container queries, no #k-panel or #k-confirm-panel
   rule (the overviews draw no panel of their own), no print rule.
   ========================================================================== */

/* The summary strip (DL §4.1 item 2, §5.3). */
.k-overview-strip { container-type: inline-size; }
.k-strip--summary .k-strip__cell { padding: 16px 24px; }
.k-strip__num--lg { font-size: var(--k-fs-title); font-weight: 300; line-height: 1.15; }
.k-strip__num--warn { color: var(--k-warn-fg); }
.k-strip__num--bad { color: var(--k-bad-fg); }
.k-strip__num--dash { color: var(--k-faint); }
.k-strip__num-link { text-decoration: none; }
.k-strip__num-link:hover,
.k-strip__num-link:focus-visible { text-decoration: underline; }
/* A numeral that filters a list in place (Phase 33, D4): the Work home's four
   tiles. A toggle button drawn as the numeral; the pressed tile reads as the
   selected row does (--k-selected) with the brand underline. */
.k-strip__num-btn { appearance: none; background: none; border: 0; padding: 0; margin: 0; font-family: inherit; text-align: left; cursor: pointer; }
.k-strip__cell:has(> .k-strip__num-btn[aria-pressed="true"]) { background: var(--k-selected); box-shadow: inset 0 -2px 0 var(--k-brand); }

/* Bars (DL §6: a 6 px pill on --k-divider). */
.k-overview-bar { width: 100%; height: 6px; border-radius: var(--k-r-pill); background: var(--k-divider); }

/* The queues (DL §5.5): key, title, person, due. */
.k-queue { container-type: inline-size; }
.k-grid--queue .k-grid-row { grid-template-columns: 72px minmax(0, 1fr) 160px 128px; }
.k-grid--queue .k-grid-row:last-child { border-bottom: 0; }
.k-queue__key { font-size: var(--k-fs-meta); color: var(--k-muted); font-variant-numeric: tabular-nums; }
.k-queue__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.k-queue__title { font-size: var(--k-fs-row); font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-queue__line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.k-queue__who { min-width: 0; }
.k-queue__due { justify-self: end; }
.k-queue__due .k-btn[aria-pressed="true"] { background: var(--k-ok-bg); color: var(--k-brand); }
@container (max-width: 599px) {
  .k-grid--queue .k-grid-row { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .k-grid--queue .k-queue__who { grid-column: 2; grid-row: 2; }
}
/* A plain list in the queue's card (no key or person column): the name takes the
   remaining width and the due date sits at the end. Beats both queue rules above. */
.k-grid--queue.k-grid--list .k-grid-row { grid-template-columns: minmax(0, 1fr) auto; }
/* Shared end column (Phase 33 U21): the card sets the two columns once and each row takes
   them through a subgrid, so every row's right cell (a date, or hours and a button) shares one
   column and one vertical centre. */
.k-grid--queue.k-grid--list.k-grid--shared-end { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
.k-grid--shared-end > .k-grid-row { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: center; }
.k-grid--queue.k-grid--list.k-grid--shared-end > .k-grid-row { grid-template-columns: subgrid; }
.k-grid--shared-end .k-queue__due { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; align-self: center; }

/* Nobody's avatar (DL §5.2: the dashed empty slot). */
.k-avatar--nobody { background: transparent; border: 1px dashed var(--k-faint); }

/* Your teams (the Work home; DL §12 "team rows with bars"). */
.k-team-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 14px 20px; border-bottom: 1px solid var(--k-divider); }
.k-team-row:last-child { border-bottom: 0; }
.k-team-row__main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.k-team-row__name { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--k-fs-row); font-weight: 600; }
.k-team-row__desc,
.k-team-row__caption { margin: 0; }
.k-team-row__stats { display: flex; gap: 16px; margin: 0; }
.k-team-row__stats dd { margin: 0; }
.k-team-row__warn { color: var(--k-warn-fg); }
.k-team-row__go { display: flex; align-items: center; gap: 8px; }

/* Workload and By state (one card). The rows' selectors carry the OFI
   pipeline's stage rows (.k-report-stages__*, Phase 21 slice 14, plan
   §2.6), which draw the same markup: a label, its count, the bar beneath. */
.k-workload__rows,
.k-report-stages__rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.k-workload__row,
.k-report-stages__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; }
.k-workload__row > .k-overview-bar,
.k-report-stages__row > .k-overview-bar { grid-column: 1 / -1; }
.k-workload__counts,
.k-report-stages__counts { white-space: nowrap; }
.k-state-split { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--k-divider); }
.k-state-split__head { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; }

/* Epics in flight, compact (plan reading 12). */
.k-epic-rows { list-style: none; margin: 0; padding: 0; }
.k-epic-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 20px; border-bottom: 1px solid var(--k-divider); }
.k-epic-row:last-child { border-bottom: 0; }
.k-epic-row__title { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--k-fs-row); font-weight: 600; }
.k-epic-row__progress { display: flex; align-items: center; gap: 8px; }
.k-epic-row__bar {
  flex: 1 1 auto;
  height: 6px;
  border: 0;
  border-radius: var(--k-r-pill);
  background: var(--k-divider);
  color: var(--k-brand);
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
}
.k-epic-row__bar::-webkit-progress-bar { background: var(--k-divider); border-radius: var(--k-r-pill); }
.k-epic-row__bar::-webkit-progress-value { background: var(--k-brand); border-radius: var(--k-r-pill); }
.k-epic-row__bar::-moz-progress-bar { background: var(--k-brand); border-radius: var(--k-r-pill); }
.k-epic-row__due { margin: 0; }

/* Yours in this workspace (ruling 75). */
.k-yours__stats { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0; }
.k-yours__stats dd { margin: 0; }

/* Coming up (ruling 72): a day header, then its meetings. */
.k-coming-up .k-row-head { margin: 0; }
.k-coming-up__row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; padding: 10px 20px; border-bottom: 1px solid var(--k-divider); }
.k-coming-up__row:last-child { border-bottom: 0; }
.k-coming-up__time { flex: 0 0 64px; padding-top: 1px; font-variant-numeric: tabular-nums; }
.k-coming-up__main { flex: 1 1 160px; min-width: 0; }
.k-coming-up__subject { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--k-fs-row); font-weight: 600; }
.k-coming-up__cadence { margin: 2px 0 0; }
.k-coming-up__act { flex: 0 0 auto; }

/* Stage 2, the Work home. The two columns keep DL §4.1's two to one, on bases
   that still sit side by side in the 740 px main of a 1,100 px window with the
   sidebar and the rail inline (520 + 320 + 24 wraps there), and stack in the
   540 px of a 900 px one. */
.k-cols--overview > .k-cols__main { flex: 2 1 380px; }
.k-cols--overview > .k-cols__side { flex: 1 1 280px; }
/* The strip sits a step below the heading, as the List pages' filter row does. */
.k-overview-strip { margin-top: 20px; }
/* The Show switch's word (ruling 73), which names the switch beside it. */
.k-page-header-view-label { align-self: center; }

/* ==========================================================================
   DESIGN LANGUAGE — the other Overview pages (Phase 21, slice 13)

   The Overview archetype (DL §4.1, §5.3, §5.5, §6; Judd's rulings 77 to 81
   of 26 October 2026) for Governance, Compliance, Helpdesk, Configuration and
   scheduler health, on slices 1a to 12's parts: the summary strip
   (ui/overview/strip.html, moved from the work app), .k-cols--overview,
   .k-card > .k-card__head, .k-grid-row with a .k-grid--<table> modifier, the
   queue rows' cells (.k-queue__*), .k-band-bar's SVG segments for every bar.
   Stage 1 adds the parts, unused; Governance takes them in stage 2,
   Compliance and Helpdesk in stage 3, Configuration and scheduler health in
   stage 4.
   - "New entry ▾": the bar's primary as a <details data-k-popover> menu.
   - The cascade (ruling 77): .k-grid--gov-cascade's columns (amended in
     place in slice 1a's block), the level indent a custom property per depth
     class (no inline style), the eye select button, the pressed row, the
     branch toggle; under 900 px of card the domain and approval date fold
     under the title, under 600 px they and the status give way.
   - The panel's In the cascade (ruling 78), the Compliance lists, Risks by
     residual rating and Registers (ruling 79), Helpdesk's queue and SLA rows
     (ruling 80), Configuration's group rows (ruling 81), scheduler health's
     backlog rows and its log tails' card.
   Nothing reordered (DOM order is the reading order), no colour but tokens,
   no media query but the container queries, the touch block and reduced
   motion, no #k-panel or #k-confirm-panel rule (the panel's section reuses
   .k-panel__section and .k-item-panel__facts), no print rule.
   ========================================================================== */

/* "New entry ▾" (plan reading 4; DL §3.2): one primary, its chevron a menu. */
.k-new-menu { position: relative; display: inline-flex; }
.k-new-menu__btn { list-style: none; gap: 6px; }
.k-new-menu__btn::-webkit-details-marker { display: none; }
.k-new-menu__btn svg { flex: 0 0 auto; }
.k-new-menu__panel { left: auto; right: 0; }

/* The Governance cascade (ruling 77): one card, a nested table. */
.k-cascade-card { container-type: inline-size; }
.k-cascade__caption { margin: 0; padding: 8px 20px 0; max-width: 42em; }
.k-cascade__foot { margin: 0; padding: 10px 20px 14px; }
.k-cascade__empty { margin: 0; padding: 12px 20px; }
.k-cascade__group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 20px 6px; border-bottom: 1px solid var(--k-divider); }
.k-cascade__group .k-cascade__caption { flex-basis: 100%; padding: 0; }
.k-cascade__group-title { margin: 0; font-size: var(--k-fs-row); font-weight: 600; color: var(--k-text); }
.k-cascade-row { --k-cascade-indent: 0px; }
.k-cascade-row--d1 { --k-cascade-indent: 24px; }
.k-cascade-row--d2 { --k-cascade-indent: 48px; }
.k-cascade-row--d3 { --k-cascade-indent: 72px; }
.k-cascade-row:has([data-k-row-select][aria-pressed="true"]) { background: var(--k-selected); }
.k-cascade-row__select { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--k-r-box); background: transparent; color: var(--k-muted); cursor: pointer; font: inherit; }
.k-cascade-row__select:hover { background: var(--k-surface-2); color: var(--k-brand); }
.k-cascade-row__select[aria-pressed="true"] { color: var(--k-brand); background: var(--k-ok-bg); }
.k-cascade-row__key { font-size: var(--k-fs-meta); color: var(--k-muted); font-variant-numeric: tabular-nums; }
.k-cascade-row__main { display: flex; align-items: baseline; gap: 8px; min-width: 0; padding-left: var(--k-cascade-indent); }
.k-cascade-row__tag { flex: 0 0 auto; font-size: var(--k-fs-label); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--k-muted); }
.k-cascade-row__title { min-width: 0; font-size: var(--k-fs-row); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-cascade-row__domain,
.k-cascade-row__approved { min-width: 0; font-size: var(--k-fs-meta); color: var(--k-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-cascade-row__due { justify-self: end; }
.k-cascade-branch > summary { list-style: none; }
.k-cascade-branch > summary::-webkit-details-marker { display: none; }
.k-cascade-branch__toggle { display: flex; align-items: center; gap: 6px; padding: 6px 20px 6px calc(156px + var(--k-cascade-indent) + 24px); border-bottom: 1px solid var(--k-divider); font-size: var(--k-fs-meta); color: var(--k-muted); cursor: pointer; }
.k-cascade-branch__toggle:hover { color: var(--k-brand); }
.k-cascade-branch__chevron { display: inline-flex; transition: transform .15s ease; }
.k-cascade-branch[open] > .k-cascade-branch__toggle .k-cascade-branch__chevron { transform: rotate(90deg); }
@container (max-width: 899px) {
  .k-grid--gov-cascade .k-grid-head,
  .k-grid--gov-cascade .k-grid-row { grid-template-columns: 40px 72px minmax(0, 1fr) 112px 150px; }
  .k-grid--gov-cascade .k-grid-head .k-cascade-row__domain,
  .k-grid--gov-cascade .k-grid-head .k-cascade-row__approved { display: none; }
  .k-cascade-row > .k-cascade-row__domain { grid-column: 3; grid-row: 2; padding-left: var(--k-cascade-indent); }
  .k-cascade-row > .k-cascade-row__approved { grid-column: 4 / -1; grid-row: 2; }
}
@container (max-width: 599px) {
  .k-grid--gov-cascade .k-grid-head { display: none; }
  .k-grid--gov-cascade .k-grid-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .k-cascade-row > .k-cascade-row__key,
  .k-cascade-row > .k-cascade-row__status,
  .k-cascade-row > .k-cascade-row__approved { display: none; }
  .k-cascade-row > .k-cascade-row__domain { grid-column: 2; grid-row: 2; }
  .k-cascade-branch__toggle { padding-left: calc(72px + var(--k-cascade-indent) + 24px); }
}

/* Phase 32 slice 2, P4: the Governance cascade's Coverage column.
   Merge after the .k-grid--gov-cascade block (kairos.css ~10097). Two-class selectors, so order is safe. */
.k-grid--gov-cascade.k-grid--gov-cascade-cov .k-grid-head,
.k-grid--gov-cascade.k-grid--gov-cascade-cov .k-grid-row { grid-template-columns: 40px 72px minmax(0, 1fr) 112px 210px 140px 112px 150px; }
.k-cascade-row__coverage { min-width: 0; font-size: var(--k-fs-meta); color: var(--k-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-cascade-row__coverage--none { color: var(--k-muted); }
@container (max-width: 899px) {
  .k-grid--gov-cascade.k-grid--gov-cascade-cov .k-grid-head,
  .k-grid--gov-cascade.k-grid--gov-cascade-cov .k-grid-row { grid-template-columns: 40px 72px minmax(0, 1fr) 112px 150px; }
  .k-grid--gov-cascade-cov .k-grid-head .k-cascade-row__coverage { display: none; }
  .k-cascade-row > .k-cascade-row__coverage { grid-column: 3; grid-row: 3; padding-left: var(--k-cascade-indent); }
}
@container (max-width: 599px) {
  .k-grid--gov-cascade.k-grid--gov-cascade-cov .k-grid-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .k-cascade-row > .k-cascade-row__coverage { grid-column: 2; grid-row: 3; }
}

/* The entry panel's In the cascade (ruling 78). */
.k-cascade-panel__link { text-decoration: none; }
.k-cascade-panel__link:hover { text-decoration: underline; }
.k-cascade-panel__below { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.k-cascade-panel__row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }

/* The Compliance lists (ruling 79): key, title, date — slice 12's queue
   cells without the person column. */
.k-grid--register-queue .k-grid-row { grid-template-columns: 72px minmax(0, 1fr) 150px; }
.k-grid--register-queue .k-grid-row:last-child { border-bottom: 0; }
@container (max-width: 599px) {
  .k-grid--register-queue .k-grid-row { grid-template-columns: 56px minmax(0, 1fr) auto; }
}

/* Risks by residual rating and Registers (ruling 79). */
.k-bands-card .k-landing-kpi { margin: 0; }
.k-registers-card__rows { list-style: none; margin: 0; padding: 0; }
.k-registers-card__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 12px 20px; border-bottom: 1px solid var(--k-divider); }
.k-registers-card__row:last-child { border-bottom: 0; }
.k-registers-card__name { font-size: var(--k-fs-row); font-weight: 600; }

/* Helpdesk (ruling 80): a workspace's queues, SLA by workspace. The SLA
   rows' selectors carry the SLA attainment report's (.k-report-sla__*,
   Phase 21 slice 14, plan §2.3), which draws the same markup. */
.k-hd-queues__rows,
.k-hd-sla__rows,
.k-report-sla__rows { list-style: none; margin: 0; padding: 0; }
.k-hd-queues__row { border-bottom: 1px solid var(--k-divider); }
.k-hd-queues__row:last-child { border-bottom: 0; }
/* Stage 3: each row is one link holding the queue's name and its count, as
   Wave 2's summary drew it (the name and the badge read as one target). */
.k-hd-queues__link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; font-size: var(--k-fs-row); font-weight: 600; text-decoration: none; }
.k-hd-queues__link:hover > span:first-child { text-decoration: underline; }
.k-hd-sla__row,
.k-report-sla__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 12px 20px; border-bottom: 1px solid var(--k-divider); }
.k-hd-sla__row:last-child,
.k-report-sla__row:last-child { border-bottom: 0; }
.k-hd-sla__row > .k-overview-bar,
.k-report-sla__row > .k-overview-bar { grid-column: 1 / -1; }
.k-hd-sla__name,
.k-report-sla__name { font-size: var(--k-fs-row); font-weight: 600; }
.k-hd-sla__counts,
.k-report-sla__counts { white-space: nowrap; }

/* Configuration's groups (ruling 81): an index, a row per section. Their
   selectors carry the Reports landing's (.k-report-index__*, Phase 21
   slice 14, plan §2.1), an index of the same shape: a row per report. */
.k-config-home-group__rows,
.k-report-index__rows { list-style: none; margin: 0; padding: 0; }
.k-config-home-group__row,
.k-report-index__row { display: flex; flex-direction: column; gap: 2px; padding: 12px 20px; border-bottom: 1px solid var(--k-divider); }
.k-config-home-group__row:last-child,
.k-report-index__row:last-child { border-bottom: 0; }
.k-config-home-group__name,
.k-report-index__name { font-size: var(--k-fs-row); font-weight: 600; }

/* Scheduler health's backlogs (plan §2.5): a row per figure. The rows'
   selectors carry the risk heat map's "Not in a cell" rows
   (.k-report-cells__*, Phase 21 slice 14, plan §2.4), which draw the same
   markup: a label, its count, what it means. */
.k-backlog__caption { margin: 0; padding: 12px 20px 0; }
.k-backlog__rows,
.k-report-cells__rows { margin: 0; padding: 4px 0 0; }
.k-backlog__row,
.k-report-cells__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 10px 20px; border-bottom: 1px solid var(--k-divider); }
.k-backlog__row:last-child,
.k-report-cells__row:last-child { border-bottom: 0; }
.k-backlog__label,
.k-report-cells__label { font-size: var(--k-fs-row); font-weight: 600; }
.k-backlog__count,
.k-report-cells__count { margin: 0; font-size: var(--k-fs-card); font-variant-numeric: tabular-nums; }
.k-backlog__count--warn { color: var(--k-warn-fg); }
.k-backlog__note,
.k-report-cells__note { grid-column: 1 / -1; margin: 0; }
/* Stage 4: the automations backlog's closing sentence (its one recovery). */
.k-backlog__foot { margin: 0; padding: 10px 20px 14px; border-top: 1px solid var(--k-divider); }
/* Stage 4: What those jobs said, one card in the left column, a divided
   entry per job (the log tail's own .k-health-log rule is Phase 18's). */
.k-health-logs__caption { margin: 0; padding: 12px 20px 4px; }
.k-health-logs__entry { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px 20px; border-top: 1px solid var(--k-divider); }
.k-health-logs__entry > .k-row { flex-wrap: wrap; }
.k-health-logs__entry .k-subheading { margin: 0; }

/* 44 px targets on a phone and any touch screen (DL §3.5): the cascade's
   eye buttons and branch toggles, the New entry menu's rows, the queue,
   register, SLA and section rows' links. */
@media (max-width: 599px), (pointer: coarse) {
  .k-cascade-row__select { width: 44px; height: 44px; }
  .k-cascade-branch__toggle { min-height: 44px; }
  .k-new-menu__panel .k-chip-choice { min-height: 44px; }
  .k-hd-queues__link { min-height: 44px; }
  .k-registers-card__name,
  .k-config-home-group__name,
  .k-report-index__name,
  .k-hd-sla__name { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .k-cascade-branch__chevron { transition: none; }
}

/* ==========================================================================
   DESIGN LANGUAGE — the reports (Phase 21, slice 14)

   The five launch reports on the Overview archetype (DL §4.1, §5.3, §6;
   Judd's rulings 82 to 85 of 26 October 2026) and the Reports page as an
   index, on slices 12 and 13's parts: the summary strip, .k-card--headed,
   Helpdesk's SLA rows and Configuration's group rows (their rules carry the
   reports' selectors in place, in slice 13's block), the overview bar. Stage
   2 draws the landing, workspace throughput and SLA attainment; stage 3 the
   heat map, control coverage and the OFI pipeline (scheduler health's
   backlog rows and the Work overview's workload rows carry their selectors
   in place); stage 4 the committee report.
   - The report tabs stay under each report's title (ruling 82) and wrap
     onto a second line from 600 px rather than hide tabs past the row's
     edge; below 600 px the row still swipes. A rule on the link tab row
     (nav.k-tabs) only: a row that fits — every automation and portal row —
     never wraps, so nothing else moves.
   - On track is drawn in the design language's second green (--k-bar-ok-2),
     a report-only tone, so it does not run into Met where the two meet
     (plan reading 9); no shared segment changes.
   - The heat map's matrix sits in a headed card, whose padding is its
     body's; on a phone the body keeps the 8 px sides the matrix was fitted
     to (Wave 2's walk #1), which .k-heat-card's own rule no longer reaches.
   - The summary strip's links — a numeral opening the list it counts, a
     dash cell's next step — are 44 px targets on a phone and any touch
     screen (DL §3.5), on every overview page that draws them: the shared
     strip had no such rule.
   - The committee report (ruling 84 A) is laid out like a meeting's
     minutes on screen: its figure cards here; its figures two by two from
     600 px and its withdrawn line, amended in place in the committee's own
     block. Its printed copy is the print block's, unchanged.
   Nothing reordered, no colour but tokens, no #k-panel or #k-confirm-panel
   rule, no print rule (the print block hides the tabs and the switch).
   ========================================================================== */

/* SLA attainment (plan §2.3): on track's tone, and the caption under each
   policy's bar across its row. */
.k-band-seg--ok-2 { fill: var(--k-bar-ok-2); }
.k-band-swatch--ok-2 { background: var(--k-bar-ok-2); }
.k-report-sla__caption { grid-column: 1 / -1; margin: 0; }

/* A report table's note naming the columns left out (§8.11), under it. */
.k-report-table__note { margin: 8px 0 0; }

/* Ruling 82: the report tabs wrap rather than hide a report. */
@media (min-width: 600px) {
  nav.k-tabs { flex-wrap: wrap; }
}

/* The risk heat map (plan §2.4, reading 11): inside a headed card the
   matrix's phone padding is the body's (.k-card--headed { padding: 0 } beats
   .k-heat-card { padding-inline: 8px }, and the body's 20 px sides would
   squeeze the grid to about 270 px at 360 and clip "Row total"). */
@media (max-width: 599px) {
  .k-heat-card > .k-card__body { padding-inline: 8px; }
}

/* The summary strip's links as 44 px targets (DL §3.5; plan §1.5b): every
   overview page's numeral links and dash cells' next steps. */
@media (max-width: 599px), (pointer: coarse) {
  .k-strip__num-link,
  .k-strip--summary .k-strip__meta a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* The committee report (ruling 84 A; plan §2.7): each figure a card on the
   design language — the label, the numeral at 30 / 300 (the page title's
   size, DL §2.2) with "of m" beside it, the change since the report it is
   compared with, the definition beneath its divider (the committee block's
   own rules). */
.k-committee-figure__label { margin: 0; }
.k-committee-figure__num {
  margin: 0;
  font-size: var(--k-fs-title);
  font-weight: 300;
  line-height: 1.15;
  color: var(--k-text);
  font-variant-numeric: tabular-nums;
}
.k-committee-figure__num--dash { color: var(--k-muted); }
.k-committee-figure__change { margin: 0; }

/* ==========================================================================
   DESIGN LANGUAGE — forms, confirmations and empty states (Phase 21, slice 15)

   The rules with no old counterpart (plan §3 item 1); the six components'
   existing rules are restyled in place in their own stages. Stage 1 adds the
   opener of a destructive act, k-btn--danger (Judd's ruling 87; DL §5.2:
   "ghost with --k-bad-fg text and end with an ellipsis"), which k_button
   draws for variant="danger" and every opener of a destructive act draws
   from stage 2; the act itself stays k-btn--destructive. Stage 2 adds the
   confirmation's contents; stages 3 and 4 the radio group's reset, the empty
   row's text, an empty table's inset and the toast's tone mark and stillness.
   Tokens only: no typed colour, no reordering, no rule naming the side
   panel's or the confirmation box's id, no print rule (print hides every
   button).
   -------------------------------------------------------------------------- */
.k-btn--danger { background: transparent; color: var(--k-bad-fg); padding: 0 10px; }
.k-btn--danger:hover { background: var(--k-bad-bg); color: var(--k-bad-fg); text-decoration: none; }
/* A person's tools: the confirmation of "Remove…" opens under its opener in a native <details>. */
.k-tools__remove > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.k-tools__remove > summary::-webkit-details-marker { display: none; }
.k-tools__remove[open] > summary { margin-bottom: 8px; }

/* The confirmation's contents (Judd's ruling 92; plan §2.2 and reading 18).
   The frame (.k-modal-panel) is a column no taller than the window, so the
   confirmation is a column too and its body scrolls between the title and
   the buttons. Its head and close take the side panel's values (.k-panel__head,
   .k-panel__title, .k-panel__close), so the two overlays' heads match; the
   44 px close on a touch screen or a phone stays. The slide-over shares
   .k-modal-head and .k-overlay-close and does not change. */
.k-confirm { display: flex; flex-direction: column; min-height: 0; }
.k-confirm .k-modal-body { overflow-y: auto; min-height: 0; }
.k-confirm .k-modal-head { gap: 8px; padding: 14px 20px; border-bottom-color: var(--k-divider); }
.k-confirm .k-modal-head > .k-heading { margin: 0; font-size: var(--k-fs-card); font-weight: 600; }
.k-confirm .k-overlay-close { flex: 0 0 auto; width: 32px; height: 32px; border-radius: var(--k-r-pill); color: var(--k-text-2); }
.k-confirm .k-overlay-close:hover { background: var(--k-surface-2); color: var(--k-text); }
.k-confirm .k-overlay-close svg { width: 16px; height: 16px; }
@media (max-width: 599px), (pointer: coarse) {
  .k-confirm .k-overlay-close { width: 44px; height: 44px; }
}

/* Fields (Judd's rulings 86 and 91; plan §2.3). A radio group and the icon
   picker are fieldset.k-field: without this they draw the browser's groove
   and its padding round the choices. Only the inline margin goes, so the
   16 px between fields stays. */
fieldset.k-field { border: 0; padding: 0; margin-inline: 0; min-inline-size: 0; }
fieldset.k-field > legend { padding: 0; }
/* A tick box, a radio or a switch in error takes the error's dark red edge
   until it is chosen, as a text box in error does. On a touch screen the
   tick box's edge is an inset shadow inside its 44 px box (5.9), so the
   error draws there. */
.k-field.has-error .k-check input:not(:checked) { border-color: var(--k-bad-fg); }
.k-field.has-error .k-toggle input:not(:checked)::before { border-color: var(--k-bad-fg); }
@media (max-width: 599px), (pointer: coarse) {
  .k-field.has-error .k-check input:not(:checked) { border-color: transparent; box-shadow: inset 0 0 0 1px var(--k-bad-fg); }
}

/* The empty row (Judd's ruling 90; plan §2.6, readings 15 and 16): its
   sentence — the title and the quieter clause after " · " — takes the room
   and wraps; the step, a small ghost button, sits at the row's end and drops
   under the sentence only when the two cannot share a line. A table with no
   rows draws its row inside the table's card, inset by a card body's padding,
   so the dashed box sits inside the card rather than against its edge. */
.k-empty-row-text { flex: 1 1 240px; min-width: 0; }
.k-table-wrap > .k-empty-row { margin: 16px 20px; }

/* The toast's tone mark (Judd's ruling 88; plan §2.7, reading 20): an 18 px
   circle on the tone's background with an existing k_icon glyph in its
   foreground — check, info, and the warning triangle for a warning and an
   error — so the tone is never colour alone (DL §8). */
.k-toast-mark {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: var(--k-r-pill);
}
.k-toast-mark svg { width: 12px; height: 12px; }
.k-toast--success .k-toast-mark { background: var(--k-ok-bg); color: var(--k-ok-fg); }
.k-toast--info .k-toast-mark { background: var(--k-info-bg); color: var(--k-info-fg); }
.k-toast--warning .k-toast-mark { background: var(--k-warn-bg); color: var(--k-warn-fg); }
.k-toast--error .k-toast-mark { background: var(--k-bad-bg); color: var(--k-bad-fg); }
/* Still for a reader who asks for less motion: no slide in, no fade out. */
@media (prefers-reduced-motion: reduce) {
  .k-toast { animation: none; }
  .k-toast.is-leaving { transition: none; }
}

/* ==========================================================================
   PRINT — the shared A4 rules (Phase 20 stage B2; design round §1.4 item 10)

   ONE block for every print view in Kairos. The committee report wrote it
   first; Meetings' minutes print page (Phase 19, Wave 3) adds its own rules
   to the end of this block rather than writing a second @media print.
   Shared here: the page (A4, 15 mm margins), the shell hidden (navigation,
   top bar, breadcrumbs, tab bar, toasts, the skip link, and since Phase 21
   slice 1b the progress line, the right rail and the panel), every control a
   page marks [data-k-print-hide] hidden, the real table drawn rather than
   the phone's stacked cards, rows kept whole and table headers repeated on
   every page. A page-specific rule goes under its own comment below the
   shared ones.
   ========================================================================== */
@media print {
  @page { size: A4; margin: 15mm; }

  /* White paper: no grey canvas behind the header or the first section, and
     no grey heading bands on the tables (Judd, 17 October 2026). Cards keep
     their borders; text stays black. */
  html, body,
  .k-app,
  .k-content,
  .k-page,
  main,
  section,
  .k-page-header { background: #ffffff !important; }
  body { font-size: 11pt; color: #000000; }
  .k-table thead th { background: #ffffff !important; color: #000000; border-bottom: 1px solid #000000; }
  /* An A4 page is in the 600–899 px tier, whose sticky first column drops
     that cell's border in a collapsed table; nothing scrolls on paper. */
  .k-table th, .k-table td { position: static !important; }

  .k-rail,
  .k-topbar,
  .k-breadcrumbs,
  .k-tabbar,
  .k-scrim,
  .k-overlay-scrim,
  .k-toast-region,
  .k-skip-link,
  .k-drawer-toggle,
  .k-tabs,
  .k-progress-line,
  .k-aside-rail,
  .k-panel,
  .k-panel-scrim,
  [data-k-print-hide],
  [data-k-print] { display: none !important; }

  .k-app,
  .k-content,
  .k-workarea,
  .k-page { display: block; margin: 0; padding: 0; width: auto; max-width: none; }

  .k-card { box-shadow: none; border: 1px solid #c8cfcb; break-inside: avoid; }
  .k-table-scroll { display: block !important; overflow: visible; }
  .k-table-cards { display: none !important; }
  table { width: 100%; border-collapse: collapse; }
  thead { display: table-header-group; }
  tr, th, td { break-inside: avoid; page-break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; page-break-after: avoid; }
  a { color: inherit; text-decoration: none; }

  /* -- The committee report -------------------------------------------- */
  .k-committee-figures { grid-template-columns: repeat(2, 1fr); gap: 8mm; }
  .k-committee-section { break-inside: auto; }
  .k-committee-withdrawn { border: 1px solid #000000; background: none; }

  /* -- A meeting's minutes, and any page printed from the browser
     (Phase 19 Wave 3) ----------------------------------------------------
     The minutes' print page (meetings/meeting_print.html, on
     base_print.html) and the meeting page print the content alone. Every
     control is left off (the modal, the page-header actions, every
     .k-actions menu, button and .k-btn),
     the record is one column, an item is kept whole where it fits and a
     link prints without its address. */
  .k-modal,
  .k-page-header-actions,
  .k-actions,
  .k-print-tools,
  button,
  .k-btn { display: none !important; }
  .k-print-body { background: #ffffff !important; color: #000000; }
  .k-record { display: block; }
  .k-print-page { max-width: none; padding: 0; }
  .k-print-item,
  .k-agenda-item,
  .k-action-row,
  .k-decision { break-inside: avoid; }
  a[href]::after { content: none; }
  /* An open agenda item prints every tab's panel and no tab rail (Phase 21
     slice 10, ruling 60 A), as today's open blade prints every slot. */
  .k-item-rail { display: none !important; }
  .k-item-tabs [role="tabpanel"] { display: block !important; }

  /* -- The OFI pack (Phase 28 slice 3b): one domain to a page; an OFI is kept
     whole where it fits, so its ruled space is never cut from its statement. */
  .k-pack-domain { margin-top: 0; }
  .k-pack-domain + .k-pack-domain { break-before: page; page-break-before: always; }
  .k-pack-ofi { break-inside: avoid; page-break-inside: avoid; }
  /* The control report (slice 4b): a test is kept whole where it fits. */
  .k-report-test { break-inside: avoid; page-break-inside: avoid; }
}

/* The inline quick add of tasks and subtasks (Judd's ruling, 30 October 2026;
   work/partials/quick_add.html, kQuickAdd in kairos.js): bordered rows
   directly under the children table, each the full width of the card's body —
   summary, assignee, due date, an item type where there is a choice, and a
   small primary ↵ — wrapping onto a second line in a narrow main column (900
   px and under) rather than scrolling the page. Under the rows, right-aligned,
   Cancel and "More options". A row being saved is dimmed and busy (DL §10:
   aria-busy, no spinner); a refused one has the error's edge and one line. */
.k-quickadd { display: grid; gap: 8px; margin-top: 12px; }
.k-quickadd[hidden] { display: none; }
.k-quickadd__rows { display: grid; gap: 8px; }
.k-quickadd__rows:empty { display: none; }
.k-quickadd__row {
  margin: 0;
  padding: 8px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-box);
  background: var(--k-surface);
}
.k-quickadd__row.has-error { border-color: var(--k-bad-fg); }
.k-quickadd__row[aria-busy="true"] { opacity: .6; }
.k-quickadd__fields { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.k-quickadd__fields .k-field-input { width: auto; min-width: 0; }
.k-quickadd__fields .k-quickadd__summary { flex: 1 1 240px; }
.k-quickadd__fields .k-quickadd__assignee { flex: 0 1 200px; min-width: 140px; }
.k-quickadd__fields .k-quickadd__due { flex: 0 0 160px; }
.k-quickadd__fields .k-quickadd__type { flex: 0 1 180px; min-width: 120px; }
/* The assignee is the people picker: its suggestions float under the box
   instead of growing the row, so the flex line never jumps and nothing clips. */
.k-quickadd__fields .k-quickadd__assignee { position: relative; flex: 0 1 220px; min-width: 160px; }
.k-quickadd__assignee .k-people-picker { display: block; }
.k-quickadd__assignee .k-people-picker__ui { display: block; position: relative; }
.k-quickadd__assignee .k-field-input { width: 100%; }
.k-quickadd__assignee .k-people-picker__list,
.k-quickadd__assignee .k-people-picker__none {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 14em;
  z-index: 20;
  overflow-y: auto;
  box-shadow: var(--k-shadow-overlay);
}
.k-quickadd__assignee .k-people-picker__none {
  padding: 8px;
  border: 1px solid var(--k-control-edge);
  border-radius: var(--k-r-box);
  background: var(--k-surface);
}
.k-quickadd__fields .k-quickadd__save {
  flex: 0 0 auto;
  width: var(--k-ctl-h-sm);
  height: var(--k-ctl-h-sm);
  background: var(--k-brand);
  color: var(--k-on-brand);
}
.k-quickadd__fields .k-quickadd__save:hover { background: var(--k-brand-hover); }
.k-quickadd__error {
  margin: 8px 0 0;
  font-size: var(--k-fs-meta);
  line-height: 16px;
  color: var(--k-bad-fg);
}
.k-quickadd__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px; }
.k-quickadd__more { font-size: var(--k-fs-row); font-weight: 600; }

/* ==========================================================================
   DESIGN LANGUAGE: Roles across all workspaces (Permissions page 1a;
   Judd rulings P1 to P5, 30 October 2026)

   The Global card and the workspace table (DL 4.2, 5.5). Tokens only; the
   table scrolls inside its card where it is wider than the page (DL 3.3).
   ========================================================================== */
.k-grid--perm-global .k-grid-row { grid-template-columns: minmax(0, 2fr) minmax(200px, 1fr); align-items: start; }
.k-grid--perm-global .k-grid-row:last-child { border-bottom: 0; }
.k-perm-role { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.k-perm-role .k-title-link { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.k-perm-holders { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; max-width: 100%; }
.k-perm-holder { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.k-perm-holder--direct { flex-direction: column; align-items: flex-start; gap: 2px; }
.k-perm-holder__name { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; font-size: var(--k-fs-row); font-weight: 600; }
.k-perm-holder--direct .k-perm-direct { font-size: var(--k-fs-label); line-height: 1.3; }
.k-perm-name { min-width: 0; max-width: 100%; font-size: var(--k-fs-meta); overflow-wrap: anywhere; line-height: 1.3; }
/* Full-width detail cards: the reading-width cap on .k-config-detail
   children is for forms, not for these tables. */
.k-config-detail > .k-perm-wide { max-width: none; }

/* The role page's access grid: a group row per workspace, register and the
   platform; a tick or a dash under each action (Judd, 9 November 2026). */
/* A group row of a grouped table (Phase 28: a domain over its standards): the access group's look, generalised. */
.k-table tr.k-group-row > td { background: var(--k-surface-2); border-top: 1px solid var(--k-divider); font-weight: 600; }
.k-table tr.k-access-group > td { background: var(--k-surface-2); border-top: 1px solid var(--k-divider); }
.k-access-group__name { font-weight: 600; }
/* Check access (Phase 33, S4): a search box over the table, the hidden rows it leaves out. */
.k-table-search__box { max-width: 360px; margin-bottom: 8px; }
.k-table-search .k-meta { margin: 0 0 8px; }
.k-table tr[hidden], .k-table-card[hidden] { display: none; }
.k-access-yes { display: inline-flex; color: var(--k-ok-fg); }
.k-access-no { color: var(--k-muted); }
/* The role grid's ticks (Phase 33, S4): .k-tick in a table cell. A pale tick
   is set on the row above (data-access="derived"): the brand tick on an
   unpressed box, its border dashed. A box that cannot be pressed yet (no View
   on the row, or a wildcard that would reach nothing) is drawn flat. */
.k-access-tick[data-access="derived"] .k-tick__box { color: var(--k-brand); border-style: dashed; border-color: var(--k-brand); }
.k-access-tick:disabled { cursor: not-allowed; }
.k-access-tick:disabled .k-tick__box { background: var(--k-surface-2); border-color: var(--k-divider); color: var(--k-muted); }
.k-access-tick:disabled:hover .k-tick__box { border-color: var(--k-divider); }
/* A role's line as one compact row: scope and target, the summary, the controls. */
.k-line--compact { padding: 10px 16px; }
.k-line-row { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.k-line-row > .k-line-head { flex: 0 1 320px; min-width: 0; }
.k-line-summary { flex: 1 1 240px; min-width: 0; margin: 0; font-size: var(--k-fs-meta); line-height: 18px; color: var(--k-text); overflow-wrap: anywhere; }
.k-line-controls { margin-left: auto; flex-wrap: nowrap; }
/* A restriction row: the Roles grid row's padding and divider, so it spans the card. */
.k-perm-restriction { padding: 12px 20px; border-bottom: 1px solid var(--k-divider); }
.k-perm-restriction:last-child { border-bottom: 0; }
.k-perm-workspaces-head { margin-top: 8px; }

/* The workspace table folds by the width of its own card (DL 3.5: fit from
   an 860 px box, no min-width): all seven columns from 860 px; below that
   Custom roles and Flags drop to a second line under the workspace and the
   Admin to Viewers columns share the row; below 600 px each row is a card
   and every cell carries its label. */
.k-perm-scroll { overflow-x: auto; container-type: inline-size; }
.k-grid--perm-workspaces .k-grid-head,
.k-grid--perm-workspaces .k-grid-row { grid-template-columns: minmax(150px, 1.4fr) repeat(4, minmax(0, 1fr)) minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
.k-grid--perm-workspaces--no-agents .k-grid-head,
.k-grid--perm-workspaces--no-agents .k-grid-row { grid-template-columns: minmax(150px, 1.4fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr) minmax(0, 1fr); }
.k-grid--perm-workspaces .k-grid-row:last-child { border-bottom: 0; }
.k-grid--perm-workspaces [data-label]::before,
.k-grid--perm-roles [data-label]::before { content: attr(data-label); display: none; flex: 0 0 100%; font-size: var(--k-fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }
@container (max-width: 859px) {
  .k-grid--perm-workspaces .k-grid-head,
  .k-grid--perm-workspaces .k-grid-row { grid-template-columns: minmax(150px, 1.4fr) repeat(4, minmax(0, 1fr)); }
  .k-grid--perm-workspaces--no-agents .k-grid-head,
  .k-grid--perm-workspaces--no-agents .k-grid-row { grid-template-columns: minmax(150px, 1.4fr) repeat(3, minmax(0, 1fr)); }
  .k-grid--perm-workspaces .k-grid-head > :nth-last-child(-n + 2) { display: none; }
  .k-grid--perm-workspaces .k-grid-row > [data-col="custom"] { grid-column: 1 / span 2; grid-row: 2; }
  .k-grid--perm-workspaces .k-grid-row > [data-col="flags"] { grid-column: 3 / -1; grid-row: 2; }
  .k-grid--perm-workspaces [data-col="custom"]::before,
  .k-grid--perm-workspaces [data-col="flags"]::before { display: block; }
}
@container (max-width: 599px) {
  .k-grid--perm-workspaces .k-grid-head { display: none; }
  .k-grid--perm-workspaces .k-grid-row,
  .k-grid--perm-workspaces--no-agents .k-grid-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-grid--perm-workspaces .k-grid-row > .k-perm-workspace { grid-column: 1 / -1; }
  .k-grid--perm-workspaces .k-grid-row > [data-col] { grid-row: auto; grid-column: auto; }
  .k-grid--perm-workspaces .k-grid-row > [data-col="custom"],
  .k-grid--perm-workspaces .k-grid-row > [data-col="flags"] { grid-column: 1 / -1; }
  .k-grid--perm-workspaces [data-label]::before { display: block; }
}
.k-perm-workspace { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.k-perm-workspace .k-title-link,
.k-perm-workspace .k-title-text { font-size: var(--k-fs-row); font-weight: 600; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.k-perm-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.k-perm-flags .k-chip { white-space: nowrap; }
.k-grid--perm-workspaces .k-grid-row > * { min-width: 0; }
.k-perm-people { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* Work -> All workspaces (U11, Phase 33): the page is the standard k-table; its only rule here is the tags panel's title. */
.k-ws-tags-panel .k-panel__object-title { margin: 0; overflow-wrap: anywhere; }

/* Nobody holds it: the dashed unassigned slot (DL 5.2), muted text. */
.k-nobody { display: inline-flex; align-items: center; min-height: 22px; padding: 0 10px; border: 1px dashed var(--k-faint); border-radius: var(--k-r-pill); color: var(--k-muted); font-size: var(--k-fs-meta); white-space: nowrap; }

/* ==========================================================================
   DESIGN LANGUAGE: One workspace's roles (Permissions page 1b; Judd rulings
   P1 to P5, 30 October 2026)

   The strip's numerals, the roles grid and the Switch workspace results. The
   grid folds by its own card's width, as the workspace table does (DL 3.5).
   ========================================================================== */
.k-strip__cell--perm-num .k-strip__value { font-size: 22px; font-weight: 300; line-height: 1.2; }
.k-strip__value--warn,
.k-strip__value--warn > .k-strip__link { color: var(--k-warn-fg); }
.k-perm-roles-card { container-type: inline-size; }
.k-grid--perm-roles .k-grid-head,
.k-grid--perm-roles .k-grid-row { grid-template-columns: minmax(140px, 1fr) minmax(0, 1.3fr) minmax(0, 1.8fr) 88px; align-items: start; }
.k-grid--perm-roles .k-grid-row:last-child { border-bottom: 0; }
.k-perm-allows { min-width: 0; overflow-wrap: anywhere; font-size: var(--k-fs-meta); color: var(--k-text-2); }
.k-perm-heldby { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.k-perm-direct { color: var(--k-warn-fg); font-weight: 600; }
.k-perm-status { justify-self: start; }
@container (max-width: 759px) {
  .k-grid--perm-roles .k-grid-head { display: none; }
  .k-grid--perm-roles .k-grid-row { grid-template-columns: minmax(0, 1fr) auto; }
  .k-grid--perm-roles .k-grid-row > .k-perm-role { grid-column: 1; grid-row: 1; }
  .k-grid--perm-roles .k-grid-row > .k-perm-status { grid-column: 2; grid-row: 1; }
  .k-grid--perm-roles .k-grid-row > .k-perm-allows,
  .k-grid--perm-roles .k-grid-row > .k-perm-heldby { grid-column: 1 / -1; }
  .k-grid--perm-roles .k-perm-allows::before,
  .k-grid--perm-roles .k-perm-heldby::before { display: block; margin-bottom: 4px; }
}
.k-perm-switch__link { flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.k-perm-switch__name { font-weight: 600; }
.k-perm-switch__link[aria-current="page"] { background: var(--k-selected); }

/* ==========================================================================
   Forms respondent page (Phase 24, slice 2; DL §4.3 without strip or panel).
   k-form-progress is the native <progress> (no inline width needed): a 6 px pill on
   --k-divider filled with --k-brand, its words beside it. k-error-summary is
   the submit-time list of links to each refused question. Tokens only.
   ========================================================================== */
.k-form-progress-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; max-width: 760px; }
.k-form-progress {
  flex: 1 1 auto;
  min-width: 0;
  height: 6px;
  border: 0;
  border-radius: var(--k-r-pill);
  background: var(--k-divider);
  color: var(--k-brand);
  appearance: none;
  overflow: hidden;
}
.k-form-progress::-webkit-progress-bar { background: var(--k-divider); border-radius: var(--k-r-pill); }
.k-form-progress::-webkit-progress-value { background: var(--k-brand); border-radius: var(--k-r-pill); }
.k-form-progress::-moz-progress-bar { background: var(--k-brand); border-radius: var(--k-r-pill); }
.k-form-progress__label { flex: 0 0 auto; white-space: nowrap; }
/* Forms: respondent rules (Phase 24 slice 4) */
.k-respond-message { margin: 6px 0 0; padding: 8px 12px; border-radius: var(--k-r-item); font-size: 14px; line-height: 1.4; }
.k-respond-message--info { background: var(--k-info-bg); color: var(--k-info-fg); }
.k-respond-message--warning { background: var(--k-warn-bg); color: var(--k-warn-fg); }
.k-field-readonly .k-field-static { margin: 4px 0 0; }
/* Form filling grows with the window up to the long-form natural width, left-aligned, so packed short
   questions use the room; a single-line answer on a full line stays at one comfortable column
   (Judd, 6 November 2026). Text areas, files, choice tiles, tick lists and groups use the full width. */
.k-respond { max-width: var(--k-form-natural); }
.k-respond input.k-field-input:not([type="file"]), .k-respond select.k-field-input:not([multiple]),
.k-preview-page input.k-field-input:not([type="file"]), .k-preview-page select.k-field-input:not([multiple]) { max-width: var(--k-form-col); }
.k-respond .k-card + .k-card { margin-top: 16px; }
/* Forms layout, FL1 to FL8 (6 November 2026): short questions pack in a responsive grid, every
   other block spans the row; one 16px gap, no stacked margins; a heading takes a little more
   room above it, except when it is first. The answers and print views are untouched (FL8). */
.k-respond-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(14em, 100%), 1fr)); gap: 16px; align-items: start; }
.k-respond-fields > .k-respond-block { grid-column: 1 / -1; min-width: 0; }
.k-respond-fields > .k-respond-block--short { grid-column: auto; }
.k-respond-fields > .k-respond-block[hidden] { display: none; }
.k-respond-fields .k-respond-block > .k-field { margin-bottom: 0; }
.k-respond-fields > .k-respond-block:not(:first-child):has(> .k-respond-heading) { margin-top: 8px; }
.k-respond-heading { margin: 0; }
.k-respond-status:empty { min-height: 0; }
.k-respond-status { min-height: 18px; }
.k-respond-note { margin: 12px 0 0; }
/* Response forms (Phase 24, slice 3): files, tick-box lists, the answers read view. */
.k-respond-files { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.k-respond-files li { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.k-choice-list { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.k-respond-other { margin-top: 8px; }
.k-respond .k-field-input[type="file"], .k-respond select[multiple] { width: 100%; max-width: 100%; }
.k-respond-answers { display: grid; gap: 16px; margin: 0; }
.k-respond-answer dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.k-respond-notice { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--k-r-item); background: var(--k-ok-bg); color: var(--k-ok-fg); }
.k-respond-withdraw summary { cursor: pointer; }
.k-respond-withdraw form { margin-top: 8px; }
/* Single-choice questions of up to six options: full-width tap tiles. */
.k-choice-tiles { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.k-choice-tile {
  align-items: center;
  box-sizing: border-box;
  min-height: 46px;
  padding: 8px 14px;
  border: 1px solid var(--k-control-edge);
  border-radius: var(--k-r-item);
  background: var(--k-surface);
}
.k-choice-tile:hover { background: var(--k-surface-2); }
.k-choice-tile:has(input:checked) { border-color: var(--k-brand); background: var(--k-selected-strong); box-shadow: inset 0 0 0 1px var(--k-brand); }
.k-choice-tile:focus-within { border-color: var(--k-brand); outline: 2px solid var(--k-brand); outline-offset: 2px; }
.k-choice-tile input[type="radio"] { margin: 0; }
/* Rating and NPS: the scores in one wrapping row of square-ish tiles (Phase 24 slice 8a). */
.k-choice-tiles--scale { display: flex; flex-wrap: wrap; gap: 8px; }
.k-choice-tiles--scale .k-field-label { flex: 0 0 100%; }
.k-choice-tiles--scale .k-choice-tile { flex: 0 0 auto; min-width: 46px; justify-content: center; }
.k-scale-ends {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 6px 0 0;
  color: var(--k-text-2);
  font-size: var(--k-fs-meta);
}
.k-choice-tiles--scale .k-scale-ends { flex: 0 0 100%; margin-top: 0; }
/* Slider: the number input carries the answer; the range beside it is decorative and shown by kSlider. */
.k-slider__row { display: flex; align-items: center; gap: 16px; }
.k-slider__range { flex: 1 1 auto; min-width: 0; accent-color: var(--k-brand); }
.k-slider__range[hidden] { display: none; }
.k-slider.is-blank .k-slider__range { opacity: 0.45; }
.k-slider__value { flex: 0 0 auto; width: 7em; }
/* Eleven scores (NPS, 0 to 10): one row of equal tiles at desktop widths, 6 + 5 on a phone. */
.k-choice-tiles--scale:has(.k-choice-tile:nth-of-type(11)) { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); }
.k-choice-tiles--scale:has(.k-choice-tile:nth-of-type(11)) .k-field-label,
.k-choice-tiles--scale:has(.k-choice-tile:nth-of-type(11)) .k-scale-ends,
.k-choice-tiles--scale:has(.k-choice-tile:nth-of-type(11)) .k-field-error,
.k-choice-tiles--scale:has(.k-choice-tile:nth-of-type(11)) .k-field-help { grid-column: 1 / -1; }
.k-choice-tiles--scale:has(.k-choice-tile:nth-of-type(11)) .k-choice-tile { min-width: 0; padding: 8px 6px; }
@media (max-width: 1099px) {
  .k-choice-tiles--scale:has(.k-choice-tile:nth-of-type(11)) .k-choice-tile { flex-direction: column; gap: 2px; padding: 6px 2px; }
}
@media (max-width: 599px), (pointer: coarse) {
  /* The whole tile is the 44 px target, so its radio keeps its own small size. */
  .k-choice-tiles--scale:has(.k-choice-tile:nth-of-type(11)) .k-choice-tile input[type="radio"] { width: 18px; height: 18px; min-width: 0; min-height: 0; }
}
@media (max-width: 599px) {
  .k-choice-tiles--scale:has(.k-choice-tile:nth-of-type(11)) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .k-choice-tiles--scale .k-choice-tile { min-width: 40px; padding: 8px 10px; }
  .k-choice-tiles--scale:has(.k-choice-tile:nth-of-type(11)) .k-choice-tile { min-width: 0; padding: 8px 6px; min-height: 44px; }
}
/* Likert matrix: one fieldset per statement, its scale in a row (a table on a wide screen, stacked on a phone). Phase 24 slice 8b. */
.k-likert { margin: 0; padding: 0; border: 0; min-width: 0; }
.k-likert__head { padding: 0 0 6px 40%; color: var(--k-text-2); font-size: var(--k-fs-meta); }
.k-likert__scale { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.k-likert__head .k-likert__scale span { text-align: center; overflow-wrap: anywhere; }
.k-likert__row { margin: 0; padding: 10px 0; border: 0; border-top: 1px solid var(--k-divider); min-width: 0; }
.k-likert__row::after { content: ""; display: block; clear: both; }
.k-likert__statement { float: left; width: calc(40% - 12px); padding: 0; margin-right: 12px; color: var(--k-text); }
.k-likert__row .k-likert__scale { margin-left: 40%; }
.k-likert__cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 40px; padding: 6px 4px; border-radius: var(--k-r-item); cursor: pointer; }
.k-likert__cell:hover { background: var(--k-surface-2); }
.k-likert__cell:has(input:checked) { background: var(--k-selected-strong); box-shadow: inset 0 0 0 1px var(--k-brand); }
.k-likert__cell:focus-within { outline: 2px solid var(--k-brand); outline-offset: 2px; }
.k-likert__cell input[type="radio"] { margin: 0; }
.k-likert__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 599px) {
  .k-likert__head { display: none; }
  .k-likert__statement { float: none; width: auto; margin: 0 0 8px; }
  .k-likert__row .k-likert__scale { margin-left: 0; grid-auto-flow: row; }
  .k-likert__cell { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 8px 10px; border: 1px solid var(--k-control-edge); }
  .k-likert__label { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
}
@media (max-width: 599px), (pointer: coarse) {
  .k-likert__cell { min-height: 44px; }
}
/* Signature: the declaration, a drawing area that scripting reveals, then the typed name and tick (Phase 24 slice 8c). */
.k-signature { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 12px; }
.k-signature__declaration { margin: 0; color: var(--k-text); }
.k-signature__draw { display: grid; gap: 8px; }
.k-signature__draw[hidden] { display: none; }
.k-signature__canvas {
  display: block;
  width: 100%;
  max-width: var(--k-form-col);
  height: auto;
  aspect-ratio: 3 / 1;
  background: var(--k-surface);
  color: var(--k-text);
  border: 1px dashed var(--k-control-edge);
  border-radius: var(--k-r-box);
  touch-action: none;
  cursor: crosshair;
}
.k-signature__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.k-signature__name { max-width: 28em; }
/* Calculated value: worked out from other answers, shown as read-only text (Phase 24 slice 8d). */
.k-calculated__value { display: block; font-size: var(--k-fs-body); font-variant-numeric: tabular-nums; color: var(--k-text); }
/* Ranking: a position drop-down beside each choice. */
.k-rank { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 8px; }
.k-rank__row { display: flex; align-items: center; gap: 12px; }
.k-rank__row select { flex: 0 0 auto; width: auto; min-width: 9em; max-width: 12em; }
.k-rank__row label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
/* Repeating group (Phase 24 slice 8e): a fieldset per entry; its controls sit in a grid that stacks on a phone. */
.k-group { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 12px; }
.k-group__entry { margin: 0; padding: 12px 16px; min-width: 0; border: 1px solid var(--k-divider); border-radius: var(--k-r-box); display: grid; gap: 12px; }
.k-group__entry > legend { padding: 0 6px; color: var(--k-text-2); font-size: var(--k-fs-meta); }
.k-group__subs { display: grid; grid-template-columns: repeat(auto-fit, minmax(14em, 1fr)); gap: 12px; min-width: 0; }
.k-group__subs > .k-field { min-width: 0; }
.k-group__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.k-error-summary {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: var(--k-r-box);
  background: var(--k-bad-bg);
  color: var(--k-bad-fg);
  font-size: var(--k-fs-row);
  line-height: 18px;
}
.k-error-summary:focus-visible { outline: 2px solid var(--k-bad-fg); outline-offset: 2px; }
.k-error-summary h2 { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: inherit; }
.k-error-summary ul { margin: 0; padding-left: 20px; }
.k-error-summary a { color: inherit; font-weight: 600; text-decoration: underline; }

/* ==========================================================================
   Forms designer (Phase 24, slice 2; DL §4.3 Detail, §5.4 card, §5.8 panel).
   One card per page; a row per question is one select button (aria-pressed)
   beside its Move up and Move down. The preview is the respondent's own
   fields, read-only, in a phone-width frame. Tokens only.
   ========================================================================== */
.k-designer-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.k-designer-saved { min-height: 18px; }
.k-designer-readonly { display: grid; gap: 2px; margin: 0; }
.k-designer-readonly dt { margin-top: 10px; }
.k-designer-readonly dd { margin: 0; font-size: var(--k-fs-body); color: var(--k-text); overflow-wrap: anywhere; }
.k-designer-pages { display: grid; gap: 16px; margin-top: 16px; }
.k-designer-pagelist { display: grid; gap: 16px; }
.k-designer-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.k-designer-toolbar__text { margin: 0; }
.k-designer-toggles { margin: 0; }
.k-designer-page__num { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--k-r-pill); background: var(--k-selected); color: var(--k-brand); font-size: var(--k-fs-meta); font-weight: 600; }
.k-designer-fold:not([open]) > .k-designer-page__summary { opacity: .85; }
.k-designer-fold > summary { list-style: none; cursor: pointer; }
.k-designer-fold > summary::-webkit-details-marker { display: none; }
/* The page header shares the question cards' inset: the rows list pads 16 px,
   a row has a 1 px border and 8 px padding, so the grip columns line up; the
   right edge is the rows list's 16 px. Even 12 px above and below, one 10 px gap. */
.k-designer-fold > .k-designer-page__summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 16px 12px calc(16px + 1px + 8px); }
.k-designer-page__titleline { display: flex; flex: 1 1 12rem; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.k-designer-page__tools { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; margin-left: auto; }
.k-designer-page__tools form { margin: 0; display: inline-flex; }
.k-designer-page__summary .k-heading { min-width: 0; overflow-wrap: anywhere; }
.k-designer-page__chevron { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--k-r-pill); color: var(--k-muted); transition: transform .15s ease; }
.k-designer-fold[open] > .k-designer-page__summary .k-designer-page__chevron { transform: rotate(180deg); }
.k-designer-page__summary:focus-visible { outline: 2px solid var(--k-brand); outline-offset: -2px; }
.k-designer-page__summary form { margin: 0; flex: 0 0 auto; }
/* The grip: the "grip" icon at 16 px in a 28 x 36 px hit target, centred. */
.k-designer-handle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 36px;
  border-radius: var(--k-r-item);
  color: var(--k-muted);
  user-select: none;
  cursor: grab;
}
.k-designer-handle svg { width: 16px; height: 16px; pointer-events: none; }
.k-designer-handle:hover,
.k-designer-handle:focus-visible { color: var(--k-text); background: var(--k-surface-2); }
.k-designer-handle:active,
.is-dragging .k-designer-handle { cursor: grabbing; }
.k-designer-page.is-dragging,
.k-designer-row.is-dragging { opacity: .6; background: var(--k-surface); box-shadow: var(--k-shadow-overlay); transform: scale(.995); }
.k-designer-page.is-drop-before { box-shadow: 0 -3px 0 var(--k-brand); }
.k-designer-page.is-drop-after { box-shadow: 0 3px 0 var(--k-brand); }
.k-designer-row.is-drop-before { box-shadow: inset 0 3px 0 var(--k-brand); background: var(--k-selected); }
.k-designer-row.is-drop-after { box-shadow: inset 0 -3px 0 var(--k-brand); background: var(--k-selected); }
.k-designer-rows.is-drop-into { box-shadow: inset 0 0 0 2px var(--k-brand); background: var(--k-selected); }
@media (hover: none) and (pointer: coarse) {
  .k-designer-handle { display: none; }
}
.k-designer-page { margin: 0; }
.k-designer-page__select {
  flex: 0 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--k-r-box);
  background: transparent;
  color: var(--k-text);
  font: inherit;
  font-size: var(--k-fs-card);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.k-designer-page__select[aria-pressed="true"],
.k-designer-row__select[aria-pressed="true"] { background: var(--k-selected); }
.k-designer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-card);
  background: var(--k-surface);
}
.k-designer-row:hover,
.k-designer-row:focus-within { background: var(--k-surface-2); }
.k-designer-rows { display: grid; gap: 8px; padding: 12px 16px; }
.k-designer-row__tile { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--k-r-item); background: var(--k-selected); color: var(--k-brand); }
.k-designer-row__text { display: grid; flex: 1 1 auto; min-width: 0; gap: 2px; }
.k-designer-row__line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.k-designer-row__select {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 4px 12px;
  border: 0;
  border-radius: var(--k-r-box);
  background: transparent;
  color: var(--k-text);
  font: inherit;
  font-size: var(--k-fs-row);
  text-align: left;
  cursor: pointer;
}
.k-designer-row__select:focus-visible,
.k-designer-page__select:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 1px; }
.k-designer-row__form { flex: 1 1 auto; min-width: 0; margin: 0; }
.k-designer-row__select { width: 100%; }
.k-designer-row__label { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.k-designer-row__moves { display: inline-flex; flex: 0 0 auto; overflow: hidden; border: 1px solid var(--k-border); border-radius: var(--k-r-pill); opacity: .55; transition: opacity .12s ease; }
.k-designer-row:hover .k-designer-row__moves,
.k-designer-row:focus-within .k-designer-row__moves,
.k-designer-page__summary:hover .k-designer-row__moves,
.k-designer-page__summary:focus-within .k-designer-row__moves { opacity: 1; }
.k-designer-row__moves > * + *,
.k-designer-row__moves form + button,
.k-designer-row__moves button + button { border-left: 1px solid var(--k-border); }
.k-designer-row__moves--bare { border: 0; border-radius: 0; background: transparent; overflow: visible; }
.k-designer-row__moves--bare > * + *,
.k-designer-row__moves--bare button + button { border-left: 0; }
.k-designer-move { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; background: var(--k-surface); color: var(--k-text-2); cursor: pointer; }
.k-designer-move:hover { background: var(--k-selected); color: var(--k-brand); }
.k-designer-move:focus-visible { outline: 2px solid var(--k-brand); outline-offset: -2px; }
.k-designer-move[disabled] { color: var(--k-faint); cursor: default; background: var(--k-surface-2); }
.k-designer-move svg { width: 16px; height: 16px; }
.k-designer-rulepill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--k-border); border-radius: var(--k-r-pill); background: var(--k-surface); color: var(--k-text-2); cursor: pointer; font: inherit; font-size: var(--k-fs-meta); font-weight: 600; }
.k-designer-rulepill:hover { background: var(--k-selected); color: var(--k-brand); }
.k-designer-rulepill:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 1px; }
.k-designer-row__moves form { margin: 0; display: inline-flex; }
.k-designer-required { display: inline-flex; align-items: center; gap: 4px; color: var(--k-bad-fg); font-size: var(--k-fs-meta); font-weight: 600; }
.k-designer-empty { padding: 12px 20px; text-align: center; }
.k-designer-foot { padding: 8px 20px; border-top: 1px solid var(--k-divider); }
.k-designer-foot form { margin: 0; }
.k-designer-addpage { margin: 0; }
/* The appraisal template designer (people-appraisal-forms slice 4): below 600 px the cards are
   read-only with a one-line note, as Learn's builder is (.k-builder__edit); the manager's one-read
   preview is a disclosure of read-only rows. */
.k-designer__phone-note { display: none; margin: 0; }
@media (max-width: 599px) { .k-designer__phone-note { display: block; } .k-designer__edit { display: none; } }
.k-designer-readall > summary { cursor: pointer; }
.k-designer-readall[open] > summary { margin-bottom: 8px; }
.k-designer-readrow { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--k-divider); }
.k-designer-readrow p { margin: 0; }
.k-designer-panel-error { margin: 0; }
.k-designer-panel-error:empty { display: none; }
.k-designer-version { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 0; }
.k-designer-version + .k-designer-version { border-top: 1px solid var(--k-divider); }
.k-designer-stack > * + * { margin-top: 12px; }
.k-designer-stack form { margin: 0; }
/* The form after a stack's list (Add a page) keeps the stack gap, which the form reset above would drop. */
.k-designer-stack > .k-designer-stack__add { margin-top: 12px; }
/* Even setting widths (2 November 2026): in a blade every control fills the blade
   (a number or date box no longer keeps its own width), and a pair such as
   shortest and longest answer shares one row as two equal halves. */
.k-designer-stack .k-field > .k-field-input,
.k-designer-stack .k-field > select { width: 100%; max-width: 100%; }
.k-designer-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.k-designer-pair > .k-field { min-width: 0; margin-bottom: 0; }
/* The (?) or (!) that discloses a hint (ui/components/help_button.html; Phase 33
   slice 2, first the Forms designer's, Phase 24): a 24 px target round a 16 px
   icon. .k-designer-help is the old name, kept as an alias. The warn tone is
   the (!), in the warning pair, for a problem that is not allowed to hide
   unseen: it is still a button, the icon still carries the label. */
.k-help-button, .k-designer-help {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--k-muted);
  cursor: pointer;
}
.k-help-button[hidden], .k-designer-help[hidden] { display: none; }
.k-help-button svg, .k-designer-help svg { width: 16px; height: 16px; stroke-width: 2; }
.k-help-button:hover, .k-designer-help:hover,
.k-help-button[aria-expanded="true"], .k-designer-help[aria-expanded="true"] { color: var(--k-brand); background: var(--k-selected); }
.k-help-button:focus-visible, .k-designer-help:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 1px; }
.k-help-button--warn { color: var(--k-warn-fg); background: var(--k-warn-bg); }
.k-help-button--warn:hover, .k-help-button--warn[aria-expanded="true"] { color: var(--k-warn-fg); background: var(--k-warn-bg); box-shadow: inset 0 0 0 1px var(--k-warn-fg); }
.k-help-button--warn:focus-visible { outline-color: var(--k-warn-fg); }
/* A button with its own text (help_button.html given text): the text opens
   under the button and fills the line. With scripting off it just shows. */
.k-help-note { display: inline-block; max-width: 100%; vertical-align: middle; }
.k-help-note__text { display: block; margin: 4px 0 0; font-size: 12px; color: var(--k-muted); }
.k-help-note--warn .k-help-note__text { color: var(--k-warn-fg); }
/* Forms: designer rules (Phase 24 slice 4) */
.k-rule-ctl { display: contents; }
.k-rule-top > * + *, .k-rule-section > * + * { margin-top: 8px; }
.k-rule-top { display: block; }
.k-rule-section > .k-label { margin-bottom: 0; }
.k-rule-block { display: grid; gap: 8px; min-width: 0; padding: 10px; border: 1px solid var(--k-border); border-radius: var(--k-r-box); background: var(--k-surface); }
.k-rule-block .k-field-input { width: 100%; max-width: 100%; box-sizing: border-box; }
.k-rule-block .k-field-input--inline { width: auto; }
.k-rule-block .k-rule-narrow { width: 6em; }
.k-rule-line { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); align-items: center; gap: 8px; }
.k-rule-line__text { color: var(--k-text); font-size: var(--k-fs-row); font-weight: 600; }
.k-rule-block--group { background: var(--k-surface-2); }
.k-rule-block__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.k-rule-block__head .k-btn { flex: none; }
.k-rule-subgroup { display: grid; gap: 8px; min-width: 0; }
.k-rule-match { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.k-rule-value { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.k-rule-toggle { justify-self: start; padding: 0; border: 0; background: none; color: var(--k-brand); font: inherit; font-size: var(--k-fs-body); cursor: pointer; text-decoration: underline; }
.k-rule-toggle:hover { color: var(--k-brand-hover); }
.k-rule-adders { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.k-rule-adders .k-btn { padding-left: 6px; gap: 4px; }
/* The rule blade's header row (Phase 33 U16): the title, then the (!) and (?). Each
   button sits in a scope that takes no box of its own, so the buttons stay on the row and
   the opened panels (.k-rule-hint) wrap under it, full width. */
.k-rule-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.k-rule-head__title { margin: 0 auto 0 0; }
.k-rule-scope { display: contents; }
.k-rule-head .k-help-button { order: 1; }
.k-rule-hint { order: 2; flex: 1 0 100%; box-sizing: border-box; min-width: 0; margin: 0; }
.k-rule-reads { padding: 8px 10px; border-radius: var(--k-r-box); background: var(--k-surface-2); }
.k-rule-reads > p { margin: 0; }
.k-rule-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.k-rule-foot form { margin: 0; }
.k-rule-narrow { width: 6em; }
.k-rule-ticks { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.k-rule-problems { padding: 8px 12px; border-radius: var(--k-r-box); background: var(--k-warn-bg); color: var(--k-warn-fg); }
.k-rule-problems__list { margin: 4px 0; padding-left: 18px; }
.k-rule-select { height: auto; }
.k-rule-select__text { display: grid; flex: 1 1 auto; min-width: 0; gap: 2px; }
.k-designer-row__rules { flex: 0 0 auto; margin: 0; }
/* The danger footer of a designer blade (Phase 33 U19): Delete page stands apart, under a rule. */
.k-designer-stack > .k-designer-foot, .k-designer-foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--k-divider); }
/* Responses page panel (Phase 24 slice 3): the revision list and the audit trail (DL §6, History in a panel). */
.k-resp-list { list-style: none; margin: 0; padding: 0; }
.k-resp-list > li { padding: 4px 0; }
.k-resp-history { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; margin: 0; }
.k-resp-history > span { color: var(--k-muted); }
/* Response-form designer (Phase 24 slice 3): the type palette and one choice row. */
.k-designer-palette { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; }
.k-designer-palette__label { padding: 0; margin-bottom: 4px; color: var(--k-muted); font-size: var(--k-fs-meta); }
.k-designer-palette__row {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px;
  border: 0; border-radius: var(--k-r-item); background: transparent;
  color: var(--k-text); font: inherit; text-align: left; cursor: pointer;
}
.k-designer-palette__row > svg, .k-designer-palette__row > span:first-child { flex: 0 0 auto; color: var(--k-muted); }
.k-designer-palette__row:hover, .k-designer-palette__row:focus-visible { background: var(--k-surface-2); }
.k-designer-option { display: flex; align-items: flex-start; gap: 8px; margin: 0; }
.k-designer-stack > .k-designer-option { margin-top: 12px; }
.k-designer-option__form { display: grid; flex: 1 1 auto; min-width: 0; gap: 6px; margin: 0; }
.k-designer-option__ticks { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--k-muted); font-size: var(--k-fs-meta); }
.k-designer-option__moves { display: flex; flex: 0 0 auto; gap: 4px; }
.k-designer-option__moves form { margin: 0; }
.k-designer-option__moves--add { align-self: flex-end; }
.k-designer-option__moves .k-btn[disabled] { opacity: 0.4; cursor: default; }
.k-designer-suboptions { display: grid; gap: 8px; margin-left: 12px; padding-left: 12px; border-left: 2px solid var(--k-divider); }
.k-designer-suboptions > .k-designer-option { margin-top: 0; }
.k-preview-frame {
  box-sizing: border-box;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 16px 14px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-card);
  background: var(--k-surface);
  overflow-wrap: anywhere;
}
.k-preview-title { margin: 0 0 12px; }

/* What's new page: one card per dated entry, a plain bullet list inside. */
.k-whatsnew-entry { margin-top: 16px; }
.k-whatsnew-list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.45; color: var(--k-text); }
.k-whatsnew-list > li + li { margin-top: 8px; }

/* Meetings calendar, Week view (Calendar slice 1; Judd's rulings C1 to C7, 2 November 2026).
   A grid of 15-minute slots by 60 columns a day. A block's place is classes
   (kairos/meetings/week_calendar.py), never a style attribute: .k-cal-s<n> and
   .k-cal-e<n> are the slot it begins and ends at, .k-cal-c<n> and .k-cal-w<n>
   its column and span among the 60 (every lane count to six divides it), and
   .k-cal-n<n> the grid's height in slots. Colour means one thing: a block's
   left edge is the agenda (grey none, amber draft, green published). Weekends
   are half width; below 600 px the grid gives way to .k-cal-list. */
.k-cal {
  --k-cal-slot: 0.75rem;
  --k-cal-gutter: 3.5rem;
  --k-cal-cols: var(--k-cal-gutter) repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, 0.5fr));
}
.k-cal-bar { margin-top: 14px; }
.k-cal-range { padding: 0 10px; font-size: var(--k-fs-row); color: var(--k-text); white-space: nowrap; }
.k-cal-grid { background: var(--k-surface); border: 1px solid var(--k-border); border-radius: var(--k-r-card); overflow: hidden; }
.k-cal--5 { --k-cal-cols: var(--k-cal-gutter) repeat(5, minmax(0, 1fr)); }
/* CAL2, U8: Day and 3 days are the same grid with one or three columns, and the columns take
   the whole centre pane (Phase 33; the old cap at 1.5 and 3 panel widths is gone). */
.k-cal--1 { --k-cal-cols: var(--k-cal-gutter) minmax(0, 1fr); }
.k-cal--3 { --k-cal-cols: var(--k-cal-gutter) repeat(3, minmax(0, 1fr)); }
.k-cal-row { display: grid; grid-template-columns: var(--k-cal-cols); }
.k-cal-heads,
.k-cal-allday { border-bottom: 1px solid var(--k-border); }
.k-cal-gutter { min-width: 0; }
.k-cal-hour-label { display: block; padding-right: 6px; text-align: right; font-size: var(--k-fs-label); color: var(--k-muted); font-variant-numeric: tabular-nums; }
.k-cal-allday .k-cal-hour-label { padding-top: 6px; }
.k-cal-day { min-width: 0; border-left: 1px solid var(--k-divider); }
.k-cal-day--today { background-color: var(--k-selected); }
.k-cal-head { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 2px; font-size: var(--k-fs-meta); color: var(--k-muted); }
.k-cal-head__num { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; border-radius: var(--k-r-pill); font-size: var(--k-fs-row); font-weight: 600; color: var(--k-text); }
.k-cal-day--today .k-cal-head__num { background: var(--k-brand); color: var(--k-on-brand); }
.k-cal-allday__cell { display: flex; flex-direction: column; gap: 2px; padding: 3px 0; }
.k-cal-body .k-cal-day {
  display: grid;
  grid-template-columns: repeat(60, minmax(0, 1fr));
  position: relative;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--k-cal-slot) * 2 - 1px), var(--k-divider) calc(var(--k-cal-slot) * 2 - 1px), var(--k-divider) calc(var(--k-cal-slot) * 2));
}
.k-cal-hours { display: grid; grid-template-columns: minmax(0, 1fr); }
.k-cal-hour { align-self: start; margin-top: calc(var(--k-fs-label) * -0.6); }
.k-cal-hour:first-child { margin-top: 0; }

.k-cal-block {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  min-width: 0; min-height: 0; overflow: hidden; margin: 1px 2px; padding: 2px 6px;
  font: inherit; font-size: var(--k-fs-meta); line-height: 1.25; text-align: left; color: var(--k-text);
  background: var(--k-surface); border: 1px solid var(--k-border); border-left: 4px solid var(--k-control);
  border-radius: var(--k-r-item); cursor: pointer;
}
.k-cal-block:hover { background: var(--k-selected); }
.k-cal-block[aria-pressed="true"] { background: var(--k-selected); border-color: var(--k-brand); }
.k-cal-block--flat { margin: 0 2px; flex: 0 0 auto; }
.k-cal-block--short { justify-content: center; padding-top: 0; padding-bottom: 0; }
.k-cal-block__title,
.k-cal-block__time { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.k-cal-block__title { font-weight: 600; }
.k-cal-block__line { display: flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; }
.k-cal-block__line > .k-cal-block__title { flex: 0 1 auto; min-width: 0; }
.k-cal-block__time { color: var(--k-muted); }
.k-cal-block--none { border-left-color: var(--k-control); }
.k-cal-block--draft { border-left-color: var(--k-bar-warn); }
.k-cal-block--published { border-left-color: var(--k-bar-ok); }
.k-cal-block--past { opacity: .6; }
.k-cal-block--cancelled { background: transparent; border-style: dashed; border-left-style: solid; color: var(--k-muted); }
.k-cal-block--cancelled .k-cal-block__title,
.k-cal-block--cancelled .k-cal-item__title { text-decoration: line-through; font-weight: 400; }

.k-cal-now { grid-column: 1 / -1; align-self: start; position: relative; z-index: 2; height: 0; border-top: 2px solid var(--k-bad-fg); pointer-events: none; }
.k-cal-now::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: var(--k-r-pill); background: var(--k-bad-fg); }
.k-cal-note { margin: 12px 0 0; }

.k-cal-list { display: none; }
.k-cal-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.k-cal-item {
  display: grid; grid-template-columns: minmax(0, 7rem) minmax(0, 1fr) auto; align-items: center; gap: 8px;
  width: 100%; min-height: 44px; padding: 6px 10px; font: inherit; font-size: var(--k-fs-row); text-align: left; color: var(--k-text);
  background: var(--k-surface); border: 1px solid var(--k-border); border-left: 4px solid var(--k-control);
  border-radius: var(--k-r-item); cursor: pointer;
}
.k-cal-item[aria-pressed="true"] { background: var(--k-selected); border-color: var(--k-brand); }
.k-cal-item__when { color: var(--k-muted); font-size: var(--k-fs-meta); }
.k-cal-item__title { font-weight: 600; overflow-wrap: anywhere; }
.k-cal-item__chip { font-size: var(--k-fs-meta); color: var(--k-muted); }
@media (max-width: 599px) {
  .k-cal-grid { display: none; }
  .k-cal-list { display: block; }
  .k-cal-list .k-group + .k-group { margin-top: 20px; }
}

/* The workspace calendar's Week (Workspace Calendar slice 2, WC2 and WC3): seven
   day columns of compact item cards. A card is one button that opens the item
   panel; overdue (open and due before today) is rose by token, today's column
   is tinted like the Meetings calendar's. Placement is layout only, no style
   attribute. */
.k-wcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--k-surface); border: 1px solid var(--k-border); border-radius: var(--k-r-card); overflow: hidden; }
.k-wcal--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* CAL2, U8: the workspace Calendar's Day and 3 days fill the centre pane, as .k-cal--1 and .k-cal--3 do. */
.k-wcal--1 { grid-template-columns: minmax(0, 1fr); }
.k-wcal--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.k-wcal-day { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 0 6px 8px; border-left: 1px solid var(--k-divider); }
.k-wcal-day:first-child { border-left: 0; }
.k-wcal-day--today { background-color: var(--k-selected); }
.k-wcal-head { margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 2px; font-size: var(--k-fs-meta); font-weight: 400; color: var(--k-muted); }
.k-wcal-head__num { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; border-radius: var(--k-r-pill); font-size: var(--k-fs-row); font-weight: 600; color: var(--k-text); }
.k-wcal-day--today .k-wcal-head__num { background: var(--k-brand); color: var(--k-on-brand); }
.k-wcal-earlier { display: block; padding: 4px 6px; border-radius: var(--k-r-item); font-size: var(--k-fs-meta); line-height: 1.3; color: var(--k-bad-fg); background: var(--k-bad-bg); text-align: center; text-decoration: none; }
.k-wcal-earlier:hover { text-decoration: underline; }
/* U6: on My calendar the line is a button that opens the overdue items in the panel. */
button.k-wcal-earlier { width: 100%; border: 0; font-family: inherit; cursor: pointer; }
button.k-wcal-earlier:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 1px; }
/* The overdue panel's list (U6): the entry, then its workspace and how late, in rose. */
.k-cal-overdue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.k-cal-overdue > li + li { border-top: 1px solid var(--k-divider); }
.k-cal-overdue__row { display: flex; flex-direction: column; gap: 2px; padding: 8px 4px; border-radius: var(--k-r-item); color: var(--k-text); text-decoration: none; }
.k-cal-overdue__row:hover { background: var(--k-selected); }
.k-cal-overdue__row:focus-visible { outline: 2px solid var(--k-brand); outline-offset: -2px; }
.k-cal-overdue__what { font-size: var(--k-fs-row); overflow-wrap: anywhere; }
.k-cal-overdue__meta { font-size: var(--k-fs-meta); color: var(--k-muted); }
/* U9: the calendar's (?) sits last in the date bar; its text opens under it as a card, so the
   bar does not reflow when it is read. */
.k-cal-bar .k-help-note { position: relative; margin-left: auto; }
.k-cal-bar .k-help-note__text { position: absolute; right: 0; top: 100%; z-index: 5; width: max-content; max-width: min(34rem, 80vw); margin: 4px 0 0; padding: 8px 10px; background: var(--k-surface); border: 1px solid var(--k-border); border-radius: var(--k-r-item); }
.k-wcal-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.k-wcal-card {
  display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: 100%;
  min-width: 0; margin: 0; padding: 6px 8px;
  font: inherit; font-size: var(--k-fs-meta); line-height: 1.3; text-align: left; color: var(--k-text);
  background: var(--k-surface); border: 1px solid var(--k-border); border-left: 4px solid var(--k-control);
  border-radius: var(--k-r-item); cursor: pointer;
}
.k-wcal-card:hover { background: var(--k-selected); }
.k-wcal-card[aria-pressed="true"] { background: var(--k-selected); border-color: var(--k-brand); }
/* A meeting action on the Personal calendar (WC9): the same card, a calendar icon where
   the key goes and the meeting's title as muted secondary text. */
.k-wcal-card__icon { display: inline-flex; flex: none; color: var(--k-muted); }
.k-wcal-card--action .k-wcal-card__key { color: var(--k-muted); font-weight: 400; }
.k-wcal-card__meta { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--k-muted); }
.k-wcal-card--overdue { border-left-color: var(--k-bad-fg); background: var(--k-bad-bg); }
.k-wcal-card--overdue:hover { background: var(--k-bad-bg); border-color: var(--k-bad-fg); }
.k-wcal-card--done { opacity: .6; }
.k-wcal-card--done .k-wcal-card__title { text-decoration: line-through; color: var(--k-muted); }
/* A meeting on My calendar (MC6): the Meetings calendar's agenda edge on the workspace
   card and chip, the time where an item's key goes. Not draggable, no menu. */
.k-wcal-card--meeting .k-wcal-card__key { color: var(--k-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.k-wcal-card--meeting.k-cal-block--none, .k-mcal-chip.k-cal-block--none { border-left-color: var(--k-control); }
.k-wcal-card--meeting.k-cal-block--draft, .k-mcal-chip.k-cal-block--draft { border-left-color: var(--k-bar-warn); }
.k-wcal-card--meeting.k-cal-block--published, .k-mcal-chip.k-cal-block--published { border-left-color: var(--k-bar-ok); }
.k-wcal-card--meeting.k-cal-block--past { opacity: .6; }
.k-wcal-card__top { display: flex; align-items: center; gap: 4px; min-width: 0; }
.k-wcal-card__key { min-width: 0; flex: 1 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; color: var(--k-brand); }
.k-wcal-card--overdue .k-wcal-card__key { color: var(--k-bad-fg); }
.k-wcal-card__title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.k-wcal-card__effort { flex: none; }
.k-wcal-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 22px; }
/* Moving a card (slice 4; WC6): the "⋯" sits over the card's top-right corner, so the
   key leaves it room; the row of columns lets its open panel out; a drag marks the
   place it would land (a line above or below a card, the column tinted). */
.k-wcal-item { position: relative; }
.k-wcal-menu { position: absolute; top: 2px; right: 2px; }
.k-wcal-card--menu .k-wcal-card__top { padding-right: 26px; }
.k-wcal:has(.k-actions[open]) { overflow: visible; }
.k-wcal-menu .k-actions-panel { width: 220px; }
.k-wcal-item.is-dragging { opacity: .5; }
.k-wcal-item.is-drop-before { box-shadow: 0 -4px 0 -1px var(--k-brand); }
.k-wcal-item.is-drop-after { box-shadow: 0 4px 0 -1px var(--k-brand); }
.k-wcal-day.is-drop-target { background-color: var(--k-selected); }
/* The day the Month's "+N more" came from (as the Meetings Week's marked day). */
.k-wcal-day--marked { box-shadow: inset 0 3px 0 var(--k-brand); }
.k-wcal-day--marked .k-wcal-head__num { box-shadow: 0 0 0 2px var(--k-brand); }
/* My calendar's Week as a time grid (time-grid slice 3; T1, T3, T6, T8, T9): the Meetings
   grid above (.k-cal-*), with the untimed strip between the all-day row and the hours.
   The strip cell is also the day's drop target for the card drag (.k-wcal-day). A timed
   work block is a .k-cal-block with the "work" edge (neutral, never an agenda colour);
   a task with no estimate is drawn 30 minutes with a dashed lower edge. */
.k-cal-strip { border-bottom: 1px solid var(--k-border); }
.k-cal-strip .k-cal-hour-label { padding-top: 8px; }
.k-cal-strip__cell { min-height: 2.75rem; padding-top: 4px; gap: 4px; }
.k-cal-strip__cell .k-wcal-items { gap: 4px; }
.k-cal-strip__cell:not(.is-expanded) .k-wcal-item--extra { display: none; }
.k-wcal-more { align-self: flex-start; min-height: 0; height: auto; padding: 0 5px; font-size: var(--k-fs-label); font-weight: 600; }
.k-cal-block--work { background: var(--k-page); border-left-color: var(--k-control-edge); }
.k-cal-block--work:hover { background: var(--k-selected); }
.k-cal-block--work.k-cal-block--overdue { border-left-color: var(--k-bad-fg); background: var(--k-bad-bg); }
.k-cal-block--work.k-cal-block--done { opacity: .6; }
.k-cal-block--done .k-cal-block__title { text-decoration: line-through; color: var(--k-muted); }
.k-cal-block--noest { border-bottom-style: dashed; }
/* Timing on the grid (time-grid slice 4; T4, T5, T7, T10). An open work or action block is
   a .k-cal-wblock wrapper that takes the placing classes and holds the block's button, its
   "⋯" (Set time), the bottom-edge grip that resizes it and the hidden time form. A short block
   shows its "⋯" only on hover or focus. A drag over the hours tints the day it would land in. */
.k-cal-wblock { position: relative; display: flex; min-width: 0; min-height: 0; margin: 1px 2px; }
.k-cal-wblock > .k-cal-block { flex: 1 1 auto; margin: 0; width: 100%; padding-right: 26px; }
.k-cal-wblock .k-wcal-menu { top: 0; right: 0; }
.k-cal-wblock--short .k-wcal-menu { opacity: 0; }
.k-cal-wblock--short:hover .k-wcal-menu,
.k-cal-wblock--short:focus-within .k-wcal-menu,
.k-cal-wblock--short .k-wcal-menu:has(.k-actions[open]) { opacity: 1; }
.k-cal-wblock:has(.k-actions[open]) { z-index: 4; }
.k-wcal:has(.k-actions[open]) .k-cal-grid { overflow: visible; }
.k-cal-wblock.is-dragging { opacity: .5; }
.k-cal-wblock.is-resizing { z-index: 3; align-self: start; }
.k-cal-wblock.is-resizing > .k-cal-block { border-color: var(--k-brand); }
.k-cal-grip { position: absolute; left: 4px; right: 4px; bottom: -2px; height: 6px; cursor: ns-resize; touch-action: none; border-radius: var(--k-r-item); }
.k-cal-grip:hover,
.k-cal-wblock.is-resizing .k-cal-grip { background: var(--k-brand); opacity: .6; }
.k-cal-day.is-drop-target { background-color: var(--k-selected); }
/* CAL4: My calendar's click or drag on empty time adds a task; each day's head has a "+". */
.k-cal-body[data-k-cal-add] .k-cal-day { cursor: cell; touch-action: pan-y; }
.k-cal-heads .k-cal-day { position: relative; }
.k-cal-add { position: absolute; top: 6px; right: 4px; opacity: .6; }
.k-cal-add:hover,
.k-cal-add:focus-visible { opacity: 1; }
.k-cal-add__facts { margin: 0 0 12px; font-size: var(--k-fs-meta); color: var(--k-muted); font-variant-numeric: tabular-nums; }
/* The drop preview and the resize read-out (drag-preview): drawn by kairos.js, aria-hidden, never
   a target. The preview is a dashed block at the snapped start; script sets its top and height. */
.k-cal-preview { position: absolute; left: 2px; right: 2px; z-index: 3; box-sizing: border-box; overflow: hidden; pointer-events: none; padding: 2px 6px; background: var(--k-selected); border: 2px dashed var(--k-brand); border-radius: var(--k-r-item); }
.k-cal-preview__label { font-size: var(--k-fs-meta); line-height: 1.25; font-weight: 600; color: var(--k-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.k-cal-resize-label { position: absolute; left: 6px; bottom: 4px; z-index: 4; max-width: calc(100% - 12px); overflow: hidden; pointer-events: none; padding: 0 6px; font-size: var(--k-fs-meta); line-height: 1.4; white-space: nowrap; color: var(--k-on-brand); background: var(--k-brand); border-radius: var(--k-r-item); }
.k-wcal-card__when { flex: none; color: var(--k-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
/* The Month's chips (slice 3): rose when overdue, faded when finished; the count
   that stands in for them below 600 px is rose when the day holds an overdue item. */
.k-mcal-chip--overdue { border-left-color: var(--k-bad-fg); background: var(--k-bad-bg); }
.k-mcal-chip--overdue:hover { background: var(--k-bad-bg); border-color: var(--k-bad-fg); }
.k-mcal-chip--overdue .k-mcal-chip__time { color: var(--k-bad-fg); }
.k-mcal-chip--done { opacity: .6; }
.k-mcal-chip--done .k-mcal-chip__title { text-decoration: line-through; color: var(--k-muted); }
.k-mcal-count--overdue { background: var(--k-bad-fg); }
/* The Week below 600 px: the columns give way to a day-grouped list. */
/* CAL4: a workspace Calendar day's "+" sits at the head's right edge, and in the phone's day list at the heading's. */
.k-wcal-head { position: relative; }
.k-wcal-add { position: absolute; top: 2px; right: 0; opacity: .6; }
.k-wcal-add:hover,
.k-wcal-add:focus-visible { opacity: 1; }
.k-wcal-list .k-group__head .k-btn { margin-left: auto; }
.k-wcal-list { display: none; }
.k-wcal-earlier--list { margin-bottom: 12px; }
.k-wcal-list .k-group + .k-group { margin-top: 20px; }
@media (max-width: 599px) {
  .k-wcal { display: none; }
  .k-wcal-list { display: block; }
}

.k-cal-s0 { grid-row-start: 1; }
.k-cal-s1 { grid-row-start: 2; }
.k-cal-s2 { grid-row-start: 3; }
.k-cal-s3 { grid-row-start: 4; }
.k-cal-s4 { grid-row-start: 5; }
.k-cal-s5 { grid-row-start: 6; }
.k-cal-s6 { grid-row-start: 7; }
.k-cal-s7 { grid-row-start: 8; }
.k-cal-s8 { grid-row-start: 9; }
.k-cal-s9 { grid-row-start: 10; }
.k-cal-s10 { grid-row-start: 11; }
.k-cal-s11 { grid-row-start: 12; }
.k-cal-s12 { grid-row-start: 13; }
.k-cal-s13 { grid-row-start: 14; }
.k-cal-s14 { grid-row-start: 15; }
.k-cal-s15 { grid-row-start: 16; }
.k-cal-s16 { grid-row-start: 17; }
.k-cal-s17 { grid-row-start: 18; }
.k-cal-s18 { grid-row-start: 19; }
.k-cal-s19 { grid-row-start: 20; }
.k-cal-s20 { grid-row-start: 21; }
.k-cal-s21 { grid-row-start: 22; }
.k-cal-s22 { grid-row-start: 23; }
.k-cal-s23 { grid-row-start: 24; }
.k-cal-s24 { grid-row-start: 25; }
.k-cal-s25 { grid-row-start: 26; }
.k-cal-s26 { grid-row-start: 27; }
.k-cal-s27 { grid-row-start: 28; }
.k-cal-s28 { grid-row-start: 29; }
.k-cal-s29 { grid-row-start: 30; }
.k-cal-s30 { grid-row-start: 31; }
.k-cal-s31 { grid-row-start: 32; }
.k-cal-s32 { grid-row-start: 33; }
.k-cal-s33 { grid-row-start: 34; }
.k-cal-s34 { grid-row-start: 35; }
.k-cal-s35 { grid-row-start: 36; }
.k-cal-s36 { grid-row-start: 37; }
.k-cal-s37 { grid-row-start: 38; }
.k-cal-s38 { grid-row-start: 39; }
.k-cal-s39 { grid-row-start: 40; }
.k-cal-s40 { grid-row-start: 41; }
.k-cal-s41 { grid-row-start: 42; }
.k-cal-s42 { grid-row-start: 43; }
.k-cal-s43 { grid-row-start: 44; }
.k-cal-s44 { grid-row-start: 45; }
.k-cal-s45 { grid-row-start: 46; }
.k-cal-s46 { grid-row-start: 47; }
.k-cal-s47 { grid-row-start: 48; }
.k-cal-s48 { grid-row-start: 49; }
.k-cal-s49 { grid-row-start: 50; }
.k-cal-s50 { grid-row-start: 51; }
.k-cal-s51 { grid-row-start: 52; }
.k-cal-s52 { grid-row-start: 53; }
.k-cal-s53 { grid-row-start: 54; }
.k-cal-s54 { grid-row-start: 55; }
.k-cal-s55 { grid-row-start: 56; }
.k-cal-s56 { grid-row-start: 57; }
.k-cal-s57 { grid-row-start: 58; }
.k-cal-s58 { grid-row-start: 59; }
.k-cal-s59 { grid-row-start: 60; }
.k-cal-s60 { grid-row-start: 61; }
.k-cal-s61 { grid-row-start: 62; }
.k-cal-s62 { grid-row-start: 63; }
.k-cal-s63 { grid-row-start: 64; }
.k-cal-s64 { grid-row-start: 65; }
.k-cal-s65 { grid-row-start: 66; }
.k-cal-s66 { grid-row-start: 67; }
.k-cal-s67 { grid-row-start: 68; }
.k-cal-s68 { grid-row-start: 69; }
.k-cal-s69 { grid-row-start: 70; }
.k-cal-s70 { grid-row-start: 71; }
.k-cal-s71 { grid-row-start: 72; }
.k-cal-s72 { grid-row-start: 73; }
.k-cal-s73 { grid-row-start: 74; }
.k-cal-s74 { grid-row-start: 75; }
.k-cal-s75 { grid-row-start: 76; }
.k-cal-s76 { grid-row-start: 77; }
.k-cal-s77 { grid-row-start: 78; }
.k-cal-s78 { grid-row-start: 79; }
.k-cal-s79 { grid-row-start: 80; }
.k-cal-s80 { grid-row-start: 81; }
.k-cal-s81 { grid-row-start: 82; }
.k-cal-s82 { grid-row-start: 83; }
.k-cal-s83 { grid-row-start: 84; }
.k-cal-s84 { grid-row-start: 85; }
.k-cal-s85 { grid-row-start: 86; }
.k-cal-s86 { grid-row-start: 87; }
.k-cal-s87 { grid-row-start: 88; }
.k-cal-s88 { grid-row-start: 89; }
.k-cal-s89 { grid-row-start: 90; }
.k-cal-s90 { grid-row-start: 91; }
.k-cal-s91 { grid-row-start: 92; }
.k-cal-s92 { grid-row-start: 93; }
.k-cal-s93 { grid-row-start: 94; }
.k-cal-s94 { grid-row-start: 95; }
.k-cal-s95 { grid-row-start: 96; }
.k-cal-e1 { grid-row-end: 2; }
.k-cal-e2 { grid-row-end: 3; }
.k-cal-e3 { grid-row-end: 4; }
.k-cal-e4 { grid-row-end: 5; }
.k-cal-e5 { grid-row-end: 6; }
.k-cal-e6 { grid-row-end: 7; }
.k-cal-e7 { grid-row-end: 8; }
.k-cal-e8 { grid-row-end: 9; }
.k-cal-e9 { grid-row-end: 10; }
.k-cal-e10 { grid-row-end: 11; }
.k-cal-e11 { grid-row-end: 12; }
.k-cal-e12 { grid-row-end: 13; }
.k-cal-e13 { grid-row-end: 14; }
.k-cal-e14 { grid-row-end: 15; }
.k-cal-e15 { grid-row-end: 16; }
.k-cal-e16 { grid-row-end: 17; }
.k-cal-e17 { grid-row-end: 18; }
.k-cal-e18 { grid-row-end: 19; }
.k-cal-e19 { grid-row-end: 20; }
.k-cal-e20 { grid-row-end: 21; }
.k-cal-e21 { grid-row-end: 22; }
.k-cal-e22 { grid-row-end: 23; }
.k-cal-e23 { grid-row-end: 24; }
.k-cal-e24 { grid-row-end: 25; }
.k-cal-e25 { grid-row-end: 26; }
.k-cal-e26 { grid-row-end: 27; }
.k-cal-e27 { grid-row-end: 28; }
.k-cal-e28 { grid-row-end: 29; }
.k-cal-e29 { grid-row-end: 30; }
.k-cal-e30 { grid-row-end: 31; }
.k-cal-e31 { grid-row-end: 32; }
.k-cal-e32 { grid-row-end: 33; }
.k-cal-e33 { grid-row-end: 34; }
.k-cal-e34 { grid-row-end: 35; }
.k-cal-e35 { grid-row-end: 36; }
.k-cal-e36 { grid-row-end: 37; }
.k-cal-e37 { grid-row-end: 38; }
.k-cal-e38 { grid-row-end: 39; }
.k-cal-e39 { grid-row-end: 40; }
.k-cal-e40 { grid-row-end: 41; }
.k-cal-e41 { grid-row-end: 42; }
.k-cal-e42 { grid-row-end: 43; }
.k-cal-e43 { grid-row-end: 44; }
.k-cal-e44 { grid-row-end: 45; }
.k-cal-e45 { grid-row-end: 46; }
.k-cal-e46 { grid-row-end: 47; }
.k-cal-e47 { grid-row-end: 48; }
.k-cal-e48 { grid-row-end: 49; }
.k-cal-e49 { grid-row-end: 50; }
.k-cal-e50 { grid-row-end: 51; }
.k-cal-e51 { grid-row-end: 52; }
.k-cal-e52 { grid-row-end: 53; }
.k-cal-e53 { grid-row-end: 54; }
.k-cal-e54 { grid-row-end: 55; }
.k-cal-e55 { grid-row-end: 56; }
.k-cal-e56 { grid-row-end: 57; }
.k-cal-e57 { grid-row-end: 58; }
.k-cal-e58 { grid-row-end: 59; }
.k-cal-e59 { grid-row-end: 60; }
.k-cal-e60 { grid-row-end: 61; }
.k-cal-e61 { grid-row-end: 62; }
.k-cal-e62 { grid-row-end: 63; }
.k-cal-e63 { grid-row-end: 64; }
.k-cal-e64 { grid-row-end: 65; }
.k-cal-e65 { grid-row-end: 66; }
.k-cal-e66 { grid-row-end: 67; }
.k-cal-e67 { grid-row-end: 68; }
.k-cal-e68 { grid-row-end: 69; }
.k-cal-e69 { grid-row-end: 70; }
.k-cal-e70 { grid-row-end: 71; }
.k-cal-e71 { grid-row-end: 72; }
.k-cal-e72 { grid-row-end: 73; }
.k-cal-e73 { grid-row-end: 74; }
.k-cal-e74 { grid-row-end: 75; }
.k-cal-e75 { grid-row-end: 76; }
.k-cal-e76 { grid-row-end: 77; }
.k-cal-e77 { grid-row-end: 78; }
.k-cal-e78 { grid-row-end: 79; }
.k-cal-e79 { grid-row-end: 80; }
.k-cal-e80 { grid-row-end: 81; }
.k-cal-e81 { grid-row-end: 82; }
.k-cal-e82 { grid-row-end: 83; }
.k-cal-e83 { grid-row-end: 84; }
.k-cal-e84 { grid-row-end: 85; }
.k-cal-e85 { grid-row-end: 86; }
.k-cal-e86 { grid-row-end: 87; }
.k-cal-e87 { grid-row-end: 88; }
.k-cal-e88 { grid-row-end: 89; }
.k-cal-e89 { grid-row-end: 90; }
.k-cal-e90 { grid-row-end: 91; }
.k-cal-e91 { grid-row-end: 92; }
.k-cal-e92 { grid-row-end: 93; }
.k-cal-e93 { grid-row-end: 94; }
.k-cal-e94 { grid-row-end: 95; }
.k-cal-e95 { grid-row-end: 96; }
.k-cal-e96 { grid-row-end: 97; }
.k-cal-c1 { grid-column-start: 1; }
.k-cal-c2 { grid-column-start: 2; }
.k-cal-c3 { grid-column-start: 3; }
.k-cal-c4 { grid-column-start: 4; }
.k-cal-c5 { grid-column-start: 5; }
.k-cal-c6 { grid-column-start: 6; }
.k-cal-c7 { grid-column-start: 7; }
.k-cal-c8 { grid-column-start: 8; }
.k-cal-c9 { grid-column-start: 9; }
.k-cal-c10 { grid-column-start: 10; }
.k-cal-c11 { grid-column-start: 11; }
.k-cal-c12 { grid-column-start: 12; }
.k-cal-c13 { grid-column-start: 13; }
.k-cal-c14 { grid-column-start: 14; }
.k-cal-c15 { grid-column-start: 15; }
.k-cal-c16 { grid-column-start: 16; }
.k-cal-c17 { grid-column-start: 17; }
.k-cal-c18 { grid-column-start: 18; }
.k-cal-c19 { grid-column-start: 19; }
.k-cal-c20 { grid-column-start: 20; }
.k-cal-c21 { grid-column-start: 21; }
.k-cal-c22 { grid-column-start: 22; }
.k-cal-c23 { grid-column-start: 23; }
.k-cal-c24 { grid-column-start: 24; }
.k-cal-c25 { grid-column-start: 25; }
.k-cal-c26 { grid-column-start: 26; }
.k-cal-c27 { grid-column-start: 27; }
.k-cal-c28 { grid-column-start: 28; }
.k-cal-c29 { grid-column-start: 29; }
.k-cal-c30 { grid-column-start: 30; }
.k-cal-c31 { grid-column-start: 31; }
.k-cal-c32 { grid-column-start: 32; }
.k-cal-c33 { grid-column-start: 33; }
.k-cal-c34 { grid-column-start: 34; }
.k-cal-c35 { grid-column-start: 35; }
.k-cal-c36 { grid-column-start: 36; }
.k-cal-c37 { grid-column-start: 37; }
.k-cal-c38 { grid-column-start: 38; }
.k-cal-c39 { grid-column-start: 39; }
.k-cal-c40 { grid-column-start: 40; }
.k-cal-c41 { grid-column-start: 41; }
.k-cal-c42 { grid-column-start: 42; }
.k-cal-c43 { grid-column-start: 43; }
.k-cal-c44 { grid-column-start: 44; }
.k-cal-c45 { grid-column-start: 45; }
.k-cal-c46 { grid-column-start: 46; }
.k-cal-c47 { grid-column-start: 47; }
.k-cal-c48 { grid-column-start: 48; }
.k-cal-c49 { grid-column-start: 49; }
.k-cal-c50 { grid-column-start: 50; }
.k-cal-c51 { grid-column-start: 51; }
.k-cal-c52 { grid-column-start: 52; }
.k-cal-c53 { grid-column-start: 53; }
.k-cal-c54 { grid-column-start: 54; }
.k-cal-c55 { grid-column-start: 55; }
.k-cal-c56 { grid-column-start: 56; }
.k-cal-c57 { grid-column-start: 57; }
.k-cal-c58 { grid-column-start: 58; }
.k-cal-c59 { grid-column-start: 59; }
.k-cal-c60 { grid-column-start: 60; }
.k-cal-w1 { grid-column-end: span 1; }
.k-cal-w2 { grid-column-end: span 2; }
.k-cal-w3 { grid-column-end: span 3; }
.k-cal-w4 { grid-column-end: span 4; }
.k-cal-w5 { grid-column-end: span 5; }
.k-cal-w6 { grid-column-end: span 6; }
.k-cal-w7 { grid-column-end: span 7; }
.k-cal-w8 { grid-column-end: span 8; }
.k-cal-w9 { grid-column-end: span 9; }
.k-cal-w10 { grid-column-end: span 10; }
.k-cal-w11 { grid-column-end: span 11; }
.k-cal-w12 { grid-column-end: span 12; }
.k-cal-w13 { grid-column-end: span 13; }
.k-cal-w14 { grid-column-end: span 14; }
.k-cal-w15 { grid-column-end: span 15; }
.k-cal-w16 { grid-column-end: span 16; }
.k-cal-w17 { grid-column-end: span 17; }
.k-cal-w18 { grid-column-end: span 18; }
.k-cal-w19 { grid-column-end: span 19; }
.k-cal-w20 { grid-column-end: span 20; }
.k-cal-w21 { grid-column-end: span 21; }
.k-cal-w22 { grid-column-end: span 22; }
.k-cal-w23 { grid-column-end: span 23; }
.k-cal-w24 { grid-column-end: span 24; }
.k-cal-w25 { grid-column-end: span 25; }
.k-cal-w26 { grid-column-end: span 26; }
.k-cal-w27 { grid-column-end: span 27; }
.k-cal-w28 { grid-column-end: span 28; }
.k-cal-w29 { grid-column-end: span 29; }
.k-cal-w30 { grid-column-end: span 30; }
.k-cal-w31 { grid-column-end: span 31; }
.k-cal-w32 { grid-column-end: span 32; }
.k-cal-w33 { grid-column-end: span 33; }
.k-cal-w34 { grid-column-end: span 34; }
.k-cal-w35 { grid-column-end: span 35; }
.k-cal-w36 { grid-column-end: span 36; }
.k-cal-w37 { grid-column-end: span 37; }
.k-cal-w38 { grid-column-end: span 38; }
.k-cal-w39 { grid-column-end: span 39; }
.k-cal-w40 { grid-column-end: span 40; }
.k-cal-w41 { grid-column-end: span 41; }
.k-cal-w42 { grid-column-end: span 42; }
.k-cal-w43 { grid-column-end: span 43; }
.k-cal-w44 { grid-column-end: span 44; }
.k-cal-w45 { grid-column-end: span 45; }
.k-cal-w46 { grid-column-end: span 46; }
.k-cal-w47 { grid-column-end: span 47; }
.k-cal-w48 { grid-column-end: span 48; }
.k-cal-w49 { grid-column-end: span 49; }
.k-cal-w50 { grid-column-end: span 50; }
.k-cal-w51 { grid-column-end: span 51; }
.k-cal-w52 { grid-column-end: span 52; }
.k-cal-w53 { grid-column-end: span 53; }
.k-cal-w54 { grid-column-end: span 54; }
.k-cal-w55 { grid-column-end: span 55; }
.k-cal-w56 { grid-column-end: span 56; }
.k-cal-w57 { grid-column-end: span 57; }
.k-cal-w58 { grid-column-end: span 58; }
.k-cal-w59 { grid-column-end: span 59; }
.k-cal-w60 { grid-column-end: span 60; }
.k-cal-n40 { grid-template-rows: repeat(40, var(--k-cal-slot)); }
.k-cal-n42 { grid-template-rows: repeat(42, var(--k-cal-slot)); }
.k-cal-n44 { grid-template-rows: repeat(44, var(--k-cal-slot)); }
.k-cal-n46 { grid-template-rows: repeat(46, var(--k-cal-slot)); }
.k-cal-n48 { grid-template-rows: repeat(48, var(--k-cal-slot)); }
.k-cal-n50 { grid-template-rows: repeat(50, var(--k-cal-slot)); }
.k-cal-n52 { grid-template-rows: repeat(52, var(--k-cal-slot)); }
.k-cal-n54 { grid-template-rows: repeat(54, var(--k-cal-slot)); }
.k-cal-n56 { grid-template-rows: repeat(56, var(--k-cal-slot)); }
.k-cal-n58 { grid-template-rows: repeat(58, var(--k-cal-slot)); }
.k-cal-n60 { grid-template-rows: repeat(60, var(--k-cal-slot)); }
.k-cal-n62 { grid-template-rows: repeat(62, var(--k-cal-slot)); }
.k-cal-n64 { grid-template-rows: repeat(64, var(--k-cal-slot)); }
.k-cal-n66 { grid-template-rows: repeat(66, var(--k-cal-slot)); }
.k-cal-n68 { grid-template-rows: repeat(68, var(--k-cal-slot)); }
.k-cal-n70 { grid-template-rows: repeat(70, var(--k-cal-slot)); }
.k-cal-n72 { grid-template-rows: repeat(72, var(--k-cal-slot)); }
.k-cal-n74 { grid-template-rows: repeat(74, var(--k-cal-slot)); }
.k-cal-n76 { grid-template-rows: repeat(76, var(--k-cal-slot)); }
.k-cal-n78 { grid-template-rows: repeat(78, var(--k-cal-slot)); }
.k-cal-n80 { grid-template-rows: repeat(80, var(--k-cal-slot)); }
.k-cal-n82 { grid-template-rows: repeat(82, var(--k-cal-slot)); }
.k-cal-n84 { grid-template-rows: repeat(84, var(--k-cal-slot)); }
.k-cal-n86 { grid-template-rows: repeat(86, var(--k-cal-slot)); }
.k-cal-n88 { grid-template-rows: repeat(88, var(--k-cal-slot)); }
.k-cal-n90 { grid-template-rows: repeat(90, var(--k-cal-slot)); }
.k-cal-n92 { grid-template-rows: repeat(92, var(--k-cal-slot)); }
.k-cal-n94 { grid-template-rows: repeat(94, var(--k-cal-slot)); }
.k-cal-n96 { grid-template-rows: repeat(96, var(--k-cal-slot)); }
.k-cal-o0 { margin-top: calc(var(--k-cal-slot) * 0 / 15); }
.k-cal-o1 { margin-top: calc(var(--k-cal-slot) * 1 / 15); }
.k-cal-o2 { margin-top: calc(var(--k-cal-slot) * 2 / 15); }
.k-cal-o3 { margin-top: calc(var(--k-cal-slot) * 3 / 15); }
.k-cal-o4 { margin-top: calc(var(--k-cal-slot) * 4 / 15); }
.k-cal-o5 { margin-top: calc(var(--k-cal-slot) * 5 / 15); }
.k-cal-o6 { margin-top: calc(var(--k-cal-slot) * 6 / 15); }
.k-cal-o7 { margin-top: calc(var(--k-cal-slot) * 7 / 15); }
.k-cal-o8 { margin-top: calc(var(--k-cal-slot) * 8 / 15); }
.k-cal-o9 { margin-top: calc(var(--k-cal-slot) * 9 / 15); }
.k-cal-o10 { margin-top: calc(var(--k-cal-slot) * 10 / 15); }
.k-cal-o11 { margin-top: calc(var(--k-cal-slot) * 11 / 15); }
.k-cal-o12 { margin-top: calc(var(--k-cal-slot) * 12 / 15); }
.k-cal-o13 { margin-top: calc(var(--k-cal-slot) * 13 / 15); }
.k-cal-o14 { margin-top: calc(var(--k-cal-slot) * 14 / 15); }

/* Meetings calendar, Month view (Calendar slice 2; Judd's rulings C1 to C7).
   Six rows, Monday first, weekends at half width. A day shows up to three
   one-line chips (time, title, the agenda's edge, as a Week block's) and a
   "+N more" link to that day's Week. Outside the month is muted, today filled
   and tinted, past days faded; the amber dot marks an agenda to prepare.
   Below 600 px the chips give way to a count (no script). */
.k-cal-bar .k-cal-switch { margin-left: auto; }
/* The range switch and the (?) are one right-hand group: the switch takes the free space, the (?) sits beside it at the bar's gap. */
.k-cal-bar .k-cal-switch + .k-help-note { margin-left: 0; }
a.k-seg__btn[aria-pressed="true"],
a.k-seg__btn[aria-pressed="true"]:hover { background: var(--k-sidebar); color: var(--k-on-brand); }
.k-cal-day--marked { box-shadow: inset 0 3px 0 var(--k-brand); }
.k-cal-day--marked .k-cal-head__num { box-shadow: 0 0 0 2px var(--k-brand); }

.k-mcal { --k-mcal-cols: repeat(5, minmax(0, 2fr)) repeat(2, minmax(0, 1fr)); background: var(--k-surface); border: 1px solid var(--k-border); border-radius: var(--k-r-card); overflow: hidden; }
.k-mcal-heads,
.k-mcal-grid { display: grid; grid-template-columns: var(--k-mcal-cols); }
.k-mcal-heads { border-bottom: 1px solid var(--k-border); }
.k-mcal-dow { padding: 9px 8px; border-left: 1px solid var(--k-divider); font-size: var(--k-fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }
.k-mcal-dow:first-child { border-left: 0; }
.k-mcal-dow--weekend { background: var(--k-surface-2); }
.k-mcal-cell { position: relative; min-width: 0; min-height: 7.25rem; display: flex; flex-direction: column; gap: 3px; padding: 6px 5px 4px; border-left: 1px solid var(--k-divider); border-bottom: 1px solid var(--k-divider); }
.k-mcal-cell:nth-child(7n + 1) { border-left: 0; }
.k-mcal-cell:nth-last-child(-n + 7) { border-bottom: 0; }
.k-mcal-cell--weekend,
.k-mcal-cell--outside { background: var(--k-surface-2); }
.k-mcal-cell--outside { color: var(--k-muted); }
.k-mcal-cell--outside .k-mcal-num { color: var(--k-muted); font-weight: 400; }
.k-mcal-cell--past > * { opacity: .6; }
.k-mcal-cell--today { background: var(--k-selected); }
.k-mcal-cell__head { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 2px 2px; }
.k-mcal-num { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: var(--k-r-pill); font-size: var(--k-fs-meta); font-weight: 600; color: var(--k-text); }
.k-mcal-cell--today .k-mcal-num { background: var(--k-brand); color: var(--k-on-brand); }
.k-mcal-prep { flex: none; width: 6px; height: 6px; margin-right: 4px; border-radius: var(--k-r-pill); background: var(--k-bar-warn); }
.k-mcal-chip {
  display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; height: 21px; padding: 0 5px;
  font: inherit; font-size: var(--k-fs-label); text-align: left; color: var(--k-text);
  background: var(--k-surface); border: 1px solid var(--k-border); border-left: 3px solid var(--k-control);
  border-radius: var(--k-r-item); cursor: pointer;
}
.k-mcal-chip:hover { background: var(--k-selected); }
.k-mcal-chip[aria-pressed="true"] { background: var(--k-selected); border-color: var(--k-brand); }
.k-mcal-chip__time { flex: none; font-weight: 500; color: var(--k-muted); font-variant-numeric: tabular-nums; }
.k-mcal-chip__title { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.k-mcal-chip.k-cal-block--cancelled .k-mcal-chip__title { text-decoration: line-through; font-weight: 400; }
.k-mcal-more { align-self: flex-start; padding: 0 5px; font-size: var(--k-fs-label); font-weight: 600; }
.k-mcal-count { display: none; align-self: flex-start; min-width: 24px; padding: 2px 8px; border-radius: var(--k-r-pill); font-size: var(--k-fs-meta); font-weight: 600; text-align: center; text-decoration: none; color: var(--k-on-brand); background: var(--k-brand); }
@media (max-width: 599px) {
  .k-mcal-cell { min-height: 4.25rem; padding: 4px 2px; }
  .k-mcal-dow { padding: 6px 2px; letter-spacing: 0; text-align: center; }
  .k-mcal-chip,
  .k-mcal-more { display: none; }
  .k-mcal-count { display: inline-block; }
}

/* Meetings calendar, the one-line "Agendas to prepare" (Calendar slice 3). */
.k-cal-prep-line { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--k-text-2); }
.k-cal-prep-line svg { flex: none; color: var(--k-bar-warn); }
.k-cal-prep-line b { font-weight: 600; color: var(--k-text); }

/* The Forms designer's Assignments section (Phase 24 slice 5, 3 November 2026):
   a selectable row (title, due and counts, an Ended chip), one assignment's
   head and actions, and the completion table, sized for the 480 px blade. */
.k-assign-select { gap: 8px; }
.k-assign-select__text { display: grid; flex: 1 1 auto; min-width: 0; gap: 2px; }
.k-assign-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.k-assign-head__title { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.k-assign-warning { color: var(--k-warn-fg); }
.k-assign-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.k-assign-actions form { margin: 0; }
.k-assign-table { width: 100%; border-collapse: collapse; font-size: var(--k-fs-meta); }
.k-assign-table caption { padding-bottom: 6px; text-align: left; }
.k-assign-table th,
.k-assign-table td { padding: 6px 8px 6px 0; border-top: 1px solid var(--k-divider); text-align: left; vertical-align: middle; }
.k-assign-table thead th { border-top: 0; color: var(--k-muted); font-weight: 600; }
.k-assign-table tbody th { color: var(--k-text); font-weight: 600; overflow-wrap: anywhere; }

/* Forms: the Export panel (Phase 24, slice 7, R7): the formats, then the requester's own
   exports from the last 7 days, each with its status and, when ready, Download. */
.k-export-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.k-export-actions form { margin: 0; }
.k-export-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.k-export-row { display: grid; gap: 2px 8px; padding: 8px 0; border-top: 1px solid var(--k-divider); }
.k-export-row:first-child { border-top: 0; }
.k-export-row__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.k-export-row__label { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }

/* Forms: the Summary tab (Phase 24, slice 7, R9). A chart is a card with a table of the same
   numbers; a horizontal bar sits in its row's last cell and its width is a percentage on the
   SVG rect (geometry attribute), its colour this class. */
.k-chart-bar--count { fill: var(--k-bar-ok); }
.k-chart-swatch--count { background: var(--k-bar-ok); }
.k-sum-bar { display: block; width: 100%; height: 14px; overflow: hidden; }
.k-sum-cell-bar { width: 45%; min-width: 120px; }
.k-sum-num { text-align: right; white-space: nowrap; }
.k-sum-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.k-sum-table { margin-top: 12px; }

/* Responses page, saved views in the filter panel (Phase 24, slice 7, R12): one row per view,
   the name a link that applies it and the row's "⋯" beside it; the active view is bold. */
.k-view-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; }
.k-view-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-top: 1px solid var(--k-divider); }
.k-view-row:first-child { border-top: 0; }
.k-view-row__name { min-width: 0; overflow-wrap: anywhere; color: var(--k-brand); font-weight: 400; }
.k-view-row__name.is-active { font-weight: 700; color: var(--k-text); }
.k-view-save { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; }

/* Configuration -> Audit log (6 November 2026): a row's changes, collapsed. */
.k-audit-detail > summary { cursor: pointer; color: var(--k-muted); font-size: var(--k-fs-meta); }
.k-audit-detail[open] > summary { margin-bottom: 4px; }
.k-audit-detail__list { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; font-size: var(--k-fs-meta); }
.k-audit-detail__list dt { color: var(--k-muted); }
.k-audit-detail__list dd { margin: 0; overflow-wrap: anywhere; }

/* k-card--frame and k-frame (Phase 25 slice 3, DL §5.4) ---------------------- */
/* A card whose body is one full-width iframe (the SCORM player). The card has no
   padding, so the frame meets its border; the radius is kept by clipping the
   frame, not the card (overflow: hidden on a card would clip popovers). The
   frame is 16:10 with a floor, so it fills the card at 1440, 1100 and 900 px
   with no sideways scroll; at phone width (spec §3.4, under 600 px) it takes
   most of the viewport height. */
.k-card--frame { padding: 0; min-width: 0; }
.k-player-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.k-player-nav__next { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; margin: 0; margin-left: auto; }
.k-player-nav__full { margin-left: auto; gap: 6px; }
.k-player-nav__full > span[hidden] { display: none; }
.k-frame {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: 0 0 var(--k-r-card) var(--k-r-card);
  background: var(--k-surface-2);
  /* Fills the viewport below the frame's top; the island shrinks it to the content
     (--k-frame-fit, in px) when the content is shorter. */
  --k-frame-fill: max(480px, calc(100dvh - 112px));
  height: var(--k-frame-fit, var(--k-frame-fill));
  min-height: 360px;
}
.k-card--frame > .k-frame:first-child { border-radius: var(--k-r-card); }
@media (max-width: 899px) {
  .k-frame { --k-frame-fill: max(420px, 70dvh); }
}
@media (max-width: 599px) {
  .k-frame { --k-frame-fill: max(360px, 75dvh); }
}
/* Full screen (the island sets is-full on the card, in native full screen and in the
   full-window fallback alike): the card holds the frame, the save status and the
   navigation, and the frame takes what is left. */
.k-card--frame.is-full {
  position: fixed;
  inset: 0;
  z-index: var(--k-z-fullscreen);
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  background: var(--k-surface);
}
.k-card--frame.is-full > .k-frame,
.k-card--frame.is-full > .k-frame:first-child {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  border-radius: 0;
}
.k-card--frame.is-full > .k-card__head,
.k-card--frame.is-full > .k-card__body { flex: none; }

/* The modules blade's list (Phase 25 slice 3). */
.k-module-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.k-module-list__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.k-module-list__name { min-width: 0; overflow-wrap: anywhere; color: var(--k-brand); }
.k-module-list__name--locked { color: var(--k-muted); }
.k-module-list__row.is-current .k-module-list__name { color: var(--k-text); font-weight: 700; }

/* k-save-status (Phase 25 slice 3, DL §5.13) --------------------------------- */
/* One line saying whether the learner's progress is safe. Markup carries
   aria-live="polite"; the island sets data-state to saving, saved or failed and
   swaps the text. Failed is rose, as the due colours are. */
.k-save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--k-fs-meta);
  line-height: 16px;
  color: var(--k-muted);
}
.k-save-status__icon { display: inline-grid; place-items: center; flex: none; }
.k-save-status__icon svg { width: 14px; height: 14px; stroke-width: 2; }
.k-save-status[data-state="saved"] { color: var(--k-ok-fg); }
.k-save-status[data-state="failed"] { color: var(--k-bad-fg); font-weight: 600; }
.k-save-status[data-state="saving"] .k-save-status__icon { opacity: .6; }


/* ==========================================================================
   Learn catalogue (Phase 25 slice 4, Judd's walk rulings of 8 November 2026)

   One collapsible group per category (a native <details>, open by default, no
   frame round it) over a responsive grid of course cards. Each card: an image
   (or the format's illustration), the title, a three-line summary, the facts,
   a progress ring and one button. The tracks are auto-fill with a 260 px floor,
   so the grid reflows from 1440 px down to a phone, and from 1100 px with the
   376 px panel open, with no sideways scroll.
   ========================================================================== */
.k-cat > summary { list-style: none; }
.k-cat > summary::-webkit-details-marker { display: none; }
.k-cat__summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px;
  cursor: pointer;
  color: var(--k-text-2);
}
.k-cat__summary:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 2px; border-radius: var(--k-r-box); }
.k-cat__chev { display: inline-flex; align-self: center; color: var(--k-muted); }
.k-cat:not([open]) .k-cat__chev { transform: rotate(-90deg); }
.k-cat[open] > .k-course-grid { margin-top: 10px; }

.k-course-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}
.k-course-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-card);
  cursor: pointer;
}
.k-course-card:hover { border-color: var(--k-control-edge); }
.k-course-card:has([data-k-row-select][aria-pressed="true"]) {
  background: var(--k-selected);
  border-color: var(--k-brand);
}
.k-course-card__media { aspect-ratio: 16 / 9; background: var(--k-surface-2); }
.k-course-card__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.k-course-card__art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.k-course-card__art--ok { background: var(--k-ok-bg); color: var(--k-ok-fg); }
.k-course-card__art--info { background: var(--k-info-bg); color: var(--k-info-fg); }
.k-course-card__art--warn { background: var(--k-warn-bg); color: var(--k-warn-fg); }
.k-course-card__art--neutral { background: var(--k-surface-2); color: var(--k-text-2); }
.k-course-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 12px 14px 0;
}
.k-course-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.k-course-card__title { margin: 0; min-width: 0; font-size: var(--k-fs-row); font-weight: 600; overflow-wrap: anywhere; }
.k-course-card__title a { color: var(--k-text); text-decoration: none; }
.k-course-card__title a:hover { text-decoration: underline; }
.k-course-card__select { flex: none; opacity: 1; }
.k-course-card__summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: var(--k-fs-meta);
  color: var(--k-text-2);
  overflow-wrap: anywhere;
}
.k-course-card__progress { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.k-course-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px 14px; }
.k-ring { flex: none; }
.k-ring__track { stroke: var(--k-border); stroke-width: 3; }
.k-ring__bar { stroke: var(--k-brand); stroke-width: 3; stroke-linecap: round; }
.k-course-image-preview {
  display: block;
  max-width: 240px;
  max-height: 135px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-r-box);
  object-fit: cover;
}


/* A table row's inline actions (Edit, Disable): buttons side by side, no wrapping. */
.k-row-actions { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.k-row-actions form { margin: 0; display: inline-flex; }

/* A long list of tick boxes in a panel (the programme Audience tool): scrolls inside its own box. */
.k-check-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--k-divider); border-radius: 8px; }

/* A search box above a long tick-box list (data-k-check-search in kairos.js): filtered rows are hidden, never removed, so they still submit. */
.k-check-search { width: 100%; max-width: 100%; margin-bottom: 8px; }

/* New course, the format list (Phase 33 U24): a plain stack of rows, no bullet or indent; the button in a fixed first column, its note beside it. */
.k-format-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.k-format-list > li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 12px; align-items: center; }
.k-format-list .k-btn { justify-content: center; }

/* A segmented switcher drawn under a tab strip (Phase 33 U28): a gap so it does not touch the tab divider. */
.k-seg--below-tabs { margin-top: 16px; }
.k-check[hidden], .k-meta[data-k-check-empty][hidden] { display: none; }

/* Learn: Courses blade rows (slice 6b walk) */
.k-course-rows { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.k-course-row { flex-wrap: wrap; padding: 8px; }
.k-course-row .k-designer-row__text { flex: 1 1 8rem; }
.k-course-row__actions { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-left: auto; }
.k-course-row__actions form { margin: 0; }
.k-course-row .k-designer-row__moves { opacity: 1; }
/* End Learn: Courses blade rows (slice 6b walk) */

/* Learn: programme course list (slice 6b) */
.k-course-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.k-course-list__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.k-course-list__title { font-size: var(--k-fs-body); color: var(--k-text); }
/* End Learn: programme course list (slice 6b) */

/* Learn: person panel courses (slice 6b) */
.k-person-courses { gap: 12px; }
.k-person-courses__row { display: flex; flex-direction: column; gap: 4px; }
.k-person-courses__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.k-person-courses__row .k-meta { margin: 0; }
/* End Learn: person panel courses (slice 6b) */

/* Learn: My learning assigned rows (slice 6b walk) */
.k-assigned { border-bottom: 1px solid var(--k-divider); }
.k-assigned:last-child { border-bottom: 0; }
.k-assigned__summary { display: flex; align-items: center; gap: 8px 12px; padding: 12px 16px; cursor: pointer; list-style: none; }
.k-assigned__summary::-webkit-details-marker { display: none; }
.k-assigned__summary:hover { background: var(--k-surface-2); }
.k-assigned__summary:focus-visible { outline: 2px solid var(--k-brand); outline-offset: -2px; }
.k-assigned__chevron { display: inline-flex; color: var(--k-muted); transition: transform 0.15s; }
.k-assigned[open] > .k-assigned__summary .k-assigned__chevron { transform: rotate(180deg); }
.k-assigned__title { flex: 1 1 auto; min-width: 0; font-size: var(--k-fs-row); font-weight: 600; color: var(--k-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-assigned__meta { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 12px; }
.k-assigned__body { padding: 0 16px 12px 42px; }
.k-assigned__body .k-queue__line { margin: 0; }
.k-assigned__action { margin: 8px 0 0; }
.k-assigned__body .k-course-list { margin: 4px 0 0; gap: 0; }
.k-assigned__body .k-course-list__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--k-divider); }
.k-assigned__body .k-course-list__row:first-child { border-top: 0; }
.k-course-list__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.k-course-list__btn { justify-self: end; min-width: 96px; justify-content: center; }
/* End Learn: My learning assigned rows (slice 6b walk) */

/* Learn: development plan goals (Phase 25 slice 7, W4). The meta line under a goal, with the 6 px
   progress bar of a linked programme or courses (R67); tokens only. */
.k-goal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; }
.k-goal-meta .k-form-progress { flex: 0 0 120px; min-width: 80px; }
/* A segmented control inside the panel shares the width: segments shrink, never overflow the pill (Phase 25 slice 7). */
.k-panel__section .k-seg { display: flex; max-width: 100%; }
.k-panel__section .k-seg__btn { flex: 1 1 0; min-width: 0; justify-content: center; padding: 0 8px; white-space: nowrap; }
/* The goals table's grip column and drag marks (the generic data-k-reorder script marks a row's cells), and the plain twin of
   an in-place cell, shown instead of the button at phone width (ED4: cards stay read-only; Judd's walk, 10 November 2026). */
.k-table .k-goal-handle-col { width: 36px; padding-inline: 4px; }
.k-table tr.is-dragging { opacity: .6; }
.k-table tr.is-drop-before > td { box-shadow: inset 0 3px 0 var(--k-brand); background: var(--k-selected); }
.k-table tr.is-drop-after > td { box-shadow: inset 0 -3px 0 var(--k-brand); background: var(--k-selected); }
.k-goal-plain { display: none; }
@media (max-width: 599px) {
  .k-table td > .k-cell-edit:has(+ .k-goal-plain) { display: none; }
  .k-table td > .k-goal-plain { display: inline; }
}
.k-goal-moves { display: inline-flex; border: 1px solid var(--k-border); border-radius: var(--k-r-pill); overflow: hidden; }
.k-goal-moves form { display: inline-flex; }
.k-goal-moves > * + *, .k-goal-moves form + form { border-left: 1px solid var(--k-border); }
/* Nested responsibilities (Phase 33 S1, one level): a part sits one step in under its responsibility, in the PD table's rows
   and in the readers' nested list (the person's page, the plan's Position tool). Tokens only, no bullets. */
.k-table tr.k-resp-part > td.k-resp-text { padding-inline-start: 32px; }
.k-resp-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.k-resp-list .k-resp-list { margin-top: 4px; padding-inline-start: 16px; gap: 4px; }
.k-resp-list--flat .k-resp-indent { padding-inline-start: 16px; }
.k-resp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.k-goal-lines { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.k-goal-lines li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
/* Plan evidence and notes (Phase 25 slice 7, W5). */
.k-evidence { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.k-evidence__row { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--k-border); }
.k-evidence__row:last-child { padding-bottom: 0; border-bottom: 0; }
.k-plan-note { display: flex; align-items: flex-start; gap: 12px; }
.k-plan-note > .k-avatar { flex: 0 0 auto; }
.k-plan-note__main { flex: 1 1 auto; min-width: 0; }

/* A check-in on a person's page (Phase 27 slice 4a): the author's avatar beside the summary line. */
.k-checkin { display: flex; align-items: flex-start; gap: 12px; }
.k-checkin > .k-avatar { flex: 0 0 auto; }
.k-checkin__main { flex: 1 1 auto; min-width: 0; }

/* An appraisal's page (Phase 27 slice 5b; plan §6.4): the stage strip's current cell is brand
   coloured, a stage already done is muted; each question's blocks are a labelled column with the
   author's avatar; the prompt is 13 px muted; a signature row is an avatar and its words. */
.k-strip__cell--current { background: var(--k-ok-bg); }
.k-strip__cell--current > .k-label { color: var(--k-brand); }
.k-strip__cell--done > .k-label { color: var(--k-muted); }
.k-ap-prompt { margin: 0; font-size: 13px; color: var(--k-muted); }
.k-ap-block { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.k-ap-block__head { display: flex; align-items: center; gap: 8px; margin: 0; }
.k-ap-signature { display: flex; align-items: flex-start; gap: 12px; }
.k-ap-signature > .k-avatar { flex: 0 0 auto; }
.k-ap-signature__main { flex: 1 1 auto; min-width: 0; }
/* The employee's step-through of an appraisal (people-appraisal-forms slice 6; DL §5.16): the page list is a
   wrapping row of links, the current one on --k-selected with a --k-brand edge, each with its count; below 600 px the
   row folds into one native disclosure; Back and Next run full width. The manager's answer to a "both" question sits
   under the employee's control behind a rule, and the refusal of Send to manager lists what is missing as links. */
.k-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 16px; }
.k-steps__nav { flex: 1 1 auto; min-width: 0; }
.k-steps__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.k-steps__list > li { min-width: 0; }
.k-steps__link { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 14px; border: 1px solid var(--k-border); border-radius: var(--k-r-item); background: var(--k-surface); color: var(--k-text); text-decoration: none; }
.k-steps__link:hover { background: var(--k-surface-2); }
.k-steps__link[aria-current="step"] { background: var(--k-selected); border-color: var(--k-brand); }
.k-steps__title { font-size: var(--k-fs-row); font-weight: 600; overflow-wrap: anywhere; }
.k-steps__meta { font-size: 12px; color: var(--k-muted); }
.k-steps__link--done .k-steps__meta { color: var(--k-ok-fg); }
.k-steps__fold { display: none; }
.k-steps__summary { cursor: pointer; padding: 8px 14px; border: 1px solid var(--k-border); border-radius: var(--k-r-item); background: var(--k-surface); font-size: var(--k-fs-row); font-weight: 600; }
.k-steps__fold[open] > .k-steps__list { margin-top: 8px; flex-direction: column; }
.k-steps__all { flex: 0 0 auto; }
.k-ap-missing { margin: 4px 0 0; padding-left: 20px; font-weight: 400; }
.k-ap-beneath { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding: 4px 0 4px 12px; border-left: 2px solid var(--k-border); }
.k-ap-beneath > p { margin: 0; }
/* The appraisal in one read (people-appraisal-forms slice 7; DL §5.17): a section for each template page, a card for
   each question, a heading question as a sub-heading, and the employee's and manager's blocks side by side from 1100
   px (stacked below, so a phone reads the two answers one under the other). The manager's own block is a form of its
   own; a repeating group and a Likert answer are short tables inside a scrolling box. */
.k-ap-section { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.k-ap-section__title { margin: 0; font-size: 18px; line-height: 24px; }
.k-ap-subhead { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.k-ap-subhead__title { margin: 0; font-size: 15px; line-height: 20px; }
.k-ap-blocks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.k-ap-qform { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.k-ap-words { margin: 0; overflow-wrap: anywhere; }
.k-ap-list { margin: 0; padding-left: 20px; }
.k-ap-table th[scope="row"] { font-weight: 600; text-align: left; }
@media (min-width: 1100px) {
  .k-ap-blocks--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.k-step-nav { margin-top: 16px; }
@media (max-width: 599px) {
  .k-steps__nav > .k-steps__list { display: none; }
  .k-steps__fold { display: block; }
  .k-step-nav { flex-direction: column; align-items: stretch; }
  .k-step-nav .k-btn { width: 100%; }
}
/* Plan reviews (Phase 25 slice 7, W6): the two signature lines of a review, an avatar, the name and when, with the
   Sign button at the end. */
.k-sign-lines { display: grid; gap: 8px; }
.k-sign-line { display: flex; align-items: center; gap: 12px; min-width: 0; }
.k-sign-line > .k-avatar { flex: 0 0 auto; }
.k-sign-line__text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; flex: 1 1 auto; min-width: 0; }
.k-sign-line > form { flex: 0 0 auto; margin-left: auto; }
/* End Learn: development plan goals */

/* Learn reports (Phase 25 slice 8, Judd's walk 11 November 2026): a number column marked nowrap keeps its
   header on one line too (the default lets a number header take two); and below 600 px a table that
   folds to cards drops its own surface, border and clip, so the cards stand on the page as they do
   everywhere else instead of inside a white box. */
.k-table thead th.k-col--number.k-col--nowrap { white-space: nowrap; }
@media (max-width: 599px) {
  .k-table-wrap:has(> .k-table-cards) {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }
}

/* The Kairos Learn course builder (Phase 26, 1d and 1e). The centre is the Forms designer's cards
   (k-designer-*, 12 November 2026): one card per lesson, its blocks as rows. .k-builder__edit marks every
   write control, hidden below 600 px. Below 600 px the page is read-only (D28): the phone note shows.
   .k-statement and .k-callout are the lesson block partials' own (shared with the player from 2a). */
.k-builder__phone-note { display: none; margin: 0; }
.k-builder__lessons { min-width: 0; }
.k-builder__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.k-builder__lesson .k-designer-row__label[aria-current="true"] { color: var(--k-brand); }
.k-builder__lesson:has([aria-current="true"]) { background: var(--k-selected); border-color: var(--k-brand); }
.k-builder__nodraft { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.k-builder__adds { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.k-builder__adds form { margin: 0; }
.k-builder__tools { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.k-builder__tools form { margin: 0; display: inline-flex; }
.k-builder__quiz-summary { margin: 8px 16px 0; }
.k-statement { padding: 4px 0 4px 16px; border-left: 3px solid var(--k-brand); font-size: var(--k-fs-card); font-weight: 600; }
.k-callout { padding: 12px 16px; border-radius: var(--k-r-card); background: var(--k-info-bg); color: var(--k-info-fg); }
.k-callout--warning { background: var(--k-warn-bg); color: var(--k-warn-fg); }
.k-callout--tip { background: var(--k-ok-bg); color: var(--k-ok-fg); }
.k-callout .k-body, .k-callout .k-heading { color: inherit; }
.k-lesson-list { margin: 0; padding-left: 20px; }
/* Image and document blocks (Phase 26 3b). A hero image runs the card's width at its own
   height; a banner is the same width, cropped short. */
.k-lesson-image { margin: 0; display: grid; gap: 6px; }
.k-lesson-image img { display: block; width: 100%; height: auto; border-radius: var(--k-r-card); }
.k-lesson-image--banner img { height: 160px; object-fit: cover; }
.k-lesson-video { margin: 0; display: grid; gap: 8px; }
.k-lesson-video__player { display: block; width: 100%; height: auto; max-height: 70vh; border-radius: var(--k-r-card); background: var(--k-text); }
.k-lesson-video__frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--k-r-card); background: var(--k-text); }
.k-lesson-document { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 1px solid var(--k-border); border-radius: var(--k-r-card); background: var(--k-surface); }
.k-lesson-document__icon { color: var(--k-muted); display: inline-flex; }
.k-lesson-document__text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
/* Interactive lesson blocks (Phase 26 2b, D72 to D78). The accordion is native <details>; the flashcard
   and the process are real buttons that kairos.js (kFlashcard, kSteps) marks .is-live. Without script
   they stay as plain content: both faces of a card and every step show. */
.k-accordion { display: grid; gap: 8px; }
.k-accordion__item { border: 1px solid var(--k-border); border-radius: var(--k-r-card); background: var(--k-surface); }
.k-accordion__item > summary { padding: 14px 20px; font-weight: 600; cursor: pointer; }
.k-accordion__panel { padding: 0 20px 16px; }
.k-flashcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
/* Without script a card is a plain box holding both faces. With script (.is-live) the card is a 3D
   turn: the faces share one grid cell so the card is as tall as the taller face, the inner wrapper
   rotates, and each face hides its reverse. The title is sized from the card's own width
   (container query units) and breaks only between words. */
.k-flashcard { display: flex; flex-direction: column; min-width: 0; min-height: 148px; border: 1px solid var(--k-control); border-radius: var(--k-r-card); background: var(--k-surface); container-type: inline-size; }
.k-flashcard__inner { display: contents; }
.k-flashcard__flip { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 16px 18px; border: 0; border-radius: var(--k-r-card); background: transparent; color: inherit; font: inherit; text-align: left; cursor: default; }
.k-flashcard__front { font-weight: 600; overflow-wrap: normal; word-break: normal; }
.k-flashcard__hint, .k-flashcard__unflip { display: none; }
.k-flashcard__back { padding: 12px 18px 16px; border-top: 1px solid var(--k-divider); }
.k-flashcard.is-live { min-height: 180px; border: 0; background: transparent; perspective: 1200px; transition: transform .25s ease; }
.k-flashcard.is-live:hover, .k-flashcard.is-live:focus-within { transform: translateY(-4px); }
.k-flashcard.is-live:has(.k-flashcard__flip:active) { transform: translateY(-2px) scale(.97); }
.k-flashcard.is-live .k-flashcard__inner { display: grid; flex: 1 1 auto; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.34, 1.56, .64, 1); }
.k-flashcard.is-live.is-flipped .k-flashcard__inner { transform: rotateY(180deg); }
.k-flashcard.is-live .k-flashcard__flip, .k-flashcard.is-live .k-flashcard__back { grid-area: 1 / 1; min-width: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--k-r-card); box-shadow: var(--k-shadow-menu); transition: box-shadow .25s ease, visibility 0s; }
.k-flashcard.is-live:hover .k-flashcard__flip, .k-flashcard.is-live:hover .k-flashcard__back, .k-flashcard.is-live:focus-within .k-flashcard__flip, .k-flashcard.is-live:focus-within .k-flashcard__back { box-shadow: var(--k-shadow-overlay); }
.k-flashcard.is-live .k-flashcard__flip { justify-content: space-between; border: 1px solid var(--k-control); background: var(--k-surface); cursor: pointer; }
.k-flashcard.is-live .k-flashcard__front { color: var(--k-brand); font-size: clamp(18px, 11cqi, 28px); font-weight: 400; line-height: 1.2; }
.k-flashcard.is-live .k-flashcard__hint { display: inline-flex; align-items: center; gap: 6px; color: var(--k-muted); font-size: var(--k-fs-meta); font-weight: 600; }
/* Turned over: the back is the dark brand colour and the answer reads white. */
.k-flashcard.is-live .k-flashcard__back { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 16px 18px; transform: rotateY(180deg); border: 1px solid var(--k-sidebar); background: var(--k-sidebar); color: var(--k-on-brand); }
.k-flashcard__answer { display: grid; align-content: center; flex: 1 1 auto; }
.k-flashcard.is-live .k-flashcard__unflip { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 0; border: 0; background: transparent; color: var(--k-on-brand); font: inherit; font-size: var(--k-fs-meta); font-weight: 600; opacity: .8; cursor: pointer; }
/* The hidden face leaves the accessibility tree (and focus order) once the turn is half over. */
.k-flashcard.is-live.is-flipped .k-flashcard__back { cursor: pointer; }
.k-flashcard.is-live:not(.is-flipped) .k-flashcard__back, .k-flashcard.is-live.is-flipped .k-flashcard__flip { visibility: hidden; transition: box-shadow .25s ease, visibility 0s .3s; }
.k-lesson .k-flashcard.is-live .k-flashcard__back, .k-lesson .k-flashcard.is-live .k-flashcard__back :is(p, li, a, strong, em) { color: var(--k-on-brand); font-size: 20px; font-weight: 600; line-height: 1.3; }
.k-flashcard__answer > :first-child { margin-top: 0; }
.k-flashcard__answer > :last-child { margin-bottom: 0; }
/* Phone width (spec 3.4, under 600px): the set is a swipeable row, one card at a time with the next peeking. */
@media (max-width: 599px) {
  .k-flashset.is-live .k-flashcards { display: flex; gap: 12px; padding: 8px 2px 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .k-flashset.is-live .k-flashcard { flex: 0 0 86%; scroll-snap-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .k-flashcard.is-live, .k-flashcard.is-live .k-flashcard__inner { transition: none; }
  .k-flashcard.is-live:hover, .k-flashcard.is-live:focus-within, .k-flashcard.is-live:has(.k-flashcard__flip:active) { transform: none; }
  .k-flashcard.is-live.is-flipped .k-flashcard__inner, .k-flashcard.is-live .k-flashcard__back { transform: none; }
  .k-flashcard.is-live .k-flashcard__flip, .k-flashcard.is-live .k-flashcard__back { transition: opacity .15s ease, visibility 0s; }
  .k-flashcard.is-live:not(.is-flipped) .k-flashcard__back, .k-flashcard.is-live.is-flipped .k-flashcard__flip { opacity: 0; transition: opacity .15s ease, visibility 0s .15s; }
}
.k-process { display: grid; gap: 12px; }
.k-flashset { display: grid; gap: 12px; }
.k-seen-form { display: flex; }
.k-flashset.is-live .k-seen-form, .k-process.is-live .k-seen-form { display: none; }
/* The process as a stepper (12 November 2026, Judd's mock-up): tabs across the top, the open step below,
   Step n of N and Previous step and Next step under it. Without script every step shows in a list. */
.k-process__nav, .k-process__foot { display: none; }
.k-process.is-live { gap: 0; border: 1px solid var(--k-border); border-radius: var(--k-r-card); overflow: hidden; background: var(--k-surface); }
.k-process.is-live .k-process__nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--k-surface-2); border-bottom: 1px solid var(--k-border); }
.k-process__go { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; min-height: 56px; padding: 8px; border: 0; border-right: 1px solid var(--k-border); border-radius: 0; background: var(--k-surface-2); box-shadow: inset 0 -1px 0 var(--k-border); color: var(--k-text-2); font: inherit; font-size: var(--k-fs-row); font-weight: 600; text-align: center; overflow-wrap: anywhere; cursor: pointer; }
.k-process__go:focus-visible { outline-offset: -3px; }
.k-process__go[aria-current="step"] { background: var(--k-surface); box-shadow: inset 0 -3px 0 var(--k-brand); color: var(--k-text); }
.k-process__dot { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 26px; height: 26px; box-sizing: border-box; border: 1px solid var(--k-control-edge); border-radius: 50%; background: var(--k-surface); color: var(--k-text-2); font-size: var(--k-fs-meta); font-weight: 700; }
.k-process__go[aria-current="step"] .k-process__dot { border-color: var(--k-brand); background: var(--k-brand); color: var(--k-on-brand); }
.k-process__go.is-done .k-process__dot { border-color: var(--k-ok-bg); background: var(--k-ok-bg); color: var(--k-ok-fg); }
.k-process__tick, .k-process__go.is-done .k-process__num { display: none; }
.k-process__go.is-done .k-process__tick { display: inline-flex; }
.k-process__steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: k-step; }
.k-process__step { padding: 12px 16px; border: 1px solid var(--k-border); border-radius: var(--k-r-card); background: var(--k-surface); counter-increment: k-step; }
.k-process__title { margin: 0 0 6px; font-size: 20px; font-weight: 600; line-height: 26px; color: var(--k-text); }
.k-process:not(.is-live) .k-process__title::before { content: counter(k-step) ". "; }
.k-process.is-live .k-process__steps { display: block; padding: 24px 28px 0; }
.k-process.is-live .k-process__step { padding: 0; border: 0; background: none; }
.k-process.is-live .k-process__step:not(.is-current) { display: none; }
.k-process.is-live .k-process__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 18px 28px 24px; }
.k-process__count { flex: 1 1 auto; font-size: var(--k-fs-row); }
@media (max-width: 599px) {
  .k-process.is-live .k-process__steps { padding: 16px 16px 0; }
  .k-process.is-live .k-process__foot { padding: 14px 16px 16px; }
}
/* Sorting and knowledge check (Phase 26 2c, D83 to D85): real radios and checkboxes in fieldsets, no script. Right and
   not-right are always said in words as well as tinted. */
.k-qcheck { display: grid; gap: 12px; min-width: 0; }
.k-sorting, .k-knowledge { display: grid; gap: 12px; }
.k-sorting__cards { display: grid; gap: 12px; }
.k-sort-card, .k-choices { min-width: 0; margin: 0; padding: 12px 16px; border: 1px solid var(--k-border); border-radius: var(--k-r-card); background: var(--k-surface); }
/* The card title is a legend (the radio group's name). A floated, full-width legend sits inside the card padding like a
   heading in every state, instead of straddling the top border; the piles clear it. */
.k-sort-card__text { float: left; width: 100%; box-sizing: border-box; margin: 0 0 8px; padding: 0; font-weight: 600; }
.k-sort-card__piles { clear: both; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.k-sort-card__result { margin: 8px 0 0; font-weight: 600; }
.k-sort-card:disabled { opacity: 1; }
.k-sort-card:disabled .k-sort-pile { cursor: default; }
/* Drawn radios keep the chosen pile readable on the tinted fill, which a disabled native radio would grey out. */
.k-sort-pile input { appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border: 2px solid currentColor; border-radius: 50%; background: transparent; color: inherit; }
.k-sort-pile input:checked { background: radial-gradient(circle, currentColor 0 40%, transparent 45%); }
.k-sort-pile input:focus-visible { outline: 2px solid var(--k-brand); outline-offset: 2px; }
.k-sort-pile, .k-choice__label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.k-sort-card.is-right, .k-choice.is-right { background: var(--k-ok-bg); color: var(--k-ok-fg); }
.k-sort-card.is-wrong, .k-choice.is-wrong { background: var(--k-bad-bg); color: var(--k-bad-fg); }
.k-sort-card.is-right .k-meta, .k-choice.is-right .k-meta { color: inherit; }
.k-sort-card.is-wrong .k-meta, .k-choice.is-wrong .k-meta { color: inherit; }
.k-choices { display: grid; gap: 8px; }
.k-choice { display: grid; gap: 4px; padding: 4px 8px; border-radius: var(--k-r-card); }
.k-choice__feedback { padding-left: 24px; }
.k-qcheck__status { margin: 0; font-weight: 600; }
.k-qcheck__status--right, .k-qcheck__status--wrong { display: flex; align-items: center; gap: 8px; }
.k-qcheck__status--right { color: var(--k-ok-fg); }
.k-qcheck__status--wrong { color: var(--k-bad-fg); }
/* The knowledge check as a tinted panel (12 November 2026, Judd's mock-up): a question icon, a "No marks are
   given" chip, the question large, and each answer a large bordered row that fills the width and rings when
   chosen. Right and wrong are tinted and said in words with an icon. */
.k-qcheck--panel { gap: 18px; padding: 28px clamp(16px, 4%, 28px); border: 1px solid var(--k-border); border-radius: var(--k-r-card); background: var(--k-surface-2); }
.k-qcheck__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.k-qcheck__icon { display: inline-flex; flex: none; color: var(--k-ok-fg); }
.k-qcheck__title { flex: 1 1 auto; color: var(--k-ok-fg); font-size: var(--k-fs-body); font-weight: 600; }
.k-qcheck--panel .k-knowledge { gap: 18px; }
.k-knowledge > .k-btn, .k-sorting > .k-btn { justify-self: start; }
.k-lesson .k-qcheck--panel .k-knowledge__question, .k-lesson .k-qcheck--panel .k-knowledge__question :is(p, li) { color: var(--k-text); font-size: 18px; font-weight: 600; line-height: 1.4; }
.k-knowledge .k-choices { gap: 10px; padding: 0; border: 0; background: none; }
.k-knowledge .k-choice { gap: 0; min-width: 0; padding: 0; border: 1px solid var(--k-control); border-radius: var(--k-r-box); background: var(--k-surface); }
.k-knowledge .k-choice__label { width: 100%; min-height: 52px; box-sizing: border-box; padding: 12px 16px; gap: 12px; font-size: var(--k-fs-card); font-weight: 500; }
.k-knowledge .k-choice__label input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--k-brand); }
.k-knowledge .k-choice > .k-field-input { margin: 0 16px 12px; }
.k-knowledge .k-choice__result { display: inline-flex; align-items: center; gap: 6px; padding: 0 16px 12px 46px; font-weight: 600; }
.k-knowledge .k-choice__feedback { padding: 0 16px 12px 46px; }
.k-knowledge .k-choice:has(input:checked) { border-color: var(--k-brand); background: var(--k-selected); box-shadow: 0 0 0 1px var(--k-brand); }
.k-knowledge .k-choice.is-right, .k-knowledge .k-choice.is-right:has(input:checked) { border-color: var(--k-ok-fg); background: var(--k-ok-bg); box-shadow: 0 0 0 1px var(--k-ok-fg); }
.k-knowledge .k-choice.is-wrong, .k-knowledge .k-choice.is-wrong:has(input:checked) { border-color: var(--k-bad-fg); background: var(--k-bad-bg); box-shadow: 0 0 0 1px var(--k-bad-fg); }
.k-qcheck__status:empty { display: none; }
/* The lesson player (Phase 26 2a, D21): a card that scrolls with the page, its blocks filling the card's width (D147). */
.k-lesson-stage { display: grid; gap: 20px; min-width: 0; }
.k-card--lesson { display: grid; gap: 28px; min-width: 0; padding: 44px clamp(20px, 6.4%, 56px); }
.k-lesson__title { margin: 0; color: var(--k-text); font-size: var(--k-fs-section); font-weight: 600; line-height: 1.25; }
.k-continue { display: grid; justify-items: center; gap: 8px; }
.k-continue__row { display: flex; align-self: stretch; align-items: center; gap: 16px; margin: 0; }
.k-continue__rule { flex: 1 1 0; height: 1px; background: var(--k-border); }
.k-continue__note { margin: 0; text-align: center; }
p.k-continue { display: block; }
.k-lesson { display: grid; gap: 36px; margin-inline: 0; width: 100%; min-width: 0; overflow-wrap: anywhere; }
.k-lesson__block { min-width: 0; }
/* The shared record-page measure (.k-record-main .k-body, 46em) must not cap lesson text (D147). */
.k-lesson .k-body, .k-lesson .k-meta, .k-lesson p { max-width: none; }
/* Lesson type (12 November 2026, Judd's mock-up): body 15 / 1.65 in the secondary text colour, block headings 17. */
.k-lesson .k-body, .k-lesson .k-body :is(p, li) { font-size: var(--k-fs-card); line-height: 1.65; color: var(--k-text-2); }
.k-lesson .k-body > :first-child { margin-top: 0; }
.k-lesson .k-body > :last-child { margin-bottom: 0; }
.k-lesson .k-heading { margin: 0 0 6px; font-size: 17px; line-height: 24px; }
.k-lesson .k-callout .k-body, .k-lesson .k-callout .k-body :is(p, li) { color: inherit; }
.k-lesson .k-choice.is-right .k-body, .k-lesson .k-choice.is-wrong .k-body, .k-lesson .k-choice .k-choice__feedback :is(p, li) { color: inherit; }
/* The lesson header's progress row: a segment per lesson, then where you are and the pass mark. */
.k-lesson-key { font-variant-numeric: tabular-nums; }
.k-page-header-facts:has(.k-lesson-progress) { display: block; padding: 0; border: 0; }
.k-lesson-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 6px; color: var(--k-text); font-size: var(--k-fs-row); }
.k-lesson-progress__bar { display: flex; flex: 1 1 240px; gap: 4px; min-width: 0; }
.k-lesson-progress__seg { flex: 1 1 0; min-width: 0; height: 6px; border-radius: var(--k-r-pill); background: var(--k-control); }
.k-lesson-progress__seg.is-on { background: var(--k-brand); }
.k-lesson-progress__label { font-weight: 600; }
.k-lesson-progress__pass { color: var(--k-muted); }
@media (max-width: 599px) { .k-card--lesson { padding: 24px 16px; } }
.k-builder__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-left: auto; }
.k-builder__lesson .k-builder__actions { margin-left: 0; }
.k-builder__warning { color: var(--k-warn-fg); font-weight: 600; }
.k-designer-palette__text { display: grid; gap: 2px; text-align: left; }
.k-builder__list .k-field-input { flex: 1 1 auto; min-width: 0; }
@media (max-width: 599px) { .k-builder__phone-note { display: block; } .k-builder__edit { display: none; } }

/* The quiz runner (Phase 26 5e): the question count's progress bar and the results score. */
.k-quiz { display: grid; gap: 12px; }
.k-quiz__progress { width: 100%; height: 8px; accent-color: var(--k-brand); }
.k-quiz__score { margin: 0; font-size: var(--k-fs-title); font-weight: 600; }
/* A learner's written answer as submitted (WA-a): set off from the question, line breaks kept. */
.k-quiz__written { margin-top: 6px; padding-left: 12px; border-left: 3px solid var(--k-border); overflow-wrap: anywhere; }

/* People: the person page's credential chips sit in the eyebrow's own row, and the Credentials card's evidence count
   (Phase 27 slice 2b); tokens only. */
.k-credential-chips { display: contents; }
.k-evidence-count { display: inline-flex; align-items: center; gap: 4px; color: var(--k-muted); }
.k-probation-chip { display: contents; }
/* People settings (Phase 27 slice 3a): one card, a row per setting: its name and what it does at the left, its control at the right. */
.k-setting-list { padding: 0; }
.k-setting { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 20px; border-bottom: 1px solid var(--k-divider); }
.k-setting:last-child { border-bottom: 0; }
.k-setting__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.k-setting__name { font-size: var(--k-fs-row); font-weight: 600; color: var(--k-text); }
.k-setting__control { flex: none; }
.k-setting__form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.k-setting__number { width: 80px; }
@media (max-width: 600px) {
  .k-setting { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* A pre-filled choice shown as one line, with the control behind "Change"
   (Phase 33 slice 6, S3: a survey's workspace). A native <details>, so it
   works with scripting off. */
.k-fixed-choice > summary { cursor: pointer; list-style: none; color: var(--k-text-muted); }
.k-fixed-choice > summary::-webkit-details-marker { display: none; }
.k-fixed-choice > summary .k-fixed-choice__change { color: var(--k-brand); text-decoration: underline; }
.k-fixed-choice[open] > summary { margin-bottom: 6px; }

/* BEGIN GENERATED: rich-text code highlighting (Phase 17).
   Written by scripts/generate_highlight_css.py - do not edit by hand;
   change the mapping there and re-run it. Pygments emits class names
   only (prefix k-hl-), so no style attribute reaches the page and the
   CSP is unchanged. */
.k-body pre, .k-rt-prosemirror pre { background: var(--k-surface-2); color: var(--k-text); }
.k-hl-c,
.k-hl-c1,
.k-hl-ch,
.k-hl-cm,
.k-hl-cs { color: var(--k-muted); font-style: italic; }
.k-hl-cp,
.k-hl-cpf,
.k-hl-go,
.k-hl-gp,
.k-hl-nd,
.k-hl-p,
.k-hl-pm { color: var(--k-muted); }
.k-hl-dl,
.k-hl-ni,
.k-hl-s,
.k-hl-s1,
.k-hl-s2,
.k-hl-sa,
.k-hl-sb,
.k-hl-sc,
.k-hl-sd,
.k-hl-sh,
.k-hl-sr,
.k-hl-ss,
.k-hl-sx { color: var(--k-warn-fg); }
.k-hl-err,
.k-hl-gd,
.k-hl-gr,
.k-hl-gt,
.k-hl-ne { color: var(--k-bad-fg); }
.k-hl-ge { font-style: italic; }
.k-hl-gh,
.k-hl-gs,
.k-hl-gu { font-weight: 600; }
.k-hl-gi { color: var(--k-brand); }
.k-hl-il,
.k-hl-ld,
.k-hl-m,
.k-hl-mb,
.k-hl-mf,
.k-hl-mh,
.k-hl-mi,
.k-hl-mo,
.k-hl-na,
.k-hl-nl,
.k-hl-no,
.k-hl-nv,
.k-hl-se,
.k-hl-si,
.k-hl-vc,
.k-hl-vg,
.k-hl-vi { color: var(--k-info-fg); }
.k-hl-k,
.k-hl-kc,
.k-hl-kd,
.k-hl-kn,
.k-hl-kp,
.k-hl-kr,
.k-hl-ow { color: var(--k-brand); font-weight: 600; }
.k-hl-kt,
.k-hl-nb,
.k-hl-nc,
.k-hl-nf,
.k-hl-nn { color: var(--k-brand-hover); }
.k-hl-nt { color: var(--k-brand-hover); font-weight: 600; }
/* END GENERATED: rich-text code highlighting */
