/* ==========================================================================
   Kaizen design system
   The visual language is Metronic's demo 42 (see /demo42): white cards on a
   soft grey page, hairline borders, a violet accent, flat controls with small radii, dashed
   separators. Only the language is borrowed — the template's 1.3 MB stylesheet
   is not loaded. Bootstrap supplies the grid, utilities, dropdowns and modals;
   everything else on screen is drawn here.

   The shell (.kz-app, .kz-side, .kz-top, .kz-main) is the app's own too, so
   nothing here depends on a theme's markup or on a theme's script.
   ========================================================================== */

/* --------------------------------------------------------------------------
   The colour tokens. Every colour on screen comes from here; a component that
   writes a colour of its own is the one that breaks at night.

   Each token is a ROLE, measured against the surfaces it lands on — the
   ratios beside them are WCAG contrast, worked out for the value given, on
   the page (--kz-bg) and on a card (--kz-surface). The floors:
     text people read            4.5:1 at least, 7:1 for body text
     icons, input edges, focus,
     the marks of a chart        3:1
   Surfaces are not measured against text but against each other: a card has
   to stand off the page, a menu off the card under it.

   Role                 token                 (in the brief's words)
   page                 --kz-bg               background
   card, sidebar, bar   --kz-surface          surface
   menu, dialog         --kz-pop              surface-raised
   row under pointer    --kz-hover            surface-hover
   chosen row / chip    --kz-selected         surface-selected
   inset well, chip     --kz-soft
   card frame           --kz-line             border
   rows inside a card   --kz-line-2
   shell, separators    --kz-line-3           border-strong
   anything typed into  --kz-line-input       (3:1 — an input's edge is how
                                               anyone finds it)
   headings, values     --kz-ink              text-primary
   body text            --kz-ink-2            text-secondary
   labels, meta         --kz-ink-3            text-muted
   placeholder, hint    --kz-ink-4            (still 4.5:1 — it is read)
   disabled             --kz-ink-disabled     text-disabled (exempt, 3:1 kept)
   on the violet        --kz-on-primary       text-on-primary
   violet fill          --kz-primary / -700   primary / primary-hover
   violet as text       --kz-accent           link
   focus ring           --kz-focus            focus-ring
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light;

  /* The surfaces. A soft, cool off-white page with white cards on it: a
     card is told from the page by its colour before its edge, and nothing
     is a glaring sheet of pure white edge to edge. */
  --kz-bg: #eef1f6;
  --kz-surface: #fff;
  --kz-pop: #fff;
  --kz-soft: #f3f5f9;
  --kz-hover: #eff2f8;
  /* A kanban column: a step darker than the page, so the white cards in it
     stand out as cards and the three columns read as three lanes. */
  --kz-lane: #e3e8f0;
  /* Late work, tinted: a row or a card that is past its deadline. */
  --kz-late: color-mix(in srgb, var(--kz-danger) 6%, var(--kz-surface));
  --kz-late-hover: color-mix(in srgb, var(--kz-danger) 10%, var(--kz-surface));
  --kz-toast: #141b2d;

  /* The sidebar: one deep navy in both modes. It anchors the page, takes a
     third of the white out of the day mode, and wears the night tokens
     whichever mode the page is in (see the night block's selector). */
  --kz-side: #1a2133;

  /* Always-white and always-dark, for what sits on a fill, on a photo or on
     the navy panels whatever the mode; and the colour shadows are cast in. */
  --kz-white: #fff;
  --kz-shade: #0b1433;

  /* The accent as a FILL — a button, a bar, a selected square. White text
     sits on it: 6.0:1 on -primary, 8.0:1 on -700 (its hover). */
  --kz-primary: #7239ea;
  --kz-primary-700: #5b22d4;
  --kz-primary-600: #6129db;
  --kz-primary-100: #e7ddff;
  --kz-primary-050: #f1ebff;
  --kz-selected: var(--kz-primary-050);
  --kz-on-primary: #fff;

  /* The accent as TEXT, an icon or the focus ring: 6.8:1 on a card, 6.0:1
     on the page, 5.8:1 on the chosen-row tint. -2 is the stronger one, for
     words sitting on the accent's own tint (7.7:1). */
  --kz-accent: #6a2fe0;
  --kz-accent-2: #5014d0;
  --kz-focus: #6a2fe0;

  /* Text, darkest first — slate, not blue-black. On a card / on the page:
     ink 17.9 / 15.8 · ink-2 10.4 / 9.1 · ink-3 7.6 / 6.7 · ink-4 5.7 / 5.0 */
  --kz-ink: #0f172a;
  --kz-ink-2: #334155;
  --kz-ink-3: #475569;
  --kz-ink-4: #5b6781;
  --kz-ink-disabled: #8d94a6;

  /* Lines. -2 separates rows inside a card, the plain one frames a card, -3
     frames the shell. An input's edge is -input: 3.9:1 on a card, 3.4:1 on
     the page. */
  --kz-line: #d5dae4;
  --kz-line-2: #e4e8ef;
  --kz-line-3: #c3c9d6;
  --kz-line-input: #79829a;

  /* Behind a dialog: always a dark veil, whichever the mode. */
  --kz-scrim: rgba(8, 12, 28, .48);

  /* A person's or a department's own colour: a tint with its dark shade on
     top by day, a deep shade with its light tint on top by night. The hue is
     theirs (--kz-h); these say how it is mixed. */
  --kz-swatch-s: 82%;
  --kz-swatch-l: 93%;
  --kz-swatch-ink-s: 62%;
  --kz-swatch-ink-l: 27%;

  /* The four states, each as three colours:
       plain  the FILL and the MARK — a bar, a dot, an icon, a column's rule.
              Held at 3:1 on a card and on the page, so a mark carries its
              meaning on its own (green 3.8 / 3.4, amber 3.7 / 3.2, red
              4.7 / 4.1, blue 4.8 / 4.2).
       -050   the pale ground of a badge or a chip.
       -ink   words and icons on that ground (6.0:1 or more on it).
     Text ON a plain fill is -on: white on the red and the blue, near-black
     on the green and the amber, where white would be 3.8:1 and 3.4:1.

     The task states wear them the same way everywhere — column, chip,
     ring, select, count:  To do = danger (hourglass)  ·  Doing = warning
     (turning arrows)  ·  Done = success (tick)  ·  late = danger (clock).
     Each has its icon and its word as well, so none rests on colour. */
  --kz-success: #15964a;
  --kz-success-050: #e2f6e9;
  --kz-success-ink: #0b6532;
  --kz-success-on: #03150a;
  --kz-warning: #c86f02;
  --kz-warning-050: #fff1dc;
  --kz-warning-ink: #8a4700;
  --kz-warning-on: #1e1200;
  --kz-danger: #e11d48;
  --kz-danger-050: #ffe8ee;
  --kz-danger-ink: #a3123c;
  --kz-danger-on: #fff;
  --kz-info: #1d6fe0;
  --kz-info-050: #e6f0ff;
  --kz-info-ink: #0b52b0;
  --kz-info-on: #fff;

  /* Solid green under white text (a button, not a dot): 5.4:1. */
  --kz-success-solid: #0e7a3c;

  /* Qualification levels. A sequential ramp for 1/4–3/4, then green for 4/4 —
     "can teach others" is the state the matrix is really asking about, so it
     gets its own hue rather than one more step of the same one. Track and ring
     are translucent ink, so a dial holds its contrast over a white row and a
     hovered one alike. */
  --kz-lvl-track: rgba(11, 20, 51, .13);
  --kz-lvl-ring: rgba(11, 20, 51, .07);
  --kz-lvl-1: #b398f4;
  --kz-lvl-2: #8f63ee;
  --kz-lvl-3: #6a2fe0;
  --kz-lvl-4: #0f8a45;
  --kz-lvl-goal: #c98a06;

  /* The one dark surface: the dashboard's headline card and the sign-in
     panel. Dark navy rather than violet so the accent still has something to
     stand out against. */
  --kz-night: #080655;
  --kz-night-2: #130f7a;
  /* The sign-in page's panel and what is laid over a photo. */
  --kz-night-deep: #071437;
  --kz-night-deepest: #040b20;
  --kz-on-photo: #4b5675;
  /* Green read on the always-dark panels (the sign-in path, a notice). */
  --kz-success-bright: #7df0a6;
  /* Words on the pale and on the bright steps of the phase ramp. */
  --kz-ph-on-pale: #2d1178;
  --kz-ph-on-bright: #1b1238;
  /* On paper: black words, grey rules, whatever the mode on screen. */
  --kz-print-ink: #000;
  --kz-print-line: #999;

  /* Type. One scale, and nothing people read is under 12px: captions 12,
     small print 13, table and control text 14, body 15, then the headings. */
  --kz-fs-xs: 12px;
  --kz-fs-sm: 13px;
  --kz-fs-md: 14px;
  --kz-fs-base: 15px;
  --kz-fs-lg: 16px;
  --kz-fs-xl: 20px;
  --kz-fs-2xl: 24px;
  --kz-fs-3xl: 32px;
  --kz-lh: 1.5;

  /* Space, on a 4px grid. */
  --kz-sp-1: 4px;
  --kz-sp-2: 8px;
  --kz-sp-3: 12px;
  --kz-sp-4: 16px;
  --kz-sp-5: 24px;
  --kz-sp-6: 32px;

  /* The least height of anything pressed. */
  --kz-tap: 40px;

  --kz-r: 12px;
  --kz-r-lg: 16px;
  --kz-r-sm: 8px;

  /* Elevation by day: a card lifts a little off the grey page, a menu or a
     dialog a lot. By night shadows do not show, and the lighter surface does
     the lifting instead. */
  --kz-shadow: 0 1px 2px rgba(11, 20, 51, .06), 0 2px 6px rgba(11, 20, 51, .06);
  /* Under the pointer: a card lifts. */
  --kz-shadow-md: 0 2px 4px rgba(11, 20, 51, .06), 0 10px 22px -8px rgba(11, 20, 51, .20);
  --kz-shadow-lg: 0 12px 32px -8px rgba(11, 20, 51, .22), 0 2px 6px rgba(11, 20, 51, .06);

  /* Shell measurements, named because three things are positioned from them:
     the bar, the column beside the sidebar, and whatever sticks under the bar. */
  --kz-side-w: 272px;
  --kz-side-w-mini: 76px;
  --kz-top-h: 68px;
}
/* ==========================================================================
   0. Dark mode
   The same tokens, given their night values. Nothing below this block knows
   which mode it is in — a component that needs to would be a component with
   a colour written into it, and those are the ones that break at night.

   A dim slate page rather than black — an ordinary office or factory
   monitor crushes everything under about #1a1a1a to one black, and page,
   card and border were there but could not be told apart — and every step
   UP is LIGHTER: page, card, the well inside a card, a menu or dialog. Shadows do
   not show on a dark page, so the lightness is what lifts a surface, and
   every surface keeps an edge that can be seen (1.4:1 or more against it).
   The colours are lighter and less saturated than by day: the day's red,
   green and violet on charcoal either glare or sink.

   js/theme.js sets data-theme on <html> before the page is painted: "dark" or
   "light", worked out from what the person chose (light, dark, or follow the
   system). With scripting off there is no attribute and the page is light.
   ========================================================================== */

.kz-side,
[data-theme="dark"] {
  color-scheme: dark;

  /* Deep slate, each step up lighter: page, card, the well inside a card,
     a menu. On a card / against the page the card is 1.2:1, its frame 1.5:1
     against the card. */
  --kz-bg: #151b26;
  --kz-surface: #212a38;
  --kz-pop: #2c3647;
  --kz-soft: #293344;
  --kz-hover: #2c3647;
  --kz-toast: #37425a;
  --kz-lane: #1a212d;
  --kz-late: color-mix(in srgb, var(--kz-danger) 11%, var(--kz-surface));
  --kz-late-hover: color-mix(in srgb, var(--kz-danger) 16%, var(--kz-surface));

  --kz-shade: #000;

  --kz-primary: #7f47f5;
  --kz-primary-700: #6a30e8;
  --kz-primary-600: #7a3ff2;
  --kz-primary-100: #40376e;
  --kz-primary-050: #332e57;
  --kz-selected: var(--kz-primary-050);
  --kz-on-primary: #fff;

  /* On a card / on the page: 6.9 / 8.2. */
  --kz-accent: #bba5ff;
  --kz-accent-2: #d3c6ff;
  --kz-focus: #bba5ff;

  /* On a card / on the page:
     ink 13.3 / 15.9 · ink-2 10.4 / 12.4 · ink-3 7.6 / 9.1 · ink-4 6.2 / 7.4 */
  --kz-ink: #f1f5f9;
  --kz-ink-2: #d5dbe6;
  --kz-ink-3: #b3bdcc;
  --kz-ink-4: #a0abbd;
  --kz-ink-disabled: #7a8698;

  /* Card frame 1.5:1 on the card, input edge 4.3:1 (3.7:1 in a menu). */
  --kz-line: #3b4759;
  --kz-line-2: #303b4c;
  --kz-line-3: #4a576c;
  --kz-line-input: #8391a8;

  --kz-scrim: rgba(0, 0, 0, .62);

  --kz-swatch-s: 40%;
  --kz-swatch-l: 30%;
  --kz-swatch-ink-s: 88%;
  --kz-swatch-ink-l: 82%;

  /* Green, amber and blue marks 4.9:1 or more on a card. Tints are deep shades of their own colour
     rather than greys, so a green badge and a red one can still be told
     apart by more than the word on them; the inks are their bright ends. */
  --kz-success: #3cc774;
  --kz-success-050: #1a3327;
  --kz-success-ink: #6ee49c;
  --kz-success-on: #04170b;
  --kz-warning: #eca33a;
  --kz-warning-050: #3a2e18;
  --kz-warning-ink: #f6bf62;
  --kz-warning-on: #1e1200;
  /* The red keeps its day value as a fill — white on it is 4.7:1 — and as a
     mark it is 3.1:1 on a card; the words in red are -ink. */
  --kz-danger: #e11d48;
  --kz-danger-050: #46222b;
  --kz-danger-ink: #ff8ea8;
  --kz-danger-on: #fff;
  --kz-info: #4c95f5;
  --kz-info-050: #1b3150;
  --kz-info-ink: #8ec0ff;
  --kz-info-on: #04111f;

  --kz-success-solid: #177f43;

  /* The ramp runs the other way at night: the further along, the brighter. */
  --kz-lvl-track: rgba(255, 255, 255, .15);
  --kz-lvl-ring: rgba(255, 255, 255, .08);
  --kz-lvl-1: #6d52c4;
  --kz-lvl-2: #8f6af0;
  --kz-lvl-3: #bda6ff;
  --kz-lvl-4: #3cc774;
  --kz-lvl-goal: #f6bf62;

  /* Lifted a step, so the headline card still stands off a slate page. */
  --kz-night: #15116e;
  --kz-night-2: #221c9c;

  /* An empty shadow rather than none: a rule that adds its own mark to it
     (the red edge of a late card) is still a valid shadow, where `none` in
     a list threw the whole declaration away. */
  --kz-shadow: 0 0 0 transparent;
  --kz-shadow-md: 0 10px 24px -10px rgba(0, 0, 0, .55);
  --kz-shadow-lg: 0 16px 40px -10px rgba(0, 0, 0, .7);
}
/* ==========================================================================
   1. Base
   ========================================================================== */

/* The interface zoom (js/zoom.js; the buttons are layouts/partials/
   zoom-buttons). CSS zoom rather than a larger root font size: the sizes here
   are in px, and zoom enlarges every one of them — text, spacing, icons, the
   shell — and lays the page out again at its new size.

   To behave as the browser's own zoom does, the page has to take the layout
   of the width it now has: at 150% a 1366px laptop is a 911px page, and gets
   the tablet's layout, not the laptop's squeezed. A media query cannot see
   that — it reads the screen — so every width rule here and in Bootstrap's
   stylesheet is an @container kz-screen query instead, which reads <html>,
   in the page's own pixels. At 100% the two are the same width, less a
   scrollbar. kaizen.js asks the same question through --kz-desk on <body>.

   One more difference: a length in vh or vw is zoomed too, so whatever has
   to fit the screen divides it back by --kz-zoom (each such place says so). */
:root {
  --kz-zoom: 1;
}

html {
  container: kz-screen / inline-size;
  zoom: var(--kz-zoom);
}

/* The desk layout — the sidebar beside the page rather than a drawer — for
   kaizen.js to read, so it never disagrees with the stylesheet. */
body {
  --kz-desk: 0;
}

@container kz-screen (min-width: 1200px) {
  body {
    --kz-desk: 1;
  }
}

/* A browser with no CSS zoom to give is not offered buttons that do nothing. */
@supports not (zoom: 1) {
  .kz-zoom {
    display: none !important;
  }
}

body {
  margin: 0;
  background-color: var(--kz-bg);
  color: var(--kz-ink-2);
  /* Roboto ships with the project (assets/plugins/roboto, the variable font,
     every weight), so the page reads the same on every machine and never
     waits on a font server. */
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--kz-fs-base);
  letter-spacing: normal;
  /* Nothing sideways past the window's edge. Clipped rather than hidden:
     <html> is the zoom's container (Base), which keeps the page from handing
     body's overflow to the window, so a hidden one made body a scrolling box
     of its own — one that never scrolls, and that everything sticky (a
     table's heading row, .kz-sticky) stuck to instead of the window. A
     browser without clip keeps hidden. */
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--kz-ink);
  letter-spacing: -.01em;
}

a {
  color: var(--kz-accent);
  text-decoration: none;
}

a:hover {
  color: var(--kz-accent-2);
}

::placeholder {
  color: var(--kz-ink-4);
  opacity: 1;
}

/* --- Bootstrap pieces the pages still use, brought into the language ------ */

.dropdown-toggle-nocaret::after {
  display: none;
}

/* Bootstrap 5.2 has no dark mode of its own, so each piece of it that the
   pages use is given its colours from the tokens here. */
.dropdown-menu {
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  padding: 8px;
  background-color: var(--kz-pop);
  color: var(--kz-ink-2);
  box-shadow: var(--kz-shadow-lg);
  font-size: var(--kz-fs-md);
}

.text-secondary,
.dropdown-item-text {
  color: var(--kz-ink-3) !important;
}

.dropdown-menu .dropdown-item {
  border-radius: var(--kz-r-sm);
  padding: 8px 12px;
  font-size: var(--kz-fs-md);
  font-weight: 500;
  color: var(--kz-ink-2);
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
  background: var(--kz-soft);
  color: var(--kz-accent);
}

/* The chosen one is tinted, not filled: a filled row in a four-row menu reads
   as a button to press rather than as "this is what you have". A link says it
   with .active; a button that sets something says it with aria-pressed. */
.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item[aria-pressed="true"] {
  background: var(--kz-primary-050);
  color: var(--kz-accent);
  font-weight: 600;
}

.dropdown-menu .dropdown-item .bi {
  margin-right: 9px;
}

.dropdown-divider {
  border-top-color: var(--kz-line-2);
  opacity: 1;
}

/* Bootstrap's own badge, where a status hands back a bg-* class. Tint and
   dark ink instead of a solid fill: a row of solid badges shouts, and white on
   the fill green or amber is not readable at this size. */
.badge {
  padding: 5px 9px;
  border-radius: 6px;
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  letter-spacing: normal;
}

.badge.bg-primary   { background-color: var(--kz-primary-050) !important; color: var(--kz-accent-2) !important; }
.badge.bg-success   { background-color: var(--kz-success-050) !important; color: var(--kz-success-ink) !important; }
.badge.bg-warning   { background-color: var(--kz-warning-050) !important; color: var(--kz-warning-ink) !important; }
.badge.bg-danger    { background-color: var(--kz-danger-050) !important;  color: var(--kz-danger-ink) !important; }
.badge.bg-info      { background-color: var(--kz-info-050) !important;    color: var(--kz-info-ink) !important; }
.badge.bg-secondary { background-color: var(--kz-line-2) !important;      color: var(--kz-ink-2) !important; }
.badge.bg-light     { background-color: var(--kz-soft) !important;        color: var(--kz-ink-2) !important; box-shadow: inset 0 0 0 1px var(--kz-line); }

.modal-content {
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r-lg);
  background-color: var(--kz-pop);
  color: var(--kz-ink-2);
  box-shadow: var(--kz-shadow-lg);
}

.modal-header,
.modal-footer {
  border-color: var(--kz-line-2);
}

/* Bootstrap's close mark is a black drawing set as a background image, so it
   cannot take a colour from a token — the one place that has to ask which
   mode it is in. */
[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.modal-backdrop {
  --bs-backdrop-bg: var(--kz-scrim);
  --bs-backdrop-opacity: 1;
}

.btn-light {
  --bs-btn-bg: var(--kz-soft);
  --bs-btn-border-color: var(--kz-line);
  --bs-btn-color: var(--kz-ink-2);
  --bs-btn-hover-bg: var(--kz-line-2);
  --bs-btn-hover-border-color: var(--kz-line-3);
  --bs-btn-hover-color: var(--kz-ink);
  border-radius: var(--kz-r-sm);
  font-weight: 600;
}

/* ==========================================================================
   2. Shell — sidebar
   A white column with a hairline, the way the template draws it: the brand in
   a row as tall as the top bar so the two rules meet, the menu scrolling on
   its own, and the person signed in parked at the foot.
   ========================================================================== */

.kz-app {
  /* The screen's height whatever the zoom (see Base). */
  min-height: calc(100vh / var(--kz-zoom));
}

.kz-side {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  width: var(--kz-side-w);
  background: var(--kz-surface);
  border-right: 1px solid var(--kz-line-3);
  transition: width .2s ease, transform .22s ease, box-shadow .2s ease;
}

.kz-side__brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--kz-top-h);
  padding: 0 20px;
  border-bottom: 1px solid var(--kz-line-3);
  color: var(--kz-ink);
  white-space: nowrap;
  overflow: hidden;
}

.kz-side__brand:hover {
  color: var(--kz-ink);
}

/* The mark is a blue drawing; on a violet tile it is shown in white so the
   brand and the accent are one colour rather than two that nearly match. */
.kz-logo {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--kz-primary) 0%, var(--kz-primary-700) 100%);
}

.kz-logo img {
  width: 17px;
  height: auto;
  filter: brightness(0) invert(1);
}

.kz-side__name {
  font-size: var(--kz-fs-xl);
  font-weight: 700;
  letter-spacing: -.02em;
}

.kz-side__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 14px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--kz-line-3) transparent;
}

.kz-nav {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kz-nav__label {
  padding: 18px 12px 7px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}

.kz-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--kz-r-sm);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 500;
  line-height: 1.3;
  transition: background .15s ease, color .15s ease;
}

.kz-nav__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 20px;
  font-size: 17px;
  line-height: 1;
  color: var(--kz-ink-4);
  transition: color .15s ease;
}

.kz-nav__text {
  flex: 1 1 auto;
  min-width: 0;
}

.kz-nav__link:hover,
.kz-nav__link:focus-visible {
  background: var(--kz-soft);
  color: var(--kz-ink);
}

.kz-nav__link:hover .kz-nav__icon,
.kz-nav__link:focus-visible .kz-nav__icon {
  color: var(--kz-accent);
}

/* Where you are: the tint and the accent, and nothing louder. The sidebar is
   on screen all day; a filled block in it competes with the page. */
.kz-nav__link.is-active,
.kz-nav__link.is-active:hover {
  background: var(--kz-primary-050);
  color: var(--kz-accent);
  font-weight: 600;
}

.kz-nav__link.is-active .kz-nav__icon {
  color: var(--kz-accent);
}

.kz-nav__link:focus-visible,
.kz-userbtn:focus-visible,
.kz-topbtn:focus-visible,
.kz-zoom button:focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 1px;
}

/* --- The person signed in ------------------------------------------------ */

.kz-side__foot {
  flex: 0 0 auto;
  padding: 12px 14px;
  border-top: 1px solid var(--kz-line-3);
}

.kz-userbtn {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: var(--kz-r-sm);
  background: transparent;
  color: var(--kz-ink-4);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease;
}

.kz-userbtn:hover,
.kz-userbtn[aria-expanded="true"] {
  background: var(--kz-soft);
}

.kz-userbtn__text {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.3;
}

.kz-userbtn__name,
.kz-userbtn__role {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kz-userbtn__name {
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
}

.kz-userbtn__role {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
}

.kz-side__foot .dropdown-menu {
  min-width: calc(var(--kz-side-w) - 28px);
}

/* --- Narrow rail (desktop) ------------------------------------------------
   The wide pages — the task table, the matrix — want the width back. The rail
   keeps every destination one click away, and opens to full width for as long
   as the pointer or the keyboard is inside it, so nothing has to be learned by
   icon alone. */
@container kz-screen (min-width: 1200px) {
  .kz-nav-collapsed .kz-side:not(:hover):not(:focus-within) {
    width: var(--kz-side-w-mini);
  }

  .kz-nav-collapsed .kz-side:is(:hover, :focus-within) {
    box-shadow: 12px 0 40px -18px color-mix(in srgb, var(--kz-shade) 28%, transparent);
  }

  .kz-nav-collapsed .kz-side:not(:hover):not(:focus-within) :is(.kz-side__name, .kz-nav__text, .kz-userbtn__text, .kz-userbtn__more) {
    display: none;
  }

  /* A heading with no words left is still a break between groups. */
  .kz-nav-collapsed .kz-side:not(:hover):not(:focus-within) .kz-nav__label {
    height: 1px;
    margin: 10px 12px;
    padding: 0;
    background: var(--kz-line-2);
    color: transparent;
  }

  .kz-nav-collapsed .kz-side:not(:hover):not(:focus-within) :is(.kz-nav__link, .kz-userbtn) {
    justify-content: center;
    padding-inline: 0;
  }

  .kz-nav-collapsed .kz-main {
    margin-left: var(--kz-side-w-mini);
  }

  .kz-nav-collapsed .kz-top {
    left: var(--kz-side-w-mini);
  }
}

/* --- Drawer (below desktop) ------------------------------------------------ */

.kz-scrim {
  display: none;
}

@container kz-screen (max-width: 1199.98px) {
  .kz-side {
    z-index: 1045;
    width: min(var(--kz-side-w), 86vw / var(--kz-zoom));
    transform: translateX(-100%);
    /* Hidden, not just off screen, so its links are out of the tab order
       while it is away — but only once it has finished sliding out. */
    visibility: hidden;
    transition: transform .22s ease, visibility 0s linear .22s;
  }

  .kz-nav-open .kz-side {
    transform: none;
    visibility: visible;
    box-shadow: var(--kz-shadow-lg);
    transition: transform .22s ease, visibility 0s;
  }

  .kz-nav-open .kz-scrim {
    position: fixed;
    inset: 0;
    z-index: 1040;
    display: block;
    border: 0;
    background: var(--kz-scrim);
    cursor: pointer;
  }
}

/* ==========================================================================
   3. Shell — top bar and the column beside the sidebar
   ========================================================================== */

.kz-main {
  margin-left: var(--kz-side-w);
  padding: calc(var(--kz-top-h) + 28px) 30px 48px;
  transition: margin-left .2s ease;
}

.kz-page {
  max-width: 1440px;
  margin: 0 auto;
}

/* Below every dropdown and dialog the pages open (Bootstrap starts at 1000,
   the attendance picker sits at 60), above everything that merely sticks. */
.kz-top {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--kz-side-w);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--kz-top-h);
  padding: 0 30px;
  background: var(--kz-surface);
  border-bottom: 1px solid var(--kz-line-3);
  transition: left .2s ease;
}

.kz-top__where {
  flex: 1 1 auto;
  min-width: 0;
}

.kz-top__tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* The square controls of the bar — the menu button, the bell, the language.
   40px so each is a comfortable target for a finger as well as a pointer. */
.kz-topbtn {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--kz-ink-3);
  font: inherit;
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.kz-topbtn .bi {
  font-size: 18px;
  line-height: 1;
}

.kz-topbtn:hover,
.kz-topbtn[aria-expanded="true"],
.kz-topbtn.is-on {
  background: var(--kz-primary-050);
  color: var(--kz-accent);
}

.kz-top__menu {
  margin-left: -10px;
}

/* --- Light, dark, or as the system has it -----------------------------------
   The button wears the icon of what is chosen — a sun, a moon, or the
   half-and-half disc for "follow the system" — so the choice can be read
   without opening the menu. All three are in the page; the attribute theme.js
   keeps on <html> picks the one to show, so nothing flickers on load. */
.kz-mode__icon {
  display: none;
}

:root:not([data-theme-mode]) .kz-mode__icon--auto,
[data-theme-mode="auto"] .kz-mode__icon--auto,
[data-theme-mode="light"] .kz-mode__icon--light,
[data-theme-mode="dark"] .kz-mode__icon--dark {
  display: inline-block;
}

.kz-mode .dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
}

/* --- Zoom -------------------------------------------------------------------
   Smaller, the level, larger — one control on one tray, so it reads as one.
   The level in between is a button too: pressing it puts the page back to
   100%. What it says comes from <html> (js/zoom.js), so a page opened at 125%
   says 125% from its first paint. In the top bar the tray is its own; on the
   sign-in, error and shared pages it is one more .kz-langpick strip. */
.kz-zoom {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.kz-zoom:not(.kz-langpick) {
  gap: 2px;
  height: 36px;
  padding: 2px;
  border-radius: 9px;
  background: var(--kz-soft);
  box-shadow: inset 0 0 0 1px var(--kz-line);
}

.kz-zoom:not(.kz-langpick) button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--kz-ink-3);
  font: inherit;
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.kz-zoom:not(.kz-langpick) button:hover {
  background: var(--kz-surface);
  color: var(--kz-accent);
}

.kz-zoom__btn .bi {
  font-size: var(--kz-fs-lg);
  line-height: 1;
}

/* Wide enough for "100%", so the tray does not change width as the level
   changes, and the figures do not jitter. */
.kz-zoom__level {
  min-width: 48px;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.kz-zoom__level::before {
  content: var(--kz-zoom-label, "100%");
}

/* In the top bar on a wide page; in the light-and-dark menu on a narrow one,
   where the bar has room for little more than where you are. */
.kz-top__zoom {
  display: flex;
}

.kz-mode__zoom {
  display: none;
}

@container kz-screen (max-width: 575.98px) {
  .kz-top__zoom {
    display: none;
  }

  .kz-mode__zoom {
    display: block;
  }
}

.kz-mode__zoomrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 0 0 12px;
  font-size: var(--kz-fs-md);
  font-weight: 500;
  color: var(--kz-ink-2);
}

/* At either end, the button that can go no further says so. Pressing it does
   nothing, and the pointer is not invited to try. */
[data-zoom-end="least"] .kz-zoom [data-zoom-step="-1"],
[data-zoom-end="most"] .kz-zoom [data-zoom-step="1"],
[data-zoom-end="least"] .kz-zoom [data-zoom-step="-1"]:hover,
[data-zoom-end="most"] .kz-zoom [data-zoom-step="1"]:hover {
  background: transparent;
  color: var(--kz-ink-3);
  opacity: .35;
  cursor: default;
}

@container kz-screen (max-width: 1199.98px) {
  .kz-main {
    margin-left: 0;
  }

  .kz-top {
    left: 0;
  }
}

/* ==========================================================================
   4. Page header
   ========================================================================== */

/* The trail lives in the top bar: one line that says where this page sits,
   on every page, in the same place. It never wraps — the bar has one height —
   so the last, most specific part is the one that gives way. */
.kz-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: var(--kz-fs-md);
  font-weight: 500;
  color: var(--kz-ink-3);
  white-space: nowrap;
}

.kz-crumbs > * {
  flex: 0 0 auto;
}

.kz-crumbs a {
  color: var(--kz-ink-3);
  transition: color .15s ease;
}

.kz-crumbs a:hover {
  color: var(--kz-accent);
}

.kz-crumbs__sep {
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-xs);
}

.kz-crumbs__current {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--kz-ink);
  font-weight: 600;
}

/* A layout with no top bar (the shared project page) shows the trail above
   the content instead. */
.kz-shared .kz-crumbs {
  margin-bottom: 14px;
  flex-wrap: wrap;
  white-space: normal;
}

.kz-pagehead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.kz-pagehead__text {
  flex: 1 1 320px;
  min-width: 0;
}

.kz-pagehead__title {
  margin: 0;
  font-size: clamp(1.3rem, 1.12rem + .5vw, 1.55rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.kz-pagehead__sub {
  margin: 5px 0 0;
  font-size: var(--kz-fs-md);
  color: var(--kz-ink-3);
}

.kz-pagehead__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

/* ==========================================================================
   5. Cards
   ========================================================================== */

.kz-card {
  position: relative;
  margin-bottom: 24px;
  border-radius: var(--kz-r);
  background: var(--kz-surface);
  border: 1px solid var(--kz-line);
  box-shadow: var(--kz-shadow);
}

.kz-card--flush {
  overflow: hidden;
}

/* Cards in one row end level with each other — asked for by the row, since a
   short form beside a long table should not be stretched to match it. */
.kz-level > [class*="col-"] > :is(.kz-card, .kz-spot):only-child {
  height: calc(100% - 24px);
}

/* Every card already carries its own 24px below it. With the grid's vertical
   gutter on top, columns that wrap under each other stood 48px apart while
   rows stood 24px apart. */
.kz-level {
  --bs-gutter-y: 0;
}

/* A whole card that is one link — the dashboard's project-type cards are the
   only way into a type's list, so the entire card is the target, not just the
   title. Colour is inherited so the card keeps reading as a card. */
.kz-card--link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.kz-card--link:hover,
.kz-card--link:focus-visible {
  color: inherit;
  border-color: var(--kz-primary);
  box-shadow: 0 10px 30px -14px color-mix(in srgb, var(--kz-primary) 35%, transparent);
  transform: translateY(-2px);
}

.kz-card--link:focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-card--link:hover .kz-card__title {
  color: var(--kz-accent);
}

@media (prefers-reduced-motion: reduce) {
  .kz-card--link {
    transition: none;
  }

  .kz-card--link:hover,
  .kz-card--link:focus-visible {
    transform: none;
  }
}

.kz-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--kz-line-2);
}

.kz-card__title {
  margin: 0;
  font-size: var(--kz-fs-lg);
  font-weight: 600;
  line-height: 1.35;
  transition: color .15s ease;
}

/* An icon written straight into a title, ahead of the words. */
.kz-card__title > .bi:first-child {
  margin-right: 7px;
  color: var(--kz-ink-4);
}

.kz-card__sub {
  margin: 2px 0 0;
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  color: var(--kz-ink-3);
}

.kz-card__count {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--kz-soft);
  box-shadow: inset 0 0 0 1px var(--kz-line);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kz-card__body {
  padding: 22px 24px;
}

.kz-card__body--tight {
  padding: 0;
}

/* An icon in a tinted square: the template's "symbol". Leads a card title,
   so a row of cards can be told apart before a word is read. */
.kz-symbol {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--kz-r);
  background: var(--kz-primary-050);
  color: var(--kz-accent);
  font-size: var(--kz-fs-xl);
}

.kz-symbol--success { background: var(--kz-success-050); color: var(--kz-success-ink); }
.kz-symbol--neutral { background: var(--kz-soft);        color: var(--kz-ink-3); box-shadow: inset 0 0 0 1px var(--kz-line); }

.kz-sticky {
  position: sticky;
  top: calc(var(--kz-top-h) + 24px);
  /* Keeps the last card's margin inside, so sliding to the foot of its
     column never lands it flush on the card below the columns. */
  display: flow-root;
}

.kz-rule {
  height: 1px;
  margin: 4px 0 20px;
  background: var(--kz-line);
}

/* ==========================================================================
   6. Buttons
   Flat, as the template draws them: one fill, no gradient, no glow. What a
   button does is said by its fill; what state it is in by the fill darkening.
   ========================================================================== */

.kz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--kz-r-sm);
  font-family: inherit;
  font-size: var(--kz-fs-md);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.kz-btn--primary {
  color: var(--kz-white);
  background: var(--kz-primary);
}

.kz-btn--primary:hover:not(:disabled) {
  color: var(--kz-white);
  background: var(--kz-primary-700);
}

.kz-btn--success {
  color: var(--kz-white);
  background: var(--kz-success-solid);
}

.kz-btn--success:hover:not(:disabled) {
  color: var(--kz-white);
  background: var(--kz-success-ink);
}

/* Dark ink on amber: white on it is 1.7:1. */
.kz-btn--warning {
  color: var(--kz-warning-on);
  background: var(--kz-warning);
}

.kz-btn--warning:hover:not(:disabled) {
  color: var(--kz-warning-on);
  background: var(--kz-warning);
  box-shadow: inset 0 0 0 99px color-mix(in srgb, var(--kz-white) 14%, transparent);
}

.kz-btn--ghost {
  background: var(--kz-surface);
  border-color: var(--kz-line-3);
  color: var(--kz-ink-2);
}

.kz-btn--ghost:hover:not(:disabled) {
  background: var(--kz-primary-050);
  border-color: var(--kz-primary);
  color: var(--kz-accent);
}

/* The template's "light primary": quiet until pointed at, then the full fill. */
.kz-btn--soft {
  background: var(--kz-primary-050);
  color: var(--kz-accent);
}

.kz-btn--soft:hover:not(:disabled) {
  background: var(--kz-primary);
  color: var(--kz-white);
}

.kz-btn--sm {
  padding: 7px 12px;
  font-size: var(--kz-fs-sm);
  border-radius: 6px;
}

.kz-btn:disabled {
  background: var(--kz-line-2);
  border-color: transparent;
  color: var(--kz-ink-3);
  box-shadow: none;
  cursor: not-allowed;
}

/* Full-width call to action. */
.kz-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 13px 18px;
  border: 0;
  border-radius: var(--kz-r-sm);
  font-family: inherit;
  font-size: var(--kz-fs-base);
  font-weight: 600;
  color: var(--kz-white);
  background: var(--kz-primary);
  cursor: pointer;
  transition: background .15s ease, box-shadow .2s ease;
}

.kz-cta:hover:not(:disabled) {
  background: var(--kz-primary-700);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--kz-primary) 70%, transparent);
}

.kz-cta--success {
  background: var(--kz-success-solid);
}

.kz-cta--success:hover:not(:disabled) {
  background: var(--kz-success-ink);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--kz-success) 70%, transparent);
}

.kz-cta:disabled {
  background: var(--kz-line-2);
  color: var(--kz-ink-3);
  box-shadow: none;
  cursor: not-allowed;
}

/* A horizontal run of controls: the Edit + Delete pair at the end of a table
   row, the two gate buttons on a training, the month arrows on attendance.

   The forms matter. A one-button form is a block element, so without this the
   button below it starts a new line and the row grows to fit — which is what
   was happening on every actions column. */
.kz-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.kz-actions form {
  display: flex;
  margin: 0;
}

/* Actions in a right-aligned cell hug the right edge. */
.kz-table__end .kz-actions {
  justify-content: flex-end;
}

/* ==========================================================================
   7. Badges & chips
   ========================================================================== */

.kz-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

/* The dot repeats the status in a second channel, for whoever cannot tell the
   tints apart. */
.kz-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.kz-badge--doing,
.kz-badge--open {
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
}

.kz-badge--done,
.kz-badge--finished {
  background: var(--kz-success-050);
  color: var(--kz-success-ink);
}

.kz-badge--closed {
  background: var(--kz-info-050);
  color: var(--kz-info-ink);
}

.kz-badge--neutral {
  background: var(--kz-line-2);
  color: var(--kz-ink-2);
}

.kz-badge--live {
  background: var(--kz-primary-050);
  color: var(--kz-accent-2);
}

.kz-tag {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  white-space: nowrap;
}

.kz-tag--current {
  background: var(--kz-primary-050);
  color: var(--kz-accent-2);
}

.kz-tag--done {
  background: var(--kz-success-050);
  color: var(--kz-success-ink);
}

.kz-tag--upcoming {
  background: var(--kz-line-2);
  color: var(--kz-ink-3);
}

/* Overdue is the one number a manager scans for, and it lands on both white
   and the soft grey — where plain --kz-danger is 4.35:1, just under the bar. */
.kz-overdue {
  color: var(--kz-danger-ink) !important;
  font-weight: 600;
}

/* ==========================================================================
   8. People
   ========================================================================== */

.kz-person {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

/* Initials on a tint of the person's own hue, the letters in its dark shade —
   the template's light symbols. Told apart by hue, read by letter, and quiet
   enough that a table of forty of them is still a table. */
.kz-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: hsl(var(--kz-h, 262) var(--kz-swatch-s) var(--kz-swatch-l));
  color: hsl(var(--kz-h, 262) var(--kz-swatch-ink-s) var(--kz-swatch-ink-l));
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: 0;
}

.kz-avatar--lg {
  width: 38px;
  height: 38px;
  border-radius: var(--kz-r);
  font-size: var(--kz-fs-md);
}

/* The people on a task (team/partials/task-people): each by their whole name,
   one under another, numbered when they are two or more. A long name wraps
   under itself, beside its number and face, and is never cut short — the
   white-space is set here, so a cell that keeps to one line cannot cut it. */
.kz-taskpeople {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--kz-fs-md);
  line-height: 1.35;
}

.kz-taskpeople__one {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
}

/* The number and the name's first line sit level with the middle of the face. */
.kz-taskpeople__no {
  flex: 0 0 auto;
  min-width: 1.3em;
  padding-top: 2px;
  color: var(--kz-ink-3);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.kz-taskpeople .kz-avatar {
  width: 22px;
  height: 22px;
  font-size: var(--kz-fs-xs);
}

/* What somebody is on a project, under their name (projects/partials/details). */
.kz-taskpeople__tag {
  display: flex;
  width: fit-content;
  margin-top: 4px;
}

.kz-taskpeople__name {
  min-width: 0;
  padding-top: 2px;
  color: var(--kz-ink);
  font-weight: 500;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   9. Tables
   ========================================================================== */

/* For a table with more columns than its column of the page can hold — the
   admin panel's list-beside-a-form layouts. Without this the browser squeezes
   the text columns until a one-line row becomes six, which is far worse to read
   than the sideways scroll this trades it for. */
.kz-tablewrap--wide .kz-table {
  min-width: max-content;
}

.kz-tablewrap {
  overflow-x: auto;
}

/* A list read whole rather than page by page (the people list), in the
   page's own scroll. Its table fits the card, the cells wrapping where they
   must; while it does — kaizen.js measures it and says so with .is-whole —
   nothing around it scrolls on its own, so the heading row stays under the
   top bar all the way down the list. On a phone the table keeps its width
   instead, as --wide does, and scrolls sideways in its frame. The card
   clips rather than hides what overflows it: the same rounded corners,
   without becoming a frame the heading would stick inside. */
.kz-card--list {
  overflow: clip;
}

/* A long name or position takes a second line rather than widening the
   table: a list of people is read for whole names, never cut short. */
.kz-tablewrap--list :is(.kz-person .text-truncate, .kz-badge) {
  white-space: normal;
}

@container kz-screen (max-width: 767.98px) {
  .kz-tablewrap--list .kz-table {
    min-width: max-content;
  }
}

.kz-tablewrap--list.is-whole {
  overflow: visible;
}

.kz-tablewrap--list.is-whole thead th {
  top: var(--kz-top-h);
  /* Over the rows going by under it: a badge, an avatar. */
  z-index: 1;
}

/* What was typed, found in a name, a login or an email — as the picker
   marks it (.kz-pick__name). */
.kz-tablewrap--list mark {
  padding: 0;
  border-radius: 2px;
  background: var(--kz-primary-100);
  color: inherit;
}

.kz-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--kz-fs-md);
}

/* No band behind the headings, as in the template: small capitals and a
   dashed rule are enough to say "this is the heading row". The surface colour
   is still set, because the heading sticks and rows scroll under it. */
.kz-table thead th {
  position: sticky;
  top: 0;
  padding: 13px 16px;
  background: var(--kz-surface);
  border-bottom: 1px dashed var(--kz-line-3);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.kz-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px dashed var(--kz-line);
  color: var(--kz-ink-2);
  vertical-align: middle;
}

.kz-table :is(th, td):first-child {
  padding-left: 24px;
}

.kz-table :is(th, td):last-child {
  padding-right: 24px;
}

.kz-table tbody tr {
  transition: background .13s ease;
}

.kz-table tbody tr:hover {
  background: var(--kz-hover);
}

.kz-table tbody tr:last-child td,
.kz-table tbody tr.is-last td {
  border-bottom: 0;
}

.kz-table__id {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-variant-numeric: tabular-nums;
}

.kz-table__link {
  color: var(--kz-ink);
  font-weight: 600;
  transition: color .15s ease;
}

.kz-table__link:hover {
  color: var(--kz-accent);
}

.kz-table__sub {
  margin-top: 2px;
  font-size: var(--kz-fs-xs);
  color: var(--kz-ink-3);
}

/* A line under a row that asks for a second look. */
.kz-table__sub--warn {
  color: var(--kz-warning-ink);
}

.kz-table__end {
  text-align: right;
}

/* The project lists. The title is what a row is read for, so it keeps room
   for two lines instead of being squeezed to one word per line by the
   columns beside it; those — names, a shift, the phase, a date — are short
   and stay on one line, since "1-" over "smena" reads as two things. */
.kz-table__title {
  min-width: 200px;
  max-width: 400px;
}

.kz-table__title .kz-table__sub {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-top: 4px;
  font-size: var(--kz-fs-sm);
}

.kz-table__subitem {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.kz-table__nowrap {
  white-space: nowrap;
}

/* A person on a project list: the whole name, on a second line when the row
   has no room for it on one. Kept on one line, three long names pushed the
   production list far past its frame. */
.kz-table__person {
  min-width: 150px;
}

.kz-table__person > div + div {
  margin-top: 6px;
}

.kz-table__person .kz-person .text-truncate {
  white-space: normal;
}

/* Ten columns on a laptop screen: a little less air between the inner ones,
   so the last — the delete button — is not cut off at the card's edge. The
   outer two keep the table's own padding. */
#kzProjectList .kz-table :is(th, td):not(:first-child):not(:last-child) {
  padding-left: 12px;
  padding-right: 12px;
}

.kz-muted {
  color: var(--kz-ink-3);
}

/* Compact phase indicator: one dot per phase. */
.kz-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.kz-dots__d {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--kz-line-3);
}

.kz-dots__d--on {
  background: var(--kz-primary);
}

.kz-dots__d--done {
  background: var(--kz-success);
}

.kz-dots__n {
  margin-left: 5px;
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  color: var(--kz-ink-3);
}

/* ==========================================================================
   10. Forms
   ========================================================================== */

.kz-form {
  display: grid;
  gap: 18px;
}

.kz-grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.kz-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  /* Without this the control stretches to match a taller neighbour — one field
     growing an error message would leave the whole row at different heights. */
  align-content: start;
}

.kz-label {
  font-size: var(--kz-fs-md);
  font-weight: 600;
  color: var(--kz-ink);
}

.kz-label__req {
  color: var(--kz-danger-ink);
}

/* A value worked out from other fields: shaped like the input beside it, but
   plainly not one to type into. */
.kz-enddate {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border: 1px dashed var(--kz-line-3);
  border-radius: var(--kz-r-sm);
  background: var(--kz-soft);
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Bordered, not the template's borderless grey field: on a white page a grey
   box with no edge reads as disabled. */
.kz-input,
.kz-select {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--kz-line-input);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.kz-input::placeholder {
  color: var(--kz-ink-4);
}

/* Shown, and not open to change: a session's day once it has taken place.
   (A link to copy is read-only too, and has a look of its own.) */
.kz-input[readonly]:not(.kz-input--copy),
.kz-input[readonly]:not(.kz-input--copy):hover,
.kz-input[readonly]:not(.kz-input--copy):focus {
  background: var(--kz-line-2);
  border-color: var(--kz-line-3);
  box-shadow: none;
  color: var(--kz-ink-3);
  cursor: not-allowed;
}

.kz-input:hover,
.kz-select:hover {
  border-color: var(--kz-ink-3);
}

.kz-input:focus,
.kz-select:focus {
  outline: 0;
  border-color: var(--kz-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-focus) 26%, transparent);
}

.kz-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2378829d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.kz-input.is-invalid,
.kz-select.is-invalid {
  border-color: var(--kz-danger);
}

.kz-input.is-invalid:focus,
.kz-select.is-invalid:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-danger) 14%, transparent);
}

.kz-help {
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
  line-height: 1.45;
}

/* --- Chips (people chosen in a picker) ------------------------------------ */

.kz-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 2px;
}

.kz-chips:empty { display: none; }

.kz-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 10px;
  border-radius: 6px;
  background: var(--kz-primary-050);
  color: var(--kz-accent-2);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  line-height: 1.2;
}

.kz-chip__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-size: var(--kz-fs-xs);
  cursor: pointer;
  opacity: .6;
}

.kz-chip__x:hover,
.kz-chip__x:focus-visible {
  background: color-mix(in srgb, var(--kz-primary) 16%, transparent);
  opacity: 1;
  outline: none;
}

.kz-chip__name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Which department: a second name of the same is a different person. */
.kz-chip__sub {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 400;
  white-space: nowrap;
}

/* --- People picker (kaizen.js, "People picker") ----------------------------
   A box over a native select, opening a list with a search field on top:
   people grouped by department, each with initials, name and position. The
   list is the dropdown menus' surface — no edge, the large shadow — and
   hangs under the box (over it with .is-up), or sits in the page's flow
   (.is-inline) where something around it would cut it off. */

/* The select it stands for: out of sight, still in the form. */
.kz-pick__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  opacity: 0;
  pointer-events: none;
}

.kz-pick {
  position: relative;
}

.kz-pick__field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding-top: 6px;
  padding-bottom: 6px;
  line-height: 1.3;
  text-align: left;
}

.kz-pick__field.kz-select--sm {
  min-height: 34px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.kz-pick__field:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.kz-pick.is-open .kz-pick__field {
  border-color: var(--kz-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-primary) 14%, transparent);
}

.kz-pick__field .kz-avatar {
  width: 26px;
  height: 26px;
  font-size: var(--kz-fs-xs);
}

.kz-pick__field.kz-select--sm .kz-avatar {
  width: 22px;
  height: 22px;
  font-size: var(--kz-fs-xs);
}

.kz-pick__placeholder {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  color: var(--kz-ink-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kz-pick__placeholder .bi {
  color: var(--kz-ink-4);
}

/* How many are chosen, on a box that chooses several. */
.kz-pick__badge {
  flex: 0 0 auto;
  min-width: 22px;
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--kz-primary-050);
  color: var(--kz-accent-2);
  font-size: var(--kz-fs-sm);
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.kz-pick__panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: min(300px, calc(100vw / var(--kz-zoom) - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--kz-r);
  background: var(--kz-pop);
  box-shadow: var(--kz-shadow-lg), 0 0 0 1px var(--kz-line);
  color: var(--kz-ink);
  text-align: left;
}

.kz-pick__panel[hidden] {
  display: none;
}

.kz-pick.is-up .kz-pick__panel {
  top: auto;
  bottom: calc(100% + 6px);
}

.kz-pick.is-inline .kz-pick__panel {
  position: static;
  min-width: 0;
  margin-top: 6px;
}

.kz-pick__search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid var(--kz-line);
  color: var(--kz-ink-4);
}

/* The row says the field is focused — the icon and the line under it — so
   the field itself needs no ring of its own inside the list. */
.kz-pick__search:focus-within {
  border-bottom-color: var(--kz-primary);
  color: var(--kz-accent);
}

/* Above "Focus & motion" (section 20), whose ring every input gets. */
.kz-pick .kz-pick__search .kz-pick__input:focus,
.kz-pick .kz-pick__search .kz-pick__input:focus-visible {
  outline: none;
}

/* Written out in full and made specific enough, as it may stand inside a
   form's own inputs rule — a reminder's choices size every input in them
   as their radio. */
.kz-pick .kz-pick__search .kz-pick__input {
  flex: 1 1 auto;
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0;
  cursor: text;
  padding: 3px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--kz-ink);
  font: inherit;
  font-size: var(--kz-fs-md);
}

.kz-pick__input::placeholder {
  color: var(--kz-ink-4);
}

.kz-pick__clear {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  cursor: pointer;
}

.kz-pick__clear:hover,
.kz-pick__clear:focus-visible {
  background: var(--kz-soft);
  color: var(--kz-ink);
  outline: none;
}

.kz-pick__clear[hidden] {
  display: none;
}

/* The screen's height whatever the zoom (see Base). */
.kz-pick__list {
  max-height: min(340px, calc(48vh / var(--kz-zoom)));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 6px 6px;
  outline: none;
}

.kz-pick.is-inline .kz-pick__list {
  max-height: 300px;
}

/* No department headings: the first name keeps its distance from the search. */
.kz-pick__list.is-flat {
  padding-top: 6px;
}

/* Each department's heading stays at the top while its people scroll under it. */
.kz-pick__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 -6px;
  padding: 10px 14px 5px 20px;
  background: var(--kz-pop);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .02em;
}

.kz-pick__size {
  padding: 0 7px;
  border-radius: 999px;
  background: var(--kz-soft);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.kz-pick__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--kz-r-sm);
  cursor: pointer;
}

.kz-pick__opt.is-active {
  background: var(--kz-primary-050);
}

.kz-pick__opt--none {
  margin-top: 6px;
}

.kz-pick__dash {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-lg);
}

.kz-pick__text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kz-pick__name {
  overflow: hidden;
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 500;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kz-pick__opt.is-chosen .kz-pick__name {
  font-weight: 600;
}

/* What was typed, found in the name. */
.kz-pick__name mark {
  padding: 0;
  border-radius: 2px;
  background: var(--kz-primary-100);
  color: inherit;
}

.kz-pick__sub {
  overflow: hidden;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* One choice: a tick on the person chosen. */
.kz-pick__tick {
  flex: 0 0 auto;
  color: var(--kz-accent);
  font-size: var(--kz-fs-lg);
  visibility: hidden;
}

.kz-pick__opt.is-chosen .kz-pick__tick {
  visibility: visible;
}

/* Several: a box on everybody, ticked on whoever is chosen — so it is plain
   that more than one can be. */
.kz-pick--multi .kz-pick__tick {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--kz-line-input);
  border-radius: 5px;
  color: transparent;
  font-size: var(--kz-fs-sm);
  visibility: visible;
}

.kz-pick--multi .kz-pick__opt.is-chosen .kz-pick__tick {
  border-color: var(--kz-primary);
  background: var(--kz-primary);
  color: var(--kz-white);
}

.kz-pick__none {
  margin: 0;
  padding: 22px 16px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-md);
  text-align: center;
}

.kz-pick__none[hidden] {
  display: none;
}

.kz-pick__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-top: 1px solid var(--kz-line);
  background: var(--kz-soft);
}

.kz-pick__count {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
}

/* A finger needs taller rows than a pointer. */
@media (pointer: coarse) {
  .kz-pick__opt {
    padding-top: 9px;
    padding-bottom: 9px;
  }
}

.kz-error {
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  color: var(--kz-danger-ink);
}

.kz-formactions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

/* Filter bar */
.kz-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.kz-filters .kz-field {
  flex: 1 1 170px;
}

.kz-filters__actions {
  display: flex;
  gap: 9px;
  margin-left: auto;
}

/* Switch */
.kz-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: var(--kz-fs-md);
  font-weight: 500;
  color: var(--kz-ink-2);
}

.kz-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.kz-switch__track {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--kz-line-input);
  transition: background .18s ease;
}

.kz-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--kz-white);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--kz-shade) 30%, transparent);
  transition: transform .18s ease;
}

.kz-switch input:checked + .kz-switch__track {
  background: var(--kz-primary);
}

.kz-switch input:checked + .kz-switch__track::after {
  transform: translateX(18px);
}

.kz-switch input:focus-visible + .kz-switch__track {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-primary) 25%, transparent);
}

/* ==========================================================================
   11. Alerts
   The template's "notice": a tint inside a dashed edge of the same colour.
   The dashes are what separate it from a card, which has a solid one.
   ========================================================================== */

.kz-alert {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: var(--kz-r);
  border: 1px dashed transparent;
  font-size: var(--kz-fs-md);
  line-height: 1.5;
}

.kz-alert__icon {
  flex: 0 0 auto;
  font-size: 17px;
  line-height: 1.35;
}

.kz-alert__body {
  flex: 1 1 auto;
  min-width: 0;
}

.kz-alert__title {
  font-weight: 600;
}

.kz-alert ul {
  margin: 5px 0 0;
  padding-left: 18px;
}

.kz-alert__close {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: .55;
  font-size: var(--kz-fs-md);
  cursor: pointer;
  padding: 2px 4px;
  transition: opacity .15s ease;
}

.kz-alert__close:hover {
  opacity: 1;
}

.kz-alert--success {
  background: var(--kz-success-050);
  border-color: var(--kz-success);
  color: var(--kz-success-ink);
}

.kz-alert--danger {
  background: var(--kz-danger-050);
  border-color: var(--kz-danger);
  color: var(--kz-danger-ink);
}

.kz-alert--warning {
  background: var(--kz-warning-050);
  border-color: var(--kz-warning);
  color: var(--kz-warning-ink);
}

.kz-alert--info {
  background: var(--kz-info-050);
  border-color: var(--kz-info);
  color: var(--kz-info-ink);
}

/* What the last action came back with (layouts.partials.alerts), in the app:
   floating at the foot of the window, in the middle of the page. It takes
   no room, so nothing on the page moves when it arrives or when it leaves —
   and it is seen wherever on the page the work was being done.

   The middle, not a corner: the corners are where the buttons are — a row's
   own actions at the end of it, a page's at its top right — and a notice
   about the last press should not sit on the next one. */
.kz-main .kz-flash {
  /* How much of the window the menu takes: all of it, the rail, or none. */
  --kz-flash-side: var(--kz-side-w);

  position: fixed;
  bottom: 22px;
  /* The middle of the page, which begins where the menu ends. Screen-sized
     lengths are divided back by the zoom (see Base). */
  left: calc(var(--kz-flash-side) + (100vw / var(--kz-zoom) - var(--kz-flash-side)) / 2);
  transform: translateX(-50%);
  /* Over the page and the bar; under every dropdown and dialog (1000+). */
  z-index: 45;
  display: grid;
  gap: 10px;
  width: min(520px, calc(100vw / var(--kz-zoom) - var(--kz-flash-side) - 32px));
  max-height: calc(100vh / var(--kz-zoom) - var(--kz-top-h) - 44px);
  overflow-y: auto;
  pointer-events: none;
}

@container kz-screen (min-width: 1200px) {
  .kz-nav-collapsed .kz-main .kz-flash {
    --kz-flash-side: var(--kz-side-w-mini);
  }
}

@container kz-screen (max-width: 1199.98px) {
  .kz-main .kz-flash {
    --kz-flash-side: 0px;
  }
}

.kz-main .kz-flash .kz-alert {
  margin: 0;
  border-style: solid;
  box-shadow: var(--kz-shadow-lg);
  pointer-events: auto;
  animation: kz-flash-in .2s ease-out;
}

@keyframes kz-flash-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .kz-main .kz-flash .kz-alert { animation: none; }
}

/* Inline gate note (project manage panel) */
.kz-gate {
  display: flex;
  gap: 11px;
  padding: 13px 15px;
  margin-bottom: 16px;
  border: 1px dashed var(--kz-warning);
  border-radius: var(--kz-r-sm);
  font-size: var(--kz-fs-md);
  line-height: 1.45;
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
}

.kz-gate--ok {
  border-color: var(--kz-success);
  background: var(--kz-success-050);
  color: var(--kz-success-ink);
}

/* kaizen.js flips this on when a ticking clock crosses its deadline, so the
   panel turns red without a reload. Wins over --ok, which was rendered on the
   server while there was still time. */
.kz-gate.is-late {
  border-color: var(--kz-danger);
  background: var(--kz-danger-050);
  color: var(--kz-danger-ink);
}

.kz-gate .bi {
  flex: 0 0 auto;
  font-size: var(--kz-fs-lg);
  line-height: 1.3;
}

.kz-note {
  margin: 12px 0 0;
  font-size: var(--kz-fs-sm);
  line-height: 1.5;
  color: var(--kz-ink-3);
}

.kz-done-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px dashed var(--kz-success);
  border-radius: var(--kz-r-sm);
  background: var(--kz-success-050);
  color: var(--kz-success-ink);
  font-size: var(--kz-fs-md);
  font-weight: 500;
}

.kz-done-note .bi {
  font-size: var(--kz-fs-2xl);
}

/* ==========================================================================
   12. Stats & meters (dashboard)
   ========================================================================== */

.kz-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.kz-stat {
  position: relative;
  overflow: hidden;
  padding: 20px 22px;
  border-radius: var(--kz-r);
  background: var(--kz-surface);
  border: 1px solid var(--kz-line);
  box-shadow: var(--kz-shadow);
}

.kz-stat__top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.kz-stat__label {
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  color: var(--kz-ink-3);
}

.kz-stat__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: auto;
  border-radius: var(--kz-r-sm);
  font-size: 17px;
}

.kz-stat__icon--indigo { background: var(--kz-primary-050); color: var(--kz-accent); }
.kz-stat__icon--amber  { background: var(--kz-warning-050); color: var(--kz-warning-ink); }
.kz-stat__icon--green  { background: var(--kz-success-050); color: var(--kz-success-ink); }
.kz-stat__icon--red    { background: var(--kz-danger-050);  color: var(--kz-danger-ink); }

.kz-stat__value {
  font-size: var(--kz-fs-3xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--kz-ink);
  font-variant-numeric: tabular-nums;
}

.kz-stat__foot {
  margin-top: 9px;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-stat__spark {
  margin-top: 12px;
  height: 6px;
  border-radius: 999px;
  background: var(--kz-line-2);
  overflow: hidden;
}

.kz-stat__spark i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--kz-primary);
}

/* Labelled meter rows */
.kz-meter + .kz-meter {
  margin-top: 15px;
}

.kz-meter__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: var(--kz-fs-md);
}

.kz-meter__label {
  font-weight: 500;
  color: var(--kz-ink-2);
}

.kz-meter__value {
  font-weight: 700;
  color: var(--kz-ink);
  font-variant-numeric: tabular-nums;
}

/* A phase nobody is in says so by going quiet, so the eye lands on the rows
   that hold projects. */
.kz-meter.is-empty :is(.kz-meter__label, .kz-meter__value) {
  color: var(--kz-ink-3);
  font-weight: 500;
}

.kz-meter__track {
  height: 6px;
  border-radius: 999px;
  background: var(--kz-line-2);
  overflow: hidden;
}

.kz-meter__bar {
  height: 100%;
  border-radius: 999px;
  background: var(--kz-primary);
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

.kz-meter__bar--green {
  background: var(--kz-success);
}

/* Key/value rows */
.kz-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--kz-line);
  font-size: var(--kz-fs-md);
}

.kz-kv:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.kz-kv:first-child {
  padding-top: 0;
}

.kz-kv__k {
  color: var(--kz-ink-2);
}

.kz-kv__v {
  font-weight: 600;
  color: var(--kz-ink);
  text-align: right;
}

/* --- The headline card ----------------------------------------------------
   The one dark surface on the dashboard, as on the template's: it holds the
   number the page is opened for, so it is the one thing allowed to shout. */
.kz-spot {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 26px;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 26px 28px 28px;
  border-radius: var(--kz-r);
  background: var(--kz-night);
  color: var(--kz-white);
}

/* The improvement cycle, drawn large and faint behind the figure. */
.kz-spot::before,
.kz-spot::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  border: 34px solid color-mix(in srgb, var(--kz-white) 4.5%, transparent);
}

.kz-spot::before {
  top: -110px;
  right: -90px;
  width: 300px;
  height: 300px;
}

.kz-spot::after {
  right: 70px;
  bottom: -150px;
  width: 220px;
  height: 220px;
  border-width: 26px;
  border-color: color-mix(in srgb, var(--kz-primary) 28%, transparent);
}

.kz-spot__value {
  display: block;
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.kz-spot__label {
  display: block;
  margin-top: 8px;
  font-size: var(--kz-fs-base);
  font-weight: 500;
  color: color-mix(in srgb, var(--kz-white) 72%, transparent);
}

.kz-spot__flag {
  position: absolute;
  top: 26px;
  right: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--kz-white) 10%, transparent);
  color: var(--kz-white);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* White on the tint, not red on navy: red text on this ground is 3:1. The
   red is the fill, where it only has to be seen. */
.kz-spot__flag.is-late {
  background: var(--kz-danger);
}

.kz-spot__prog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  font-size: var(--kz-fs-md);
  font-weight: 600;
}

.kz-spot__prog-head span:last-child {
  font-variant-numeric: tabular-nums;
}

.kz-spot__track {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--kz-white) 16%, transparent);
  overflow: hidden;
}

.kz-spot__bar {
  height: 100%;
  border-radius: 999px;
  background: var(--kz-success);
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

/* --- Figures in dashed boxes ---------------------------------------------
   The template's way of setting two or three numbers side by side without a
   table: each in its own dashed frame, the number over its name. */
.kz-figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.kz-card__body > .kz-figs:not(:first-child) {
  margin-top: 20px;
}

.kz-fig {
  display: block;
  min-width: 0;
  padding: 12px 14px;
  border: 1px dashed var(--kz-line-3);
  border-radius: var(--kz-r-sm);
}

.kz-fig__v {
  display: block;
  font-size: var(--kz-fs-2xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--kz-ink);
  font-variant-numeric: tabular-nums;
}

.kz-fig--lg .kz-fig__v {
  font-size: var(--kz-fs-3xl);
}

.kz-fig__k {
  display: block;
  margin-top: 3px;
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  color: var(--kz-ink-3);
}

.kz-fig.is-late {
  border-color: var(--kz-danger);
  background: var(--kz-danger-050);
}

.kz-fig.is-late .kz-fig__v,
.kz-fig.is-late .kz-fig__k {
  color: var(--kz-danger-ink);
}

/* ==========================================================================
   13. Fact list
   ========================================================================== */

.kz-facts {
  display: grid;
  /* One column, never wider than the card — even for a fact holding a
     control with a width of its own, such as a file field. */
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.kz-fact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--kz-r-sm);
  transition: background .15s ease;
}

.kz-fact:hover {
  background: var(--kz-soft);
}

.kz-fact__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-soft);
  box-shadow: inset 0 0 0 1px var(--kz-line-2);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-lg);
}

.kz-fact__label {
  font-size: var(--kz-fs-md);
  font-weight: 500;
  color: var(--kz-ink-3);
}

.kz-fact__value {
  margin-left: auto;
  text-align: right;
  font-size: var(--kz-fs-md);
  font-weight: 600;
  color: var(--kz-ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

.kz-fact__value--muted {
  font-weight: 500;
  color: var(--kz-ink-2);
}

/* A project's record (projects/partials/details), across the whole page: a
   tile a fact, its label above its value, and every name whole. As many
   columns as leave a tile room for a name, a surname and a father's name:
   three on a laptop, more on a wide screen, one on a phone. */
.kz-facts--record {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 8px;
}

.kz-facts--record .kz-fact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
  padding: 11px 14px;
  box-shadow: inset 0 0 0 1px var(--kz-line-2);
}

/* A project's team: a row of its own, its people side by side. */
.kz-facts--record .kz-fact--full {
  grid-column: 1 / -1;
}

.kz-facts--record .kz-fact__icon {
  width: 26px;
  height: 26px;
  font-size: var(--kz-fs-md);
}

.kz-facts--record .kz-fact__label {
  font-size: var(--kz-fs-md);
  line-height: 1.3;
}

/* Whatever comes under the label has the tile's whole width. */
.kz-facts--record .kz-fact > :not(.kz-fact__icon, .kz-fact__label) {
  grid-column: 1 / -1;
}

.kz-facts--record .kz-fact__value {
  margin-left: 0;
  text-align: left;
  font-size: var(--kz-fs-lg);
  line-height: 1.4;
}

/* A name takes a second line rather than ending in "…": .text-truncate comes
   with the person partial, for the few narrow places that want it. */
.kz-facts--record .kz-person {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.kz-facts--record .kz-person .text-truncate {
  padding-top: 3px;
  overflow: visible;
  white-space: normal;
}

.kz-facts--record .kz-taskpeople {
  gap: 10px;
  font-size: inherit;
  line-height: inherit;
}

.kz-facts--record .kz-taskpeople__one {
  gap: 10px;
}

.kz-facts--record .kz-taskpeople .kz-avatar {
  width: 28px;
  height: 28px;
  font-size: var(--kz-fs-xs);
}

.kz-facts--record :is(.kz-taskpeople__no, .kz-taskpeople__name) {
  padding-top: 3px;
}

.kz-facts--record .kz-taskpeople__name {
  font-weight: 600;
}

.kz-facts--record .kz-fact--full .kz-taskpeople {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  column-gap: 24px;
}

.kz-reportlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--kz-accent);
  text-decoration: none;
}

.kz-reportlink:hover {
  text-decoration: underline;
}

.kz-reportform {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 8px 0 0;
}

.kz-reportform .kz-error {
  grid-column: 1 / -1;
}

.kz-reportform .kz-input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  font-size: var(--kz-fs-sm);
}

.kz-reportform .kz-btn {
  justify-self: start;
}

/* Changing a fact on a project's record, in place of what it says: the button
   that opens it sits under the value, and the form takes the tile's width. */
.kz-fact__more {
  margin-top: 2px;
}

.kz-teamedit {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  margin: 6px 0 2px;
}

.kz-teamedit .kz-chips {
  margin: 0;
}

.kz-teamedit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

/* ==========================================================================
   14. Empty states
   ========================================================================== */

.kz-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 40px 24px;
  border: 1px dashed var(--kz-line-3);
  border-radius: var(--kz-r);
  background: var(--kz-soft);
  text-align: center;
}

.kz-empty--plain {
  border-color: transparent;
  background: transparent;
}

.kz-empty--xl {
  padding: 70px 24px;
}

.kz-empty__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 8px;
  border-radius: var(--kz-r-lg);
  background: var(--kz-primary-050);
  color: var(--kz-accent);
  font-size: var(--kz-fs-2xl);
}

.kz-empty--xl .kz-empty__icon {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  font-size: var(--kz-fs-3xl);
}

.kz-empty__title {
  font-size: var(--kz-fs-base);
  font-weight: 600;
  color: var(--kz-ink);
}

.kz-empty--xl .kz-empty__title {
  font-size: var(--kz-fs-xl);
}

.kz-empty__text {
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
  max-width: 46ch;
  line-height: 1.55;
}

.kz-empty__cta {
  margin-top: 14px;
}

/* ==========================================================================
   15. Project hero (detail page)
   The template's "view project" header: a white card, the title large and
   dark, the facts each in a dashed frame, the state in a panel to the right.
   A faint wash of the accent in one corner is the only decoration — and it
   turns green once the project is finished, so that is felt before it is read.
   ========================================================================== */

.kz-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 28px 30px;
  margin-bottom: 24px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  color: var(--kz-ink-2);
  background: var(--kz-surface);
  box-shadow: var(--kz-shadow);
}

.kz-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(520px 240px at 100% 0%, color-mix(in srgb, var(--kz-primary) 10%, transparent), transparent 70%),
    linear-gradient(90deg, var(--kz-primary), var(--kz-primary)) 0 0 / 100% 3px no-repeat;
}

.kz-hero--done::before {
  background:
    radial-gradient(520px 240px at 100% 0%, color-mix(in srgb, var(--kz-success) 14%, transparent), transparent 70%),
    linear-gradient(90deg, var(--kz-success), var(--kz-success)) 0 0 / 100% 3px no-repeat;
}

.kz-hero__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
}

.kz-hero__main {
  flex: 1 1 420px;
  min-width: 0;
}

.kz-hero__side {
  flex: 0 0 auto;
  width: min(300px, 100%);
  margin-left: auto;
}

.kz-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--kz-accent);
}

.kz-eyebrow__id {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--kz-line-2);
  color: var(--kz-ink-2);
  letter-spacing: .02em;
}

.kz-hero__title {
  margin: 0;
  color: var(--kz-ink);
  font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.kz-langs {
  margin-top: 14px;
  max-width: 640px;
}

.kz-langs__toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 10px;
  border: 0;
  border-radius: 6px;
  background: var(--kz-line-2);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}

.kz-langs__toggle:hover {
  background: var(--kz-primary-050);
  color: var(--kz-accent);
}

.kz-langs__toggle .bi-chevron-down {
  font-size: var(--kz-fs-xs);
  transition: transform .2s ease;
}

.kz-langs__toggle[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}

.kz-langs__list {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.kz-langs__list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 9px 14px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-soft);
  font-size: var(--kz-fs-md);
  color: var(--kz-ink);
}

.kz-langs__code {
  flex: 0 0 auto;
  min-width: 42px;
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--kz-ink-3);
}

.kz-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin-top: 22px;
  font-size: var(--kz-fs-md);
  color: var(--kz-ink-2);
}

.kz-hero__meta > * {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 7px 14px;
  border: 1px dashed var(--kz-line-3);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
}

.kz-hero__meta b {
  color: var(--kz-ink);
  font-weight: 600;
}

.kz-hero__meta .kz-person .text-truncate {
  white-space: normal;
}

.kz-hero__meta > * > .bi {
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-lg);
}

.kz-hero__panel {
  padding: 18px 20px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  background: var(--kz-soft);
}

.kz-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  margin-right: 4px;
  border-radius: 6px;
  font-size: var(--kz-fs-md);
  font-weight: 600;
  line-height: 1;
  background: var(--kz-surface);
  box-shadow: inset 0 0 0 1px var(--kz-line-3);
  color: var(--kz-ink);
}

.kz-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--kz-warning);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-warning) 25%, transparent);
}

.kz-status--done::before {
  background: var(--kz-success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-success) 22%, transparent);
}

.kz-prog {
  margin-top: 18px;
}

.kz-prog__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--kz-ink-3);
}

.kz-prog__value {
  font-size: var(--kz-fs-lg);
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  color: var(--kz-ink);
  font-variant-numeric: tabular-nums;
}

.kz-prog__value small {
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  color: var(--kz-ink-3);
}

.kz-prog__track {
  height: 8px;
  border-radius: 999px;
  background: var(--kz-line-3);
  overflow: hidden;
}

.kz-prog__bar {
  height: 100%;
  border-radius: 999px;
  background: var(--kz-primary);
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

.kz-hero--done .kz-prog__bar {
  background: var(--kz-success);
}

/* ==========================================================================
   16. Phase rail
   The template's stepper: a rounded square per step, tinted once it is behind
   you, filled where you stand, plain while it is still ahead.
   ========================================================================== */

.kz-rail {
  display: flex;
  padding: 20px 14px 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.kz-step {
  position: relative;
  /* Six phases beside a 272px sidebar: at 122px a step the rail scrolled
     sideways on a 1440px screen with one phase out of sight. */
  flex: 1 0 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 6px 12px;
  border: 0;
  border-radius: var(--kz-r-sm);
  background: transparent;
  text-align: center;
  cursor: pointer;
  transition: background .16s ease;
}

.kz-step:hover {
  background: var(--kz-soft);
}

.kz-step::before {
  content: "";
  position: absolute;
  top: 27px;
  left: -50%;
  width: 100%;
  border-top: 2px dashed var(--kz-line-3);
  z-index: 0;
}

.kz-step:first-child::before {
  display: none;
}

.kz-step--linked::before {
  border-top: 2px solid var(--kz-success);
}

.kz-step__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--kz-r);
  /* Opaque, and ringed in the surface colour, so the connecting line stops
     short of the square instead of running into it. */
  background: var(--kz-line-2);
  box-shadow: 0 0 0 5px var(--kz-surface);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-base);
  font-weight: 700;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.kz-step:hover .kz-step__dot,
.kz-step.active .kz-step__dot {
  box-shadow: 0 0 0 5px transparent;
}

.kz-step__label {
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  color: var(--kz-ink-2);
  line-height: 1.25;
}

.kz-step__meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--kz-fs-xs);
  color: var(--kz-ink-3);
}

.kz-step--done .kz-step__dot {
  background: var(--kz-success-050);
  color: var(--kz-success-ink);
}

.kz-step--current .kz-step__dot {
  background: var(--kz-primary);
  color: var(--kz-white);
}

.kz-step--current .kz-step__label {
  color: var(--kz-accent);
}

.kz-step.active {
  background: var(--kz-primary-050);
}

.kz-step.active .kz-step__dot {
  transform: scale(1.06);
}

.kz-step.active .kz-step__label {
  color: var(--kz-ink);
}

/* The "you are here" pin used to float above the dot: absolutely positioned,
   nowrap, inside a 122px step that the rail clips with overflow-x. Any label
   longer than the step — every language except English — was cut in half. The
   current step is already unmistakable from its filled square and tinted
   panel, so the pin is gone rather than patched. */

.kz-panelhead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 18px;
}

.kz-panelhead__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: var(--kz-fs-lg);
  font-weight: 600;
  color: var(--kz-ink);
}

/* ==========================================================================
   17. Dropzone & media
   ========================================================================== */

.kz-upload {
  display: grid;
  gap: 12px;
  margin-bottom: 0;
}

.kz-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 26px 20px;
  border: 1px dashed var(--kz-primary);
  border-radius: var(--kz-r);
  background: var(--kz-primary-050);
  text-align: center;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.kz-drop:hover,
.kz-drop.is-over {
  background: var(--kz-primary-100);
}

.kz-drop.is-over {
  transform: scale(1.005);
}

.kz-drop.is-filled {
  border-style: solid;
  border-color: var(--kz-success);
  background: var(--kz-success-050);
}

.kz-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.kz-drop__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 6px;
  border-radius: var(--kz-r);
  background: var(--kz-surface);
  color: var(--kz-accent);
  font-size: var(--kz-fs-xl);
}

.kz-drop.is-filled .kz-drop__icon {
  color: var(--kz-success-ink);
}

.kz-drop__title {
  font-size: var(--kz-fs-base);
  font-weight: 600;
  color: var(--kz-ink);
  overflow-wrap: anywhere;
}

.kz-drop__title u {
  color: var(--kz-accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.kz-drop__hint {
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.kz-tile {
  position: relative;
  border-radius: var(--kz-r);
  border: 1px solid var(--kz-line);
  background: var(--kz-surface);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .2s ease, border-color .18s ease;
}

.kz-tile:hover {
  transform: translateY(-3px);
  border-color: var(--kz-line-3);
  box-shadow: 0 12px 30px -16px color-mix(in srgb, var(--kz-shade) 30%, transparent);
}

.kz-tile__frame {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--kz-line-2);
  cursor: zoom-in;
  border: 0;
  padding: 0;
  width: 100%;
}

.kz-tile__frame img,
.kz-tile__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kz-tile__frame video {
  cursor: default;
}

/* A document has no picture of its own: a large file icon and its extension,
   on the accent's palest tint, and the whole frame opens the file. */
.kz-tile__frame--doc {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--kz-primary-050);
  color: var(--kz-accent);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease;
}

.kz-tile__frame--doc:hover,
.kz-tile__frame--doc:focus-visible {
  background: var(--kz-primary-100, var(--kz-primary-050));
  color: var(--kz-accent);
}

.kz-tile__frame--doc .bi {
  font-size: 44px;
  line-height: 1;
}

.kz-tile__ext {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--kz-surface);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .06em;
}

.kz-tile__badge {
  position: absolute;
  top: 9px;
  left: 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--kz-shade) 66%, transparent);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--kz-white);
  font-size: var(--kz-fs-xs);
  font-weight: 600;
}

.kz-tile__actions {
  position: absolute;
  top: 9px;
  right: 9px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease;
}

.kz-tile:hover .kz-tile__actions,
.kz-tile:focus-within .kz-tile__actions {
  opacity: 1;
  transform: none;
}

/* 34px, not 30: below ~32px an icon button is an unreliable tap target, and
   these are all destructive. The floating look is kept only where the button
   sits on top of a media tile; in a table row it reads as a flat control. */
.kz-iconbtn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: var(--kz-r-sm);
  background: var(--kz-line-2);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.kz-tile__actions .kz-iconbtn {
  /* On top of a photo, so white in both modes — and the icon dark to match. */
  background: color-mix(in srgb, var(--kz-white) 94%, transparent);
  color: var(--kz-on-photo);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--kz-shade) 18%, transparent);
}

/* Fingers need more room than a mouse pointer does. The small button variant
   sits at 29px, which is under the 32px a thumb can hit reliably. */
@media (pointer: coarse) {
  .kz-iconbtn {
    width: 40px;
    height: 40px;
  }

  .kz-btn--sm {
    min-height: 36px;
  }
}

.kz-iconbtn:hover {
  background: var(--kz-primary-050);
  color: var(--kz-accent);
}

.kz-iconbtn--danger:hover {
  background: var(--kz-danger);
  color: var(--kz-white);
}

.kz-tile__body {
  padding: 11px 13px 13px;
}

.kz-tile__name {
  margin: 0 0 6px;
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  color: var(--kz-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kz-tile__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--kz-fs-xs);
  color: var(--kz-ink-3);
  min-width: 0;
}

.kz-tile__foot span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kz-tile__foot time {
  margin-left: auto;
  flex: 0 0 auto;
}

/* Lightbox */
.kz-lightbox .modal-content {
  border: 0;
  border-radius: var(--kz-r);
  overflow: hidden;
  background: var(--kz-night-deep);
}

.kz-lightbox .modal-body {
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--kz-night-deepest);
}

.kz-lightbox img {
  max-width: 100%;
  /* Of the screen whatever the zoom (see Base). */
  max-height: calc(78vh / var(--kz-zoom));
  display: block;
}

.kz-lightbox .modal-footer {
  border: 0;
  padding: 12px 18px;
  color: color-mix(in srgb, var(--kz-white) 68%, transparent);
  font-size: var(--kz-fs-sm);
  justify-content: space-between;
}

.kz-lightbox .modal-footer strong {
  color: var(--kz-white);
  font-weight: 600;
}

/* ==========================================================================
   18. Pagination
   ========================================================================== */

.kz-pagination {
  padding: 16px 24px;
  border-top: 1px solid var(--kz-line-2);
}

.kz-pagination .pagination {
  margin: 0;
  gap: 5px;
  flex-wrap: wrap;
}

.kz-pagination .page-link {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px !important;
  background: transparent;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  transition: background .14s ease, color .14s ease;
}

.kz-pagination .page-link:hover {
  background: var(--kz-primary-050);
  color: var(--kz-accent);
}

.kz-pagination .page-link:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-primary) 20%, transparent);
}

.kz-pagination .page-item.active .page-link {
  background: var(--kz-primary);
  color: var(--kz-white);
}

.kz-pagination .page-item.disabled .page-link {
  background: transparent;
  color: var(--kz-ink-4);
}

.kz-pagination p,
.kz-pagination .text-muted {
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3) !important;
  margin: 0;
}

/* ==========================================================================
   19. Sign-in
   The form on white to the left, where the eye and the cursor start; the
   platform's one idea — a project walked through its phases — drawn on the
   dark panel to the right.
   ========================================================================== */

.kz-auth {
  /* The screen's height whatever the zoom (see Base). */
  min-height: calc(100vh / var(--kz-zoom));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  background: var(--kz-surface);
}

/* Grid items default to min-width:auto, so the form side refused to shrink
   below its content and pushed the login page 2px wider than a 375px phone. */
.kz-auth > * {
  min-width: 0;
}

.kz-auth__formside {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh / var(--kz-zoom));
  padding: 28px clamp(22px, 5vw, 56px);
}

.kz-auth__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.kz-auth__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--kz-fs-xl);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--kz-ink);
}

.kz-auth__form {
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 40px 0;
}

.kz-auth__title {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.03em;
}

.kz-auth__sub {
  margin: 0 0 30px;
  font-size: var(--kz-fs-base);
  font-weight: 500;
  color: var(--kz-ink-3);
}

.kz-auth .kz-input {
  padding-top: 13px;
  padding-bottom: 13px;
}

.kz-auth .kz-cta {
  padding: 14px 18px;
}

.kz-auth__foot {
  margin: 0;
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  color: var(--kz-ink-3);
}

.kz-langpick {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-soft);
  box-shadow: inset 0 0 0 1px var(--kz-line);
}

/* The same strip holds two kinds of choice on the sign-in page: the language,
   which is a set of links, and the mode, which is a set of buttons. */
.kz-langpick :is(a, button) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font: inherit;
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  color: var(--kz-ink-2);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.kz-langpick button {
  padding-inline: 10px;
}

.kz-langpick button .bi {
  font-size: var(--kz-fs-base);
  line-height: 1;
}

.kz-langpick :is(a, button):hover {
  color: var(--kz-accent);
}

.kz-langpick a.is-active,
.kz-langpick button[aria-pressed="true"] {
  background: var(--kz-surface);
  color: var(--kz-accent);
  font-weight: 600;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--kz-shade) 12%, transparent);
}

.kz-auth__picks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* An icon sitting inside a text input — the login fields. Nothing else.
   The child selector is deliberate: as a descendant selector this reached into
   any button or link placed in the group, tore its icon out of the flow and
   pinned every one of them to the same spot, 14px from the left. */
.kz-inputgroup {
  position: relative;
}

.kz-inputgroup > .bi {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-lg);
  pointer-events: none;
}

.kz-inputgroup .kz-input {
  padding-left: 42px;
}

.kz-inputgroup:focus-within > .bi {
  color: var(--kz-accent);
}

/* The eye at the far end of a password field (partials/password-eye). */
.kz-inputgroup--eye .kz-input {
  padding-right: 46px;
}

.kz-inputgroup__eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: var(--kz-r-sm);
  background: transparent;
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-lg);
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}

.kz-inputgroup__eye:hover,
.kz-inputgroup__eye[aria-pressed="true"] {
  color: var(--kz-accent);
}

.kz-inputgroup__eye:hover {
  background: var(--kz-soft);
}

.kz-inputgroup__eye:focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 1px;
}

.kz-auth__hint {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-soft);
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
  line-height: 1.5;
}

/* --- The dark panel ------------------------------------------------------ */

.kz-auth__brandside {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding: 56px clamp(32px, 5vw, 72px);
  color: var(--kz-white);
  background:
    radial-gradient(760px 520px at 100% 0%, color-mix(in srgb, var(--kz-primary) 55%, transparent), transparent 62%),
    radial-gradient(620px 460px at 0% 100%, color-mix(in srgb, var(--kz-info) 22%, transparent), transparent 66%),
    linear-gradient(160deg, var(--kz-night) 0%, var(--kz-night-2) 100%);
}

/* The cycle again, the same two rings as the dashboard's headline card. */
.kz-auth__brandside::before,
.kz-auth__brandside::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  border: 56px solid color-mix(in srgb, var(--kz-white) 4%, transparent);
}

.kz-auth__brandside::before {
  top: -190px;
  right: -150px;
  width: 520px;
  height: 520px;
}

.kz-auth__brandside::after {
  left: -140px;
  bottom: -200px;
  width: 420px;
  height: 420px;
  border-width: 44px;
}

.kz-auth__pitch h2 {
  color: var(--kz-white);
  font-size: clamp(1.7rem, 1.1rem + 1.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.03em;
  margin: 0 0 14px;
  max-width: 16ch;
}

.kz-auth__pitch p {
  margin: 0;
  max-width: 46ch;
  font-size: var(--kz-fs-lg);
  line-height: 1.6;
  color: color-mix(in srgb, var(--kz-white) 74%, transparent);
}

/* A project's path, as the platform draws it: the steps behind you ticked,
   the one you stand on lit, the rest waiting. Decoration — the words beside
   it say the same thing to a screen reader. */
.kz-path {
  display: grid;
  gap: 8px;
  max-width: 420px;
  margin: 0;
  padding: 18px;
  list-style: none;
  border: 1px solid color-mix(in srgb, var(--kz-white) 14%, transparent);
  border-radius: var(--kz-r-lg);
  background: color-mix(in srgb, var(--kz-white) 6%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.kz-path__step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  border-radius: var(--kz-r-sm);
  font-size: var(--kz-fs-base);
  font-weight: 500;
  color: color-mix(in srgb, var(--kz-white) 62%, transparent);
}

.kz-path__n {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--kz-white) 10%, transparent);
  font-size: var(--kz-fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kz-path__step.is-done {
  color: color-mix(in srgb, var(--kz-white) 86%, transparent);
}

.kz-path__step.is-done .kz-path__n {
  background: color-mix(in srgb, var(--kz-success) 22%, transparent);
  color: var(--kz-success-bright);
}

.kz-path__step.is-now {
  /* The panel is dark in both modes, so this card is white in both: its
     colours are fixed rather than taken from the theme. */
  background: var(--kz-white);
  color: var(--kz-night-deep);
  font-weight: 600;
  box-shadow: 0 16px 34px -18px color-mix(in srgb, var(--kz-shade) 60%, transparent);
}

.kz-path__step.is-now .kz-path__n {
  background: var(--kz-primary);
  color: var(--kz-white);
}

.kz-path__bar {
  flex: 0 0 64px;
  height: 6px;
  margin-left: auto;
  border-radius: 999px;
  background: color-mix(in srgb, var(--kz-white) 94%, var(--kz-night-deep));
  overflow: hidden;
}

.kz-path__bar i {
  display: block;
  width: 58%;
  height: 100%;
  border-radius: 999px;
  background: var(--kz-primary);
}

.kz-auth__points {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kz-auth__points li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--kz-fs-base);
  color: color-mix(in srgb, var(--kz-white) 86%, transparent);
}

.kz-auth__points .bi {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--kz-white) 10%, transparent);
  font-size: var(--kz-fs-base);
}

/* ==========================================================================
   20. Focus & motion
   ========================================================================== */

:is(.kz-page, .kz-auth) :is(button, a, label, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ==========================================================================
   21. Responsive
   ========================================================================== */

@container kz-screen (max-width: 1199.98px) {
  .kz-auth {
    grid-template-columns: minmax(0, 1fr);
  }

  .kz-auth__brandside {
    display: none;
  }
}

@container kz-screen (max-width: 991.98px) {
  .kz-sticky {
    position: static;
  }

  .kz-level > [class*="col-"] > :is(.kz-card, .kz-spot):only-child {
    height: auto;
  }
}

@container kz-screen (max-width: 767.98px) {
  .kz-main {
    padding: calc(var(--kz-top-h) + 20px) 16px 40px;
  }

  .kz-top {
    padding: 0 16px;
  }

  .kz-top__menu {
    margin-left: -8px;
  }

  .kz-filters__actions {
    margin-left: 0;
    width: 100%;
  }

  .kz-filters__actions .kz-btn {
    flex: 1 1 auto;
  }
}

@container kz-screen (max-width: 575.98px) {
  .kz-hero {
    padding: 22px 18px;
  }

  .kz-hero__side {
    width: 100%;
    margin-left: 0;
  }

  .kz-card__head,
  .kz-card__body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .kz-table :is(th, td):first-child {
    padding-left: 16px;
  }

  .kz-table :is(th, td):last-child {
    padding-right: 16px;
  }

  .kz-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .kz-pagehead__actions {
    width: 100%;
  }

  .kz-pagehead__actions .kz-btn {
    flex: 1 1 auto;
  }

  .kz-spot__value {
    font-size: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* ==========================================================================
   14. Qualification matrix, attendance grid and kanban boards
   ========================================================================== */

/* --- Level dial -----------------------------------------------------------
   A cycle, quartered — the same reading the source process drew with ○ ◔ ◑ ◕ ●
   and the right shape for a Kaizen floor, where a round of improvement is the
   unit of work. What the glyphs got wrong was the drawing, not the idea:

   - they were type, so the circle's size, weight and centring came from
     whatever font the machine fell back to, and a column of them wobbled;
   - the container changed shape as the level rose — ○ is a hairline ring, ● a
     solid dot with no ring at all — so there was no fixed whole to read the
     part against;
   - a wedge at ~10px is measured by its angle, and the eye ranks angles badly.
     ◑ against ◕ is a few pixels of arc.

   Drawn instead: one 22px dial, identical at every level, cut into quarters by
   hairline spokes. The wedge lands on a spoke every time, so the level is
   counted — one quarter, two, three, four — instead of estimated, and the
   colour ramp says the same thing again.

   The inner disc is where the person stands. The outer arc is the stretch of
   the cycle an open training is reaching for: amber, on its own ring, so it can
   never be mistaken for ground already covered. It used to be a second red
   circle set beside the first, which read as an alarm and widened the cell. */

.kz-lvl {
  display: inline-flex;
  line-height: 0;
  vertical-align: middle;
}

.kz-lvl__dial {
  --kz-lvl-held: 0deg;      /* how far round the cycle the person has come */
  --kz-lvl-goal-end: 0deg;  /* how far an open training reaches */
  --kz-lvl-arc: transparent;
  --kz-lvl-fill: transparent;

  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  /* Outer ring. The faint band underneath keeps every dial the same silhouette
     whether or not a training is running. The arc colour, not the stop angles,
     is what switches the arc off — with no training the two stops sit out of
     order, and nothing here should depend on how that gets clamped. */
  background-image:
    conic-gradient(
      transparent 0 var(--kz-lvl-held),
      var(--kz-lvl-arc) var(--kz-lvl-held) var(--kz-lvl-goal-end),
      transparent var(--kz-lvl-goal-end) 360deg),
    linear-gradient(var(--kz-lvl-ring), var(--kz-lvl-ring));
}

.kz-lvl__dial::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background-color: var(--kz-lvl-track);
  background-image: conic-gradient(
    var(--kz-lvl-fill) 0 var(--kz-lvl-held),
    transparent var(--kz-lvl-held) 360deg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--kz-shade) 7%, transparent);
}

/* The two spokes that cut the cycle into its four quarters. Every wedge edge
   falls on one, which is what turns the dial from a measurement into a count. */
.kz-lvl__dial::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(var(--kz-surface), var(--kz-surface)) 50% 50% / 1px 100% no-repeat,
    linear-gradient(var(--kz-surface), var(--kz-surface)) 50% 50% / 100% 1px no-repeat;
}

.kz-lvl[data-level="1"] .kz-lvl__dial { --kz-lvl-held:  90deg; --kz-lvl-fill: var(--kz-lvl-1); }
.kz-lvl[data-level="2"] .kz-lvl__dial { --kz-lvl-held: 180deg; --kz-lvl-fill: var(--kz-lvl-2); }
.kz-lvl[data-level="3"] .kz-lvl__dial { --kz-lvl-held: 270deg; --kz-lvl-fill: var(--kz-lvl-3); }
.kz-lvl[data-level="4"] .kz-lvl__dial { --kz-lvl-held: 360deg; --kz-lvl-fill: var(--kz-lvl-4); }

.kz-lvl[data-goal] .kz-lvl__dial      { --kz-lvl-arc: var(--kz-lvl-goal); }
.kz-lvl[data-goal="1"] .kz-lvl__dial  { --kz-lvl-goal-end:  90deg; }
.kz-lvl[data-goal="2"] .kz-lvl__dial { --kz-lvl-goal-end: 180deg; }
.kz-lvl[data-goal="3"] .kz-lvl__dial { --kz-lvl-goal-end: 270deg; }
.kz-lvl[data-goal="4"] .kz-lvl__dial { --kz-lvl-goal-end: 360deg; }

/* --- The grid ------------------------------------------------------------- */

.kz-mx__wrap {
  overflow: auto;
  /* Of the screen whatever the zoom (see Base). */
  max-height: calc(74vh / var(--kz-zoom));
  border-top: 1px solid var(--kz-line-2);
}

.kz-mx {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-size: var(--kz-fs-md);
}

.kz-mx th,
.kz-mx td {
  border-bottom: 1px solid var(--kz-line-2);
  border-right: 1px solid var(--kz-line-2);
  padding: 8px 10px;
  background: var(--kz-surface);
}

/* Both headers stick, so a wide matrix stays readable in every direction. */
.kz-mx thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--kz-soft);
  color: var(--kz-ink);
  font-weight: 500;
  vertical-align: bottom;
}

.kz-mx__corner,
.kz-mx__person {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 220px;
  max-width: 260px;
  text-align: left;
  background: var(--kz-surface);
  box-shadow: 1px 0 0 var(--kz-line);
}

.kz-mx thead .kz-mx__corner {
  z-index: 4;
  background: var(--kz-soft);
}

.kz-mx__skill {
  min-width: 54px;
  max-width: 54px;
  height: 170px;
  padding: 8px 4px;
  text-align: center;
}

/* Vertical column labels — 19 skills will not fit any other way. */
.kz-mx__skilltext {
  display: block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  max-height: 152px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0 auto;
  font-weight: 500;
}

.kz-mx__td {
  text-align: center;
  white-space: nowrap;
  padding-left: 6px;
  padding-right: 6px;
}

.kz-mx__td--gap { background: var(--kz-danger-050); }

.kz-mx__share {
  font-variant-numeric: tabular-nums;
  color: var(--kz-ink-2);
}

.kz-mx__total {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--kz-ink);
  background: var(--kz-soft);
}

.kz-mx tfoot th,
.kz-mx tfoot td {
  background: var(--kz-soft);
  font-weight: 500;
}

.kz-mx tbody tr:hover td,
.kz-mx tbody tr:hover .kz-mx__person { background: var(--kz-primary-050); }

.kz-mx__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.kz-mx__key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-mx__keytext { white-space: nowrap; }

.kz-mx__events {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-mx__events li {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- Gate controls -------------------------------------------------------- */

.kz-gates {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.kz-gates form { display: inline-flex; gap: 6px; }

/* --- Attendance ----------------------------------------------------------- */

.kz-att__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.kz-att__month {
  font-weight: 500;
  color: var(--kz-ink);
  min-width: 150px;
  text-align: center;
}

.kz-att__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-att__key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kz-att .kz-att__day {
  min-width: 38px;
  height: auto;
  padding: 6px 2px;
  text-align: center;
  line-height: 1.2;
}

.kz-att__day--off,
.kz-att__cell--off { background: var(--kz-soft); }

.kz-att__dnum { display: block; font-weight: 500; }
.kz-att__dname { display: block; font-size: var(--kz-fs-xs); color: var(--kz-ink-3); }

.kz-att__cell { padding: 3px; text-align: center; }
.kz-att__cell form { margin: 0; }

.kz-att__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  color: var(--kz-ink-2);
  cursor: pointer;
  transition: transform .12s ease;
}

button.kz-att__chip:hover { transform: scale(1.1); }

.kz-att--none { color: transparent; }
/* The border keeps the full-strength colour; only the letter darkens, so the
   grid reads the same at a glance but the letters are legible up close. */
.kz-att--present { background: var(--kz-success-050); border-color: var(--kz-success); color: var(--kz-success-ink); }
.kz-att--late { background: var(--kz-warning-050); border-color: var(--kz-warning); color: var(--kz-warning-ink); }
.kz-att--leave { background: var(--kz-info-050); border-color: var(--kz-info); color: var(--kz-info-ink); }
.kz-att--absent { background: var(--kz-danger-050); border-color: var(--kz-danger); color: var(--kz-danger-ink); }

/* --- Status picker --------------------------------------------------------
   Fixed, not absolute: the grid scrolls inside .kz-mx__wrap, which would clip
   an absolutely positioned menu. kaizen.js places it and closes it on scroll. */

.kz-attmenu {
  position: fixed;
  z-index: 60;
  min-width: 190px;
  margin: 0;
  padding: 6px;
  background: var(--kz-pop);
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r-sm);
  box-shadow: var(--kz-shadow-lg);
}

.kz-attmenu[hidden] { display: none; }

.kz-attmenu__head {
  margin: 0 0 4px;
  padding: 4px 8px 8px;
  border-bottom: 1px solid var(--kz-line-2);
  line-height: 1.35;
}

.kz-attmenu__who {
  display: block;
  font-weight: 500;
  color: var(--kz-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kz-attmenu__day {
  display: block;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-attmenu__opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 8px 4px 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  text-align: left;
  cursor: pointer;
}

.kz-attmenu__opt:hover,
.kz-attmenu__opt:focus-visible { background: var(--kz-soft); outline: none; }

.kz-attmenu__opt:focus-visible { box-shadow: inset 0 0 0 2px var(--kz-focus); }

.kz-attmenu__opt .kz-att__chip { flex: 0 0 auto; cursor: inherit; }
.kz-attmenu__opt:hover .kz-att__chip { transform: none; }

.kz-attmenu__label { flex: 1 1 auto; }

.kz-attmenu__erase { color: var(--kz-ink-3); font-size: var(--kz-fs-xs); }

.kz-attmenu__tick {
  flex: 0 0 auto;
  color: var(--kz-accent);
  visibility: hidden;
}

.kz-attmenu__opt.is-on { color: var(--kz-ink); font-weight: 500; }
.kz-attmenu__opt.is-on .kz-attmenu__tick { visibility: visible; }

.kz-attmenu__opt--clear {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--kz-line-2);
  border-radius: 0 0 8px 8px;
}

/* --- Kanban boards -------------------------------------------------------- */

.kz-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.kz-board__col {
  background: var(--kz-lane);
  border: 1px solid var(--kz-line-2);
  border-radius: var(--kz-r-lg);
  overflow: hidden;
}

.kz-board__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--kz-line-2);
  border-top: 3px solid var(--kz-ink-3);
}

.kz-board__col--to-do .kz-board__head { border-top-color: var(--kz-danger); }
.kz-board__col--doing .kz-board__head { border-top-color: var(--kz-warning); }
.kz-board__col--done .kz-board__head { border-top-color: var(--kz-success); }

.kz-board__title {
  margin: 0;
  font-size: var(--kz-fs-base);
  font-weight: 500;
}

.kz-board__cards {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.kz-board__card {
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r-sm);
  padding: 12px 14px;
  background: var(--kz-surface);
  box-shadow: var(--kz-shadow);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.kz-board__card:hover,
.kz-board__card:focus-within {
  border-color: var(--kz-line-3);
  box-shadow: var(--kz-shadow-md);
}

.kz-board__card--late {
  border-color: color-mix(in srgb, var(--kz-danger) 45%, var(--kz-line));
  background: var(--kz-late);
  box-shadow: inset 4px 0 0 var(--kz-danger), var(--kz-shadow);
}

.kz-board__cardtitle {
  margin: 0 0 8px;
  color: var(--kz-ink);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* Comment / Next step on a card, in full — as on a project's board. */
.kz-board__note {
  display: block;
  margin: 0 0 10px;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-base);
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-decoration: none;
}

a.kz-board__note:hover,
a.kz-board__note:focus-visible {
  color: var(--kz-ink);
}

/* Everybody on a card's task, by their whole name (.kz-taskpeople). For
   whoever may change the task it is a link to the task at its people. */
.kz-board__people {
  display: block;
  margin: 0 -6px 8px;
  padding: 4px 6px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

a.kz-board__people:hover,
a.kz-board__people:focus-visible {
  background: var(--kz-soft);
  color: inherit;
}

.kz-board__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

/* --- Deadline clock ------------------------------------------------------- */

.kz-clock,
.kz-clock__run {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.kz-clock__run {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--kz-soft);
  color: var(--kz-ink-2);
  /* The seconds tick once a second — proportional digits would wobble. */
  font-variant-numeric: tabular-nums;
}

.kz-clock__run.is-late {
  background: var(--kz-danger-050);
  color: var(--kz-danger-ink);
  font-weight: 600;
}

.kz-clock__run.is-done {
  background: var(--kz-success-050);
  color: var(--kz-success-ink);
  font-weight: 500;
}

.kz-clock__run.is-done.is-late {
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
}

.kz-board__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--kz-line-2);
}

.kz-board__actions form { margin: 0; }

/* The status select takes the row; the delete button keeps its corner. */
.kz-board__move { flex: 1 1 auto; }

.kz-select--sm {
  padding: 6px 30px 6px 10px;
  border-radius: 8px;
  font-size: var(--kz-fs-sm);
  background-position: right 9px center;
}

/* Status colours — red, amber, green. The closed control wears the card's
   current status; the open list colours each choice the same way, so the two
   readings agree. background-color, not background: the chevron is a
   background-image on .kz-select and must survive. */

.kz-select--to-do,
.kz-board__move option[value="to do"] {
  background-color: var(--kz-danger-050);
  color: var(--kz-danger-ink);
}

.kz-select--doing,
.kz-board__move option[value="doing"] {
  background-color: var(--kz-warning-050);
  color: var(--kz-warning-ink);
}

.kz-select--done,
.kz-board__move option[value="done"] {
  background-color: var(--kz-success-050);
  color: var(--kz-success-ink);
}

.kz-select--to-do { border-color: var(--kz-danger); }
.kz-select--doing { border-color: var(--kz-warning); }
.kz-select--done { border-color: var(--kz-success); }

.kz-select--tight { min-width: 120px; }

@container kz-screen (max-width: 991.98px) {
  .kz-board { grid-template-columns: 1fr; }
  .kz-mx__corner,
  .kz-mx__person { min-width: 170px; }
}

/* ==========================================================================
   22. Session schedule
   The consultant sessions, as the whole team reads them. A schedule is scanned
   by date first, so the day block leads each row and the next session up wears
   the only accent on the page.
   ========================================================================== */

.kz-sched {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.kz-sched__month {
  margin: 6px 0 0;
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--kz-ink-3);
}

.kz-sched__month:first-child {
  margin-top: 0;
}

.kz-sched__row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 13px 16px 13px 13px;
  border: 1px solid var(--kz-line);
  border-left: 3px solid var(--kz-line);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
}

/* The one everybody is actually looking for. */
.kz-sched__row--next {
  border-color: var(--kz-line);
  border-left-color: var(--kz-primary);
  background: var(--kz-primary-050);
}

.kz-sched__row--past {
  background: var(--kz-soft);
  border-left-color: var(--kz-line-2);
}

.kz-sched__when {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 7px 4px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
  border: 1px solid var(--kz-line-2);
}

.kz-sched__row--past .kz-sched__when {
  background: var(--kz-surface);
  opacity: .72;
}

.kz-sched__dow {
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--kz-ink-3);
}

.kz-sched__day {
  font-size: var(--kz-fs-xl);
  font-weight: 700;
  line-height: 1.05;
  color: var(--kz-ink);
}

.kz-sched__mon {
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--kz-ink-3);
}

.kz-sched__body {
  min-width: 0;
}

.kz-sched__title {
  margin: 0 0 4px;
  font-size: var(--kz-fs-base);
  font-weight: 600;
  color: var(--kz-ink);
  overflow-wrap: anywhere;
}

.kz-sched__row--past .kz-sched__title {
  color: var(--kz-ink-2);
}

.kz-sched__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-sched__time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--kz-ink-2);
}

.kz-sched__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

@container kz-screen (max-width: 575.98px) {
  .kz-sched__row {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
  }

  .kz-sched__tags {
    grid-column: 2;
    justify-content: flex-start;
  }
}

/* ==========================================================================
   23. Admin CRUD — toolbars, summary strips, choice cards, danger zones
   Shared by the three management pages (People, Departments, Seasons), which
   all pose the same questions: what is here, how do I narrow it down, what
   does this option mean, and what happens if I delete this.
   ========================================================================== */

/* ---- Summary strip ------------------------------------------------------
   A quieter kz-stats: figures that frame the list under them rather than
   headline a dashboard, so they stay on one row for far longer. */
/* The rules between cells are drawn by each cell into the 1px gap after it
   (right, below, and the corner where the two meet), not by the strip's
   background showing through the gap: when the cells wrap onto a second row
   that is not full, the rest of that row is the card's own colour rather than
   a grey slab. The lines that would double the strip's border on the outside
   fall beyond its edge and are trimmed by its overflow. */
.kz-sum {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 1px;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  background: var(--kz-surface);
  box-shadow: var(--kz-shadow);
}

.kz-sum__cell {
  display: block;
  padding: 15px 18px;
  background: var(--kz-surface);
  box-shadow: 1px 0 0 var(--kz-line), 0 1px 0 var(--kz-line), 1px 1px 0 var(--kz-line);
  text-decoration: none;
  transition: background .15s ease;
}

a.kz-sum__cell:hover,
a.kz-sum__cell:focus-visible {
  background: var(--kz-primary-050);
  outline: none;
}

/* The cell standing for the filter that is currently on. */
.kz-sum__cell.is-on {
  background: var(--kz-primary-050);
  box-shadow: inset 3px 0 0 var(--kz-primary), 1px 0 0 var(--kz-line), 0 1px 0 var(--kz-line), 1px 1px 0 var(--kz-line);
}

.kz-sum__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  color: var(--kz-ink-3);
}

.kz-sum__value {
  margin-top: 4px;
  font-size: var(--kz-fs-2xl);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--kz-ink);
  line-height: 1.15;
}

.kz-sum__value--muted {
  color: var(--kz-ink-3);
}

/* ---- Toolbar ------------------------------------------------------------
   Search and filters, sitting in a card head so the controls read as
   belonging to the table below rather than floating above it. */
.kz-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.kz-toolbar__search {
  position: relative;
  flex: 1 1 230px;
  min-width: 0;
}

.kz-toolbar__search .bi {
  position: absolute;
  top: 50%;
  left: 13px;
  transform: translateY(-50%);
  font-size: var(--kz-fs-base);
  color: var(--kz-ink-3);
  pointer-events: none;
}

.kz-toolbar__search .kz-input {
  padding-left: 36px;
}

.kz-toolbar .kz-select {
  flex: 0 1 190px;
  min-width: 0;
}

.kz-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

/* ---- Filter chips -------------------------------------------------------
   Links, not a select: the set is short, and seeing every position at once
   with its count is the point. */
.kz-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 13px 22px;
  border-bottom: 1px solid var(--kz-line);
}

.kz-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border: 1px solid var(--kz-line);
  border-radius: 6px;
  background: var(--kz-surface);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.kz-pill:hover,
.kz-pill:focus-visible {
  border-color: var(--kz-primary);
  color: var(--kz-accent-2);
  outline: none;
}

.kz-pill.is-on {
  border-color: transparent;
  background: var(--kz-primary);
  color: var(--kz-white);
  font-weight: 600;
}

.kz-pill__n {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--kz-soft);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 600;
}

.kz-pill.is-on .kz-pill__n {
  background: color-mix(in srgb, var(--kz-white) 22%, transparent);
  color: var(--kz-white);
}

/* ---- Result line --------------------------------------------------------
   What the filters above actually did, in words, with the way back out. */
.kz-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  border-bottom: 1px solid var(--kz-line);
  background: var(--kz-primary-050);
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-2);
}

.kz-result strong {
  color: var(--kz-ink);
}

.kz-result a {
  margin-left: auto;
  font-weight: 600;
  color: var(--kz-accent-2);
  text-decoration: none;
}

.kz-result a:hover {
  text-decoration: underline;
}

/* ---- Choice cards -------------------------------------------------------
   A radio group where each option carries the sentence that explains it. A
   position picker is a decision about what someone may do, and a bare select
   makes that decision blind. */
.kz-choices {
  display: grid;
  gap: 9px;
}

.kz-choice {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.kz-choice:hover {
  border-color: var(--kz-primary);
}

.kz-choice input {
  flex: 0 0 auto;
  margin-top: 2px;
  width: 17px;
  height: 17px;
  accent-color: var(--kz-primary);
  cursor: inherit;
}

.kz-choice__text {
  min-width: 0;
}

.kz-choice__name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--kz-fs-md);
  font-weight: 600;
  color: var(--kz-ink);
}

.kz-choice__name .bi {
  color: var(--kz-ink-3);
}

.kz-choice__desc {
  margin: 3px 0 0;
  font-size: var(--kz-fs-sm);
  line-height: 1.5;
  color: var(--kz-ink-3);
}

.kz-choice:has(input:checked) {
  border-color: var(--kz-primary);
  background: var(--kz-primary-050);
  box-shadow: inset 0 0 0 1px var(--kz-primary);
}

.kz-choice:has(input:checked) .kz-choice__name .bi {
  color: var(--kz-accent);
}

.kz-choice:has(input:focus-visible) {
  outline: 2px solid var(--kz-focus);
  outline-offset: 2px;
}

/* A position this account cannot move to. The reason sits in the card, so the
   answer to "why not?" is already on screen. */
.kz-choice--blocked {
  background: var(--kz-soft);
  cursor: not-allowed;
}

.kz-choice--blocked:hover {
  border-color: var(--kz-line);
}

.kz-choice--blocked .kz-choice__name {
  color: var(--kz-ink-3);
}

.kz-choice__why {
  display: flex;
  gap: 7px;
  margin: 7px 0 0;
  font-size: var(--kz-fs-sm);
  line-height: 1.5;
  color: var(--kz-warning-ink);
}

/* ---- Held-by list -------------------------------------------------------
   What is naming this record, shown before the delete button rather than
   after a refused attempt. */
.kz-holds {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 0;
}

.kz-holds__item {
  padding: 4px 11px;
  border-radius: 6px;
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
}

/* ---- Danger zone --------------------------------------------------------
   Deletes live at the bottom of an edit page, framed so they cannot be
   mistaken for the save button. */
.kz-danger {
  border-color: var(--kz-danger-050);
}

.kz-danger .kz-card__head {
  border-bottom-color: var(--kz-danger-050);
  background: var(--kz-danger-050);
}

.kz-danger .kz-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--kz-danger-ink);
}

.kz-danger__what {
  margin: 0 0 14px;
  font-size: var(--kz-fs-md);
  line-height: 1.6;
  color: var(--kz-ink-2);
}

.kz-btn--danger {
  background: var(--kz-danger);
  color: var(--kz-white);
}

.kz-btn--danger:hover:not(:disabled) {
  background: var(--kz-danger-ink);
  color: var(--kz-white);
}

/* ---- Lede ---------------------------------------------------------------
   One short paragraph at the top of a page saying what it is for and what the
   order of operations is. */
.kz-lede {
  display: flex;
  gap: 13px;
  padding: 15px 18px;
  margin-bottom: 20px;
  border: 1px solid var(--kz-line);
  border-left: 3px solid var(--kz-primary);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
}

.kz-lede .bi {
  flex: 0 0 auto;
  margin-top: 1px;
  font-size: 17px;
  color: var(--kz-accent);
}

.kz-lede p {
  margin: 0;
  font-size: var(--kz-fs-md);
  line-height: 1.6;
  color: var(--kz-ink-2);
}

.kz-lede p + p {
  margin-top: 6px;
}

/* ---- Lifecycle flow -----------------------------------------------------
   The path a season takes, drawn where it is being changed. */
.kz-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.kz-flow__step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--kz-soft);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
}

.kz-flow__step.is-on {
  background: var(--kz-primary);
  color: var(--kz-white);
}

.kz-flow__step.is-past {
  background: var(--kz-primary-050);
  color: var(--kz-accent-2);
}

.kz-flow__sep {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
}

/* ---- Two fields on one row ---------------------------------------------- */
.kz-fieldrow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0 16px;
}

/* ---- Meta line under a page title in a detail view ---------------------- */
.kz-metaline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-metaline__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@container kz-screen (max-width: 767.98px) {
  .kz-toolbar__actions {
    margin-left: 0;
    width: 100%;
  }

  .kz-toolbar__actions .kz-btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .kz-sum {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }

  .kz-sum__value {
    font-size: var(--kz-fs-xl);
  }
}

/* ==========================================================================
   24. Person page — tabs
   A person's page carries four unrelated jobs: who they are, what they are
   following, their sign-in, and ending the account. Stacked, it was a page you
   scrolled past rather than read, and the delete button sat one flick below the
   name field. Tabs put one job on screen at a time.

   With scripting off every panel stays open and the strip reads as a set of
   in-page links — the fallback is the long page it used to be, not a blank one.
   ========================================================================== */

/* Line tabs, as the template draws them: no box around the strip, a rule
   under it, and the tab on screen marked by the accent running along that
   rule. The strip is navigation, so it should not look like one more card. */
.kz-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--kz-line-3);
}

.kz-tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -1px;
  padding: 12px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--kz-ink-3);
  font-family: inherit;
  font-size: var(--kz-fs-md);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}

.kz-tabs__tab i {
  font-size: var(--kz-fs-lg);
  line-height: 1;
}

.kz-tabs__tab:hover,
.kz-tabs__tab:focus-visible {
  color: var(--kz-accent);
}

.kz-tabs__tab.is-on {
  border-bottom-color: var(--kz-primary);
  color: var(--kz-accent);
}

/* The figure on a tab — how many projects, how much is holding the account.
   Muted until the tab is the one on screen, so the strip does not read as four
   competing counters. */
.kz-tabs__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--kz-line-2);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
}

.kz-tabs__tab.is-on .kz-tabs__n {
  background: var(--kz-primary);
  color: var(--kz-white);
}

/* The one that ends the account never sits in the same colour as the rest. */
.kz-tabs__tab--danger:hover,
.kz-tabs__tab--danger:focus-visible {
  color: var(--kz-danger-ink);
}

.kz-tabs__tab--danger.is-on {
  border-bottom-color: var(--kz-danger);
  color: var(--kz-danger-ink);
}

.kz-tabs__tab--danger.is-on .kz-tabs__n {
  background: var(--kz-danger);
}

/* Scripting on: only the chosen panel is in the document. */
.kz-tabpanel[hidden] {
  display: none;
}

@container kz-screen (max-width: 767.98px) {
  .kz-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .kz-tabs::-webkit-scrollbar {
    display: none;
  }

  .kz-tabs {
    gap: 4px 20px;
  }
}

/* ==========================================================================
   25. Person page — the tracking board
   One project per block: what it is, where it stands, and the weekly meetings
   on it. The log and the form that adds to it sit in the same block, because
   "has this week's meeting happened" is a question about one project, never
   about the tracker as a whole.
   ========================================================================== */

.kz-track {
  margin-bottom: 18px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  background: var(--kz-surface);
  overflow: hidden;
}

.kz-track__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--kz-line-2);
}

.kz-track__title {
  margin: 0 0 3px;
  font-size: var(--kz-fs-lg);
  font-weight: 700;
  line-height: 1.35;
}

.kz-track__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-track__side {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.kz-track__body {
  padding: 16px 18px;
}

/* The week's obligation, stated before the log rather than left to be counted
   out of it. Reuses the gate palette the training page already reads in. */
.kz-track__week {
  margin-bottom: 14px;
}

.kz-track__log {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--kz-line);
}

.kz-track__logtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: var(--kz-fs-sm);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--kz-ink-3);
}

/* ==========================================================================
   Phase artifacts
   What a phase owes, on the project page and on a shared link. Reuses the
   existing gate/tag/table palette rather than introducing a second one.
   ========================================================================== */

.kz-artifacts {
  margin: 14px 0 4px;
}

.kz-artifacts__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.kz-artifacts__count {
  font-size: var(--kz-fs-sm);
  font-weight: 700;
  color: var(--kz-ink-2);
  white-space: nowrap;
}

/* Sits inline next to the count, so it takes the leftover width rather than
   the full-width track the hero panel uses. */
.kz-prog__track--slim {
  flex: 1;
  height: 6px;
}

.kz-blocks {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.kz-block {
  border: 1px solid var(--kz-line);
  border-radius: 12px;
  background: var(--kz-surface);
  overflow: hidden;
}

/* Accepted and rework are the two states worth spotting from across the list,
   so they carry an edge rather than only a badge. */
.kz-block--done {
  border-left: 3px solid var(--kz-success);
}

.kz-block--rework {
  border-left: 3px solid var(--kz-danger);
}

.kz-block__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--kz-soft);
  border-bottom: 1px solid var(--kz-line-2);
}

.kz-block__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: var(--kz-fs-base);
  font-weight: 700;
  color: var(--kz-ink);
}

.kz-block__hint {
  margin: 4px 0 0;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-tag--req {
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
}

.kz-block__body {
  padding: 14px;
}

.kz-block__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--kz-line);
}

.kz-block__meta,
.kz-block__count {
  margin: 8px 0 0;
  font-size: var(--kz-fs-xs);
  color: var(--kz-ink-3);
}

.kz-block__comment {
  margin: 8px 0 0;
  padding-left: 10px;
  border-left: 2px solid var(--kz-line);
  font-size: var(--kz-fs-md);
  color: var(--kz-ink-2);
}

.kz-block__attach {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 14px 14px;
}

.kz-blocktext {
  margin: 0;
  font-size: var(--kz-fs-md);
  color: var(--kz-ink-2);
  white-space: pre-wrap;
}

.kz-blocklink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--kz-fs-md);
  font-weight: 600;
  word-break: break-all;
}

.kz-input--cell {
  padding: 5px 7px;
  font-size: var(--kz-fs-sm);
  min-width: 90px;
}

.kz-input--num {
  width: 72px;
}

.kz-input--sub {
  margin-top: 6px;
  font-size: var(--kz-fs-sm);
}

.kz-input--file {
  padding: 6px;
  font-size: var(--kz-fs-sm);
}

.kz-input--copy {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--kz-fs-xs);
}

.kz-formgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.kz-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

/* A list that may run to a whole department's people. */
.kz-checklist--tall {
  max-height: 280px;
  overflow-y: auto;
}

.kz-checklist__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--kz-fs-md);
  color: var(--kz-ink-2);
}

.kz-checklist__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}

.kz-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  color: var(--kz-ink-2);
  white-space: nowrap;
  cursor: pointer;
}

.kz-filelist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.kz-filelist__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--kz-fs-md);
}

/* Plan against fact. Both lines share one scale, so the gap between them is
   the thing the eye lands on. */
.kz-spark {
  display: block;
  width: 100%;
  height: 48px;
  margin-bottom: 8px;
  color: var(--kz-accent);
}

.kz-spark__key {
  display: flex;
  gap: 14px;
  margin: 0 0 10px;
  font-size: var(--kz-fs-xs);
  color: var(--kz-ink-3);
}

.kz-spark__plan::before,
.kz-spark__fact::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 0;
  margin-right: 5px;
  vertical-align: middle;
  border-top: 2px solid var(--kz-primary);
}

.kz-spark__plan::before {
  border-top-style: dashed;
  opacity: .55;
}

.kz-grid--tight {
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.kz-tile--sm .kz-tile__frame {
  aspect-ratio: 4 / 3;
}

/* ==========================================================================
   Timeline (portfolio Gantt)
   Rectangles on a shared time axis, laid out with percentages rather than a
   charting library — the app has no build step and this needs none.
   ========================================================================== */

.kz-gantt__scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.kz-gantt__months {
  position: relative;
  height: 18px;
  margin-left: 180px;
  min-width: 420px;
}

.kz-gantt__month {
  position: absolute;
  top: 0;
  font-size: var(--kz-fs-xs);
  color: var(--kz-ink-3);
  white-space: nowrap;
  transform: translateX(-50%);
}

.kz-gantt__rows {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 600px;
}

/* Today, drawn behind the bars so it never hides one. */
.kz-gantt__today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  margin-left: 180px;
  border-left: 2px dashed var(--kz-danger);
  opacity: .5;
  pointer-events: none;
}

.kz-gantt__row {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 10px;
}

.kz-gantt__name {
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  color: var(--kz-ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kz-gantt__track {
  position: relative;
  height: 22px;
  background: var(--kz-soft);
  border-radius: 6px;
}

.kz-gantt__bar {
  position: absolute;
  top: 0;
  height: 22px;
  display: flex;
  border-radius: 6px;
  overflow: hidden;
}

/* A Kaizen project has no per-phase timetable, so its segments are an even
   split rather than a measurement. Say so instead of implying precision. */
.kz-gantt__bar--estimated {
  opacity: .78;
  outline: 1px dashed var(--kz-line);
  outline-offset: -1px;
}

.kz-gantt__seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  background: var(--kz-lvl-ring);
  border-right: 1px solid var(--kz-surface);
  font-size: var(--kz-fs-xs);
  color: var(--kz-ink-3);
}

.kz-gantt__seg:last-child {
  border-right: 0;
}

.kz-gantt__seg em {
  font-style: normal;
}

.kz-gantt__seg--done {
  background: var(--kz-success);
  color: var(--kz-success-on);
}

.kz-gantt__seg--current {
  background: var(--kz-primary);
  color: var(--kz-white);
}

/* Left behind: the project moved on, the artifacts never arrived. Pale
   stripes inside a red edge, so the words on it stay readable (4.8:1 by day,
   5.9:1 by night) — white on the old full-red stripes was not. */
.kz-gantt__seg--owing {
  background: repeating-linear-gradient(
    45deg,
    color-mix(in srgb, var(--kz-danger) 22%, var(--kz-danger-050)) 0 5px,
    var(--kz-danger-050) 5px 10px
  );
  box-shadow: inset 0 0 0 1px var(--kz-danger);
  color: var(--kz-danger-ink);
}

.kz-gantt__key {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 12px 0 0;
  font-size: var(--kz-fs-xs);
  color: var(--kz-ink-3);
}

.kz-gantt__keyitem::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 2px;
  vertical-align: -1px;
}

.kz-gantt__keyitem--done::before { background: var(--kz-success); }
.kz-gantt__keyitem--current::before { background: var(--kz-primary); }
.kz-gantt__keyitem--owing::before { background: var(--kz-danger); }

/* ==========================================================================
   Share links, admin artifact rows, the shared page
   ========================================================================== */

.kz-share {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.kz-blockrow {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--kz-line);
}

.kz-blockrow__edit {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex: 1;
  flex-wrap: wrap;
}

.kz-blockrow--new {
  border-bottom: 0;
  padding-top: 14px;
}

.kz-blockrow__type {
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--kz-ink-3);
  white-space: nowrap;
}

.kz-field--grow {
  flex: 1;
  min-width: 200px;
}

.kz-filterbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}

.kz-shared {
  background: var(--kz-bg);
}

/* The page's trail, and the zoom at the end of its line. */
.kz-shared__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.kz-shared__where {
  flex: 1 1 auto;
  min-width: 0;
}

.kz-shared__where .kz-crumbs {
  margin-bottom: 0;
}

.kz-shared__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--kz-line);
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

/* ---- Refused save ---------------------------------------------------------
   Shown when somebody else saved the same artifact first. Deliberately loud:
   the form below it still holds what this person typed, and the one thing that
   must not happen is their pressing Save again without reading why it bounced.
   -------------------------------------------------------------------------- */

.kz-block--clash {
  border-color: var(--kz-danger);
  box-shadow: 0 0 0 1px var(--kz-danger-050);
}

.kz-clash {
  margin: 0 0 14px;
  padding: 13px 15px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-danger-050);
  color: var(--kz-danger-ink);
  font-size: var(--kz-fs-md);
  line-height: 1.45;
}

.kz-clash__lead {
  display: flex;
  gap: 9px;
  margin: 0;
  font-weight: 600;
}

.kz-clash__lead .bi {
  flex: 0 0 auto;
  line-height: 1.3;
}

.kz-clash__note {
  margin: 7px 0 0 24px;
  color: var(--kz-ink-2);
}

.kz-clash__diff {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 10px 0 0 24px;
}

.kz-clash__diff dt {
  font-weight: 600;
  color: var(--kz-ink-2);
}

.kz-clash__diff dd {
  margin: 0;
  color: var(--kz-ink);
}

/* ---- History feed --------------------------------------------------------- */

.kz-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kz-feed__row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--kz-line-2);
}

.kz-feed__row:last-child {
  border-bottom: 0;
}

/* Access events are audit rather than progress, so they sit back a shade. */
.kz-feed__row--access .kz-feed__icon {
  background: var(--kz-soft);
  color: var(--kz-ink-3);
}

.kz-feed__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--kz-primary-050);
  color: var(--kz-accent-2);
  font-size: var(--kz-fs-base);
}

.kz-feed__body {
  min-width: 0;
  flex: 1 1 auto;
}

.kz-feed__line {
  margin: 0;
  font-size: var(--kz-fs-md);
  line-height: 1.45;
  color: var(--kz-ink);
}

.kz-feed__what {
  color: var(--kz-ink-2);
}

.kz-feed__detail {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin: 5px 0 0;
  font-size: var(--kz-fs-sm);
}

.kz-feed__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0 0;
  font-size: var(--kz-fs-xs);
  color: var(--kz-ink-3);
}

.kz-tag--link {
  background: var(--kz-info-050);
  color: var(--kz-info-ink);
}

@container kz-screen (max-width: 640px) {
  .kz-gantt__row { grid-template-columns: 120px 1fr; }
  .kz-gantt__months,
  .kz-gantt__today { margin-left: 120px; }
  .kz-block__foot { flex-direction: column; align-items: stretch; }
  .kz-blockrow { flex-wrap: wrap; }
  .kz-clash__note,
  .kz-clash__diff { margin-left: 0; }
}

/* ==========================================================================
   Reminders — the bell, the sidebar count and the reminders page

   One scale, five steps, each with its own colour, icon and words so that
   none of the three carries the meaning alone. Red for missed and for today,
   amber for close, blue for a week out — the usual safety-sign meanings.
   Every ink below is the darker "-ink" shade on its tint, for 4.5:1.
   ========================================================================== */

/* --- The bell in the top bar -------------------------------------------- */

/* The bell is one of the bar's square controls (.kz-topbtn) and takes its
   shape from there; only what is the bell's own is said here. */
.kz-bell {
  padding: 0;
}

.kz-bell__n {
  position: absolute;
  top: 3px;
  right: 1px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  border: 2px solid var(--kz-surface);
  background: var(--kz-danger);
  color: var(--kz-white);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* --- The count beside Reminders in the sidebar ----------------------------- */

.kz-navcount {
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--kz-danger);
  color: var(--kz-white);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Narrow rail: the title is hidden, so the count sits on the icon. */
@container kz-screen (min-width: 1200px) {
  .kz-nav-collapsed .kz-side:not(:hover):not(:focus-within) .kz-navcount {
    position: absolute;
    top: 2px;
    left: 50%;
    min-width: 16px;
    margin-left: 2px;
    padding: 0 4px;
    font-size: var(--kz-fs-xs);
    line-height: 16px;
  }
}

/* --- Countdown chips -------------------------------------------------------- */

.kz-remchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 6px;
  font-size: var(--kz-fs-sm);
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.kz-remchip--overdue  { background: var(--kz-danger); color: var(--kz-danger-on); }
.kz-remchip--today    { background: var(--kz-danger-050); color: var(--kz-danger-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--kz-danger) 35%, transparent); }
.kz-remchip--tomorrow { background: var(--kz-warning-050); color: var(--kz-warning-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--kz-warning) 45%, transparent); }
.kz-remchip--soon     { background: var(--kz-warning-050); color: var(--kz-warning-ink); }
.kz-remchip--week     { background: var(--kz-info-050); color: var(--kz-info-ink); }
.kz-remchip--later    { background: var(--kz-soft); color: var(--kz-ink-3); font-weight: 600; }
.kz-remchip--done     { background: var(--kz-success-050); color: var(--kz-success-ink); font-weight: 600; }

/* --- Summary strip: one cell per step -------------------------------------- */

.kz-remsum {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kz-remsum__cell {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
  border: 1px solid var(--kz-line);
  border-top: 3px solid var(--kz-line);
  box-shadow: var(--kz-shadow);
}

.kz-remsum__n {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--kz-ink);
  font-variant-numeric: tabular-nums;
}

.kz-remsum__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  color: var(--kz-ink-3);
}

.kz-remsum__cell--overdue  { border-top-color: var(--kz-danger); }
.kz-remsum__cell--today    { border-top-color: var(--kz-danger); }
.kz-remsum__cell--tomorrow { border-top-color: var(--kz-warning); }
.kz-remsum__cell--soon     { border-top-color: var(--kz-warning); }
.kz-remsum__cell--week     { border-top-color: var(--kz-info); }

.kz-remsum__cell--overdue:not(.is-zero) .kz-remsum__n,
.kz-remsum__cell--today:not(.is-zero) .kz-remsum__n { color: var(--kz-danger-ink); }

.kz-remsum__cell.is-zero {
  box-shadow: none;
  background: var(--kz-soft);
  border-top-color: var(--kz-line);
}

.kz-remsum__cell.is-zero .kz-remsum__n { color: var(--kz-ink-3); }

/* --- The month calendar ------------------------------------------------------
   The top of the reminders page: a month in whole weeks, Monday to Sunday,
   every day a button. A day says its number and, when something falls on it,
   up to three marks — the icon of each thing's kind, in the colour of its
   step — and how many there are. The day picked is the one the list below
   shows. Above the grid: the month with the way to its neighbours, and two
   chips that are not days — everything, and what is already late. */

.kz-cal {
  margin-bottom: 18px;
  padding: 16px 18px 18px;
}

.kz-cal__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 14px;
}

.kz-cal__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* One width for every month's name, so the arrow after it is in the same
   place for "May" as for "September" — pressed again without looking. */
.kz-cal__title {
  width: 170px;
  margin: 0;
  font-size: var(--kz-fs-lg);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  color: var(--kz-ink);
}

.kz-cal__nav .kz-btn {
  margin-left: 6px;
}

/* A control with nowhere to lead just now — "This month" on this month,
   "Show all" with everything shown — keeps its place and is not shown:
   taking it away would move what stands beside it. */
.kz-cal__nav .kz-btn.is-idle,
.kz-remcal__picked .kz-btn.is-idle {
  visibility: hidden;
  pointer-events: none;
}

/* On a phone the month's fixed width, the two arrows and the (kept, but
   invisible) "This month" are wider than the screen: the month takes the room
   there is, "This month" goes under it when it has somewhere to lead, and an
   idle one gives its room up — there is no neighbour on a phone row to keep
   still. */
@container kz-screen (max-width: 480px) {
  .kz-cal__nav {
    flex-wrap: wrap;
    width: 100%;
  }

  .kz-cal__title {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .kz-cal__nav .kz-btn {
    margin-left: 0;
  }

  .kz-cal__nav .kz-btn.is-idle {
    display: none;
  }
}

.kz-cal__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kz-cal__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 4px 7px 4px 12px;
  border: 1px solid var(--kz-line-3);
  border-radius: 999px;
  background: transparent;
  color: var(--kz-ink-2);
  font: inherit;
  font-size: var(--kz-fs-md);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.kz-cal__chipn {
  min-width: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--kz-line-2);
  color: var(--kz-ink);
  font-size: var(--kz-fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.kz-cal__chip:hover {
  border-color: var(--kz-primary);
  color: var(--kz-ink);
}

.kz-cal__chip--overdue:not(.is-zero) .bi,
.kz-cal__chip--overdue:not(.is-zero) .kz-cal__chipn {
  color: var(--kz-danger-ink);
}

.kz-cal__chip--overdue:not(.is-zero) .kz-cal__chipn {
  background: var(--kz-danger-050);
}

.kz-cal__chip.is-zero {
  color: var(--kz-ink-3);
}

.kz-cal__chip.is-on {
  border-color: var(--kz-accent);
  background: var(--kz-primary-050);
  color: var(--kz-accent-2);
}

.kz-cal__chip:focus-visible,
.kz-cal__day:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: 2px;
}

/* Seven equal columns. On a narrow screen the days get smaller, not fewer. */
.kz-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.kz-cal__dow {
  padding: 0 4px 4px;
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
  color: var(--kz-ink-3);
}

.kz-cal__day {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  min-height: 62px;
  padding: 7px 9px 8px;
  border: 1px solid var(--kz-line);
  border-left: 3px solid var(--kz-line);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
  color: var(--kz-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.kz-cal__num {
  font-size: var(--kz-fs-base);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.kz-cal__marks {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  font-size: var(--kz-fs-md);
}

.kz-cal__mark--overdue,
.kz-cal__mark--today    { color: var(--kz-danger); }
.kz-cal__mark--tomorrow,
.kz-cal__mark--soon     { color: var(--kz-warning-ink); }
.kz-cal__mark--week     { color: var(--kz-info-ink); }
.kz-cal__mark--later    { color: var(--kz-ink-3); }

.kz-cal__n {
  margin-left: 2px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--kz-line-2);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

/* A day with something on it: the colour of the most urgent thing there. */
.kz-cal__day--overdue  { border-left-color: var(--kz-danger); background: var(--kz-danger-050); }
.kz-cal__day--today    { border-left-color: var(--kz-danger); }
.kz-cal__day--tomorrow,
.kz-cal__day--soon     { border-left-color: var(--kz-warning); }
.kz-cal__day--week     { border-left-color: var(--kz-info); }
.kz-cal__day--later    { border-left-color: var(--kz-ink-4); }

/* A day with nothing on it steps back; it can still be picked. */
.kz-cal__day.is-zero {
  background: var(--kz-soft);
}

.kz-cal__day.is-zero .kz-cal__num {
  font-weight: 500;
  color: var(--kz-ink-2);
}

/* The days of the months either side that fill out the first and last week. */
.kz-cal__day.is-out {
  border-style: dashed;
  background: transparent;
}

.kz-cal__day.is-out .kz-cal__num {
  color: var(--kz-ink-4);
}

/* Today: its number in a filled circle, as calendars do. */
.kz-cal__day.is-today .kz-cal__num {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  margin: -4px 0 -4px -4px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--kz-primary);
  color: var(--kz-white);
  font-weight: 700;
}

.kz-cal__day:hover {
  border-color: var(--kz-primary);
}

/* The one picked: the day the list below is showing. */
.kz-cal__day.is-on {
  border-color: var(--kz-primary);
  background: var(--kz-primary-050);
  box-shadow: inset 0 0 0 1px var(--kz-primary);
}

@container kz-screen (max-width: 575.98px) {
  .kz-cal {
    padding: 12px;
  }

  .kz-cal__grid {
    gap: 4px;
  }

  .kz-cal__day {
    min-height: 52px;
    padding: 6px 5px;
  }

  /* No room for the marks: the count alone says there is something. */
  .kz-cal__mark {
    display: none;
  }

  .kz-cal__n {
    margin-left: 0;
  }
}

/* Everything under the calendar. Its own block, so the room it keeps (the
   script pins its height at the first pick) counts the last card's margin
   too, and the page is not a few pixels shorter for a day with less on it. */
[data-remcal-list] {
  display: flow-root;
}

/* What the list is showing. One line, the same height whatever it says, so
   the list under it never starts higher or lower. */
.kz-remcal__picked {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  margin: -4px 0 14px;
}

.kz-remcal__picked > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kz-remcal__picked .kz-btn {
  flex: 0 0 auto;
  margin-left: auto;
}

.kz-remnote {
  margin: -6px 0 16px;
  color: var(--kz-accent-2);
  font-weight: 600;
}

/* --- Group cards ------------------------------------------------------------ */

.kz-remgroup--overdue .kz-card__title i,
.kz-remgroup--today .kz-card__title i    { color: var(--kz-danger); }
.kz-remgroup--tomorrow .kz-card__title i,
.kz-remgroup--soon .kz-card__title i     { color: var(--kz-warning); }
.kz-remgroup--week .kz-card__title i     { color: var(--kz-info); }

/* --- The list as columns -----------------------------------------------------
   Up to four columns, the most urgent on the left (ReminderStage::columns).
   They share the width there is and wrap when one would be under 260px, so
   nothing is scrolled sideways; a phone has room for one. A column left alone
   — a day picked, or only one step in use — lays its reminders out side by
   side instead of stretching one across the page. */

.kz-remboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  align-items: start;
  margin-bottom: 24px;
}

/* The steps of one column, one under the other. */
.kz-remboard__col {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.kz-remboard .kz-card {
  margin-bottom: 0;
}

/* The step's colour along the top of its column, as on the task board. */
.kz-remboard .kz-remgroup { border-top: 3px solid var(--kz-ink-4); }
.kz-remboard .kz-remgroup--overdue,
.kz-remboard .kz-remgroup--today    { border-top-color: var(--kz-danger); }
.kz-remboard .kz-remgroup--tomorrow,
.kz-remboard .kz-remgroup--soon     { border-top-color: var(--kz-warning); }
.kz-remboard .kz-remgroup--week     { border-top-color: var(--kz-info); }

.kz-remboard .kz-card__head {
  min-height: 52px;
  padding: 10px 16px;
}

.kz-remboard .kz-card__body {
  padding: 12px;
}

.kz-remboard .kz-remlist {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

/* A reminder in a column: the date beside what it is, and under them how far
   off it is and the way to it. */
.kz-remboard .kz-rem {
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: 10px 12px;
  padding: 12px;
}

.kz-remboard .kz-rem__side {
  grid-column: 1 / -1;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

/* --- Rows --------------------------------------------------------------------- */

.kz-remlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.kz-rem {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 12px 13px;
  border: 1px solid var(--kz-line);
  border-left: 3px solid var(--kz-line);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
}

.kz-rem--overdue  { border-left-color: var(--kz-danger); background: var(--kz-danger-050); }
.kz-rem--today    { border-left-color: var(--kz-danger); }
.kz-rem--tomorrow { border-left-color: var(--kz-warning); }
.kz-rem--soon     { border-left-color: var(--kz-warning); }
.kz-rem--week     { border-left-color: var(--kz-info); }
/* Finished and kept (the "Done" tab): green edge, quieter words. */
.kz-rem--done     { border-left-color: var(--kz-success); }
.kz-rem--done .kz-rem__title { color: var(--kz-ink-2); }

.kz-rem__body {
  min-width: 0;
}

.kz-rem__kind {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 3px;
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--kz-ink-3);
}

.kz-rem__new {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--kz-primary);
  color: var(--kz-white);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .03em;
}

/* A reminder written for particular people: each of them, ticked once they
   have ticked it off. */
.kz-rem__person {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px 1px 6px;
  border-radius: 999px;
  background: var(--kz-soft);
  box-shadow: inset 0 0 0 1px var(--kz-line);
  color: var(--kz-ink-2);
  font-weight: 600;
  letter-spacing: normal;
}

.kz-rem__person .bi {
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-xs);
}

.kz-rem__person.is-done {
  background: var(--kz-success-050);
  box-shadow: none;
  color: var(--kz-success-ink);
}

.kz-rem__person.is-done .bi {
  color: var(--kz-success-ink);
}

.kz-rem__title {
  margin: 0 0 4px;
  font-size: var(--kz-fs-base);
  font-weight: 600;
  color: var(--kz-ink);
  overflow-wrap: anywhere;
}

.kz-rem__title a {
  color: inherit;
  text-decoration: none;
}

.kz-rem__title a:hover,
.kz-rem__title a:focus-visible {
  color: var(--kz-accent);
  text-decoration: underline;
}

.kz-rem__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-rem__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.kz-rem__side form {
  margin: 0;
}

/* Put back, and delete for good, side by side. */
.kz-rem__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- "How reminders work" ---------------------------------------------------
   Kept behind the small icon in the page's heading: the confirmation dialog's
   frame, read from the left. The padding is on the box inside, so a click on
   the dialog itself can only be a click beside it. */

.kz-iconbtn--help {
  font-size: var(--kz-fs-lg);
}

.kz-confirm.kz-remhow {
  width: min(620px, calc(100vw / var(--kz-zoom) - 32px));
  max-height: calc(100vh / var(--kz-zoom) - 48px);
  padding: 0;
  overflow-y: auto;
  text-align: left;
}

.kz-remhow__box {
  padding: 22px 24px 24px;
}

.kz-remhow__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.kz-remhow__heading {
  flex: 1 1 auto;
  min-width: 0;
}

.kz-remhow__title {
  margin: 0;
  font-size: var(--kz-fs-lg);
  font-weight: 600;
  line-height: 1.35;
}

.kz-remhow__sub {
  margin: 2px 0 0;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-remhow__note {
  margin-top: 18px;
}

.kz-remhow__h {
  margin: 0 0 10px;
  font-size: var(--kz-fs-sm);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--kz-ink-3);
}

* + .kz-remhow__h {
  margin-top: 22px;
}

.kz-remscale {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kz-remkinds {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.kz-remkinds li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  font-size: var(--kz-fs-md);
  line-height: 1.45;
  color: var(--kz-ink-2);
}

.kz-remkinds i {
  color: var(--kz-accent);
  font-size: var(--kz-fs-lg);
  line-height: 1.3;
}

/* --- A task card reached from a reminder ------------------------------------ */

.kz-board__card:target {
  outline: 3px solid var(--kz-focus);
  outline-offset: 2px;
  scroll-margin-top: 96px;
}

@container kz-screen (max-width: 991.98px) {
  .kz-remsum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@container kz-screen (max-width: 575.98px) {
  .kz-remsum { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .kz-rem {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
  }

  .kz-rem__side {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
}


/* ==========================================================================
   Tasks — the tasks page, the edit dialog, and the little notices a
   background save leaves behind
   ========================================================================== */

/* --- The counts strip: four cells on the tasks page -------------------------- */

.kz-remsum--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kz-remsum__cell--todo { border-top-color: var(--kz-danger); }
.kz-remsum__cell--done { border-top-color: var(--kz-success); }

@container kz-screen (max-width: 575.98px) {
  .kz-remsum--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Search and filters ------------------------------------------------------ */

.kz-taskfilters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 16px;
}

.kz-taskfilters__search {
  position: relative;
  flex: 1 1 260px;
}

.kz-taskfilters__search i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--kz-ink-3);
  pointer-events: none;
}

.kz-taskfilters__search .kz-input {
  padding-left: 38px;
}

.kz-taskfilters .kz-select {
  flex: 0 1 220px;
}

.kz-taskfilters__mine {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: var(--kz-fs-md);
  font-weight: 500;
  color: var(--kz-ink-2);
  cursor: pointer;
}

.kz-taskfilters__mine input {
  width: 17px;
  height: 17px;
  accent-color: var(--kz-primary);
}

/* A filtered-out card really is gone, whatever a theme rule says. */
[data-task-card][hidden],
[data-task-column][hidden] {
  display: none !important;
}

/* One status picked: its column has the board to itself, the cards side by
   side, rather than one narrow column beside two empty thirds. */
.kz-board:has(> [data-task-column][hidden]),
.kz-ptboard:has(> [data-task-column][hidden]),
.kz-lanes:has(> [data-task-column][hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.kz-board:has(> [data-task-column][hidden]) .kz-board__cards,
.kz-ptboard:has(> [data-task-column][hidden]) .kz-ptcol__cards,
.kz-lanes:has(> [data-task-column][hidden]) .kz-lane__cards {
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}

/* --- Cards: the pencil beside the title ------------------------------------- */

.kz-board__cardhead {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.kz-board__cardhead .kz-board__cardtitle {
  flex: 1 1 auto;
  min-width: 0;
}

.kz-board__edit {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin: -4px -6px 0 0;
  border-color: transparent;
  background: transparent;
  color: var(--kz-ink-3);
  text-decoration: none;
}

.kz-board__edit:hover,
.kz-board__edit:focus-visible {
  color: var(--kz-accent);
  background: var(--kz-primary-050);
}

.kz-board__project {
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kz-board__project:hover,
.kz-board__project:focus-visible {
  color: var(--kz-accent-2);
  background: var(--kz-primary-050);
}

/* Just added, moved or edited: a brief glow so the eye finds it. */
.kz-board__card.is-fresh {
  animation: kz-fresh 1.8s ease-out;
}

@keyframes kz-fresh {
  0%   { box-shadow: 0 0 0 3px var(--kz-primary); background: var(--kz-primary-050); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--kz-primary) 0%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .kz-board__card.is-fresh { animation: none; outline: 2px solid var(--kz-focus); }
}

/* A form being sent: its button waits, so one click is one card. */
form[aria-busy="true"] button[type="submit"] {
  opacity: .6;
  cursor: progress;
}

/* --- The edit dialog ---------------------------------------------------------- */

.kz-taskmodal .modal-content {
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  box-shadow: var(--kz-shadow-lg);
}

.kz-taskmodal .modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--kz-line);
}

.kz-taskmodal .modal-body {
  padding: 20px 22px;
}

.kz-taskmodal .kz-card__title i {
  color: var(--kz-accent);
}

/* --- Notices -------------------------------------------------------------- */

.kz-toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1090;
  display: grid;
  gap: 10px;
  /* Screen-sized lengths are divided back by the zoom (see Base). */
  max-width: min(380px, calc(100vw / var(--kz-zoom) - 32px));
  pointer-events: none;
}

.kz-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--kz-r);
  /* A notice is dark in both modes: it floats over the page, and in the
     dark mode the ink colour is nearly white. */
  background: var(--kz-toast);
  color: var(--kz-white);
  font-size: var(--kz-fs-md);
  font-weight: 500;
  box-shadow: var(--kz-shadow-lg);
  animation: kz-toast-in .2s ease-out;
  transition: opacity .25s ease, transform .25s ease;
}

.kz-toast i {
  color: var(--kz-success-bright);
  font-size: var(--kz-fs-lg);
}

.kz-toast--error {
  background: var(--kz-danger-ink);
}

.kz-toast--error i {
  color: var(--kz-white);
}

.kz-toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
}

@keyframes kz-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@container kz-screen (max-width: 575.98px) {
  .kz-toasts {
    right: 16px;
    left: 16px;
    bottom: 16px;
    max-width: none;
  }
}

/* ==========================================================================
   Asking first, and taking it back

   The confirmation dialog that replaces the browser's own, and the Undo that
   replaces asking at all where a thing can simply be put back.
   ========================================================================== */

/* --- The confirmation dialog ------------------------------------------------- */

.kz-confirm {
  /* The screen's width whatever the zoom (see Base). */
  width: min(420px, calc(100vw / var(--kz-zoom) - 32px));
  padding: 26px 26px 22px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r-lg);
  background: var(--kz-surface);
  color: var(--kz-ink);
  box-shadow: var(--kz-shadow-lg);
  text-align: center;
}

.kz-confirm[open] {
  animation: kz-confirm-in .16s ease-out;
}

.kz-confirm::backdrop {
  background: var(--kz-scrim);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

@keyframes kz-confirm-in {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.kz-confirm__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 16px;
  font-size: var(--kz-fs-2xl);
  background: var(--kz-primary-050);
  color: var(--kz-accent);
}

.kz-confirm--danger .kz-confirm__icon  { background: var(--kz-danger-050);  color: var(--kz-danger); }
.kz-confirm--warning .kz-confirm__icon { background: var(--kz-warning-050); color: var(--kz-warning-ink); }

.kz-confirm__msg {
  margin: 0 0 22px;
  font-size: var(--kz-fs-lg);
  font-weight: 600;
  line-height: 1.5;
  color: var(--kz-ink);
  overflow-wrap: anywhere;
}

/* A dialog with more to say (data-confirm-title): the question in a line,
   then what it is about set apart in its own box, then the small print — so
   the name of the thing is read as a name, not as part of a sentence. */
.kz-confirm__title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--kz-ink);
}

.kz-confirm__subject {
  margin: 0 0 14px;
  padding: 11px 14px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r-sm);
  background: var(--kz-line-2);
  font-size: var(--kz-fs-base);
  font-weight: 600;
  line-height: 1.45;
  color: var(--kz-ink);
  overflow-wrap: anywhere;
}

.kz-confirm--titled .kz-confirm__msg {
  font-size: var(--kz-fs-md);
  font-weight: 400;
  color: var(--kz-ink-2);
}

/* Two equal halves whatever the buttons say: a long label wraps inside its
   half instead of pushing the dialog wider than itself. */
.kz-confirm__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.kz-confirm__actions .kz-btn {
  justify-content: center;
  width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.kz-confirm__actions .kz-btn:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .kz-confirm[open] { animation: none; }
}

/* --- Undo in a notice ----------------------------------------------------------- */

.kz-toast {
  pointer-events: auto;
}

.kz-toast__text {
  flex: 1 1 auto;
}

.kz-toast__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -4px -6px -4px 6px;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--kz-white) 14%, transparent);
  color: var(--kz-white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease;
}

.kz-toast__action:hover,
.kz-toast__action:focus-visible {
  background: color-mix(in srgb, var(--kz-white) 26%, transparent);
}

.kz-toast__action:focus-visible {
  outline: 2px solid var(--kz-white);
  outline-offset: 2px;
}

/* The same Undo, in the page notice when scripting is off. */
.kz-alert__undo {
  margin: 0 0 0 auto;
  align-self: center;
}

/* --- A card on its way out --------------------------------------------------- */

.kz-board__card.is-removing {
  opacity: .35;
  transform: scale(.98);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

/* ==========================================================================
   The task table

   One row per task and a column per thing worth knowing — laid out the way
   the team's own Notion tables are: quiet grid lines, an icon on every
   heading, coloured pills for status, priority and team, a progress bar.
   Wide, so it scrolls sideways inside its frame rather than squeezing its
   columns; "+ New task" stands over it, outside the frame, so it never
   scrolls away with them.
   ========================================================================== */

/* --- The bar above: view switch, find, New task --------------------------- */

.kz-viewbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 14px;
}

.kz-viewbar .kz-taskfilters {
  flex: 1 1 420px;
  margin-bottom: 0;
}

.kz-viewbar__new {
  margin-left: auto;
  white-space: nowrap;
}

/* To do, Doing, Done: a line of their own under the bar. */
.kz-viewbar__status {
  flex: 1 0 100%;
}

.kz-viewswitch {
  display: inline-flex;
  padding: 3px;
  border-radius: 11px;
  background: var(--kz-soft);
  border: 1px solid var(--kz-line);
}

.kz-viewswitch__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 8px;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.kz-viewswitch__btn:hover {
  color: var(--kz-ink);
}

.kz-viewswitch__btn.is-on {
  background: var(--kz-surface);
  color: var(--kz-accent-2);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--kz-shade) 8%, transparent), 0 2px 6px -2px color-mix(in srgb, var(--kz-shade) 12%, transparent);
}

.kz-viewswitch__btn:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: 1px;
}

/* --- The frame and the grid --------------------------------------------------- */

.kz-ttable-wrap {
  overflow-x: auto;
  margin-bottom: 18px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  background: var(--kz-surface);
  box-shadow: var(--kz-shadow);
}

.kz-ttable {
  width: 100%;
  min-width: 1480px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--kz-fs-md);
  color: var(--kz-ink);
}

.kz-ttable th,
.kz-ttable td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--kz-line-2);
  border-right: 1px solid var(--kz-line-2);
  vertical-align: middle;
  white-space: nowrap;
  text-align: left;
}

.kz-ttable th:last-child,
.kz-ttable td:last-child {
  border-right: 0;
}

.kz-ttable thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 10px;
  padding-bottom: 10px;
  background: var(--kz-soft);
  border-bottom: 1px solid var(--kz-line);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  color: var(--kz-ink-3);
}

.kz-ttable thead th > .bi {
  margin-right: 6px;
  opacity: .8;
}

.kz-ttable__aa {
  margin-right: 6px;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
}

.kz-ttable__hint {
  margin-left: 2px;
  font-size: var(--kz-fs-xs);
}

.kz-ttable__actions {
  width: 48px;
}

.kz-ttable__empty td {
  padding: 22px 12px;
  text-align: center;
  color: var(--kz-ink-3);
}

/* --- Rows ---------------------------------------------------------------------- */

.kz-trow {
  transition: background .12s ease;
}

.kz-trow:hover {
  background: var(--kz-hover);
}

/* Late: the whole row tinted and a red edge on its first cell, so a late
   task is found in a long table without reading the dates. */
.kz-trow.is-late,
.kz-trow.is-late td:first-child {
  background: var(--kz-late);
}

.kz-trow.is-late:hover,
.kz-trow.is-late:hover td:first-child {
  background: var(--kz-late-hover);
}

.kz-trow.is-late td:first-child {
  box-shadow: inset 4px 0 0 var(--kz-danger), 1px 0 0 var(--kz-line);
}

.kz-trow.is-done .kz-trow__name a,
.kz-trow.is-done .kz-trow__name > span:first-child {
  color: var(--kz-ink-3);
}

/* The task's name in full, on as many lines as it takes — read in its row,
   never cut short and never only in the dialog. The column keeps a steady
   width, so a long name grows downwards rather than pushing the table wide. */
.kz-trow__name {
  width: 400px;
  min-width: 360px;
  max-width: 420px;
  overflow-wrap: anywhere;
  font-size: var(--kz-fs-base);
  font-weight: 600;
  line-height: 1.45;
}

.kz-trow__name a,
.kz-board__cardtitle a {
  color: var(--kz-ink);
  text-decoration: none;
}

.kz-trow__name a:hover,
.kz-trow__name a:focus-visible,
.kz-board__cardtitle a:hover,
.kz-board__cardtitle a:focus-visible {
  color: var(--kz-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.kz-trow__src {
  margin-left: 6px;
  color: var(--kz-accent);
  font-size: var(--kz-fs-sm);
}

/* Assignee and Tracker: everybody by their whole name, one under another
   (.kz-taskpeople). Wide enough for a name, surname and father's name on one
   line; the column keeps a steady width, so a longer name wraps under itself
   rather than pushing the table wide. */
.kz-trow__people {
  width: 340px;
  min-width: 330px;
  max-width: 360px;
}

.kz-trow__date {
  font-variant-numeric: tabular-nums;
  color: var(--kz-ink-2);
}

.kz-trow__date.is-late {
  color: var(--kz-danger-ink);
  font-weight: 600;
}

.kz-trow__date .bi {
  margin-left: 4px;
}

/* --- Columns moved by their headings ----------------------------------------
   Every heading but the name's can be dragged left or right; a line shows
   where it will land. A grip shows on the heading pointed at. */

.kz-ttable__col {
  cursor: grab;
  user-select: none;
}

.kz-ttable__col:active {
  cursor: grabbing;
}

.kz-ttable thead th > .kz-ttable__grip {
  position: absolute;
  top: 50%;
  left: 0;
  margin: 0 !important;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .15s ease;
}

.kz-ttable thead .kz-ttable__col:hover > .kz-ttable__grip,
.kz-ttable thead .kz-ttable__col:focus-visible > .kz-ttable__grip {
  opacity: .8;
}

.kz-ttable__col:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: -3px;
}

.kz-ttable__col.is-dragging {
  opacity: .45;
}

.kz-ttable__col.is-drop-before {
  box-shadow: inset 3px 0 0 var(--kz-primary);
}

.kz-ttable__col.is-drop-after {
  box-shadow: inset -3px 0 0 var(--kz-primary);
}

.kz-ttable__reset {
  margin: 0;
}

.kz-ttable__reset .kz-iconbtn {
  width: 28px;
  height: 28px;
}

/* --- Cells changed in place ------------------------------------------------
   Each cell of a task someone may change answers a click: a date opens the
   calendar, and Assignee, Files and the comment open the task dialog at that
   field. They look like text until pointed at. */

.kz-cellform {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

/* A date: dd.mm.yyyy text, whatever language the browser speaks, with the
   date field laid over it unseen. A click opens the calendar and the field
   stays unseen (.is-picking); typing, or reaching it with Tab, shows it. */
.kz-celldate {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 108px;
  min-height: 30px;
  margin: -4px -6px;
  padding: 3px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease;
}

.kz-celldate:hover,
.kz-celldate:has(.is-picking) {
  background: var(--kz-soft);
}

.kz-celldate input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--kz-surface);
  color: var(--kz-ink);
  font: inherit;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  cursor: pointer;
}

.kz-celldate input:focus {
  outline: none;
}

.kz-celldate input:focus:not(.is-picking) {
  border-color: var(--kz-primary);
  box-shadow: 0 0 0 3px var(--kz-primary-050);
  opacity: 1;
}

.kz-celldate input::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

/* A cell that opens the dialog: the whole cell is the button. */
.kz-cellbtn {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin: -4px -6px;
  padding: 3px 6px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease;
}

.kz-cellbtn:hover {
  background: var(--kz-soft);
  color: inherit;
}

.kz-cellbtn:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: 0;
}

/* "+ Add" in an empty cell — there to be found, not to be read. */
.kz-cellbtn__add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  opacity: 0;
  transition: opacity .15s ease;
}

.kz-trow:hover .kz-cellbtn__add,
.kz-cellbtn:focus-visible .kz-cellbtn__add {
  opacity: 1;
}

/* Files: the paperclip button after the files there are. */
.kz-trow__files a.kz-cellbtn--attach {
  display: inline-flex;
  max-width: none;
  margin: -4px 0;
  padding: 3px 6px;
  color: var(--kz-ink-3);
}

.kz-trow__files a.kz-cellbtn--attach:hover {
  color: var(--kz-accent);
  text-decoration: none;
}

/* The field a cell opened the dialog at, marked for a moment. */
.kz-field.is-wanted {
  border-radius: 10px;
  background: var(--kz-primary-050);
  box-shadow: 0 0 0 6px var(--kz-primary-050);
  transition: background .3s ease, box-shadow .3s ease;
}

.kz-trow__files a,
.kz-trow__project a,
.kz-trow__project span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 180px;
  margin-right: 8px;
  overflow: hidden;
  color: var(--kz-ink-2);
  text-decoration: none;
  vertical-align: middle;
}

.kz-trow__files a span {
  overflow: hidden;
  text-overflow: ellipsis;
}
/* One file in the Files cell, with the way to take it back when it is the
   reader's own to take. */
.kz-trow__file {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: 8px;
  vertical-align: middle;
}

.kz-trow__files .kz-trow__file > a {
  margin-right: 0;
}

.kz-trow__files a:hover,
.kz-trow__project a:hover {
  color: var(--kz-accent);
  text-decoration: underline;
}

.kz-trow__more {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
}

/* The row's delete waits out of sight until the row is pointed at. */
.kz-trow__actions form {
  margin: 0;
}

.kz-trow__del {
  width: 30px;
  height: 30px;
  opacity: 0;
  transition: opacity .12s ease;
}

.kz-trow:hover .kz-trow__del,
.kz-trow:focus-within .kz-trow__del {
  opacity: 1;
}

@media (hover: none) {
  .kz-trow__del { opacity: 1; }
}

.kz-trow.is-fresh {
  animation: kz-fresh 1.8s ease-out;
}

.kz-trow:target {
  background: var(--kz-primary-050);
  outline: 2px solid var(--kz-focus);
  outline-offset: -2px;
}

.kz-trow.is-removing {
  opacity: .35;
  pointer-events: none;
  transition: opacity .18s ease;
}

[data-task-item][hidden] {
  display: none !important;
}

/* --- Pills: status, priority — static, or a select that looks like one -------- */

.kz-pill,
.kz-pillselect {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  line-height: 24px;
  white-space: nowrap;
}

.kz-pillselect {
  padding-right: 24px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23626d8a' stroke-width='2' d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.kz-pillselect:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: 1px;
}

.kz-pillselect:disabled {
  opacity: .6;
}

.kz-pill--to-do,  .kz-pillselect--to-do  { background-color: var(--kz-danger-050);  color: var(--kz-danger-ink); }
.kz-pill--doing,  .kz-pillselect--doing  { background-color: var(--kz-warning-050); color: var(--kz-warning-ink); }
.kz-pill--done,   .kz-pillselect--done   { background-color: var(--kz-success-050); color: var(--kz-success-ink); }
.kz-pill--green,  .kz-pillselect--green  { background-color: var(--kz-success-050); color: var(--kz-success-ink); }
.kz-pill--amber,  .kz-pillselect--amber  { background-color: var(--kz-warning-050); color: var(--kz-warning-ink); }
.kz-pill--red,    .kz-pillselect--red    { background-color: var(--kz-danger-050);  color: var(--kz-danger-ink); }
.kz-pillselect--none {
  background-color: transparent;
  color: var(--kz-ink-3);
  box-shadow: inset 0 0 0 1px var(--kz-line);
}

/* --- "+ New task" -------------------------------------------------------------- */

/* The line the next task is written on, on its own between the bar that finds
   the tasks and the tasks themselves — the same for the board and the table.
   A dashed frame, as an empty slot has, that turns solid in the accent while
   it is written in. Where tasks come out of sessions, the session comes
   first, set off from the name by a rule — as wide as the table's Session
   date column (--kz-ttable-session), its mark as far in as the cells' are,
   so over the table the line reads as one more row of it. */
.kz-quickadd {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0 0 18px;
  border: 1px dashed var(--kz-line-3);
  border-radius: var(--kz-r);
  background: var(--kz-surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.kz-quickadd--sessions {
  grid-template-columns: var(--kz-ttable-session) minmax(0, 1fr);
}

.kz-quickadd:hover {
  border-color: var(--kz-ink-4);
}

.kz-quickadd:focus-within {
  border-style: solid;
  border-color: var(--kz-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-primary) 14%, transparent);
}

.kz-quickadd:has(.is-invalid) {
  border-style: solid;
  border-color: var(--kz-danger);
}

.kz-quickadd:has(.is-invalid):focus-within {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-danger) 14%, transparent);
}

/* Over the picker's own place in a cell (.kz-cellsession). */
.kz-quickadd .kz-quickadd__session {
  margin: 0;
  padding: 6px 12px;
  border-right: 1px solid var(--kz-line-2);
  border-radius: calc(var(--kz-r) - 1px) 0 0 calc(var(--kz-r) - 1px);
}

.kz-quickadd__name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 5px 6px 5px 12px;
  color: var(--kz-ink-3);
}

.kz-quickadd:focus-within .kz-quickadd__name > .bi {
  color: var(--kz-accent);
}

.kz-quickadd__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--kz-ink);
  font: inherit;
  font-size: var(--kz-fs-md);
  text-overflow: ellipsis;
}

.kz-quickadd__input::placeholder {
  color: var(--kz-ink-3);
}

/* The frame says where the cursor is; the field has no ring of its own
   inside it (section 20 gives every input one). */
.kz-quickadd .kz-quickadd__input:focus,
.kz-quickadd .kz-quickadd__input:focus-visible {
  outline: none;
}

/* Add stays quiet until there is a name to add, then fills in. */
.kz-quickadd__add {
  flex: none;
  border-color: var(--kz-line-3);
  background: var(--kz-surface);
  color: var(--kz-ink-2);
}

.kz-quickadd__add:hover:not(:disabled),
.kz-quickadd:has(.kz-quickadd__input:not(:placeholder-shown)) .kz-quickadd__add:not(:disabled) {
  border-color: var(--kz-primary);
  background: var(--kz-primary);
  color: var(--kz-white);
}

.kz-quickadd:has(.kz-quickadd__input:not(:placeholder-shown)) .kz-quickadd__add:hover:not(:disabled) {
  border-color: var(--kz-primary-700);
  background: var(--kz-primary-700);
}

/* Why it was refused, on a line of its own under the whole of it. */
.kz-quickadd > .kz-error {
  grid-column: 1 / -1;
  padding: 0 16px 9px;
}

/* On a phone the session takes a line of its own, over the name. */
@container kz-screen (max-width: 575.98px) {
  .kz-quickadd--sessions {
    grid-template-columns: minmax(0, 1fr);
  }

  .kz-quickadd .kz-quickadd__session {
    border-right: 0;
    border-bottom: 1px solid var(--kz-line-2);
    border-radius: calc(var(--kz-r) - 1px) calc(var(--kz-r) - 1px) 0 0;
  }
}

/* --- The task form (dialog) ---------------------------------------------------- */

.kz-taskform {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.kz-taskform__wide {
  grid-column: 1 / -1;
}

.kz-taskform .kz-label .bi {
  margin-right: 4px;
  color: var(--kz-ink-3);
}

.kz-taskfiles {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
  display: grid;
  gap: 6px;
}

.kz-taskfiles li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--kz-line-2);
  border-radius: var(--kz-r-sm);
  background: var(--kz-soft);
}

.kz-taskfiles a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  color: var(--kz-ink);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kz-taskfiles__remove {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 0 auto;
  color: var(--kz-danger-ink);
  font-size: var(--kz-fs-sm);
  cursor: pointer;
  white-space: nowrap;
}

@container kz-screen (max-width: 575.98px) {
  .kz-taskform {
    grid-template-columns: 1fr;
  }

  .kz-viewbar__new {
    width: 100%;
    justify-content: center;
  }
}

/* The task's name stays in view while the table scrolls sideways, as a
   Notion table's first column does. */
.kz-ttable thead th:first-child,
.kz-ttable tbody td:first-child {
  position: sticky;
  left: 0;
  box-shadow: 1px 0 0 var(--kz-line);
}

.kz-ttable tbody td:first-child {
  z-index: 1;
  background: var(--kz-surface);
}

.kz-ttable thead th:first-child {
  z-index: 2;
}

.kz-trow:hover td:first-child {
  background: var(--kz-hover);
}

.kz-trow:target td:first-child {
  background: var(--kz-primary-050);
}

/* --- Session date: the first column of a project's table --------------------
   The session a task came out of, before its name. As the table scrolls
   sideways the name stays in view, as it always has; on a page wide enough
   for both, the date stays too, at the edge, with the name pinned right
   after it — as far in as the date column really is wide (--kz-ttable-pin,
   measured by kaizen.js; the column's own width until then). The line that
   sets the pinned columns off from the rest is the name's. */

.kz-ttable--sessions,
.kz-quickadd--sessions {
  --kz-ttable-session: 200px;
}

.kz-ttable__session,
.kz-trow__session {
  width: var(--kz-ttable-session);
  min-width: var(--kz-ttable-session);
  max-width: var(--kz-ttable-session);
}

.kz-ttable--sessions thead th:first-child,
.kz-ttable--sessions tbody td:first-child {
  box-shadow: none;
}

.kz-ttable--sessions thead th:first-child,
.kz-ttable--sessions tbody td.kz-trow__session {
  left: auto;
}

.kz-ttable--sessions thead th.kz-ttable__name,
.kz-ttable--sessions tbody td.kz-trow__name {
  position: sticky;
  left: 0;
  box-shadow: 1px 0 0 var(--kz-line);
}

.kz-ttable--sessions thead th.kz-ttable__name {
  z-index: 2;
}

.kz-ttable--sessions tbody td.kz-trow__name {
  z-index: 1;
  background: var(--kz-surface);
}

.kz-ttable--sessions .kz-trow:hover td.kz-trow__name {
  background: var(--kz-hover);
}

.kz-ttable--sessions .kz-trow:target td.kz-trow__name {
  background: var(--kz-primary-050);
}

@container kz-screen (min-width: 1200px) {
  .kz-ttable--sessions thead th:first-child,
  .kz-ttable--sessions tbody td.kz-trow__session {
    left: 0;
  }

  .kz-ttable--sessions thead th.kz-ttable__name,
  .kz-ttable--sessions tbody td.kz-trow__name {
    left: var(--kz-ttable-pin, var(--kz-ttable-session));
  }
}

@container kz-screen (max-width: 575.98px) {
  .kz-ttable--sessions {
    --kz-ttable-session: 164px;
  }
}

/* What a Session date cell shows when no session is chosen (session-face):
   "Choose the session" where one can be, in the accent, beside a dashed mark
   and the list's arrow — always in sight, not only when pointed at — and for
   a task written before tasks had sessions, where it was agreed, with "Date
   not chosen" under it. */
.kz-sessface {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.kz-sesspick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--kz-ink-3);
  text-align: left;
}

.kz-sesspick.is-open {
  width: 100%;
}

.kz-sesspick > .bi:first-child {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px dashed var(--kz-line-3);
  border-radius: 8px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-base);
}

.kz-sesspick__text {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.kz-sesspick__main {
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  white-space: normal;
}

.kz-sesspick.is-open:not(.is-earlier) .kz-sesspick__main {
  color: var(--kz-accent);
}

.kz-sesspick__sub {
  color: var(--kz-warning-ink);
  font-size: var(--kz-fs-xs);
  font-weight: 500;
  white-space: normal;
}

.kz-sesspick__chev {
  margin-left: auto;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
}

.kz-sesspick__none {
  color: var(--kz-ink-4);
}

/* How many tasks still have no session date, and the way to them. */
.kz-sessgap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 18px;
  padding: 8px 10px 8px 14px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
  font-size: var(--kz-fs-md);
  font-weight: 500;
}

.kz-sessgap > span {
  flex: 1 1 220px;
}

.kz-sessgap .kz-btn {
  margin-left: auto;
}

/* The day over the kind of session, beside the kind's mark — in the kind's
   own colour, the pre-session calendar's (.kz-pre--main / --support /
   --weekly). */
.kz-sessdate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--kz-ink);
  text-align: left;
}

.kz-sessdate > .bi {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--kz-kind-050);
  color: var(--kz-kind-ink);
  font-size: var(--kz-fs-base);
}

.kz-sessdate__text {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.kz-sessdate__day {
  font-size: var(--kz-fs-md);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.kz-sessdate__kind {
  color: var(--kz-kind-ink);
  font-size: var(--kz-fs-xs);
  font-weight: 500;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Picked in place: the list lies over the cell unseen, as a date cell's
   calendar does, so a click anywhere on it opens the list. */
.kz-cellsession {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  min-height: 36px;
  margin: -4px -6px;
  padding: 3px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease;
}

.kz-cellsession:hover {
  background: var(--kz-soft);
}

.kz-cellsession select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  font: inherit;
  opacity: 0;
  cursor: pointer;
}

.kz-cellsession:has(select:focus-visible) {
  outline: 3px solid var(--kz-focus);
  outline-offset: 0;
}

.kz-trow__sessionlink {
  flex: none;
  padding: 4px;
  border-radius: 6px;
  color: var(--kz-ink-3);
  line-height: 1;
}

.kz-trow__sessionlink:hover,
.kz-trow__sessionlink:focus-visible {
  background: var(--kz-soft);
  color: var(--kz-accent);
}

.kz-trow__sessionread {
  display: inline-flex;
  text-decoration: none;
}

.kz-trow__sessionread:hover .kz-sessdate__day {
  color: var(--kz-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   People on the platform — logins, the pages that hand them out, a person's
   own tasks, and asking to be let in
   ========================================================================== */

/* --- A login or a temporary password, as something to be copied ------------
   Set in a fixed-width face so 0 and O, l and 1 cannot be confused, and
   selected whole by one click, since it is always about to be copied or read
   out. */
.kz-login {
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--kz-soft);
  box-shadow: inset 0 0 0 1px var(--kz-line);
  color: var(--kz-ink);
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: var(--kz-fs-md);
  font-weight: 600;
  white-space: nowrap;
  -webkit-user-select: all;
  user-select: all;
}

/* --- Accounts just handed out ------------------------------------------------
   Dashed and tinted like a notice, because it is one: read this now, it will
   not be here again. */
.kz-issued {
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 1px dashed var(--kz-primary);
  border-radius: var(--kz-r);
  background: var(--kz-primary-050);
}

/* The same list as a table, on the last page of an import. */
.kz-issued--table {
  padding: 0;
  border: 1px solid var(--kz-line);
  background: var(--kz-surface);
}

.kz-issued__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.kz-issued__head .kz-symbol {
  background: var(--kz-surface);
}

.kz-issued__title {
  margin: 0;
  font-size: var(--kz-fs-lg);
  font-weight: 600;
}

.kz-issued__sub {
  margin: 2px 0 0;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-2);
}

.kz-issued__print {
  margin-left: auto;
}

.kz-issued__list {
  display: grid;
  gap: 8px;
}

.kz-issued__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  padding: 11px 14px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
}

.kz-issued__who {
  flex: 1 1 200px;
  min-width: 0;
  color: var(--kz-ink);
  font-weight: 600;
}

.kz-issued__pair {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.kz-issued__k {
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  color: var(--kz-ink-3);
}

/* A notice that ends in a button — "three people are waiting: review". */
.kz-alert > .kz-btn {
  flex: 0 0 auto;
  align-self: center;
}

/* Printing takes just the list. kaizen.js puts .kz-printing on <html> for as
   long as the print dialog is up; everything else on the page is left out,
   and the list is put in plain black on white whatever mode the screen is
   in — a browser does not print backgrounds, so the dark mode's pale text
   would come out invisible. */
@media print {
  .kz-printing :is(.kz-side, .kz-top, .kz-scrim, .kz-pagehead, .kz-alert, .kz-flow, .kz-formactions, .kz-tabs, .kz-issued__print) {
    display: none !important;
  }

  .kz-printing .kz-main {
    margin: 0;
    padding: 0;
  }

  .kz-printing .kz-page > :not(.kz-issued) {
    display: none !important;
  }

  .kz-printing .kz-issued,
  .kz-printing .kz-issued * {
    background: transparent !important;
    box-shadow: none !important;
    color: var(--kz-print-ink) !important;
  }

  .kz-printing .kz-issued {
    border: 0;
    padding: 0;
  }

  .kz-printing .kz-issued :is(.kz-issued__row, td, th) {
    border-color: var(--kz-print-line) !important;
  }

  .kz-printing .kz-tablewrap {
    overflow: visible;
  }
}

/* --- Sign-in pages that are only a form ------------------------------------- */

.kz-auth--solo {
  grid-template-columns: minmax(0, 1fr);
}

.kz-auth__logo:is(a):hover {
  color: var(--kz-ink);
}

/* The mark over "your request is sent". */
.kz-auth__mark {
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  font-size: 26px;
}

.kz-auth .kz-form > .kz-btn {
  justify-content: center;
}

/* --- My tasks -----------------------------------------------------------------
   A list, not a board: one person, one column of things to do. Each task is a
   row with what it is on the left and where it stands on the right, and under
   both the files — the place the work is handed in. */

.kz-mytask {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  padding: 18px 24px;
  border-bottom: 1px dashed var(--kz-line);
  /* A status saved or a file sent lands back on its task, under the bar. */
  scroll-margin-top: calc(var(--kz-top-h) + 16px);
}

.kz-mytask:last-child {
  border-bottom: 0;
}

.kz-mytask:target {
  background: var(--kz-primary-050);
}

/* Late is said by the clock in words; the bar is so a late task is found
   without reading every row. */
.kz-mytask.is-late {
  background: var(--kz-late);
  box-shadow: inset 4px 0 0 var(--kz-danger);
}

.kz-mytask__title {
  margin: 0 0 8px;
  font-size: var(--kz-fs-lg);
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.kz-mytask.is-done .kz-mytask__title {
  color: var(--kz-ink-3);
}

.kz-mytask__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

/* Who else is on the task, by their whole name (.kz-taskpeople). */
.kz-mytask__people {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.kz-mytask__peoplehead {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
}

.kz-mytask__status {
  align-self: start;
  margin: 0;
}

.kz-mytask__status .kz-select {
  min-width: 120px;
}

/* A Kaizen Improvement project's task: its status read, and who changes it. */
div.kz-mytask__status {
  display: grid;
  justify-items: start;
  gap: 4px;
  max-width: 180px;
}

.kz-mytask__statusnote {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  line-height: 1.35;
}

.kz-mytask__files {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.kz-mytask__upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.kz-mytask__upload .kz-input {
  flex: 1 1 260px;
  width: auto;
  padding: 7px 10px;
  font-size: var(--kz-fs-sm);
}

/* The list itself is the artifacts' .kz-filelist; a row here is boxed, since
   each one carries a button. */
.kz-filelist__one {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r-sm);
  font-size: var(--kz-fs-md);
}

.kz-filelist__link {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-weight: 500;
}

.kz-filelist__one form {
  display: flex;
  margin: 0;
}

@container kz-screen (max-width: 575.98px) {
  .kz-mytask {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }
}

/* --- The project form: a team with a role each, and a new person ------------ */

/* A label with a button at the far end of its line. */
.kz-labelrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

/* Its buttons take a second line rather than push the whole field wider
   than a small phone — or a page that narrow under the zoom. */
.kz-labelrow .kz-actions {
  flex-wrap: wrap;
}

/* A chip that also says what the person is on the project. */
.kz-chip--role {
  padding-top: 3px;
  padding-bottom: 3px;
}

.kz-chip__role {
  max-width: 160px;
  padding: 2px 4px;
  border: 0;
  border-radius: 4px;
  background: var(--kz-surface);
  color: var(--kz-ink-2);
  font: inherit;
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  cursor: pointer;
}

.kz-chip__role:focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 1px;
}

/* The "new person" dialog: the confirmation dialog's frame, read left to
   right because it is a form and not a question. */
.kz-newperson {
  width: min(460px, calc(100vw / var(--kz-zoom) - 32px));
  padding: 24px;
  text-align: left;
}

.kz-newperson [hidden] {
  display: none !important;
}

.kz-newperson__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.kz-newperson__title {
  margin: 0;
  font-size: var(--kz-fs-lg);
  font-weight: 600;
  line-height: 1.35;
}

.kz-newperson__sub {
  margin: 2px 0 0;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-newperson .kz-alert {
  margin-bottom: 0;
}

/* --- Access requests ---------------------------------------------------------- */

.kz-request {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding: 16px 24px;
  border-bottom: 1px dashed var(--kz-line);
}

.kz-request:last-child {
  border-bottom: 0;
}

.kz-request__who {
  flex: 1 1 280px;
  display: grid;
  gap: 7px;
  min-width: 0;
}

.kz-request__who .kz-person {
  color: var(--kz-ink);
  font-size: var(--kz-fs-base);
  font-weight: 600;
}

.kz-request__answer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.kz-request__answer form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.kz-request__approve .kz-select {
  width: auto;
  min-width: 190px;
}

@container kz-screen (max-width: 575.98px) {
  .kz-request {
    padding: 16px;
  }
}

/* ==========================================================================
   Concerns — the department's own board
   Drawn as the template draws a board: no box around a column, only its name
   over a rule in the column's colour, and the cards standing free beneath.
   A concern is a few sentences rather than a title, so its card is roomier
   than a task's and the text is the largest thing on it.
   ========================================================================== */

/* --- The three status tones ------------------------------------------------
   To do is red, Doing amber, Done green — on the ring, the count, the lanes
   and the status switch alike. Each tone is three colours, named here once
   for everything on this page that wears them:
     -fill  the colour at full strength: an arc, a bar, a pressed button;
     -tint  its pale ground;
     -ink   the shade of it that reads as text on that ground (see the note
            on the -ink tokens at the top of this file). */

.kz-ring__arc--to-do,
.kz-legend__row--to-do,
.kz-tally__one--to-do,
.kz-moveto__opt--to-do {
  --kz-tone-fill: var(--kz-danger);
  --kz-tone-tint: var(--kz-danger-050);
  --kz-tone-ink: var(--kz-danger-ink);
}

.kz-ring__arc--doing,
.kz-legend__row--doing,
.kz-tally__one--doing,
.kz-moveto__opt--doing {
  --kz-tone-fill: var(--kz-warning);
  --kz-tone-tint: var(--kz-warning-050);
  --kz-tone-ink: var(--kz-warning-ink);
}

.kz-ring__arc--done,
.kz-legend__row--done,
.kz-tally__one--done,
.kz-moveto__opt--done {
  --kz-tone-fill: var(--kz-success);
  --kz-tone-tint: var(--kz-success-050);
  --kz-tone-ink: var(--kz-success-ink);
}

/* --- Above the board: the share, the count, the time -------------------------
   Three cards in a row, each answering one question. The two that are charts
   get the room; the time is two figures and needs less. */

.kz-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, .8fr);
  gap: 24px;
  margin-bottom: 24px;
}

/* The grid spaces the cards and stretches them level; a card's own bottom
   margin would only add to the first and break the second. */
.kz-overview__card {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.kz-overview__card > .kz-card__body {
  flex: 1 1 auto;
  display: grid;
  align-content: center;
}

/* The share: a ring, and beside it the same three figures in words. */
.kz-overview__card > .kz-ringbox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 26px;
}

.kz-ring {
  position: relative;
  flex: 0 0 auto;
  width: 136px;
  height: 136px;
}

/* A circle's stroke starts at three o'clock; a quarter turn back and the
   first arc starts at the top, where a reader expects a ring to begin. */
.kz-ring svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.kz-ring__track,
.kz-ring__arc {
  fill: none;
  stroke-width: 5.4;
}

.kz-ring__track {
  stroke: var(--kz-line-2);
}

/* Each arc is drawn out from nothing to its length when the page opens. The
   length itself is the stroke-dasharray written on the element, which is why
   the animation names only where it starts. */
.kz-ring__arc {
  stroke: var(--kz-tone-fill);
  animation: kz-ring-draw .8s cubic-bezier(.4, 0, .2, 1) both;
}

@keyframes kz-ring-draw {
  from { stroke-dasharray: 0 100; }
}

.kz-ring__hole {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
}

.kz-ring__hole strong {
  font-size: var(--kz-fs-3xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--kz-ink);
  font-variant-numeric: tabular-nums;
}

.kz-ring__hole span {
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  color: var(--kz-ink-3);
}

.kz-legend {
  flex: 1 1 150px;
  min-width: 0;
  margin: 0;
}

.kz-legend__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--kz-line);
}

.kz-legend__row:last-child {
  border-bottom: 0;
}

.kz-legend dt {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: var(--kz-fs-md);
  font-weight: 600;
  color: var(--kz-ink-2);
}

.kz-legend dd {
  margin: 0;
  font-size: var(--kz-fs-lg);
  font-weight: 700;
  color: var(--kz-ink);
  font-variant-numeric: tabular-nums;
}

.kz-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--kz-tone-fill);
}

/* The count: a tile a column, the number the largest thing on it. The bar
   under it is measured against the fullest column, so the three can be
   compared without reading them. */
.kz-tally {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kz-tally__one {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-tone-tint);
}

.kz-tally__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  border-radius: 9px;
  background: var(--kz-surface);
  color: var(--kz-tone-ink);
  font-size: var(--kz-fs-lg);
}

.kz-tally__n {
  font-size: var(--kz-fs-3xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--kz-ink);
  font-variant-numeric: tabular-nums;
}

.kz-tally__label {
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  color: var(--kz-tone-ink);
}

.kz-tally__bar {
  height: 6px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--kz-surface);
  overflow: hidden;
}

.kz-tally__bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--kz-tone-fill);
  animation: kz-tally-grow .8s cubic-bezier(.4, 0, .2, 1) both;
}

@keyframes kz-tally-grow {
  from { width: 0; }
}

/* An empty column steps back, so the eye goes to the ones with something in. */
.kz-tally__one.is-zero {
  background: var(--kz-soft);
}

.kz-tally__one.is-zero :is(.kz-tally__n, .kz-tally__label, .kz-tally__icon) {
  color: var(--kz-ink-3);
}

/* Narrower, the two charts share a row and the time takes the next whole —
   where its two figures stand side by side instead of stacked. */
@container kz-screen (max-width: 1199.98px) {
  .kz-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kz-overview__card--time {
    grid-column: 1 / -1;
  }
}

@container kz-screen (max-width: 767.98px) {
  .kz-overview {
    grid-template-columns: minmax(0, 1fr);
  }

  .kz-overview__card--time {
    grid-column: auto;
  }
}

/* --- The board --------------------------------------------------------------- */

.kz-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.kz-lane__head {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--kz-line-3);
}

/* Red, amber, green — the same three the task board's columns wear. */
.kz-lane--to-do .kz-lane__head { border-bottom-color: var(--kz-danger); }
.kz-lane--doing .kz-lane__head { border-bottom-color: var(--kz-warning); }
.kz-lane--done .kz-lane__head  { border-bottom-color: var(--kz-success); }

.kz-lane__title {
  margin: 0;
  font-size: var(--kz-fs-lg);
  font-weight: 600;
}

.kz-lane__n {
  font-size: var(--kz-fs-md);
  font-weight: 600;
  color: var(--kz-ink-3);
  font-variant-numeric: tabular-nums;
}

/* minmax(0, 1fr), here and on the card: a grid column left to size itself
   grows to its widest unbreakable child, and the running clock is one line —
   on a narrow desktop the cards pushed out of their lane and over the next. */
.kz-lane__cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.kz-concern {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  background: var(--kz-surface);
  box-shadow: var(--kz-shadow);
  /* The head moves or answers a concern and lands back on it, under the bar. */
  scroll-margin-top: calc(var(--kz-top-h) + 16px);
}

.kz-concern:target {
  border-color: var(--kz-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-primary) 14%, transparent);
}

.kz-concern__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
}

/* The clock is one line everywhere else it is used; on a narrow card it has
   to be allowed a second. */
.kz-concern__top .kz-clock__run {
  min-width: 0;
  white-space: normal;
}

/* As written, line breaks and all: a concern is somebody's own words. */
.kz-concern__text {
  margin: 0;
  color: var(--kz-ink);
  font-size: var(--kz-fs-base);
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

/* The answer is the head's voice on a tracker's card, so it is set apart the
   way a notice is: tinted, with a dashed edge. */
.kz-concern__answer {
  padding: 11px 13px;
  border: 1px dashed var(--kz-primary);
  border-radius: var(--kz-r-sm);
  background: var(--kz-primary-050);
}

.kz-concern__answerhead {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--kz-accent-2);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.kz-concern__answer p {
  margin: 0;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.kz-concern__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-concern__foot .kz-person {
  color: var(--kz-ink-2);
  font-weight: 600;
}

/* The head's controls, under a dashed rule so they read as being about the
   card rather than part of what the tracker wrote. */
.kz-concern__manage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--kz-line);
}

.kz-concern__manage form {
  margin: 0;
}

/* The status takes the first line whole: it is what the head came to press.
   Answering and removing share the second, removing in the far corner. */
.kz-concern__move {
  grid-column: 1 / -1;
}

.kz-concern__reply {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

.kz-concern__remove {
  grid-column: 2;
  grid-row: 2;
}

.kz-concern__reply > summary {
  min-height: 34px;
  list-style: none;
  cursor: pointer;
}

.kz-concern__reply > summary::-webkit-details-marker {
  display: none;
}

/* Open, the answer form runs the card's full width. It reaches under the
   remove button's corner, which is clear: only the short "Answer" button
   shares that line. */
.kz-concern__reply[open] {
  grid-column: 1 / -1;
}

/* The status switch: To do, Doing, Done side by side — red, amber, green —
   in one grey track. The status the concern holds is filled solid; the other
   two wait in their own colour and tint when pointed at. Colour is never the
   only sign: each carries its name and its icon, and the filled one says
   aria-pressed. Its colours are the status tones named above the board. */
.kz-moveto {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--kz-line-2);
}

.kz-moveto__opt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--kz-tone-ink);
  font-family: inherit;
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

/* The text over the solid fill: each state's own -on token — white on the
   red, a near-black of its own hue on the amber and the green, where white
   would be 3.4:1 and 3.8:1. */
.kz-moveto__opt--to-do { --kz-moveto-on: var(--kz-danger-on); }
.kz-moveto__opt--doing { --kz-moveto-on: var(--kz-warning-on); }
.kz-moveto__opt--done  { --kz-moveto-on: var(--kz-success-on); }

.kz-moveto__opt:hover {
  background: var(--kz-tone-tint);
}

.kz-moveto__opt[aria-pressed="true"] {
  background: var(--kz-tone-fill);
  color: var(--kz-moveto-on);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--kz-shade) 18%, transparent);
  cursor: default;
}

/* Three lanes on a narrow desktop leave each button room for its name only. */
@container kz-screen (min-width: 992px) and (max-width: 1399.98px) {
  .kz-moveto__opt i { display: none; }
}

.kz-concern__reply[open] > summary {
  margin-bottom: 8px;
}

.kz-concern__reply form {
  display: grid;
  gap: 8px;
}

.kz-concern__reply form .kz-btn {
  justify-self: start;
}

/* A voice message on a card sits under the words, or stands for them; in the
   answer's tinted box it is set on white so it reads as something to press. */
.kz-concern__answer p + .kz-voiceplay {
  margin-top: 8px;
}

.kz-concern__answer .kz-voiceplay {
  background: var(--kz-surface);
}

/* ==========================================================================
   Voice messages — recording one, and playing one back
   (team/partials/voice-recorder, team/partials/voice-player; kaizen.js)
   ========================================================================== */

/* --- Playing ----------------------------------------------------------------
   A round play button, a bar to drag, and the time, on a soft pill. Until
   kaizen.js takes over (data-ready) the browser's own player is what shows,
   so it plays with scripting off too. */
.kz-voiceplay {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--kz-line);
  border-radius: 999px;
  background: var(--kz-soft);
}

.kz-voiceplay:not([data-ready]) {
  padding: 0;
  border: 0;
  background: none;
}

.kz-voiceplay:not([data-ready]) > :not(audio),
.kz-voiceplay[data-ready] > audio {
  display: none;
}

.kz-voiceplay > audio {
  width: 100%;
  height: 40px;
}

.kz-voiceplay__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--kz-primary);
  color: var(--kz-white);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.kz-voiceplay__btn .bi {
  font-size: 18px;
  line-height: 1;
}

/* The play triangle sits a hair right of centre, as it looks centred. */
.kz-voiceplay__btn .bi-play-fill {
  margin-left: 2px;
}

.kz-voiceplay__btn:hover {
  background: var(--kz-primary-700);
}

.kz-voiceplay__btn:active {
  transform: scale(.94);
}

.kz-voiceplay__btn:focus-visible,
.kz-voiceplay__seek:focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 2px;
}

/* The bar: what has been played is filled (--kz-seek, from kaizen.js). */
.kz-voiceplay__seek {
  flex: 1 1 auto;
  min-width: 60px;
  height: 4px;
  margin: 0;
  border-radius: 2px;
  background: linear-gradient(to right, var(--kz-primary) var(--kz-seek, 0%), var(--kz-line-3) var(--kz-seek, 0%));
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.kz-voiceplay__seek::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--kz-primary);
  -webkit-appearance: none;
  appearance: none;
}

.kz-voiceplay__seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--kz-primary);
}

.kz-voiceplay__seek::-moz-range-track {
  background: transparent;
}

.kz-voiceplay__time {
  flex: 0 0 auto;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kz-voiceplay.is-playing .kz-voiceplay__time {
  color: var(--kz-accent);
}

/* --- Recording --------------------------------------------------------------
   One line under the words: the button to start; then, while recording, a
   red line with the time, the level the microphone hears and the way out;
   then the recording to listen to before it is sent. The file field is what
   is left where the page cannot record (data-voice-ready is never set). */
.kz-voice {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.kz-voice[data-voice-ready] .kz-filepick,
.kz-voice[data-voice-ready] .kz-voice__file {
  display: none;
}

.kz-voice__idle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

.kz-voice__idle[hidden],
.kz-voice__rec[hidden],
.kz-voice__take[hidden],
.kz-voice__kept[hidden] {
  display: none;
}

.kz-voice__start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 8px;
  border: 1px solid var(--kz-line-3);
  border-radius: 999px;
  background: var(--kz-surface);
  color: var(--kz-ink-2);
  font: inherit;
  font-size: var(--kz-fs-md);
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.kz-voice__start .bi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--kz-danger-050);
  color: var(--kz-danger-ink);
  font-size: var(--kz-fs-base);
}

.kz-voice__start:hover {
  border-color: var(--kz-danger);
  color: var(--kz-ink);
}

.kz-voice__start:focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-voice__hint {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
}

.kz-voice__rec {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 7px 8px 7px 14px;
  border: 1px solid var(--kz-danger);
  border-radius: var(--kz-r-sm);
  background: var(--kz-danger-050);
}

.kz-voice__dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--kz-danger);
  animation: kz-voice-pulse 1.2s ease-in-out infinite;
}

@keyframes kz-voice-pulse {
  50% { opacity: .3; }
}

.kz-voice__clock {
  min-width: 36px;
  color: var(--kz-danger-ink);
  font-size: var(--kz-fs-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* The level: bars that rise and fall with the voice (kaizen.js scales them). */
.kz-voice__meter {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.kz-voice__meter i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--kz-danger);
  transform: scaleY(.3);
  transition: transform .08s linear;
}

.kz-voice__actions {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}

.kz-voice__take,
.kz-voice__kept {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.kz-voice__take .kz-voiceplay,
.kz-voice__kept .kz-voiceplay {
  flex: 1 1 220px;
}

/* Taking away the one already sent: ticked, it is shown as going. */
.kz-voice__drop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--kz-danger-ink);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  cursor: pointer;
}

.kz-voice__drop input {
  accent-color: var(--kz-danger);
}

.kz-voice__kept:has([data-voice-remove]:checked) .kz-voiceplay {
  opacity: .4;
}

.kz-voice__error {
  margin: 0;
  color: var(--kz-danger-ink);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
}

.kz-voice__error[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .kz-voice__dot {
    animation: none;
  }

  .kz-voice__meter i {
    transition: none;
  }
}

/* A clock still running on something that is being worked on. */
.kz-clock__run.is-doing {
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
  font-weight: 500;
}

@container kz-screen (max-width: 991.98px) {
  .kz-lanes {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- The concerns as a table ---------------------------------------------------
   The task table's frame and rows (.kz-ttable, .kz-trow). A concern is a
   sentence or several rather than a name: its words stay at reading weight,
   and its number sits over them as it sits on the card. */

.kz-ttable--concerns .kz-trow {
  /* Landed on after a move, under the bar. */
  scroll-margin-top: calc(var(--kz-top-h) + 16px);
}

/* A concern may run to a paragraph: who wrote it, when and where it stands
   are read along its first line, not somewhere down the middle of it. */
.kz-ttable--concerns tbody td {
  vertical-align: top;
}

.kz-trow__concern {
  font-weight: 400;
}

.kz-trow__concern .kz-table__id {
  display: block;
  margin-bottom: 2px;
}

.kz-trow__concern .kz-voiceplay,
.kz-trow__comment .kz-voiceplay {
  margin-top: 6px;
}

/* Nothing yet: there to say so, not to be read. */
.kz-trow__none {
  color: var(--kz-ink-3);
}

/* What the head does about a concern, under what has been said so far. */
.kz-trow__answer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--kz-accent);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  text-decoration: none;
}

.kz-trow__commenttext + .kz-trow__answer,
.kz-voiceplay + .kz-trow__answer {
  margin-top: 6px;
}

.kz-trow__answer:hover,
.kz-trow__answer:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   A project's tasks, from the project list and in the task table
   ========================================================================== */

/* The Tasks cell of a project list: the way into that project's own tasks
   page. An "open" mark in a square, as wide as it is tall while the project
   has no tasks; once it has some, how many of them are done stands beside the
   mark and the square grows to hold it. */
.kz-tasklink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--kz-line-3);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.kz-tasklink .bi {
  font-size: var(--kz-fs-base);
}

.kz-tasklink:hover,
.kz-tasklink:focus-visible {
  background: var(--kz-primary-050);
  border-color: var(--kz-primary);
  color: var(--kz-accent);
}

/* Comment / Next step in a task's row, in full and with its own line
   breaks, however long — the same as the name beside it. */
.kz-trow__comment {
  width: 340px;
  min-width: 300px;
  max-width: 380px;
}

/* Every other cell of the table keeps to one line (.kz-ttable td); these
   wrap, so nothing in them is ever cut off. */
.kz-ttable .kz-trow__name,
.kz-ttable .kz-trow__comment,
.kz-ttable .kz-trow__people {
  white-space: normal;
}

/* On a phone the name, which stays in view as the table scrolls sideways,
   keeps to about half the screen — wider, it would cover every cell scrolled
   under it. It is still there in full, on more lines. The people take a
   little less room too, their names on more lines. */
@container kz-screen (max-width: 575.98px) {
  .kz-trow__name {
    width: 190px;
    min-width: 190px;
    max-width: 210px;
  }

  .kz-trow__people {
    width: 210px;
    min-width: 200px;
    max-width: 220px;
  }
}

.kz-trow__commenttext {
  display: block;
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-size: var(--kz-fs-base);
  line-height: 1.45;
}

/* ==========================================================================
   A project's own tasks page (projects/tasks)

   The template's project board, in this app's own tokens: the project named
   in a card at the top with its facts in dashed frames, the figures under it,
   then a column per status — headed by a rule in the status's colour — and a
   card per task. Everything is drawn from the tokens, so it turns with the
   light and the dark mode like the rest.
   ========================================================================== */

/* --- The project, named ------------------------------------------------------ */

/* The mark, the name and the buttons on one line; the facts on the next,
   under the name and running on under the buttons, so they keep to one row. */
.kz-pthead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "mark name  actions"
    "mark facts facts";
  align-items: start;
  gap: 16px 22px;
  margin-bottom: 24px;
  padding: 24px 28px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  background: var(--kz-surface);
  box-shadow: var(--kz-shadow);
}

/* The mark the kind of project wears in the sidebar, where the template sets
   a project's logo. */
.kz-pthead__mark {
  grid-area: mark;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: var(--kz-r-lg);
  background: var(--kz-primary-050);
  color: var(--kz-accent);
  font-size: 27px;
}

.kz-pthead__name {
  grid-area: name;
  align-self: center;
  min-width: 0;
}

.kz-pthead__titlerow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.kz-pthead__title {
  margin: 0;
  font-size: var(--kz-fs-xl);
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.kz-pthead__title a {
  color: var(--kz-ink);
  transition: color .15s ease;
}

.kz-pthead__title a:hover {
  color: var(--kz-accent);
}

.kz-pthead__sub {
  margin: 4px 0 0;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-md);
  font-weight: 500;
}

.kz-pthead__facts {
  grid-area: facts;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

/* Written name first, shown value first: the frame turns the two over. */
.kz-pthead__fact {
  display: flex;
  flex-direction: column-reverse;
  justify-content: center;
  gap: 3px;
  min-width: 128px;
  padding: 10px 16px;
  border: 1px dashed var(--kz-line-3);
  border-radius: var(--kz-r-sm);
}

.kz-pthead__fact dt {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
}

.kz-pthead__fact dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 0;
  color: var(--kz-ink);
  font-size: var(--kz-fs-base);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.kz-pthead__fact dd .kz-avatar {
  width: 22px;
  height: 22px;
  font-size: var(--kz-fs-xs);
}

.kz-pthead__actions {
  grid-area: actions;
  align-self: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

/* --- How the tasks stand ----------------------------------------------------- */

.kz-ptstats {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px;
  margin-bottom: 24px;
}

/* The grid spaces the two; the card's own bottom margin would only add to it. */
.kz-ptsum {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 0;
  padding: 24px 28px;
}

.kz-ptsum__ring {
  position: relative;
  flex: 0 0 auto;
  width: 136px;
  height: 136px;
}

/* Turned a quarter back, so the first arc starts at twelve o'clock. */
.kz-ptsum__ring svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.kz-ptsum__ring circle {
  fill: none;
  stroke-width: 4.6;
}

.kz-ptsum__track {
  stroke: var(--kz-line-2);
}

.kz-ptsum__arc--done,  .kz-ptsum__key--done  { --kz-ptc: var(--kz-success); }
.kz-ptsum__arc--doing, .kz-ptsum__key--doing { --kz-ptc: var(--kz-warning); }
.kz-ptsum__arc--todo,  .kz-ptsum__key--todo  { --kz-ptc: var(--kz-danger); }

.kz-ptsum__arc {
  stroke: var(--kz-ptc);
}

.kz-ptsum__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.kz-ptsum__total {
  color: var(--kz-ink);
  font-size: var(--kz-fs-3xl);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.kz-ptsum__unit {
  margin-top: 5px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
}

.kz-ptsum__body {
  flex: 1 1 auto;
  min-width: 0;
}

.kz-ptsum__title {
  margin: 0 0 8px;
  font-size: var(--kz-fs-lg);
  font-weight: 600;
}

.kz-ptsum__legend {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kz-ptsum__legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--kz-line);
  font-size: var(--kz-fs-md);
}

.kz-ptsum__legend li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.kz-ptsum__key {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--kz-ptc);
}

.kz-ptsum__label {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--kz-ink-2);
  font-weight: 500;
}

.kz-ptsum__n {
  color: var(--kz-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.kz-ptsum__pct {
  min-width: 46px;
  color: var(--kz-ink-3);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.kz-ptsum__legend li.is-zero .kz-ptsum__n {
  color: var(--kz-ink-3);
}

/* What needs attention: six figures, each with the sign of what it counts. */
.kz-ptstats__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.kz-ptstat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 14px;
  padding: 16px 18px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  background: var(--kz-surface);
  box-shadow: var(--kz-shadow);
}

.kz-ptstat__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-ptt, var(--kz-soft));
  color: var(--kz-pti, var(--kz-ink-3));
  font-size: 18px;
}

.kz-ptstat--danger  { --kz-ptt: var(--kz-danger-050);  --kz-pti: var(--kz-danger-ink); }
.kz-ptstat--warning { --kz-ptt: var(--kz-warning-050); --kz-pti: var(--kz-warning-ink); }
.kz-ptstat--primary { --kz-ptt: var(--kz-primary-050); --kz-pti: var(--kz-accent); }
.kz-ptstat--info    { --kz-ptt: var(--kz-info-050);    --kz-pti: var(--kz-info-ink); }
.kz-ptstat--success { --kz-ptt: var(--kz-success-050); --kz-pti: var(--kz-success-ink); }

.kz-ptstat__n {
  color: var(--kz-ink);
  font-size: var(--kz-fs-2xl);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.kz-ptstat__n small {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-base);
  font-weight: 500;
  letter-spacing: 0;
}

.kz-ptstat__label {
  grid-column: 1 / -1;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  line-height: 1.35;
}

/* Late is the one figure that turns its own colour when there is any. */
.kz-ptstat--danger:not(.is-zero) .kz-ptstat__n {
  color: var(--kz-danger-ink);
}

/* Nothing to report: the tile goes quiet, so the eye lands on the others. */
.kz-ptstat.is-zero .kz-ptstat__icon {
  background: var(--kz-soft);
  color: var(--kz-ink-4);
}

.kz-ptstat.is-zero .kz-ptstat__n {
  color: var(--kz-ink-3);
}

/* --- The board --------------------------------------------------------------- */

.kz-ptboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

/* Each column is a lane: a darker well with the status's colour along its
   top, so the cards in it read as cards and the three columns as three
   places a task can be. */
.kz-ptcol {
  min-width: 0;
  padding: 14px 12px 12px;
  border: 1px solid var(--kz-line-2);
  border-top: 3px solid var(--kz-ptc, var(--kz-line-3));
  border-radius: var(--kz-r-lg);
  background: var(--kz-lane);
}

.kz-ptcol--to-do { --kz-ptc: var(--kz-danger);  --kz-ptci: var(--kz-danger-ink); }
.kz-ptcol--doing { --kz-ptc: var(--kz-warning); --kz-ptci: var(--kz-warning-ink); }
.kz-ptcol--done  { --kz-ptc: var(--kz-success); --kz-ptci: var(--kz-success-ink); }

/* The name, how many, and the share — over a rule in the status's colour. */
.kz-ptcol__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 0 6px;
}

.kz-ptcol__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--kz-ink);
  font-size: var(--kz-fs-lg);
  font-weight: 600;
}

.kz-ptcol__title .bi {
  color: var(--kz-ptci, var(--kz-ink-3));
  font-size: var(--kz-fs-lg);
}

.kz-ptcol__count {
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--kz-surface);
  box-shadow: inset 0 0 0 1px var(--kz-line);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kz-ptcol__share {
  margin-left: auto;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Tall enough to be dropped into while it is empty. */
.kz-ptcol__cards {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 120px;
  border-radius: var(--kz-r);
  transition: background .15s ease, box-shadow .15s ease;
}

.kz-ptcol__empty {
  margin: 0;
  padding: 28px 16px;
  border: 1px dashed var(--kz-line-3);
  border-radius: var(--kz-r);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-md);
  text-align: center;
}

/* A card is being carried over this column: it says it will take it. */
.kz-ptcol.is-drop .kz-ptcol__cards {
  background: var(--kz-primary-050);
  box-shadow: 0 0 0 6px var(--kz-primary-050), 0 0 0 8px var(--kz-primary);
}

/* --- A card ------------------------------------------------------------------ */

.kz-ptcard {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  background: var(--kz-surface);
  box-shadow: var(--kz-shadow);
  transition: border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.kz-ptcard[draggable="true"] {
  cursor: grab;
}

.kz-ptcard:hover,
.kz-ptcard:focus-within {
  border-color: var(--kz-line-3);
  box-shadow: var(--kz-shadow-md);
}

/* Late: tinted red, with a red edge down the side — found on a board of
   thirty without reading one of them. */
.kz-ptcard.is-late {
  border-color: color-mix(in srgb, var(--kz-danger) 45%, var(--kz-line));
  background: var(--kz-late);
  box-shadow: inset 4px 0 0 var(--kz-danger), var(--kz-shadow);
}

.kz-ptcard.is-late:hover,
.kz-ptcard.is-late:focus-within {
  border-color: var(--kz-danger);
  box-shadow: inset 4px 0 0 var(--kz-danger), var(--kz-shadow-md);
}

.kz-ptcard.is-dragging {
  opacity: .45;
  cursor: grabbing;
}

.kz-ptcard__top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}

.kz-ptcard__pri {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  white-space: nowrap;
}

.kz-ptcard__pri .bi {
  font-size: var(--kz-fs-xs);
}

.kz-ptcard__pri--red   { background: var(--kz-danger-050);  color: var(--kz-danger-ink); }
.kz-ptcard__pri--amber { background: var(--kz-warning-050); color: var(--kz-warning-ink); }
.kz-ptcard__pri--green { background: var(--kz-success-050); color: var(--kz-success-ink); }
.kz-ptcard__pri--none  { background: var(--kz-soft);        color: var(--kz-ink-3); }

.kz-ptcard__src {
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-base);
}

/* The session the task came out of: its day, in the colour of its kind. */
.kz-ptcard__session {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--kz-kind-050);
  color: var(--kz-kind-ink);
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  white-space: nowrap;
}

.kz-ptcard__session:hover,
.kz-ptcard__session:focus-visible {
  color: var(--kz-kind-ink);
  box-shadow: inset 0 0 0 1px var(--kz-kind);
}

/* Written before tasks had sessions: its date is still to be chosen. */
.kz-ptcard__session.is-earlier {
  border: 1px dashed var(--kz-line-3);
  background: transparent;
  color: var(--kz-ink-3);
}

/* The card's own controls wait out of sight until the card is pointed at or
   has the keyboard — and are simply there where nothing can hover. */
.kz-ptcard__tools {
  display: flex;
  gap: 4px;
  margin-left: auto;
  opacity: 0;
  transition: opacity .15s ease;
}

.kz-ptcard:hover .kz-ptcard__tools,
.kz-ptcard:focus-within .kz-ptcard__tools {
  opacity: 1;
}

@media (hover: none) {
  .kz-ptcard__tools {
    opacity: 1;
  }
}

.kz-ptcard__tools form {
  margin: 0;
}

.kz-ptcard__tools .kz-iconbtn {
  width: 30px;
  height: 30px;
}

.kz-ptcard__title {
  margin: 0;
  color: var(--kz-ink);
  font-size: var(--kz-fs-lg);
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.kz-ptcard__title a {
  color: inherit;
  transition: color .15s ease;
}

.kz-ptcard__title a:hover {
  color: var(--kz-accent);
}

.kz-ptcard__title a:focus-visible,
.kz-ptcard__note:focus-visible,
.kz-ptcard__chip:focus-visible,
.kz-ptcard__nobody:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Finished: the name steps back, the way a crossed-off line does. */
.kz-ptcard.is-done .kz-ptcard__title {
  color: var(--kz-ink-2);
}

/* Comment / Next step, in full: the card grows to hold it. */
.kz-ptcard__note {
  display: block;
  margin: 0;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-base);
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

a.kz-ptcard__note:hover {
  color: var(--kz-ink);
}

.kz-ptcard__when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
}

.kz-ptcard__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px dashed var(--kz-line);
}

.kz-ptcard__people {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Who: everybody the task is given to, by their whole name (.kz-taskpeople).
   For whoever may change the task it opens the task at its people. */
.kz-ptcard__who {
  display: block;
  margin: 0 -6px;
  padding: 4px 6px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

a.kz-ptcard__who:hover,
a.kz-ptcard__who:focus-visible {
  background: var(--kz-soft);
  color: inherit;
}

.kz-ptcard__nobody {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px dashed var(--kz-line-3);
  border-radius: 50%;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-md);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

a.kz-ptcard__nobody:hover {
  border-color: var(--kz-primary);
  background: var(--kz-primary-050);
  color: var(--kz-accent);
}

/* The tracker stands apart from the people the task is given to — past a
   rule, and wearing the sign trackers wear everywhere on the platform. */
.kz-ptcard__tracker {
  position: relative;
  display: inline-flex;
  padding-left: 10px;
  border-left: 1px solid var(--kz-line);
}

.kz-ptcard__tracker + .kz-ptcard__tracker {
  padding-left: 0;
  border-left: 0;
}

.kz-ptcard__tracker .bi {
  position: absolute;
  right: -5px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--kz-surface);
  box-shadow: 0 0 0 1px var(--kz-line-3);
  color: var(--kz-accent);
  font-size: var(--kz-fs-xs);
}

.kz-ptcard__chips {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* The template's dashed chip: a sign and a count. */
.kz-ptcard__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 9px;
  border: 1px dashed var(--kz-line-3);
  border-radius: 6px;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: border-color .15s ease, color .15s ease;
}

.kz-ptcard__chip .bi {
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-base);
}

a.kz-ptcard__chip:hover {
  border-color: var(--kz-primary);
  color: var(--kz-accent);
}

/* Finished with nothing attached: "done" is so far only a claim. */
.kz-ptcard__chip.is-missing {
  border-color: var(--kz-warning);
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
}

.kz-ptcard__chip.is-missing .bi {
  color: inherit;
}

.kz-ptcard__move {
  margin: 0;
}

/* What was handed in, for whoever cannot open the task: each file opens on
   its own. The zero minimum keeps a long name from widening the card, whose
   status list would be pushed out of it; the name is cut short instead. */
.kz-ptcard__files {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  margin: 10px 0 0;
  padding: 8px 0 0;
  border-top: 1px dashed var(--kz-line-3);
  list-style: none;
}

.kz-ptcard__files a {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  text-decoration: none;
}

.kz-ptcard__files a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kz-ptcard__files .bi {
  flex: none;
  color: var(--kz-ink-4);
}

.kz-ptcard__files a:hover {
  color: var(--kz-accent);
  text-decoration: underline;
}
/* What was handed in and the way to hand in more, together under the card's
   dashed line: the list keeps its own line and spacing only when it stands
   alone. */
.kz-ptcard__handin {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 8px 0 0;
  border-top: 1px dashed var(--kz-line-3);
}

.kz-ptcard__handin .kz-ptcard__files {
  margin: 0;
  padding: 0;
  border-top: 0;
}

.kz-ptcard__files li {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.kz-ptcard__files li > a {
  flex: 1 1 auto;
}

/* Handing in files without opening the task (task-file-attach): a button
   that opens the file picker, the picker's own field kept out of sight but
   still reached by the keyboard, which the button then shows. */
.kz-attachform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.kz-attachbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 3px 10px;
  border: 1px dashed var(--kz-line-3);
  border-radius: 999px;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.kz-attachbtn:hover,
.kz-attachbtn:focus-within {
  border-color: var(--kz-accent);
  background: var(--kz-primary-050);
  color: var(--kz-accent);
}

.kz-attachbtn:focus-within {
  outline: 2px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-attachbtn__input {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.kz-attachform[aria-busy="true"] .kz-attachbtn {
  opacity: .6;
  cursor: progress;
}

/* Beside files already there, in a table cell: the icon alone, its word in
   the title, as the dialog's own attach button is. */
.kz-attachform--compact .kz-attachbtn {
  padding: 3px 7px;
}

.kz-attachform--compact .kz-attachbtn__text {
  display: none;
}

/* Taking back one's own file (task-file-remove): small, beside its name. */
.kz-fileremove {
  display: inline-flex;
  flex: none;
  margin: 0;
}

.kz-iconbtn.kz-fileremove__btn {
  width: 22px;
  height: 22px;
  background: transparent;
  font-size: var(--kz-fs-xs);
}

/* Just added, moved or edited: a brief glow so the eye finds it. */
.kz-ptcard.is-fresh {
  animation: kz-fresh 1.8s ease-out;
}

.kz-ptcard.is-removing {
  opacity: .35;
  transform: scale(.98);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

@media (prefers-reduced-motion: reduce) {
  .kz-ptcard.is-fresh {
    animation: none;
    outline: 2px solid var(--kz-focus);
  }
}

/* --- Narrower screens -------------------------------------------------------- */

@container kz-screen (max-width: 1199.98px) {
  .kz-ptstats {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A trail four deep — Projects › Kaizen › #6 › Tasks — is longer than a
   phone's top bar, and ran on under the bell and the language. There the bar
   shows where you are and the one step up from it; nothing may spill past
   its own place either way. */
.kz-top__where {
  overflow: hidden;
}

@container kz-screen (max-width: 767.98px) {
  .kz-top .kz-crumbs > :not(:nth-last-child(-n+3)) {
    display: none;
  }

  /* When even two do not fit, the step up gives way first: "Kaizen
     yaxshilani… › #7", not "Kaizen yaxshilanishi › #" — where you are is the
     half that must not be cut. */
  .kz-top .kz-crumbs > :is(a, span):not(.kz-crumbs__current):not(.kz-crumbs__sep) {
    flex: 0 100 auto;
    min-width: 56px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Three columns of cards need room; under that they stand one above another,
   in the order the work moves. */
@container kz-screen (max-width: 991.98px) {
  .kz-ptboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .kz-ptcol__cards {
    min-height: 0;
  }
}

/* No room for the buttons beside the name: they take a line of their own,
   and the facts run the card's full width under everything. */
@container kz-screen (max-width: 767.98px) {
  .kz-pthead {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "mark    name"
      "facts   facts"
      "actions actions";
  }

  .kz-pthead__actions {
    justify-content: flex-start;
  }
}

@container kz-screen (max-width: 575.98px) {
  .kz-pthead {
    padding: 20px 16px;
  }

  .kz-pthead__mark {
    width: 52px;
    height: 52px;
    font-size: var(--kz-fs-2xl);
  }

  .kz-pthead__actions .kz-btn {
    flex: 1 1 auto;
  }

  .kz-pthead__fact {
    flex: 1 1 140px;
  }

  .kz-ptsum {
    flex-direction: column;
    align-items: stretch;
    padding: 20px 16px;
  }

  .kz-ptsum__ring {
    align-self: center;
  }

  .kz-ptstats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================================
   Project status — Active, On Hold, Completed, Cancelled, No Longer Relevant
   (App\Enums\ProjectStatus). One colour each, the same wherever a project's
   status is shown: violet for what is being worked on, amber for what waits,
   green for what is finished, red for what was stopped, grey for what was
   dropped. The word is always written beside it; nothing rests on the colour.
   ========================================================================== */

.kz-badge--active {
  background: var(--kz-primary-050);
  color: var(--kz-accent-2);
}

.kz-badge--on-hold {
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
}

.kz-badge--completed {
  background: var(--kz-success-050);
  color: var(--kz-success-ink);
}

.kz-badge--cancelled {
  background: var(--kz-danger-050);
  color: var(--kz-danger-ink);
}

.kz-badge--no-longer-relevant {
  background: var(--kz-line-2);
  color: var(--kz-ink-2);
}

/* The same five on the project page's status mark, as the dot before the word. */
.kz-status--active::before {
  background: var(--kz-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-primary) 22%, transparent);
}

.kz-status--on-hold::before {
  background: var(--kz-warning);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-warning) 25%, transparent);
}

.kz-status--completed::before {
  background: var(--kz-success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-success) 22%, transparent);
}

.kz-status--cancelled::before {
  background: var(--kz-danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-danger) 20%, transparent);
}

.kz-status--no-longer-relevant::before {
  background: var(--kz-ink-4);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-ink-4) 25%, transparent);
}

/* "This project is away": a note, not a warning — grey, where the gate that
   holds a phase shut is amber and the one that lets it go is green. */
.kz-gate--away {
  border-color: var(--kz-line-3);
  background: var(--kz-soft);
  color: var(--kz-ink-2);
}

.kz-gate--away b {
  color: var(--kz-ink);
}

/* Changing a project's status, at the foot of its Manage card: the list and
   its button on one line, under a rule that sets it apart from the buttons
   that move the phase. */
.kz-statusform {
  display: grid;
  gap: 7px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px dashed var(--kz-line);
}

.kz-statusform__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kz-statusform__row .kz-select {
  flex: 1 1 150px;
  width: auto;
}

.kz-statusform__row .kz-btn {
  flex: 0 0 auto;
}

/* The same five as a menu to pick from: a project list's Status cell, for
   whoever may change it. The cell shows the status's own badge with an arrow
   beside the word; it opens a menu in which every choice is that status's
   badge, so the colour picked is the colour the cell will wear. */
.kz-statuspick {
  display: inline-block;
  margin: 0;
}

.kz-statuspick__btn {
  border: 0;
  font-family: inherit;
  cursor: pointer;
  transition: box-shadow .15s ease;
}

.kz-statuspick__btn .bi {
  font-size: var(--kz-fs-xs);
  opacity: .75;
  transition: transform .15s ease;
}

.kz-statuspick__btn:hover,
.kz-statuspick__btn[aria-expanded="true"] {
  box-shadow: inset 0 0 0 1px currentColor;
}

.kz-statuspick__btn[aria-expanded="true"] .bi {
  transform: rotate(180deg);
}

.kz-statuspick__btn:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-statuspick__menu {
  min-width: 190px;
}

/* A choice: its badge, and a tick on the one the project has now. */
.dropdown-menu .kz-statuspick__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.kz-statuspick__opt .bi {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-base);
}

.dropdown-menu .kz-statuspick__opt[aria-current="true"] {
  background: var(--kz-soft);
}

/* ==========================================================================
   The figures above a project list (projects/partials/indicators)

   Three cards, as the template sets three above its own project list: a
   large figure, what it counts under it in grey, and the breakdown below as
   lines of a mark, a name and a number. Each card answers one question —
   how many and in what state; of those being worked on, how do the deadlines
   stand; and how far along are they.
   ========================================================================== */

/* The six phases in order, as one violet deepening: where a project stands
   along the cycle is how far along the ramp it is drawn. The other way round
   at night, so further along is still the stronger mark. */
:root {
  --kz-ph-1: #dcd0fb;
  --kz-ph-2: #c4aef7;
  --kz-ph-3: #a98bf2;
  --kz-ph-4: #8d64ee;
  --kz-ph-5: #7239ea;
  --kz-ph-6: #4a12c4;
}

[data-theme="dark"] {
  --kz-ph-1: #4a3a7a;
  --kz-ph-2: #6245b8;
  --kz-ph-3: #7d55dd;
  --kz-ph-4: #9a72f0;
  --kz-ph-5: #b89cff;
  --kz-ph-6: #d9ccff;
}

.kz-pstats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

/* The grid spaces the cards and stretches them level; a card's own bottom
   margin would only add to it. */
.kz-pstats__card {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  padding: 22px 26px 18px;
}

/* As tall as the ring in the first card, in all three, so the three figures
   and the first lines under them stand level across the row. */
.kz-pstats__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  margin-bottom: 12px;
}

.kz-pstats__n {
  display: block;
  color: var(--kz-ink);
  font-size: var(--kz-fs-3xl);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.kz-pstats__n small {
  margin-left: 2px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xl);
  font-weight: 500;
  letter-spacing: 0;
}

.kz-pstats__label {
  display: block;
  margin-top: 5px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-base);
  font-weight: 500;
  line-height: 1.35;
}

/* --- What each mark's colour is --------------------------------------------
   Said once, on the line or the arc, and read by whatever draws: a stroke,
   a dot, a segment. The five statuses wear the colours their badges wear. */
.kz-pstats--active             { --kz-psc: var(--kz-primary); }
.kz-pstats--on-hold            { --kz-psc: var(--kz-warning); }
.kz-pstats--completed          { --kz-psc: var(--kz-success); }
.kz-pstats--cancelled          { --kz-psc: var(--kz-danger); }
.kz-pstats--no-longer-relevant { --kz-psc: var(--kz-ink-4); }

/* A task's three statuses, in the colours of its board's columns. */
.kz-pstats--to-do { --kz-psc: var(--kz-danger); }
.kz-pstats--doing { --kz-psc: var(--kz-warning); }
.kz-pstats--done  { --kz-psc: var(--kz-success); }

.kz-pstats--danger  { --kz-psc: var(--kz-danger); }
.kz-pstats--warning { --kz-psc: var(--kz-warning); }
.kz-pstats--info    { --kz-psc: var(--kz-info); }
.kz-pstats--success { --kz-psc: var(--kz-success); }
.kz-pstats--neutral { --kz-psc: var(--kz-ink-4); }

.kz-pstats--phase-1 { --kz-psc: var(--kz-ph-1); }
.kz-pstats--phase-2 { --kz-psc: var(--kz-ph-2); }
.kz-pstats--phase-3 { --kz-psc: var(--kz-ph-3); }
.kz-pstats--phase-4 { --kz-psc: var(--kz-ph-4); }
.kz-pstats--phase-5 { --kz-psc: var(--kz-ph-5); }
.kz-pstats--phase-6 { --kz-psc: var(--kz-ph-6); }

/* --- The ring -----------------------------------------------------------------
   Turned a quarter back, so the first arc starts at twelve o'clock. */
.kz-pstats__ring {
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  transform: rotate(-90deg);
}

.kz-pstats__ring circle {
  fill: none;
  stroke-width: 5.5;
}

.kz-pstats__track {
  stroke: var(--kz-line-2);
}

.kz-pstats__arc {
  stroke: var(--kz-psc);
}

/* --- One bar, a segment per phase ------------------------------------------- */
.kz-pstats__bar {
  display: flex;
  gap: 3px;
  height: 8px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--kz-line-2);
  overflow: hidden;
}

.kz-pstats__seg {
  flex: var(--kz-n, 1) 0 0;
  min-width: 8px;
  background: var(--kz-psc);
}

/* --- The lines: a mark, a name, a number -------------------------------------- */
.kz-pstats__rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  margin: 0 -8px;
  padding: 0;
  list-style: none;
}

.kz-pstats__row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 29px;
  padding: 4px 8px;
  border-radius: var(--kz-r-sm);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 500;
  line-height: 1.3;
  transition: background .15s ease, color .15s ease;
}

/* A line that narrows the list below says so when it is pointed at. */
a.kz-pstats__row:hover,
a.kz-pstats__row:focus-visible {
  background: var(--kz-soft);
  color: var(--kz-ink);
}

a.kz-pstats__row:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: 1px;
}

/* The filter in force. */
.kz-pstats__row.is-on {
  background: var(--kz-primary-050);
  color: var(--kz-ink);
}

/* The template's bullet: a short bar, not a dot. */
.kz-pstats__dot {
  flex: 0 0 auto;
  width: 9px;
  height: 4px;
  border-radius: 3px;
  background: var(--kz-psc, var(--kz-line-3));
}

.kz-pstats__name {
  flex: 1 1 auto;
  min-width: 0;
}

.kz-pstats__v {
  flex: 0 0 auto;
  color: var(--kz-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.kz-pstats__pct {
  flex: 0 0 auto;
  min-width: 40px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Nothing behind it: the line goes quiet, so the eye lands on the others. */
.kz-pstats__row.is-zero,
.kz-pstats__row.is-zero .kz-pstats__v {
  color: var(--kz-ink-3);
}

.kz-pstats__row.is-zero .kz-pstats__dot {
  background: var(--kz-line-3);
}

/* Late is the one figure that turns its own colour when there is any. */
.kz-pstats__row.is-alarm .kz-pstats__v {
  color: var(--kz-danger-ink);
}

/* --- Narrower screens ---------------------------------------------------------
   Three cards need room for a status's name beside its figures; under that
   the first — which has the most to say on a line — takes a row of its own
   and the two about active projects share the next. */
@container kz-screen (max-width: 1399.98px) {
  .kz-pstats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kz-pstats__card:first-child {
    grid-column: 1 / -1;
  }
}

@container kz-screen (max-width: 767.98px) {
  .kz-pstats {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .kz-pstats__card {
    padding: 20px 16px 16px;
  }
}

/* ==========================================================================
   The filter above a project list (projects/partials/filters)

   Two rows of chips — the statuses, then the phases in order — instead of two
   lists to open. A chip is a mark, a name and how many projects are behind
   it; its colour is the one the same status or phase wears everywhere else
   on the page (--kz-psc, set by the .kz-pstats--* classes above).
   ========================================================================== */
.kz-facets {
  position: relative;
  display: grid;
  gap: 14px;
}

.kz-facet {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  gap: 8px 14px;
}

.kz-facet + .kz-facet {
  padding-top: 14px;
  border-top: 1px dashed var(--kz-line);
}

.kz-facet__legend {
  padding-top: 9px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.kz-facet__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* --- A chip ------------------------------------------------------------------ */
.kz-fchip--all {
  --kz-psc: var(--kz-primary);
}

.kz-fchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 7px 4px 11px;
  border: 1px solid var(--kz-line-3);
  border-radius: 999px;
  background: transparent;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease, transform .1s ease;
}

a.kz-fchip:hover {
  border-color: var(--kz-psc);
  background: color-mix(in srgb, var(--kz-psc) 7%, transparent);
  color: var(--kz-ink);
}

a.kz-fchip:active {
  transform: scale(.97);
}

a.kz-fchip:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: 2px;
}

/* The status's colour, as a dot before its name. */
.kz-fchip__dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--kz-psc);
}

/* A phase's place in the cycle: its number, on its shade of the ramp. */
.kz-fchip__step {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--kz-psc);
  color: var(--kz-white);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* The pale end of the ramp needs dark figures on it; at night the ramp runs
   the other way, so it is the far end that does. */
.kz-pstats--phase-1 .kz-fchip__step,
.kz-pstats--phase-2 .kz-fchip__step,
.kz-pstats--phase-3 .kz-fchip__step {
  color: var(--kz-ph-on-pale);
}

[data-theme="dark"] .kz-pstats--phase-1 .kz-fchip__step,
[data-theme="dark"] .kz-pstats--phase-2 .kz-fchip__step,
[data-theme="dark"] .kz-pstats--phase-3 .kz-fchip__step {
  color: var(--kz-white);
}

[data-theme="dark"] .kz-pstats--phase-4 .kz-fchip__step,
[data-theme="dark"] .kz-pstats--phase-5 .kz-fchip__step,
[data-theme="dark"] .kz-pstats--phase-6 .kz-fchip__step {
  color: var(--kz-ph-on-bright);
}

/* How many are behind it. */
.kz-fchip__n {
  flex: 0 0 auto;
  min-width: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--kz-line-2);
  color: var(--kz-ink);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  transition: background .15s ease, color .15s ease;
}

/* --- The filter in force: filled in its own colour, with the way out. -------- */
.kz-fchip.is-on {
  border-color: var(--kz-psc);
  background: color-mix(in srgb, var(--kz-psc) 13%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-psc) 16%, transparent);
  color: var(--kz-ink);
  font-weight: 600;
}

.kz-fchip.is-on .kz-fchip__n {
  background: var(--kz-pop);
}

.kz-fchip__x {
  margin: 0 3px 0 -2px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
}

.kz-fchip:not(.is-on) .kz-fchip__x {
  display: none;
}

a.kz-fchip.is-on:hover .kz-fchip__x {
  color: var(--kz-ink);
}

/* "All" with nothing narrowed is the resting state — said quietly. */
.kz-fchip--all.is-on {
  border-color: var(--kz-accent);
  background: var(--kz-primary-050);
  box-shadow: none;
  color: var(--kz-accent-2);
}

/* --- Nothing behind it: there to be read, not to be picked. ------------------ */
.kz-fchip.is-dead {
  border-style: dashed;
  color: var(--kz-ink-4);
  cursor: not-allowed;
}

.kz-fchip.is-dead .kz-fchip__dot,
.kz-fchip.is-dead .kz-fchip__step {
  background: var(--kz-line-3);
  color: var(--kz-ink-2);
}

.kz-fchip.is-dead .kz-fchip__n {
  background: transparent;
  color: var(--kz-ink-4);
}

/* --- Narrow screens: the legend above its chips. ---- */
@container kz-screen (max-width: 767.98px) {
  .kz-facet {
    grid-template-columns: minmax(0, 1fr);
  }

  .kz-facet__legend {
    padding-top: 0;
  }
}


/* ==========================================================================
   Educating a person: the four steps (qualification/partials/steps and the
   screens under it)

   Person -> skills -> starting levels -> teachers. The strip across the top
   says where in that order the screen is; everything under it is one step's
   own form. Drawn as the template draws its steppers: a numbered square, a
   title, and a line of grey under it.
   ========================================================================== */
.kz-qsteps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 24px;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  background: var(--kz-surface);
  box-shadow: var(--kz-shadow);
}

.kz-qsteps__item {
  position: relative;
  min-width: 0;
}

/* The arrow from one step to the next. */
.kz-qsteps__item + .kz-qsteps__item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -4px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--kz-line-3);
  border-right: 2px solid var(--kz-line-3);
  transform: translateY(-50%) rotate(45deg);
}

.kz-qsteps__link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 10px 14px;
  border-radius: var(--kz-r-sm);
  color: inherit;
  text-decoration: none;
  transition: background .15s ease;
}

a.kz-qsteps__link:hover {
  background: var(--kz-soft);
  color: inherit;
}

a.kz-qsteps__link:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: 1px;
}

.kz-qsteps__n {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--kz-r);
  background: var(--kz-line-2);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-lg);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kz-qsteps__text {
  display: grid;
  min-width: 0;
}

.kz-qsteps__title {
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-base);
  font-weight: 600;
  line-height: 1.3;
}

.kz-qsteps__sub {
  overflow: hidden;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Where the screen is. */
.kz-qsteps__item.is-here .kz-qsteps__link {
  background: var(--kz-primary-050);
}

.kz-qsteps__item.is-here .kz-qsteps__n {
  background: var(--kz-primary);
  color: var(--kz-white);
}

.kz-qsteps__item.is-here .kz-qsteps__title {
  color: var(--kz-ink);
}

/* Behind it. */
.kz-qsteps__item.is-done .kz-qsteps__n {
  background: var(--kz-success-050);
  color: var(--kz-success-ink);
}

.kz-qsteps__item.is-done .kz-qsteps__title {
  color: var(--kz-ink);
}

/* The same four inside an empty page: said, not walked, so without the frame. */
.kz-qsteps--plain {
  width: min(100%, 760px);
  margin: 22px auto 4px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.kz-qsteps--plain .kz-qsteps__n {
  background: var(--kz-primary-050);
  color: var(--kz-accent);
}

/* --- The person the steps are about ---------------------------------------- */
.kz-qlearner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
}

.kz-qlearner__who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--kz-ink);
  font-size: var(--kz-fs-lg);
  font-weight: 600;
}

/* --- Step 1: the people to choose from -------------------------------------- */
.kz-qpeople .kz-person {
  color: var(--kz-ink);
  font-weight: 600;
}

/* Under the name, clear of the avatar beside it. */
.kz-qpeople__role {
  display: block;
  margin: -6px 0 0 47px;
}

.kz-qpeople .kz-btn .bi {
  margin: 0 0 0 2px;
}

/* --- Steps 2 and 3: a skill per line, ticked, with its level ---------------- */
.kz-qcount {
  margin-left: auto;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-md);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kz-qcount strong {
  color: var(--kz-ink);
  font-weight: 700;
}

[data-skill-all][hidden],
.kz-qall[hidden] {
  display: none;
}

.kz-qskill__pick {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  cursor: pointer;
}

.kz-qskill__box {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--kz-primary);
  cursor: pointer;
}

.kz-qskill__box:disabled {
  cursor: not-allowed;
}

.kz-qskill__text {
  display: grid;
  min-width: 0;
}

.kz-qskill__name {
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 500;
  transition: color .15s ease;
}

.kz-qskill.is-on .kz-qskill__name,
.kz-qteach .kz-qskill__name {
  color: var(--kz-ink);
  font-weight: 600;
}

/* The level picker: the five levels as five buttons, each with the dial the
   matrix draws that level with. One is always down. */
.kz-lvlpick {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kz-lvlpick__opt {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.kz-lvlpick__opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.kz-lvlpick__face {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 58px;
  height: 36px;
  padding: 0 11px 0 8px;
  border: 1px solid var(--kz-line-3);
  border-radius: 8px;
  background: var(--kz-surface);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.kz-lvlpick__opt:hover .kz-lvlpick__face {
  border-color: var(--kz-accent);
}

.kz-lvlpick__opt input:focus-visible + .kz-lvlpick__face {
  outline: 3px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-lvlpick__opt input:checked + .kz-lvlpick__face {
  border-color: var(--kz-accent);
  background: var(--kz-primary-050);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-primary) 16%, transparent);
  color: var(--kz-ink);
}

/* A skill that is not ticked: its levels wait, greyed, and the one that
   would be set if it were ticked is only outlined. Picking any ticks it. */
.kz-qskill:not(.is-on) .kz-lvlpick__face {
  opacity: .5;
}

.kz-qskill:not(.is-on) .kz-lvlpick__opt:hover .kz-lvlpick__face {
  opacity: 1;
}

.kz-qskill:not(.is-on) .kz-lvlpick__opt input:checked + .kz-lvlpick__face {
  border-style: dashed;
  background: var(--kz-surface);
  box-shadow: none;
  color: var(--kz-ink-2);
}

/* Under the table: what the numbers mean, the note, and the way on. */
.kz-qfoot {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--kz-line-2);
}

.kz-qfoot .kz-note {
  margin: 0;
}

.kz-qfoot__legend {
  margin-left: 0;
}

.kz-qfoot__legend b {
  color: var(--kz-ink);
}

.kz-qfoot__actions {
  justify-content: flex-end;
  padding-top: 0;
}

.kz-qfoot__actions .kz-btn--primary .bi-arrow-right {
  margin: 0 0 0 2px;
}

.kz-qfoot__dates {
  max-width: 520px;
}

/* --- Step 4: a teacher per skill ---------------------------------------------- */
.kz-qall {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 0 auto;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
}

.kz-qall .kz-select {
  width: 230px;
}

.kz-card__head .kz-card__count + .kz-qall {
  margin-left: 4px;
}

.kz-qteach .kz-select {
  min-width: 190px;
}

.kz-qteach__now {
  white-space: nowrap;
}

@container kz-screen (max-width: 991.98px) {
  .kz-qsteps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kz-qsteps__item:nth-child(odd)::before {
    display: none;
  }
}

@container kz-screen (max-width: 575.98px) {
  .kz-qsteps,
  .kz-qsteps--plain {
    grid-template-columns: minmax(0, 1fr);
  }

  .kz-qsteps__item + .kz-qsteps__item::before {
    display: none;
  }

  .kz-qall {
    flex-basis: 100%;
    margin-left: 0;
  }

  .kz-qall .kz-select {
    flex: 1 1 auto;
    width: auto;
  }

  .kz-card__head:has(.kz-qall) {
    flex-wrap: wrap;
  }
}

/* A line of small print under a level, on its own line. */
.kz-qskills td .kz-table__sub {
  display: block;
}

/* On the training plan: whom a training is waiting on, said to everybody
   who is not the one it waits on. */
.kz-gatewait {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  white-space: nowrap;
}

.kz-gatewait .bi {
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-md);
}


/* ==========================================================================
   The skills catalogue (qualification/skills/index)

   Three figures above the list, drawn as the figures above a project list
   are, and under them a line per skill: its place in the order, its name and
   what it is about, its four levels as four marks, and who it was chosen for.
   ========================================================================== */

/* Three cards of the same kind — none of them carries a ring that needs a
   row to itself — so they stay three abreast down to a tablet. */
@container kz-screen (min-width: 992px) and (max-width: 1399.98px) {
  .kz-pstats--even {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kz-pstats--even .kz-pstats__card:first-child {
    grid-column: auto;
  }
}

.kz-skl__no {
  width: 60px;
}

/* The place in the order, as the template numbers its lists. */
.kz-skl__pos {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--kz-line-2);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kz-skl__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  line-height: 1.4;
}

/* What the skill is about, or a second fact about it: under the first line. */
.kz-skl__about {
  display: block;
  max-width: 56ch;
  margin-top: 3px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  line-height: 1.45;
}

/* --- The four levels as four marks ----------------------------------------
   Filled where that level's criteria are written, hollow where they are
   still owed. */
.kz-crit {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
}

.kz-crit__pip {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px dashed var(--kz-line-3);
  border-radius: 7px;
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: default;
}

.kz-crit__pip.is-on {
  border: 1px solid var(--kz-primary);
  background: var(--kz-primary);
  color: var(--kz-white);
}

.kz-crit__note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 10px;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  white-space: nowrap;
  vertical-align: middle;
}

.kz-crit__note.is-full {
  color: var(--kz-success-ink);
  font-weight: 600;
}

.kz-crit__note.is-none {
  color: var(--kz-ink-3);
}

/* --- Who it was chosen for ------------------------------------------------- */
.kz-skl__people {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  white-space: nowrap;
}

.kz-skl__people .bi {
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-lg);
}

/* An archived skill: still listed, plainly out of use. */
.kz-skl tr.is-archived .kz-skl__name,
.kz-skl tr.is-archived .kz-skl__about,
.kz-skl tr.is-archived .kz-skl__pos,
.kz-skl tr.is-archived .kz-crit {
  opacity: .55;
}

.kz-skl .kz-btn {
  white-space: nowrap;
}

/* Under the list: what a filled and a hollow mark mean. */
.kz-skl__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 9px;
  padding-top: 14px;
  padding-bottom: 14px;
  border-top: 1px solid var(--kz-line-2);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
}

.kz-skl__foot span + .kz-crit {
  margin-left: 14px;
}


/* ==========================================================================
   Sessions with the consultants: registering one (admin/session-form), its
   own page (team/session), a person's sessions (sessions/mine) and the
   tracker's weekly tick (team/tracker).
   ========================================================================== */

/* A badge standing where a card's count stands, at the end of its head. */
.kz-card__count--badge {
  margin-left: auto;
}

/* The five points a session passes, on its page: one more than the four
   steps of educating a person, so five columns — and two rows of text may
   be needed under a narrow one. */
.kz-qsteps--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.kz-qsteps--5 .kz-qsteps__n {
  font-size: 17px;
}

.kz-qsteps--5 .kz-qsteps__title {
  font-size: var(--kz-fs-md);
}

/* The same five as the page's tabs: each opens its section under the strip.
   The one open wears a ring — which is not the one the session has reached
   (filled, .is-here), though they are often the same. A point whose day has
   not come is shut: greyed, with a lock, and not a link at all. */
.kz-qsteps--tabs a.kz-qsteps__link {
  cursor: pointer;
}

.kz-qsteps--tabs .kz-qsteps__link.is-on {
  background: var(--kz-primary-050);
  box-shadow: inset 0 0 0 2px var(--kz-primary);
}

.kz-qsteps--tabs .kz-qsteps__link.is-on .kz-qsteps__title {
  color: var(--kz-ink);
}

.kz-qsteps__item.is-shut .kz-qsteps__link {
  cursor: not-allowed;
  opacity: .55;
}

/* Where a section stands — open, shut, over — said under its heading, in a
   card that has no padding of its own. */
.kz-stepnote {
  padding: 16px 20px 0;
}

.kz-stepnote .kz-gate {
  margin-bottom: 16px;
}

/* The way back to "not asked yet" keeps its place in the row before anything
   is ticked, so the two answers beside it do not shift when it appears. */
.kz-answerform .kz-iconbtn.is-idle {
  visibility: hidden;
  pointer-events: none;
}

@container kz-screen (max-width: 1399.98px) {
  .kz-qsteps--5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 4px;
  }

  .kz-qsteps--5 .kz-qsteps__item:nth-child(4)::before {
    display: none;
  }
}

@container kz-screen (max-width: 767.98px) {
  .kz-qsteps--5 {
    grid-template-columns: minmax(0, 1fr);
  }

  .kz-qsteps--5 .kz-qsteps__item::before {
    display: none;
  }
}

/* --- The form: main session or support session ------------------------------
   Two cards to pick between, each saying what it is. */
.kz-kindpick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.kz-kindpick__opt {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.kz-kindpick__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.kz-kindpick__face {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--kz-line-3);
  border-radius: var(--kz-r);
  background: var(--kz-surface);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.kz-kindpick__opt:hover .kz-kindpick__face {
  border-color: var(--kz-accent);
}

.kz-kindpick__opt input:focus-visible + .kz-kindpick__face {
  outline: 3px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-kindpick__opt input:checked + .kz-kindpick__face {
  border-color: var(--kz-accent);
  background: var(--kz-primary-050);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-primary) 16%, transparent);
}

.kz-kindpick__name {
  display: block;
  color: var(--kz-ink);
  font-size: var(--kz-fs-base);
  font-weight: 600;
}

.kz-kindpick__text {
  display: block;
  margin-top: 2px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  line-height: 1.4;
}

/* --- The form: the projects a support session checks -------------------------
   One row a project: its number in the visit, the project, its hours from
   and to, and the way to take the row out. Under the row, who that project's
   people are — they are the ones on its part of the session. */
.kz-parts {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kz-parts__row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--kz-line-3);
  border-radius: var(--kz-r);
  background: var(--kz-surface);
}

.kz-parts__n {
  display: grid;
  place-items: center;
  width: 34px;
  height: 42px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-primary-050);
  color: var(--kz-accent);
  font-size: var(--kz-fs-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kz-parts__fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

.kz-parts__fields .kz-select {
  flex: 1 1 220px;
  min-width: 0;
}

.kz-parts__hours {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: var(--kz-ink-3);
}

.kz-parts__hours .kz-input {
  width: 84px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.kz-parts__people,
.kz-parts__row > .kz-error {
  grid-column: 2;
}

.kz-parts__people {
  margin: 0;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* How many projects, and from when to when the visit runs. */
.kz-parts__sum {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* The only row cannot be taken out; its button keeps its place, unseen. */
.kz-parts .kz-iconbtn.is-idle {
  visibility: hidden;
  pointer-events: none;
}

/* --- A session's page: the other projects of the same support session --------
   One line a project, in the order they are held; the one being read is
   marked, the others lead to their own pages. */
.kz-visit {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kz-visit__row {
  border-bottom: 1px dashed var(--kz-line);
}

.kz-visit__row:last-child {
  border-bottom: 0;
}

.kz-visit__link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 12px;
  align-items: baseline;
  padding: 12px 24px;
  color: inherit;
  text-decoration: none;
  transition: background .15s ease;
}

a.kz-visit__link:hover {
  background: var(--kz-soft);
  color: inherit;
}

.kz-visit__row.is-current .kz-visit__link {
  background: var(--kz-primary-050);
  box-shadow: inset 3px 0 0 var(--kz-primary);
}

.kz-visit__time {
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kz-visit__name {
  min-width: 0;
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.kz-visit__sub {
  grid-column: 2;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
}

/* --- The form: what has to be prepared --------------------------------------
   One tile per thing; a ticked tile is filled and shows its tick. */
.kz-needs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.kz-needs__opt {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.kz-needs__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.kz-needs__face {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid var(--kz-line-3);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 500;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.kz-needs__face > .bi:first-child {
  flex: 0 0 auto;
  color: var(--kz-ink-4);
  font-size: 17px;
}

.kz-needs__face > span {
  flex: 1 1 auto;
  min-width: 0;
}

.kz-needs__tick {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--kz-line-3);
  border-radius: 6px;
  color: transparent;
  font-size: var(--kz-fs-md);
}

.kz-needs__opt:hover .kz-needs__face {
  border-color: var(--kz-accent);
}

.kz-needs__opt input:focus-visible + .kz-needs__face {
  outline: 3px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-needs__opt input:checked + .kz-needs__face {
  border-color: var(--kz-accent);
  background: var(--kz-primary-050);
  color: var(--kz-ink);
  font-weight: 600;
}

.kz-needs__opt input:checked + .kz-needs__face > .bi:first-child {
  color: var(--kz-accent);
}

.kz-needs__opt input:checked + .kz-needs__face .kz-needs__tick {
  border-color: var(--kz-primary);
  background: var(--kz-primary);
  color: var(--kz-white);
}

[data-session-addteam][hidden] {
  display: none;
}

/* --- The form: what follows from registering -------------------------------- */
.kz-cycle {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kz-cycle li {
  display: flex;
  gap: 12px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  line-height: 1.5;
}

.kz-cycle b {
  display: block;
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
}

.kz-cycle__n {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--kz-primary-050);
  color: var(--kz-accent);
  font-size: var(--kz-fs-sm);
  font-weight: 700;
}

/* --- The session's page: how the answers stand ------------------------------ */
.kz-answers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--kz-line-2);
}

.kz-answers__cell {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 14px 24px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-md);
  font-weight: 500;
}

.kz-answers__cell + .kz-answers__cell {
  border-left: 1px dashed var(--kz-line);
}

.kz-answers__cell b {
  color: var(--kz-ink);
  font-size: var(--kz-fs-2xl);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.kz-answers__cell--yes b  { color: var(--kz-success-ink); }
.kz-answers__cell--no b   { color: var(--kz-danger-ink); }
.kz-answers__cell--open b { color: var(--kz-warning-ink); }

.kz-answers__cell.is-zero b {
  color: var(--kz-ink-4);
}

.kz-answerform {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.kz-answerform .kz-btn {
  white-space: nowrap;
}

/* --- The session's page: what to prepare ------------------------------------- */
.kz-prep {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kz-prep__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px dashed var(--kz-line);
}

.kz-prep__row:last-child {
  border-bottom: 0;
}

.kz-prep__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--kz-line-2);
  color: var(--kz-ink-3);
  font-size: 17px;
}

.kz-prep__row.is-ready .kz-prep__icon {
  background: var(--kz-success-050);
  color: var(--kz-success-ink);
}

.kz-prep__name {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
}

.kz-prep__state {
  display: block;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
}

.kz-prep__row.is-ready .kz-prep__state {
  color: var(--kz-success-ink);
}

.kz-prep__row form {
  margin: 0;
}

/* The tick: a box that is pressed to say "ready", and pressed again to
   take it back. */
.kz-prep__tick {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--kz-line-3);
  border-radius: 8px;
  background: var(--kz-surface);
  color: transparent;
  font-size: var(--kz-fs-lg);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

button.kz-prep__tick {
  cursor: pointer;
}

button.kz-prep__tick:hover {
  border-color: var(--kz-success);
  color: var(--kz-success-ink);
}

button.kz-prep__tick:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-prep__tick.is-on {
  border-color: var(--kz-success);
  background: var(--kz-success);
  color: var(--kz-success-on);
}

button.kz-prep__tick.is-on:hover {
  color: var(--kz-white);
  opacity: .85;
}

/* --- The session's page: after it ---------------------------------------------- */
.kz-results__before {
  margin: 0 0 18px;
}

.kz-results__h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--kz-ink);
  font-size: var(--kz-fs-base);
  font-weight: 600;
}

.kz-results__h > .bi {
  color: var(--kz-ink-4);
}

.kz-results__h .kz-card__count {
  margin-left: 4px;
}

.kz-results__summary {
  margin: 0 0 14px;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  line-height: 1.6;
  white-space: pre-line;
}

.kz-sesstasks__filter {
  margin-bottom: 14px;
}

.kz-sesstasks {
  display: grid;
  gap: 0;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.kz-sesstasks__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--kz-line);
}

.kz-sesstasks__row .kz-badge {
  flex: 0 0 auto;
  margin-top: 1px;
}

.kz-sesstasks__body {
  display: grid;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Everybody on a task of the session, by their whole name (.kz-taskpeople). */
.kz-sesstasks__people {
  margin: 6px 0 4px;
}

/* Comment / Next step under a task of the session, in full. */
.kz-sesstasks__note {
  margin-top: 4px;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-base);
  line-height: 1.5;
  white-space: pre-line;
}

.kz-sesstasks__priority {
  flex: 0 0 auto;
  margin-left: auto;
}

/* The task board's own form, at the head of the list: a new task is written
   above the ones already written. */
.kz-sesstasks__add {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px dashed var(--kz-line-3);
  border-radius: var(--kz-r-sm);
}

/* The announcement: said in a band across the foot of the card. */
.kz-results__publish {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-soft);
}

.kz-results__publishtext {
  flex: 1 1 320px;
  margin: 0;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  line-height: 1.5;
}

.kz-results__publishtext b {
  display: block;
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
}

.kz-results__publish form {
  margin: 0;
}

/* That announcing locks the results: said on a line of its own, darker than
   the line above it, before the button is pressed. */
.kz-results__lockwarn {
  display: block;
  margin-top: 8px;
  color: var(--kz-ink);
  font-weight: 600;
}

/* --- After the session: the summary, the links, the materials ------------------
   Three small parts down the left of the results, each with its own form, one
   under another and set apart by a dashed line. */
.kz-results__part {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--kz-line);
}

.kz-results__part:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

/* "Download all materials", under their list. */
.kz-results__zip {
  margin: -4px 0 14px;
}

/* A link or a material: its tile, its name and what it is, and the buttons. */
.kz-reslist {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.kz-reslist__row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
}

.kz-reslist__main {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.kz-reslist__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.kz-reslist__main:hover .kz-reslist__name {
  color: var(--kz-accent);
}

.kz-reslist__main:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-reslist__sub {
  overflow: hidden;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.kz-reslist__act {
  flex: 0 0 auto;
  margin: 0;
}

.kz-reslist__empty {
  margin-bottom: 14px;
}

/* The tile a link or a file is known by at a glance: a sheet green, a deck
   amber, a PDF red, a Miro board yellow. */
.kz-linktile {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--kz-r-sm);
  font-size: var(--kz-fs-lg);
}

.kz-linktile--warning { background: var(--kz-warning-050); color: var(--kz-warning-ink); }
.kz-linktile--success { background: var(--kz-success-050); color: var(--kz-success-ink); }
.kz-linktile--info    { background: var(--kz-info-050);    color: var(--kz-info-ink); }
.kz-linktile--primary { background: var(--kz-primary-050); color: var(--kz-accent-2); }
.kz-linktile--danger  { background: var(--kz-danger-050);  color: var(--kz-danger-ink); }
.kz-linktile--neutral { background: var(--kz-soft);        color: var(--kz-ink-3); box-shadow: inset 0 0 0 1px var(--kz-line); }

/* Adding one: a small form under the list, boxed like the task form. */
.kz-resadd {
  gap: 12px;
  padding: 14px;
  border: 1px dashed var(--kz-line-3);
  border-radius: var(--kz-r-sm);
}

/* --- The announcement: what goes out, and the ways to take it away ---------- */
.kz-goes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}

.kz-goes__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border: 1px solid var(--kz-line);
  border-radius: 999px;
  background: var(--kz-surface);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.kz-goes__item.is-off {
  border-style: dashed;
  color: var(--kz-ink-4);
  font-weight: 500;
}

.kz-goes__item--to {
  border-color: transparent;
  background: var(--kz-primary-050);
  color: var(--kz-accent-2);
}

.kz-results__publishacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.kz-results__readeracts {
  margin-top: 20px;
}

/* A message for a Telegram group: the button, and — where the clipboard is
   refused — the text itself to copy by hand. */
.kz-copymsg {
  display: inline-grid;
  gap: 8px;
}

.kz-copymsg__text {
  width: min(560px, 80vw);
  padding: 10px 12px;
  border: 1px solid var(--kz-line-3);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
  color: var(--kz-ink);
  font-size: var(--kz-fs-sm);
  line-height: 1.5;
  resize: vertical;
}

.kz-btn.is-copied,
.kz-btn.is-copied:hover {
  border-color: var(--kz-success);
  background: var(--kz-success-050);
  color: var(--kz-success-ink);
}

.kz-gate__more {
  display: block;
  margin-top: 3px;
  font-size: var(--kz-fs-sm);
}

/* --- Since it was announced: who has seen it, and each time it went out ----- */
.kz-results__since {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px dashed var(--kz-line-3);
}

.kz-seenbar {
  height: 6px;
  margin: -4px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--kz-line-2);
}

.kz-seenbar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--kz-success);
}

.kz-seen {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kz-seen__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--kz-line);
}

.kz-seen__row:last-child {
  border-bottom: 0;
}

.kz-seen__who {
  display: grid;
  min-width: 0;
}

.kz-seen__state {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.kz-announcelog {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kz-announcelog__row {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 8px 0 10px 18px;
  border-left: 2px solid var(--kz-line-2);
}

.kz-announcelog__row::before {
  content: "";
  position: absolute;
  top: 13px;
  left: -6px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--kz-surface);
  border-radius: 50%;
  background: var(--kz-success);
}

.kz-announcelog__when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
}

/* --- My sessions: the way to a session's protocol ---------------------------- */
/* A held session with its results under it runs tall: its day and its kind
   stay at the top, by its name, rather than half way down. */
.kz-sched__row:has(.kz-mysession__results) {
  align-items: start;
}
.kz-mysession__protocol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
}

.kz-mysession__results .kz-reslist {
  max-width: 640px;
}

/* --- A Kaizen project's sessions, on its page --------------------------------- */
.kz-projsessions {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kz-projsessions__row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px dashed var(--kz-line);
}

.kz-projsessions__row:last-child {
  border-bottom: 0;
}

.kz-projsessions__body {
  display: grid;
  flex: 1 1 auto;
  gap: 6px;
  min-width: 0;
}

.kz-projsessions__title {
  margin: 0;
  color: var(--kz-ink);
  font-size: var(--kz-fs-base);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.kz-projsessions__title a {
  color: inherit;
}

.kz-projsessions__title a:hover {
  color: var(--kz-accent);
}

.kz-projsessions__meta,
.kz-projsessions__counts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 0;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
}

.kz-projsessions__meta .bi,
.kz-projsessions__counts .bi {
  margin-right: 4px;
}

.kz-projsessions__counts {
  font-size: var(--kz-fs-sm);
}

.kz-projsessions__counts .is-zero {
  color: var(--kz-ink-4);
}

.kz-projsessions__act {
  flex: 0 0 auto;
}

@container kz-screen (max-width: 575.98px) {
  .kz-projsessions__row {
    flex-wrap: wrap;
    padding: 14px 16px;
  }
}

/* --- A session's protocol ------------------------------------------------------
   One page to read, to print, and to keep as a PDF: what the session was, who
   was on it, the summary, the links written out in full, the materials, the
   tasks. Printed, the page is the protocol alone, black on white (below). */
.kz-protocol {
  max-width: 1000px;
  padding: 28px 32px 22px;
}

.kz-protocol__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--kz-ink);
}

.kz-protocol__eyebrow {
  margin: 0 0 6px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.kz-protocol__title {
  margin: 0 0 6px;
  color: var(--kz-ink);
  font-size: var(--kz-fs-2xl);
  font-weight: 700;
  line-height: 1.25;
}

.kz-protocol__when {
  margin: 0;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-base);
}

.kz-protocol__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px 24px;
  margin: 20px 0 0;
  padding: 16px 18px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-soft);
}

.kz-protocol__facts dt {
  margin-bottom: 2px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.kz-protocol__facts dd {
  margin: 0;
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
}

.kz-protocol__part {
  margin-top: 28px;
}

.kz-protocol__h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--kz-ink);
  font-size: var(--kz-fs-lg);
  font-weight: 700;
  break-after: avoid;
}

.kz-protocol__h > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--kz-primary-050);
  color: var(--kz-accent-2);
  font-size: var(--kz-fs-sm);
}

.kz-protocol__table td {
  vertical-align: top;
}

.kz-protocol__n {
  width: 40px;
  color: var(--kz-ink-3);
}

.kz-protocol__nowrap {
  white-space: nowrap;
}

.kz-protocol__note {
  display: block;
  margin-top: 3px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  white-space: pre-line;
}

.kz-protocol__summary {
  margin: 0;
}

.kz-protocol__list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.kz-protocol__list > li {
  padding-left: 4px;
}

.kz-protocol__item {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
}

.kz-protocol__url {
  display: block;
  margin-top: 2px;
  font-size: var(--kz-fs-sm);
  overflow-wrap: anywhere;
}

.kz-protocol__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  margin-top: 30px;
  padding-top: 12px;
  border-top: 1px solid var(--kz-line);
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-xs);
  overflow-wrap: anywhere;
}

@container kz-screen (max-width: 575.98px) {
  .kz-protocol {
    padding: 20px 16px 16px;
  }

  .kz-protocol__head {
    flex-direction: column;
  }

  .kz-protocol__title {
    font-size: var(--kz-fs-xl);
  }
}

/* Printed, or saved as a PDF: the protocol alone, black on white, and every
   table whole rather than cut off at the edge of a scroll box. */
@media print {
  @page {
    margin: 14mm 12mm;
  }

  html:has(.kz-protocol) :is(.kz-side, .kz-top, .kz-scrim, .kz-pagehead, .kz-alert, .kz-alerts) {
    display: none !important;
  }

  html:has(.kz-protocol) :is(body, .kz-app, .kz-main, .kz-page) {
    margin: 0 !important;
    padding: 0 !important;
    background: var(--kz-white) !important;
  }

  .kz-protocol {
    max-width: none;
    padding: 0;
    border: 0 !important;
    box-shadow: none !important;
  }

  .kz-protocol,
  .kz-protocol * {
    background: transparent !important;
    color: var(--kz-print-ink) !important;
  }

  .kz-protocol__head {
    border-bottom-color: var(--kz-print-ink) !important;
  }

  .kz-protocol__facts {
    border: 1px solid var(--kz-print-line);
  }

  .kz-protocol :is(td, th, .kz-protocol__foot) {
    border-color: var(--kz-print-line) !important;
  }

  .kz-protocol .kz-tablewrap {
    overflow: visible;
  }

  .kz-protocol tr,
  .kz-protocol__list > li {
    break-inside: avoid;
  }

  .kz-protocol a {
    text-decoration: none;
  }
}

/* --- The schedule, and a person's own sessions ------------------------------- */
.kz-sched__link {
  color: inherit;
  text-decoration: none;
}

.kz-sched__link:hover {
  color: var(--kz-accent);
}

/* The whole line is the way in, not only the words. */
.kz-sched__row {
  position: relative;
}

.kz-sched__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.kz-sched__link:focus-visible {
  outline: none;
}

.kz-sched__link:focus-visible::after {
  border-radius: var(--kz-r-sm);
  outline: 3px solid var(--kz-focus);
  outline-offset: -3px;
}

.kz-mysession__answer {
  margin: 10px 0 0;
  font-size: var(--kz-fs-md);
}

.kz-mysession__results {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--kz-line);
}

.kz-mysession__results .kz-results__h {
  margin-bottom: 8px;
}

/* --- The tracker's weekly tick ------------------------------------------------- */
.kz-weektick {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r-sm);
  background: var(--kz-soft);
}

.kz-weektick__q {
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
}

.kz-weektick__fields {
  display: grid;
  grid-template-columns: minmax(140px, 170px) minmax(0, 1fr);
  gap: 8px;
}

@container kz-screen (max-width: 575.98px) {
  .kz-answers {
    grid-template-columns: minmax(0, 1fr);
  }

  .kz-answers__cell + .kz-answers__cell {
    border-top: 1px dashed var(--kz-line);
    border-left: 0;
  }

  .kz-answerform {
    flex-wrap: wrap;
  }

  .kz-weektick__fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Who ticked an answer, and when: under the answer, not beside it. */
.kz-anscell .kz-table__sub {
  display: block;
  margin-top: 5px;
}

/* Under a session's name on the head's schedule: its kind, then its project. */
.kz-sessrow__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 6px;
}


/* ==========================================================================
   The training plan (qualification/trainings/index)

   Three figures (the .kz-pstats cards above), the filters, then the list.
   The filters are the project lists' chips (.kz-facets, .kz-fchip) for the
   stage, and beside them three lists to open — student, skill, teacher —
   because a row of chips for every skill in the catalogue would be a wall.
   ========================================================================== */

/* --- A list to open -----------------------------------------------------------
   Drawn as a field with its name in small capitals over what it is set to —
   the template's "Status: All" — and always the same width, so what one list
   is set to never moves the next. */
.kz-fpick {
  position: relative;
  display: inline-flex;
}

.kz-fpick__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 248px;
  min-height: 46px;
  padding: 5px 12px;
  border: 1px solid var(--kz-line-3);
  border-radius: var(--kz-r);
  background: transparent;
  color: var(--kz-ink-2);
  text-align: left;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.kz-fpick__btn:hover,
.kz-fpick__btn[aria-expanded="true"] {
  border-color: var(--kz-accent);
  background: var(--kz-primary-050);
}

.kz-fpick__btn:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-fpick__icon {
  flex: 0 0 auto;
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-lg);
}

.kz-fpick__text {
  flex: 1 1 auto;
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.kz-fpick__label {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.kz-fpick__value {
  overflow: hidden;
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kz-fpick__caret {
  flex: 0 0 auto;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  transition: transform .15s ease;
}

.kz-fpick__btn[aria-expanded="true"] .kz-fpick__caret {
  transform: rotate(180deg);
}

/* Narrowed: filled like a chip in force, and the arrow gives its place to
   the cross that takes the filter off. */
.kz-fpick.is-on .kz-fpick__btn {
  padding-right: 42px;
  border-color: var(--kz-accent);
  background: var(--kz-primary-050);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-primary) 16%, transparent);
}

.kz-fpick.is-on .kz-fpick__icon {
  color: var(--kz-accent);
}

.kz-fpick.is-on .kz-fpick__caret {
  display: none;
}

.kz-fpick__clear {
  position: absolute;
  top: 50%;
  right: 9px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  text-decoration: none;
  transform: translateY(-50%);
  transition: background .15s ease, color .15s ease;
}

.kz-fpick__clear:hover,
.kz-fpick__clear:focus-visible {
  background: var(--kz-pop);
  color: var(--kz-ink);
}

.kz-fpick__clear:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: 1px;
}

/* --- What it opens ------------------------------------------------------------ */
.kz-fpick__menu {
  width: 330px;
  /* The screen's width whatever the zoom (see Base). */
  max-width: calc(100vw / var(--kz-zoom) - 32px);
  max-height: 348px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--kz-line-3) transparent;
}

.dropdown-menu .kz-fpick__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  white-space: normal;
}

.dropdown-menu .kz-fpick__item .bi {
  margin-right: 0;
}

/* Before a name: a person's initials (.kz-avatar), a skill's place in the
   catalogue, or the sign for "all of them". */
.kz-fpick__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--kz-line-2);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kz-fpick__name {
  flex: 1 1 auto;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
  line-height: 1.3;
}

.kz-fpick__item.active .kz-fchip__n {
  background: var(--kz-pop);
}

.kz-fpick__item.active .kz-fpick__mark {
  background: var(--kz-primary);
  color: var(--kz-white);
}

/* Nothing behind it within the other filters: read, not picked. */
.dropdown-menu .kz-fpick__item.is-dead,
.dropdown-menu .kz-fpick__item.is-dead:hover {
  background: transparent;
  color: var(--kz-ink-4);
  cursor: not-allowed;
}

.kz-fpick__item.is-dead .kz-fchip__n {
  background: transparent;
  color: var(--kz-ink-4);
}

.kz-fpick__item.is-dead .kz-avatar {
  filter: grayscale(1);
  opacity: .55;
}

/* The lists are taller than a chip; their legend stands level with them. */
.kz-facet--lists .kz-facet__legend {
  padding-top: 15px;
}

/* --- The line above the table ---------------------------------------------------
   Always there. Narrowed, it is the tinted line of the project lists; not
   narrowed, it only says how the list is ordered. */
.kz-result--quiet {
  background: transparent;
  color: var(--kz-ink-3);
}

.kz-result .bi-sort-down {
  margin-right: 4px;
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-base);
}

/* --- The list ------------------------------------------------------------------
   Six columns, each cell two lines at most: the thing, and under it in grey
   what qualifies it — as the template sets a name over an address. */
.kz-tplan {
  min-width: 960px;
}

/* Every column but the skill keeps to one line, so the skill's name is what
   gives when the page is narrow or the language long. Closer cells leave it
   room for a name in two lines rather than three. */
.kz-tplan thead th,
.kz-tplan tbody td {
  padding-right: 10px;
  padding-left: 10px;
}

.kz-tplan__who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 210px;
}

.kz-tplan__who .kz-avatar {
  width: 32px;
  height: 32px;
  font-size: var(--kz-fs-xs);
}

.kz-tplan__skill {
  display: block;
  color: var(--kz-ink);
  font-weight: 600;
}

.kz-tplan__lvl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kz-tplan__dates {
  display: block;
  color: var(--kz-ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* A line's height even when there is nothing to say, so rows stay level. */
.kz-tplan__when {
  display: block;
  min-height: 18px;
  margin-top: 4px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  white-space: nowrap;
}

/* --- The two gates, as two marks -------------------------------------------------
   Test, then approval, joined by a short rule. A mark is hollow until its
   gate is reached, ringed in the accent while the training waits on it, green
   with a tick once cleared, red with a cross where it was refused — which is
   how a "needs retraining" shows whose no it was. */
.kz-tgates {
  display: flex;
  align-items: center;
  margin-top: 8px;
}

.kz-tgate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  white-space: nowrap;
}

.kz-tgate + .kz-tgate::before {
  content: "";
  width: 16px;
  height: 2px;
  margin: 0 3px 0 9px;
  border-radius: 2px;
  background: var(--kz-line-3);
}

.kz-tgate.is-done + .kz-tgate::before {
  background: var(--kz-success-solid);
}

.kz-tgate__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid var(--kz-line-3);
  border-radius: 50%;
  color: var(--kz-white);
  font-size: var(--kz-fs-xs);
}

.kz-tgate.is-done {
  color: var(--kz-ink-2);
}

.kz-tgate.is-done .kz-tgate__mark {
  border-color: var(--kz-success-solid);
  background: var(--kz-success-solid);
}

.kz-tgate.is-failed {
  color: var(--kz-danger-ink);
  font-weight: 600;
}

.kz-tgate.is-failed .kz-tgate__mark {
  border-color: var(--kz-danger);
  background: var(--kz-danger);
}

.kz-tgate.is-now {
  color: var(--kz-ink);
  font-weight: 600;
}

.kz-tgate.is-now .kz-tgate__mark {
  border-color: var(--kz-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-primary) 18%, transparent);
  color: var(--kz-accent);
  font-size: 6px;
}

/* A training that has cleared both gates: what it came to, where the buttons
   were. One line — the dashed box it used to be broke in two in a table. */
.kz-gatedone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--kz-success-ink);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.kz-gatedone .bi {
  font-size: var(--kz-fs-base);
}

@container kz-screen (max-width: 767.98px) {
  .kz-fpick {
    flex: 1 1 100%;
  }

  .kz-fpick__btn {
    width: 100%;
  }

  .kz-facet--lists .kz-facet__legend {
    padding-top: 0;
  }
}


/* --- The plan, collected by person ------------------------------------------------
   A line per person (.kz-pgroup), and under it — once the line is clicked —
   that person's trainings as rows. The line says what is worth knowing before
   opening it: who, how far along, when the next training ends, and whether
   any of it waits on the reader. Lines open and close on their own; opening
   one never closes another, so nothing above the line just clicked moves. */
.kz-pgroup {
  border-bottom: 1px dashed var(--kz-line);
}

.kz-pgroup:last-child {
  border-bottom: 0;
}

.kz-pgroup__head {
  display: grid;
  grid-template-columns: minmax(200px, 1.15fr) minmax(240px, 1.6fr) minmax(150px, .8fr) minmax(132px, auto) 20px;
  align-items: center;
  gap: 12px 24px;
  padding: 16px 24px;
  list-style: none;
  cursor: pointer;
  transition: background .13s ease;
}

.kz-pgroup__head::-webkit-details-marker {
  display: none;
}

.kz-pgroup__head:hover {
  background: var(--kz-hover);
}

.kz-pgroup__head:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: -3px;
}

/* Open: the line is tinted and a violet rule runs down the side of everything
   that is this person's, so it is plain where they end and the next begins. */
.kz-pgroup[open] {
  box-shadow: inset 3px 0 0 var(--kz-primary);
}

.kz-pgroup[open] > .kz-pgroup__head {
  background: var(--kz-primary-050);
  box-shadow: inset 3px 0 0 var(--kz-primary);
}

.kz-pgroup__who {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.kz-pgroup__id {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.kz-pgroup__name {
  overflow: hidden;
  color: var(--kz-ink);
  font-size: var(--kz-fs-base);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kz-pgroup__sub {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
}

/* Somebody since removed from the platform: no initials to show. */
.kz-avatar--gone {
  background: var(--kz-line-2);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-lg);
}

.kz-pgroup__progress {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.kz-pgroup__figure {
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
}

.kz-pgroup__figure b {
  color: var(--kz-ink);
  font-size: var(--kz-fs-lg);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.kz-pgroup__progress .kz-pstats__bar {
  height: 6px;
  margin-bottom: 0;
}

.kz-pgroup__keys {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 14px;
  min-height: 17px;
}

.kz-pgroup__key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  white-space: nowrap;
}

.kz-pgroup__key .kz-fchip__dot {
  width: 7px;
  height: 7px;
}

.kz-pgroup__due {
  display: grid;
  gap: 1px;
}

.kz-pgroup__label {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.kz-pgroup__value {
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.kz-pgroup__value--done {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--kz-success-ink);
}

.kz-pgroup__you {
  display: flex;
  justify-content: flex-end;
}

.kz-pgroup__caret {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-md);
  transition: transform .15s ease;
}

.kz-pgroup[open] > .kz-pgroup__head .kz-pgroup__caret {
  transform: rotate(180deg);
}

.kz-pgroup__body {
  border-top: 1px dashed var(--kz-line);
}

/* The way to the rest about the person, under their rows. */
.kz-pgroup__foot {
  margin: 0;
  padding: 11px 24px 13px;
  border-top: 1px dashed var(--kz-line);
  font-size: var(--kz-fs-sm);
  text-align: right;
}

.kz-pgroup__foot a {
  color: var(--kz-accent);
  font-weight: 600;
  text-decoration: none;
}

.kz-pgroup__foot a:hover {
  text-decoration: underline;
}

.kz-pgroup__foot .bi {
  margin-left: 6px;
}

/* Under the trainings of removed people: what they are, and the way to delete
   them, on one line. */
.kz-pgroup__foot--gone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  color: var(--kz-ink-3);
  text-align: left;
}

/* The bin on the line itself stands where "Waiting on you" would. */
.kz-pgroup__you .kz-iconbtn {
  flex: 0 0 auto;
}

/* Every person's rows share these widths, so the columns of one person stand
   under those of the one above; the skill takes what is left. */
.kz-tplan__teacher  { width: 215px; }
.kz-tplan__when-col { width: 175px; }
.kz-tplan__stage    { width: 200px; }
.kz-tplan__actions  { width: 245px; }

@container kz-screen (max-width: 991.98px) {
  .kz-pgroup__head {
    grid-template-columns: minmax(0, 1fr) 20px;
    padding: 14px 16px;
  }

  .kz-pgroup__who {
    grid-column: 1;
    grid-row: 1;
  }

  .kz-pgroup__caret {
    grid-column: 2;
    grid-row: 1;
  }

  .kz-pgroup__progress,
  .kz-pgroup__due,
  .kz-pgroup__you {
    grid-column: 1 / -1;
  }

  .kz-pgroup__you {
    justify-content: flex-start;
  }

  .kz-pgroup__you.is-empty {
    display: none;
  }

  .kz-pgroup__foot {
    padding-right: 16px;
    padding-left: 16px;
    text-align: left;
  }
}

/* --- Error pages ---------------------------------------------------------------
   403, 404, 419, 429, 500 and 503, drawn on the sign-in layout with no
   sidebar: the code, what happened, what to do, and the two ways on. */

.kz-errorpage__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 18px;
  background: var(--kz-primary-050);
  color: var(--kz-accent);
  font-size: 28px;
}

.kz-errorpage__code {
  margin: 0 0 6px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kz-errorpage__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

/* --- File pickers ----------------------------------------------------------------
   kaizen.js dresses every file input as a button and the name of what was
   picked, both in the page's language. The real input is kept, invisible and
   stretched over the whole of it, so it is still what is clicked, focused,
   dropped onto and checked for "required". */

.kz-filepick {
  position: relative;
  display: flex;
  flex: 1 1 220px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
  padding: 5px 12px 5px 5px;
  border: 1px dashed var(--kz-line-3);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.kz-filepick:hover {
  border-color: var(--kz-primary);
  background: var(--kz-primary-050);
}

.kz-filepick:focus-within {
  border-color: var(--kz-primary);
  box-shadow: 0 0 0 3px var(--kz-primary-100);
}

.kz-filepick.is-filled {
  border-style: solid;
}

.kz-filepick.is-invalid {
  border-color: var(--kz-danger);
}

.kz-filepick__input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.kz-filepick__btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 7px;
  background: var(--kz-primary-050);
  color: var(--kz-accent);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.kz-filepick:hover .kz-filepick__btn {
  background: var(--kz-primary-100);
}

.kz-filepick__name {
  overflow: hidden;
  min-width: 0;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kz-filepick.is-filled .kz-filepick__name {
  color: var(--kz-ink);
  font-weight: 500;
}

/* --- A project's page on a phone ---------------------------------------------
   One column instead of two, and the cards of both columns in the order they
   are needed (data-mobile-order in projects/show): what to do now, the phase
   clock, the phase's artifacts and its upload, and only then the details, the
   share link and the admin's phase override. Before, the whole left column
   came first, and the artifacts — the work itself — were three screens down.
   The two columns and the sticky wrapper step aside (display: contents) so
   their cards can be ordered as one list in the row. */
@container kz-screen (max-width: 991.98px) {
  .kz-projectgrid {
    margin-top: 0;
  }

  .kz-projectgrid > [class*="col-"],
  .kz-projectgrid .kz-sticky {
    display: contents;
  }

  .kz-projectgrid [data-mobile-order] {
    width: calc(100% - var(--bs-gutter-x));
    margin-left: calc(var(--bs-gutter-x) * .5);
    margin-right: calc(var(--bs-gutter-x) * .5);
  }

  .kz-projectgrid [data-mobile-order="1"] { order: 1; }
  .kz-projectgrid [data-mobile-order="2"] { order: 2; }
  .kz-projectgrid [data-mobile-order="3"] { order: 3; }
  .kz-projectgrid [data-mobile-order="4"] { order: 4; }
  .kz-projectgrid [data-mobile-order="5"] { order: 5; }
  .kz-projectgrid [data-mobile-order="6"] { order: 6; }
  .kz-projectgrid [data-mobile-order="7"] { order: 7; }
}

/* ==========================================================================
   Shift picker — Shift 1 / Shift 2 / Shift 3, one segmented control
   (admin/people/partials/positions, projects/seasonal-production/partials/chain)
   ========================================================================== */
/* The shifts share the field's whole width in equal parts, as tall as the
   selects around them: a control only as wide as its labels left the rest
   of the row an empty box, and its buttons small targets. */
.kz-segment {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  border: 1px solid var(--kz-line-3);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
  overflow: hidden;
}

.kz-segment__opt {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.kz-segment__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.kz-segment__face {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 100%;
  padding: 10px 12px;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}

.kz-segment__opt + .kz-segment__opt .kz-segment__face {
  border-left: 1px solid var(--kz-line-3);
}

.kz-segment__opt:hover .kz-segment__face {
  background: var(--kz-primary-050);
  color: var(--kz-accent-2);
}

.kz-segment__opt input:checked + .kz-segment__face {
  background: var(--kz-primary);
  color: var(--kz-white);
}

.kz-segment__opt input:focus-visible + .kz-segment__face {
  outline: 3px solid var(--kz-focus);
  outline-offset: -3px;
}

.kz-segment__opt input:disabled + .kz-segment__face {
  opacity: .55;
  cursor: not-allowed;
}

.kz-segment.is-invalid {
  border-color: var(--kz-danger);
}

/* ==========================================================================
   Iteration cards — the Production Improvement Cycle's front page
   (projects/seasonal-production/iterations)
   ========================================================================== */
/* Level with its neighbour, whether or not the way to correct it hangs
   under it. */
.kz-iteration-col {
  display: flex;
  flex-direction: column;
}

.kz-iteration-col > .kz-iteration {
  flex: 1 1 auto;
}

.kz-iteration-col > .kz-iteration:not(:last-child) {
  margin-bottom: 0;
}

.kz-iteration .kz-card__head {
  align-items: flex-start;
}

.kz-iteration__period {
  font-size: var(--kz-fs-xl);
  line-height: 1.3;
}

.kz-iteration__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  font-size: var(--kz-fs-md);
}

/* The iteration the cycle is in today. */
.kz-iteration.is-current {
  border-color: var(--kz-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-primary) 14%, transparent);
}

.kz-iteration__manage {
  display: flex;
  justify-content: flex-end;
  margin: 8px 0 24px;
}

/* ==========================================================================
   Phase durations — the choice of three, a cycle's days, a Kaizen plan
   The page opens on three cards: the two cycles, each one timetable for all
   of its projects, and Kaizen Improvement, where every project is planned by
   itself. Under it, a cycle's form and a Kaizen project's plan share the
   bar of phases drawn to scale and the field that carries its unit.
   ========================================================================== */

/* --- The three cards ------------------------------------------------------ */
.kz-pdchoice {
  display: flex;
  flex-direction: column;
}

.kz-pdchoice .kz-card__head {
  align-items: flex-start;
}

.kz-pdchoice__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 18px;
}

/* The Kaizen card's three counts, side by side whatever the card's width. */
.kz-pdchoice .kz-figs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.kz-pdchoice .kz-fig {
  padding: 10px 12px;
}

.kz-pdchoice__lead {
  margin: 0;
  font-size: var(--kz-fs-md);
  line-height: 1.55;
  color: var(--kz-ink-2);
}

/* How the projects behind the card move: by a clock, or by people. */
.kz-pdchoice__rule {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-soft);
  box-shadow: inset 0 0 0 1px var(--kz-line);
  font-size: var(--kz-fs-sm);
  line-height: 1.45;
  color: var(--kz-ink-2);
}

.kz-pdchoice__rule .bi {
  margin-top: 1px;
  color: var(--kz-accent);
}

/* Said at the foot of every card, level across the row. */
.kz-pdchoice__go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
  font-size: var(--kz-fs-md);
  font-weight: 600;
  color: var(--kz-accent);
}

.kz-pdchoice__go .bi {
  transition: transform .15s ease;
}

.kz-pdchoice:hover .kz-pdchoice__go .bi,
.kz-pdchoice:focus-visible .kz-pdchoice__go .bi {
  transform: translateX(3px);
}

/* A cycle's six phases with their days. */
.kz-pdlist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kz-pdlist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--kz-line);
  font-size: var(--kz-fs-md);
}

.kz-pdlist li:first-child {
  padding-top: 0;
}

.kz-pdlist li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

/* A phase's number in a small tinted square — here, on the cycle's form and
   on a Kaizen project's plan. */
.kz-pdlist__n,
.kz-plan__n {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--kz-primary-050);
  color: var(--kz-accent-2);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kz-pdlist__name {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--kz-ink-2);
}

.kz-pdlist__v {
  font-weight: 600;
  color: var(--kz-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* --- The bar of phases ------------------------------------------------------
   One segment per phase, as long as its days, darkening phase by phase. The
   tints are mixed from the accent and the surface, so they hold in the dark
   mode too; the number on each is ink on the light four and white on the
   two dark ones, at 4.5:1 or better. A phase with no days yet is a short
   dashed stub. */
.kz-phasebar {
  display: flex;
  gap: 3px;
  height: 30px;
}

.kz-phasebar__seg {
  flex: 1 1 0;
  min-width: 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  transition: flex-grow .25s ease, background .15s ease;
}

.kz-phasebar__seg em {
  font-size: var(--kz-fs-xs);
  font-style: normal;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kz-phasebar__seg--1 { background: color-mix(in srgb, var(--kz-primary) 16%, var(--kz-surface)); color: var(--kz-ink); }
.kz-phasebar__seg--2 { background: color-mix(in srgb, var(--kz-primary) 28%, var(--kz-surface)); color: var(--kz-ink); }
.kz-phasebar__seg--3 { background: color-mix(in srgb, var(--kz-primary) 42%, var(--kz-surface)); color: var(--kz-ink); }
.kz-phasebar__seg--4 { background: color-mix(in srgb, var(--kz-primary) 56%, var(--kz-surface)); color: var(--kz-ink); }
.kz-phasebar__seg--5 { background: var(--kz-primary); color: var(--kz-on-primary); }
.kz-phasebar__seg--6 { background: var(--kz-primary-700); color: var(--kz-on-primary); }

.kz-phasebar__seg.is-open {
  flex: 0 0 34px;
  background: transparent;
  border: 1px dashed var(--kz-ink-4);
  color: var(--kz-ink-3);
}

@media (prefers-reduced-motion: reduce) {
  .kz-phasebar__seg {
    transition: none;
  }
}

/* --- A number of days ------------------------------------------------------
   The field says its unit inside it, at the far end, so a column of them
   reads as days without a label on each. The browser's spinner would sit on
   the unit; the arrow keys still count up and down. */
.kz-daysinput {
  position: relative;
}

.kz-daysinput .kz-input {
  padding-right: 58px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}

.kz-daysinput .kz-input::-webkit-inner-spin-button,
.kz-daysinput .kz-input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.kz-daysinput__unit {
  position: absolute;
  top: 50%;
  right: 13px;
  transform: translateY(-50%);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  pointer-events: none;
}

/* --- A cycle's form ---------------------------------------------------------- */
.kz-pdgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px 20px;
  margin-top: 24px;
}

.kz-pdgrid__label {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Kaizen projects to plan --------------------------------------------------
   One row per project and the whole row one link: what it is, how many of
   its phases are planned — a tick each — and when it is due to end. */
.kz-planlist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kz-planlist > li + li {
  border-top: 1px solid var(--kz-line-2);
}

.kz-planlist__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 170px 16px;
  align-items: center;
  gap: 12px 24px;
  padding: 16px 24px;
  color: inherit;
  text-decoration: none;
  transition: background .15s ease;
}

.kz-planlist > li:last-child .kz-planlist__row {
  border-radius: 0 0 var(--kz-r) var(--kz-r);
}

.kz-planlist__row:hover,
.kz-planlist__row:focus-visible {
  background: var(--kz-hover);
  color: inherit;
}

.kz-planlist__row:focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: -2px;
}

.kz-planlist__main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.kz-planlist__title {
  font-size: var(--kz-fs-base);
  font-weight: 600;
  line-height: 1.35;
  color: var(--kz-ink);
  transition: color .15s ease;
}

.kz-planlist__row:hover .kz-planlist__title,
.kz-planlist__row:focus-visible .kz-planlist__title {
  color: var(--kz-accent);
}

.kz-planlist__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-planlist__meta .bi {
  margin-right: 3px;
  color: var(--kz-ink-4);
}

.kz-planlist__plan,
.kz-planlist__end {
  display: grid;
  justify-items: start;
  gap: 6px;
}

.kz-planlist__end {
  font-size: var(--kz-fs-md);
  font-variant-numeric: tabular-nums;
}

.kz-planlist__k {
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-planlist__k.is-done {
  font-weight: 600;
  color: var(--kz-success-ink);
}

.kz-planlist__go {
  color: var(--kz-ink-4);
  transition: color .15s ease, transform .15s ease;
}

.kz-planlist__row:hover .kz-planlist__go,
.kz-planlist__row:focus-visible .kz-planlist__go {
  color: var(--kz-accent);
  transform: translateX(3px);
}

.kz-planmeter {
  display: inline-flex;
  gap: 3px;
}

.kz-planmeter__tick {
  width: 18px;
  height: 6px;
  border-radius: 3px;
  background: var(--kz-line-3);
}

.kz-planmeter__tick.is-on {
  background: var(--kz-primary);
}

/* Running past the day its phase was planned to end: a nudge, not a mark of
   lateness — that is the end date's, in red. */
.kz-tag--behind {
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
}

@container kz-screen (max-width: 767.98px) {
  .kz-planlist__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 14px 16px;
  }

  .kz-planlist__main {
    grid-column: 1 / -1;
  }

  .kz-planlist__go {
    display: none;
  }
}

/* --- A Kaizen project's plan --------------------------------------------------
   One row per phase: the phase, its days, the day it ends — the script's,
   another way to give the days — and the dates that come of them. The phase
   the project is on is marked in the accent; the ones it has left, in green.
   With scripting off the "ends on" column keeps its place, empty. */
.kz-planform__start {
  max-width: 280px;
  margin-bottom: 22px;
}

.kz-planform__rule {
  margin: 18px 0 0;
}

.kz-plan {
  margin-top: 22px;
}

.kz-plan__head,
.kz-plan__row {
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) minmax(112px, .8fr) minmax(148px, 1fr) minmax(176px, 1.2fr);
  align-items: center;
  gap: 10px 16px;
}

.kz-plan__head {
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--kz-line-2);
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--kz-ink-3);
}

.kz-plan__rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kz-plan__row {
  padding: 12px;
  border-bottom: 1px dashed var(--kz-line);
}

.kz-plan__row:last-child {
  border-bottom: 0;
}

.kz-plan__row.is-current {
  border-radius: var(--kz-r-sm);
  border-bottom-color: transparent;
  background: var(--kz-primary-050);
  box-shadow: inset 3px 0 0 var(--kz-primary);
}

.kz-plan__phase {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

.kz-plan__n {
  width: 26px;
  height: 26px;
  font-size: var(--kz-fs-sm);
}

.kz-plan__row.is-past .kz-plan__n {
  background: var(--kz-success-050);
  color: var(--kz-success-ink);
}

.kz-plan__name {
  font-size: var(--kz-fs-md);
  font-weight: 600;
  color: var(--kz-ink);
  cursor: pointer;
}

.kz-plan__dates {
  font-size: var(--kz-fs-md);
  font-variant-numeric: tabular-nums;
  color: var(--kz-ink-2);
}

.kz-plan__row > .kz-error,
.kz-plan__away {
  grid-column: 1 / -1;
  margin: 0;
}

.kz-plan__away {
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-plan__away .bi {
  margin-right: 4px;
  color: var(--kz-ink-4);
}

/* No day to end on before the phase has a day to start on. */
.kz-plan__until .kz-input:disabled {
  background: var(--kz-soft);
  border-style: dashed;
  color: var(--kz-ink-4);
  cursor: not-allowed;
}

.kz-planform:not(.is-live) .kz-plan__until {
  visibility: hidden;
}

@container kz-screen (max-width: 767.98px) {
  .kz-planform__start {
    max-width: none;
  }

  .kz-plan__head {
    display: none;
  }

  .kz-plan__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 14px 10px;
  }

  .kz-plan__phase,
  .kz-plan__dates {
    grid-column: 1 / -1;
  }
}

/* On a Kaizen project's page: each phase with its dates under its name, the
   one the project is on filled in the accent, the ones it has left in green. */
.kz-kv + .kz-pdlist {
  margin-top: 14px;
}

.kz-pdlist--dated li {
  align-items: flex-start;
}

.kz-pdlist__dates {
  display: block;
  margin-top: 2px;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
  font-variant-numeric: tabular-nums;
}

.kz-pdlist li.is-current .kz-pdlist__n {
  background: var(--kz-primary);
  color: var(--kz-white);
}

.kz-pdlist li.is-current .kz-pdlist__name {
  font-weight: 600;
  color: var(--kz-ink);
}

.kz-pdlist li.is-past .kz-pdlist__n {
  background: var(--kz-success-050);
  color: var(--kz-success-ink);
}


/* ==========================================================================
   My day — a person's own list for the day
   The Tasks page's third view (and a participant's own page). The day with
   its week on top; under it, in amber, what was left unfinished earlier;
   then the sheet: how far the day has got, the box new lines are written
   in, and the lines — each crossed through as it is ticked off, the line
   drawn across the words the way it is on paper.

   kaizen.js marks the panel's holder .kz-day-live once it drives it: only
   then are there handles to drag, and actions folded away on a phone.
   ========================================================================== */

/* --- The day, and its week ------------------------------------------------- */

.kz-day__top {
  padding: 18px 20px 14px;
}

.kz-day__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 16px;
}

.kz-day__when {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.kz-day__called {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--kz-info-050);
  color: var(--kz-info-ink);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.kz-day__called.is-today {
  background: var(--kz-primary-050);
  color: var(--kz-accent-2);
}

.kz-day__called.is-past {
  background: var(--kz-soft);
  box-shadow: inset 0 0 0 1px var(--kz-line);
  color: var(--kz-ink-3);
}

.kz-day__date {
  margin: 0;
  font-size: var(--kz-fs-2xl);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--kz-ink);
}

.kz-day__nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Kept in its place on today, only put out of use: the arrows either side
   of it stay under the hand, and it reads as where the page already is. */
.kz-day__nav .kz-btn.is-idle {
  opacity: .5;
  pointer-events: none;
}

.kz-week {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.kz-week__day {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 4px 9px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
  color: var(--kz-ink-2);
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.kz-week__day:hover,
.kz-week__day:focus-visible {
  border-color: var(--kz-primary);
}

.kz-week__day:focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-week__dow {
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--kz-ink-3);
}

.kz-week__num {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--kz-ink);
  font-variant-numeric: tabular-nums;
}

.kz-week__tally {
  min-height: 16px;
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  line-height: 16px;
  color: var(--kz-ink-3);
  font-variant-numeric: tabular-nums;
}

.kz-week__bar {
  width: 70%;
  height: 3px;
  border-radius: 3px;
  background: var(--kz-line-2);
  overflow: hidden;
}

.kz-week__bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--kz-primary);
}

/* Done to the last line: green. A day that is over with something left on
   it: amber — it is waiting on today's list. */
.kz-week__day.is-all .kz-week__tally { color: var(--kz-success-ink); }
.kz-week__day.is-all .kz-week__bar > span { background: var(--kz-success); }
.kz-week__day.is-left .kz-week__tally { color: var(--kz-warning-ink); }
.kz-week__day.is-left .kz-week__bar > span { background: var(--kz-warning); }

/* Today wears the accent round its edge; the day on screen is filled. */
.kz-week__day.is-today {
  border-color: var(--kz-primary);
  box-shadow: inset 0 0 0 1px var(--kz-primary);
}

.kz-week__day.is-today .kz-week__num {
  color: var(--kz-accent);
}

.kz-week__day.is-shown {
  border-color: var(--kz-primary);
  background: var(--kz-primary);
  box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--kz-primary) 60%, transparent);
}

.kz-week__day.is-shown :is(.kz-week__dow, .kz-week__num, .kz-week__tally) {
  color: var(--kz-white);
}

.kz-week__day.is-shown .kz-week__bar {
  background: color-mix(in srgb, var(--kz-white) 30%, transparent);
}

.kz-week__day.is-shown .kz-week__bar > span {
  background: var(--kz-white);
}

.kz-week__sum {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-week__sum .bi {
  color: var(--kz-ink-4);
}

/* --- Not finished earlier --------------------------------------------------- */

.kz-day__left {
  padding: 16px 18px 12px;
  border-left: 3px solid var(--kz-warning);
}

.kz-day__lefthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin-bottom: 8px;
}

.kz-day__lefticon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
  font-size: 17px;
}

.kz-day__lefttext {
  flex: 1 1 240px;
  min-width: 0;
}

.kz-day__lefttitle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: var(--kz-fs-lg);
  font-weight: 700;
  color: var(--kz-ink);
}

.kz-day__leftn {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--kz-warning);
  color: var(--kz-warning-on);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kz-day__leftsub {
  margin: 3px 0 0;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-day__carry {
  flex: 0 0 auto;
  margin: 0;
}

/* --- The sheet: how far, the box, the lines --------------------------------- */

.kz-day__sheet {
  padding: 18px 20px 20px;
}

.kz-day__progress {
  margin-bottom: 14px;
}

.kz-day__progress[data-state="empty"] {
  display: none;
}

.kz-day__score {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0 0 8px;
  font-size: var(--kz-fs-md);
  font-weight: 600;
  color: var(--kz-ink-2);
}

.kz-day__tally {
  color: var(--kz-ink);
  font-variant-numeric: tabular-nums;
}

.kz-day__tally b {
  font-size: var(--kz-fs-2xl);
  font-weight: 800;
  transition: color .3s ease;
}

.kz-day__of {
  font-size: var(--kz-fs-lg);
  font-weight: 700;
  color: var(--kz-ink-3);
}

.kz-day__say {
  display: none;
}

[data-state="going"] .kz-day__say--going,
[data-state="all"] .kz-day__say--all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kz-day__say--all {
  color: var(--kz-success-ink);
}

.kz-day__pct {
  margin-left: auto;
  font-size: var(--kz-fs-sm);
  font-weight: 700;
  color: var(--kz-ink-3);
  font-variant-numeric: tabular-nums;
}

.kz-day__bar {
  height: 8px;
  border-radius: 8px;
  background: var(--kz-line-2);
  overflow: hidden;
}

.kz-day__bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--kz-primary);
  transition: width .45s cubic-bezier(.2, .8, .2, 1), background-color .3s ease;
}

[data-state="all"] .kz-day__bar > span { background: var(--kz-success); }
[data-state="all"] .kz-day__tally b { color: var(--kz-success-ink); }

/* The last line of the day ticked off: the stars go up once. */
.kz-day__progress.is-cheering .kz-day__say--all .bi {
  animation: kz-day-cheer .9s ease-out;
}

@keyframes kz-day-cheer {
  0%   { opacity: 0; transform: scale(.4) rotate(-30deg); }
  60%  { opacity: 1; transform: scale(1.4) rotate(12deg); }
  100% { transform: none; }
}

.kz-day__add {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  padding: 6px 6px 6px 14px;
  border: 1px dashed var(--kz-line-3);
  border-radius: var(--kz-r);
  background: var(--kz-soft);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.kz-day__add:focus-within {
  border-style: solid;
  border-color: var(--kz-primary);
  background: var(--kz-surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-primary) 14%, transparent);
}

.kz-day__addicon {
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-lg);
  transition: color .15s ease;
}

.kz-day__add:focus-within .kz-day__addicon {
  color: var(--kz-accent);
}

.kz-day__addinput {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--kz-ink);
  font: inherit;
  font-size: var(--kz-fs-base);
}

.kz-day__addinput::placeholder {
  color: var(--kz-ink-3);
}

/* The box around it shows the focus; the field inside wears no ring of its
   own (section 20 gives every field one). */
.kz-day__add .kz-day__addinput:focus,
.kz-day__add .kz-day__addinput:focus-visible {
  outline: none;
}

.kz-day__addbtn {
  flex: 0 0 auto;
}

.kz-day__adderror {
  display: block;
  margin: 0 0 8px 4px;
}

.kz-day__over {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  padding: 10px 14px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-soft);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
}

.kz-day__over .bi {
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-lg);
}

.kz-day__empty {
  padding: 26px 16px 10px;
}

/* --- One line ---------------------------------------------------------------
   Four columns, each control in its own whatever is shown: the handle, the
   tick, the words, the actions. Placed by column rather than by order, so a
   handle that is not there (no scripting, or a line offered from an earlier
   day) leaves its column empty instead of pulling the rest one along. */

/* --- Everything, what is left, or what is done (kaizen.js, data-showing) ------- */
.kz-day__show {
  display: none;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 12px;
}

.kz-day-live .kz-day__show {
  display: flex;
}

/* Over a list with lines on it only. */
.kz-day-live .kz-day__show:has(+ [data-day-live="list"] [data-day-empty]:not([hidden])) {
  display: none;
}

button.kz-fchip {
  padding-right: 11px;
  cursor: pointer;
}

button.kz-fchip:hover {
  border-color: var(--kz-psc);
  color: var(--kz-ink);
}

button.kz-fchip:focus-visible {
  outline: 2px solid var(--kz-psc);
  outline-offset: 2px;
}

.kz-day[data-showing="left"] [data-day-list] > .kz-day__item.is-done,
.kz-day[data-showing="done"] [data-day-list] > .kz-day__item:not(.is-done) {
  display: none;
}

/* Part of the list is out of sight, so its order cannot be arranged. */
.kz-day[data-showing="left"] [data-day-list] .kz-day__grip,
.kz-day[data-showing="done"] [data-day-list] .kz-day__grip {
  visibility: hidden;
}

.kz-day__none {
  display: none;
}

.kz-day[data-showing="left"] [data-day-list]:has(> .kz-day__item):not(:has(> .kz-day__item:not(.is-done))) ~ .kz-day__none,
.kz-day[data-showing="done"] [data-day-list]:has(> .kz-day__item):not(:has(> .kz-day__item.is-done)) ~ .kz-day__none {
  display: block;
}

.kz-day__list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
}

.kz-day__list:empty {
  margin: 0;
}

.kz-day__list--left {
  margin: 0;
}

.kz-day__item {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  padding: 7px 6px 7px 2px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
  transition: background .15s ease, box-shadow .15s ease, opacity .2s ease, transform .2s ease;
}

/* Rows apart by a dashed rule, as the template separates lines. */
.kz-day__item + .kz-day__item::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 6px;
  left: 44px;
  border-top: 1px dashed var(--kz-line);
  pointer-events: none;
}

.kz-day__item:hover {
  background: var(--kz-hover);
}

.kz-day__list--left .kz-day__item {
  grid-template-columns: 0 auto minmax(0, 1fr) auto;
  padding-left: 0;
}

.kz-day__grip {
  grid-column: 1;
  display: none;
  place-items: center;
  width: 22px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--kz-ink-4);
  font-size: var(--kz-fs-lg);
  cursor: grab;
  opacity: 0;
  /* A finger on the handle moves the line, not the page. */
  touch-action: none;
  transition: opacity .15s ease, color .15s ease, background .15s ease;
}

.kz-day-live .kz-day__grip {
  display: grid;
}

.kz-day__item:hover .kz-day__grip,
.kz-day__grip:focus-visible {
  opacity: 1;
}

.kz-day__grip:hover {
  background: var(--kz-line-2);
  color: var(--kz-ink-2);
}

.kz-day__grip:focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 1px;
}

.kz-day__tick {
  grid-column: 2;
  margin: 0;
}

.kz-day__check {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid var(--kz-ink-4);
  border-radius: 50%;
  background: var(--kz-surface);
  color: transparent;
  font-size: var(--kz-fs-base);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.kz-day__check .bi {
  line-height: 1;
  transform: scale(.4);
  transition: transform .22s cubic-bezier(.3, 1.6, .5, 1);
}

/* Pointed at: the tick it is about to become, faintly. */
.kz-day__check:hover {
  border-color: var(--kz-success-solid);
  color: var(--kz-success-solid);
}

.kz-day__check:hover .bi {
  transform: scale(.8);
}

.kz-day__item .kz-day__check:focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 2px;
  border-radius: 50%;
}

.kz-day__item.is-done .kz-day__check {
  border-color: var(--kz-success-solid);
  background: var(--kz-success-solid);
  color: var(--kz-white);
}

.kz-day__item.is-done .kz-day__check .bi {
  transform: none;
}

/* The moment it is ticked, a ring goes out from it. */
.kz-day__check::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  pointer-events: none;
}

.kz-day__item.is-ticking .kz-day__check::after {
  animation: kz-day-ring .6s ease-out;
}

@keyframes kz-day-ring {
  from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--kz-success) 50%, transparent); }
  to   { box-shadow: 0 0 0 12px color-mix(in srgb, var(--kz-success) 0%, transparent); }
}

/* A block, so the words in it stay inline: the line through them is drawn
   on each line they wrap onto, which a flex item — laid out as one box —
   would draw once, between the lines. */
.kz-day__main {
  grid-column: 3;
  min-width: 0;
}

/* The words, and the line through them: a rule as wide as nothing until the
   line is ticked off, then drawn across from the left, on every line the
   words wrap onto. */
.kz-day__text {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  color: var(--kz-ink);
  font-size: var(--kz-fs-base);
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: anywhere;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 58%;
  background-size: 0 2px;
  transition: background-size .35s cubic-bezier(.4, 0, .2, 1), color .3s ease;
}

.kz-day__item.is-done .kz-day__text {
  color: var(--kz-ink-3);
  background-size: 100% 2px;
}

/* Where backgrounds are not drawn (Windows' contrast themes), a plain
   strike-through says the same. */
@media (forced-colors: active) {
  .kz-day__item.is-done .kz-day__text {
    text-decoration: line-through;
  }
}

.kz-day__meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-left: 8px;
  vertical-align: 1px;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
}

.kz-day__from,
.kz-day__at {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.kz-day__from {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
}

.kz-day__at {
  color: var(--kz-success-ink);
  font-variant-numeric: tabular-nums;
}

.kz-day__editor {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.kz-day__editinput {
  flex: 1 1 220px;
  min-width: 0;
  padding: 7px 11px;
  font-size: var(--kz-fs-base);
}

.kz-day__editor .kz-error {
  flex-basis: 100%;
}

.kz-day__item.is-editing {
  background: var(--kz-primary-050);
}

.kz-day__item.is-editing :is(.kz-day__text, .kz-day__meta, .kz-day__actions, .kz-day__more) {
  display: none;
}

/* The actions come forward with the pointer — or with the keyboard — so
   a list of twenty lines does not read as sixty buttons. */
.kz-day__actions {
  grid-column: 4;
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity .15s ease;
}

.kz-day__actions form {
  margin: 0;
}

.kz-day__item:hover .kz-day__actions,
.kz-day__item:focus-within .kz-day__actions,
.kz-day__list--left .kz-day__actions {
  opacity: 1;
}

@media (hover: none) {
  .kz-day__actions,
  .kz-day__grip {
    opacity: 1;
  }
}

.kz-day__act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--kz-ink-3);
  font-family: inherit;
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.kz-day__act:hover,
.kz-day__act:focus-visible {
  background: var(--kz-primary-050);
  color: var(--kz-accent);
}

.kz-day__act:focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 1px;
}

.kz-day__act--danger:hover,
.kz-day__act--danger:focus-visible {
  background: var(--kz-danger-050);
  color: var(--kz-danger-ink);
}

/* "Today", on a line from another day: the one thing it is offered for. */
.kz-day__act--bring {
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
}

.kz-day__more {
  grid-column: 4;
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-lg);
  cursor: pointer;
}

.kz-day__more[aria-expanded="true"] {
  background: var(--kz-primary-050);
  color: var(--kz-accent);
}

@media (pointer: coarse) {
  .kz-day__check {
    width: 28px;
    height: 28px;
  }

  .kz-day__act {
    min-width: 36px;
    height: 36px;
  }

  .kz-day__grip {
    width: 28px;
    height: 36px;
  }
}

/* Another day on its way. */
.kz-day-live[aria-busy="true"] .kz-day {
  opacity: .6;
  transition: opacity .15s ease .1s;
}

/* --- A line on its way ---------------------------------------------------- */

/* Written, and being saved. */
.kz-day__item.is-pending {
  opacity: .65;
}

.kz-day__item.is-pending .kz-day__check {
  border-style: dashed;
  animation: kz-day-wait 1.2s linear infinite;
}

@keyframes kz-day-wait {
  to { transform: rotate(360deg); }
}

/* Just arrived on the list. */
.kz-day__item.is-new {
  animation: kz-day-in .5s ease-out;
}

@keyframes kz-day-in {
  from { background: var(--kz-primary-050); }
  to   { background: var(--kz-surface); }
}

/* Taken up by its handle. */
.kz-day__item.is-dragging {
  z-index: 2;
  background: var(--kz-surface);
  box-shadow: 0 0 0 1px var(--kz-primary), 0 14px 28px -12px color-mix(in srgb, var(--kz-shade) 40%, transparent);
  cursor: grabbing;
}

.kz-day__item.is-dragging::before {
  display: none;
}

.kz-day__item.is-dragging .kz-day__grip {
  opacity: 1;
  color: var(--kz-accent);
  cursor: grabbing;
}

/* Removed or moved to another day: it goes before the server has answered. */
.kz-day__item.is-leaving {
  opacity: 0;
  transform: translateX(14px);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .kz-day__text,
  .kz-day__bar > span,
  .kz-day__item {
    transition: none;
  }

  .kz-day__item.is-ticking .kz-day__check::after,
  .kz-day__progress.is-cheering .kz-day__say--all .bi,
  .kz-day__item.is-new,
  .kz-day__item.is-pending .kz-day__check {
    animation: none;
  }
}

/* --- Narrow screens --------------------------------------------------------- */

@container kz-screen (max-width: 575.98px) {
  .kz-day__top,
  .kz-day__sheet {
    padding: 14px;
  }

  .kz-day__left {
    padding: 14px 14px 10px;
  }

  .kz-day__date {
    font-size: var(--kz-fs-xl);
  }

  .kz-week {
    gap: 4px;
  }

  .kz-week__day {
    padding: 6px 2px 7px;
  }

  .kz-week__num {
    font-size: var(--kz-fs-lg);
  }

  .kz-week__tally {
    font-size: var(--kz-fs-xs);
  }

  .kz-day__carry,
  .kz-day__carry .kz-btn {
    width: 100%;
  }

  /* All the room to the words being written. */
  .kz-day__add {
    padding-left: 12px;
  }

  .kz-day__addicon,
  .kz-day__addlabel {
    display: none;
  }

  /* The actions fold away under "…", and open on a line of their own
     under the words. Without scripting there is no "…": they stay open. */
  .kz-day-live .kz-day__more {
    display: grid;
  }

  .kz-day-live .kz-day__actions {
    display: none;
    grid-column: 3 / -1;
    flex-wrap: wrap;
    margin-left: -8px;
  }

  .kz-day-live .kz-day__item.is-open .kz-day__actions,
  .kz-day-live .kz-day__list--left .kz-day__actions {
    display: flex;
  }

  .kz-day__actions {
    grid-column: 3 / -1;
  }

  .kz-day__item + .kz-day__item::before {
    left: 36px;
  }
}

/* ==========================================================================
   Pre-session — the year of sessions, day after day
   A calendar that is not a month at a time: every day a column, the months
   running into each other with no break, scrolled sideways for as long as
   there are days. A month's name stays in view over its days. Each kind of
   session has a colour of its own (.kz-pre--main / --support / --weekly set
   --kz-kind and its shades): a registered session is filled in with it, a
   sticker only planned so far is outlined in it, dashed.
   ========================================================================== */

.kz-pre--main {
  --kz-kind: var(--kz-primary);
  --kz-kind-050: var(--kz-primary-050);
  --kz-kind-ink: var(--kz-accent-2);
}

.kz-pre--support {
  --kz-kind: var(--kz-info);
  --kz-kind-050: var(--kz-info-050);
  --kz-kind-ink: var(--kz-info-ink);
}

.kz-pre--weekly {
  --kz-kind: var(--kz-success-solid);
  --kz-kind-050: var(--kz-success-050);
  --kz-kind-ink: var(--kz-success-ink);
}

/* The weekly session's badge on the schedule and a session's page. */
.kz-badge--weekly {
  background: var(--kz-success-050);
  color: var(--kz-success-ink);
}

.kz-schedviews {
  margin-bottom: 18px;
}

/* --- The panel: the bar, the calendar, what the colours mean -----------------
   One card: the way about and the stickers along the top, the calendar under
   them, and what the colours mean along the bottom. */

.kz-pre {
  --kz-pre-day: 120px;
  --kz-pre-head-w: 212px;
  --kz-pre-line-min: 96px;
  --kz-pre-weekend: color-mix(in srgb, var(--kz-ink) 2.5%, var(--kz-surface));
  --kz-pre-today: color-mix(in srgb, var(--kz-accent) 7%, var(--kz-surface));
  --kz-pre-hover: color-mix(in srgb, var(--kz-accent) 3.5%, transparent);
  margin-bottom: 18px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r-lg);
  background: var(--kz-surface);
  box-shadow: var(--kz-shadow);
}

.kz-pre__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--kz-line);
}

.kz-pre__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* A week back, today, a week on: one control. */
.kz-pre__navgroup {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--kz-line-3);
  border-radius: 10px;
  background: var(--kz-surface);
}

.kz-pre__navbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 38px;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.kz-pre__navbtn + .kz-pre__navbtn {
  border-left: 1px solid var(--kz-line-3);
}

.kz-pre__navbtn:hover,
.kz-pre__navbtn:focus-visible {
  background: var(--kz-primary-050);
  color: var(--kz-accent);
}

.kz-pre__navbtn:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: -3px;
}

.kz-pre__navtoday {
  padding: 0 14px;
  color: var(--kz-accent);
}

.kz-pre__jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.kz-pre__jump .kz-input {
  width: auto;
  min-height: 38px;
  padding-top: 4px;
  padding-bottom: 4px;
  border-radius: 10px;
  font-size: var(--kz-fs-md);
}

.kz-pre__palette {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.kz-pre__palettelabel {
  margin-right: 2px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
}

/* A sticker to stick: outlined in its kind's colour, the way it will look on
   the calendar; picked up (clicked), it is filled in until it is put down. */
.kz-pre__sticker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1.5px dashed var(--kz-kind);
  border-radius: 999px;
  background: var(--kz-kind-050);
  color: var(--kz-kind-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  text-decoration: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.kz-pre__sticker:hover,
.kz-pre__sticker:focus-visible {
  color: var(--kz-kind-ink);
  box-shadow: 0 6px 16px -10px var(--kz-kind);
  transform: translateY(-1px);
}

.kz-pre__sticker:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-pre__sticker[aria-pressed="true"] {
  border-style: solid;
  background: var(--kz-kind);
  color: var(--kz-white);
}

/* While a sticker is in hand: how to put it down. */
.kz-pre__hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 16px;
  border-bottom: 1px dashed var(--kz-kind, var(--kz-accent));
  background: var(--kz-kind-050, var(--kz-primary-050));
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
}

/* What the colours and the two looks mean, along the bottom. */
.kz-pre__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 11px 16px;
  border-top: 1px solid var(--kz-line);
  list-style: none;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
}

.kz-pre__legend li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.kz-pre__swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--kz-kind, var(--kz-ink-4));
}

.kz-pre__swatch--plan {
  border: 1.5px dashed var(--kz-ink-3);
  background: transparent;
}

.kz-pre__swatch--done {
  border-left: 3px solid var(--kz-ink-3);
  background: color-mix(in srgb, var(--kz-ink-3) 22%, transparent);
}

/* --- The calendar -------------------------------------------------------------
   One grid, scrolled sideways: its rows are the month's name, the days, and a
   row for each of SAFIA's lines, and every month shares them (subgrid), so a
   line's name on the left stays level with its row in every month however
   tall a month makes it. The names stay at the left edge as the days go by
   under them. */

/* Positioned, so the days measure their place along it (presession.js).
   Sideways only: the page itself scrolls down past it, and a sideways swipe
   on a touchpad goes no further than its ends — never back a page. */
.kz-pre__strip {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--kz-line-3) transparent;
}

.kz-pre__strip::-webkit-scrollbar {
  height: 10px;
}

.kz-pre__strip::-webkit-scrollbar-thumb {
  border: 2px solid var(--kz-surface);
  border-radius: 999px;
  background: var(--kz-line-3);
}

.kz-pre__strip::-webkit-scrollbar-thumb:hover {
  background: var(--kz-ink-4);
}

.kz-pre__strip:focus-visible {
  outline: 3px solid var(--kz-focus);
  outline-offset: -3px;
}

.kz-pre__track {
  display: grid;
  grid-template-rows: auto auto repeat(var(--kz-pre-lines, 4), minmax(var(--kz-pre-line-min), auto));
  grid-auto-columns: max-content;
  grid-auto-flow: column;
  width: max-content;
  min-width: 100%;
}

.kz-pre__heads,
.kz-pre__more,
.kz-pre__month {
  grid-row: 1 / -1;
}

/* --- The lines' names --------------------------------------------------------- */

.kz-pre__heads {
  position: sticky;
  left: 0;
  z-index: 4;
  display: grid;
  grid-template-rows: subgrid;
  width: var(--kz-pre-head-w);
  border-right: 1px solid var(--kz-line);
  background: var(--kz-surface);
  box-shadow: 10px 0 16px -14px color-mix(in srgb, var(--kz-shade) 45%, transparent);
}

.kz-pre__corner {
  grid-row: 1 / 3;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--kz-line);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.kz-pre__corner .bi {
  font-size: var(--kz-fs-base);
}

.kz-pre__linehead {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--kz-line);
  transition: background .15s ease;
}

.kz-pre__linehead:last-child {
  border-bottom-color: transparent;
}

.kz-pre__linename {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}

.kz-pre__lineclient {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .08em;
}

.kz-pre__linelabel {
  color: var(--kz-ink);
  font-size: var(--kz-fs-base);
  font-weight: 700;
}

.kz-pre__linecycle {
  margin-top: 2px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
}

/* A line's mark, here and wherever a line is picked. */
.kz-line__badge {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--kz-line-050);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--kz-line-ink) 16%, transparent);
  color: var(--kz-line-ink);
  font-size: 17px;
}

.kz-line--manufacturing {
  --kz-line-050: var(--kz-primary-050);
  --kz-line-ink: var(--kz-accent-2);
}

.kz-line--retail {
  --kz-line-050: var(--kz-warning-050);
  --kz-line-ink: var(--kz-warning-ink);
}

.kz-line--ai {
  --kz-line-050: var(--kz-success-050);
  --kz-line-ink: var(--kz-success-ink);
}

.kz-line--support {
  --kz-line-050: var(--kz-info-050);
  --kz-line-ink: var(--kz-info-ink);
}

/* The line the pointer is over, its name lit as well. */
.kz-pre__track:has(.kz-pre__line.kz-line--manufacturing:hover) .kz-pre__linehead.kz-line--manufacturing,
.kz-pre__track:has(.kz-pre__line.kz-line--retail:hover) .kz-pre__linehead.kz-line--retail,
.kz-pre__track:has(.kz-pre__line.kz-line--ai:hover) .kz-pre__linehead.kz-line--ai,
.kz-pre__track:has(.kz-pre__line.kz-line--support:hover) .kz-pre__linehead.kz-line--support {
  background: color-mix(in srgb, var(--kz-accent) 5%, var(--kz-surface));
}

/* The ends: where the calendar pages on without scripting, and where it
   loads more months, on its own, as they come into view with it. */
.kz-pre__more {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 96px;
  background: var(--kz-soft);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  text-decoration: none;
}

.kz-pre__more:hover,
.kz-pre__more:focus-visible {
  background: var(--kz-primary-050);
  color: var(--kz-accent);
}

.kz-pre__more.is-loading .bi {
  animation: kz-pre-pulse 1s ease-in-out infinite;
}

@keyframes kz-pre-pulse {
  50% { opacity: .3; }
}

/* --- A month ------------------------------------------------------------------ */

.kz-pre__month {
  display: grid;
  grid-template-columns: repeat(var(--kz-pre-days, 30), var(--kz-pre-day));
  grid-template-rows: subgrid;
}

.kz-pre__monthhead {
  grid-row: 1;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  min-width: 0;
  border-left: 2px solid var(--kz-line-3);
}

/* The month's name, kept just right of the lines' names for as long as its
   days are in view, and pushed on by the next month's. */
.kz-pre__monthtag {
  position: sticky;
  left: var(--kz-pre-head-w);
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  /* No wider than the calendar is on the screen, so its counts wrap under
     the name rather than run off the edge. */
  max-width: calc(100vw / var(--kz-zoom) - var(--kz-pre-head-w) - 96px);
  padding: 12px 16px 8px;
}

.kz-pre__monthname {
  margin: 0;
  color: var(--kz-ink);
  font-size: var(--kz-fs-lg);
  font-weight: 700;
  white-space: nowrap;
}

.kz-pre__monthsum {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kz-pre__monthkind,
.kz-pre__monthdone {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px 2px 7px;
  border-radius: 999px;
  font-weight: 600;
}

.kz-pre__monthkind {
  background: var(--kz-kind-050);
  color: var(--kz-kind-ink);
}

.kz-pre__monthkind .kz-pre__swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.kz-pre__monthdone {
  background: var(--kz-soft);
  box-shadow: inset 0 0 0 1px var(--kz-line);
}

/* A day's heading: its weekday over its number, today's ringed. The first of
   a month draws the line between months, down through every line. */
.kz-pre__day {
  position: relative;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 2px 9px;
  border-top: 1px solid var(--kz-line);
  border-bottom: 1px solid var(--kz-line);
  border-left: 1px solid var(--kz-line-2);
  scroll-margin-left: calc(var(--kz-pre-head-w) + 24px);
}

.kz-pre__weekday {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.kz-pre__date {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--kz-ink);
  font-size: var(--kz-fs-lg);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kz-pre__day.is-weekend .kz-pre__weekday,
.kz-pre__day.is-weekend .kz-pre__date {
  color: var(--kz-danger-ink);
}

.kz-pre__day.is-past .kz-pre__weekday,
.kz-pre__day.is-past .kz-pre__date {
  color: var(--kz-ink-4);
}

.kz-pre__day.is-today .kz-pre__weekday {
  color: var(--kz-accent);
}

.kz-pre__day.is-today .kz-pre__date {
  background: var(--kz-primary);
  box-shadow: 0 6px 14px -6px var(--kz-primary);
  color: var(--kz-on-primary);
}

/* "Today", for whoever hears the calendar: the ring says it to the eye. */
.kz-pre__todaymark {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The day's column, under its heading and through every line. */
.kz-pre__col {
  grid-row: 3 / -1;
  border-left: 1px solid var(--kz-line-2);
}

.kz-pre__day.is-first,
.kz-pre__col.is-first {
  border-left: 2px solid var(--kz-line-3);
}

.kz-pre__day.is-weekend,
.kz-pre__col.is-weekend {
  background: var(--kz-pre-weekend);
}

.kz-pre__day.is-today,
.kz-pre__col.is-today {
  background: var(--kz-pre-today);
}

.kz-pre__col.is-today {
  box-shadow: inset 2px 0 0 color-mix(in srgb, var(--kz-accent) 75%, transparent);
}

/* The day's "+": there to be found on the day the pointer is on, always there
   on a touch screen, which has no pointer to show it. */
.kz-pre__add {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px dashed var(--kz-line-3);
  border-radius: 7px;
  background: var(--kz-surface);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  text-decoration: none;
  opacity: 0;
  transition: opacity .15s ease, background .15s ease, color .15s ease;
}

.kz-pre__day:hover .kz-pre__add,
.kz-pre__add:focus-visible {
  opacity: 1;
}

.kz-pre__add:hover,
.kz-pre__add:focus-visible {
  border-color: var(--kz-accent);
  background: var(--kz-primary-050);
  color: var(--kz-accent);
}

@media (hover: none) {
  .kz-pre__add {
    opacity: .7;
  }
}

/* --- A line in a month -------------------------------------------------------------
   What is on it in lanes, one over the other where two share a day, and
   room under the last lane to put another down. */
.kz-pre__line {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(var(--kz-pre-days, 30), var(--kz-pre-day));
  grid-template-rows: repeat(var(--kz-pre-lanes, 1), auto) minmax(12px, 1fr);
  row-gap: 6px;
  padding-top: 9px;
  border-bottom: 1px solid var(--kz-line);
  transition: background .15s ease;
}

.kz-pre__line:last-child {
  border-bottom-color: transparent;
}

.kz-pre__line:hover {
  background: var(--kz-pre-hover);
}

/* --- What is on a line ------------------------------------------------------------ */

.kz-pre__chip {
  position: relative;
  z-index: 1;
  /* Its own height, not its lane's: the two pieces of one running into the
     next month then look alike. */
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 3px;
  /* Reached by the keyboard, it is scrolled clear of the lines' names. */
  scroll-margin-left: calc(var(--kz-pre-head-w) + 12px);
  min-width: 0;
  margin: 0 5px;
  padding: 7px 10px 8px;
  border-radius: 10px;
  color: var(--kz-ink);
  font-size: var(--kz-fs-sm);
  line-height: 1.35;
  text-decoration: none;
  /* Broken between words, and inside one only where it is longer than the
     day is wide. */
  overflow-wrap: break-word;
  hyphens: auto;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: box-shadow .18s ease, transform .18s ease, opacity .15s ease;
}

.kz-pre__chip:hover,
.kz-pre__chip:focus-visible,
.kz-pre__chip:focus-within {
  color: var(--kz-ink);
  box-shadow: 0 10px 22px -14px var(--kz-kind), 0 1px 2px color-mix(in srgb, var(--kz-shade) 6%, transparent);
  transform: translateY(-1px);
}

a.kz-pre__chip:focus-visible,
.kz-pre__chip:has(.kz-pre__chiplink:focus-visible) {
  outline: 3px solid var(--kz-focus);
  outline-offset: 1px;
}

/* Registered: filled in with the kind's colour, a line down its side. */
.kz-pre__chip--session {
  border: 1px solid color-mix(in srgb, var(--kz-kind) 20%, transparent);
  border-left: 3px solid var(--kz-kind);
  background: var(--kz-kind-050);
}

/* The bar opens its session: its title's link reaches over all of it; each
   day's hours sit above, a link of their own. */
.kz-pre__chiplink {
  color: inherit;
  text-decoration: none;
}

.kz-pre__chiplink:hover,
.kz-pre__chiplink:focus {
  color: inherit;
}

.kz-pre__chiplink:focus-visible {
  outline: none;
}

.kz-pre__chiplink::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* Planned: a sticker, outlined and dashed, waiting to be registered. */
.kz-pre__chip--plan {
  border: 1.5px dashed color-mix(in srgb, var(--kz-kind) 75%, transparent);
  background: color-mix(in srgb, var(--kz-kind) 4%, var(--kz-surface));
}

a.kz-pre__chip--plan {
  cursor: grab;
}

.kz-pre__chip.is-dragging {
  opacity: .35;
}

/* Its first day went by and nobody registered it. */
.kz-pre__chip.is-late {
  border-color: var(--kz-danger);
  background: var(--kz-danger-050);
}

/* Running on from the month before, or on into the next: open on that side,
   as it is not where it starts or ends. */
.kz-pre__chip.is-from-before {
  margin-left: 0;
  border-left-style: none;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.kz-pre__chip.is-on-after {
  margin-right: 0;
  border-right-style: none;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.kz-pre__chipkind {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  color: var(--kz-kind-ink);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
}

.kz-pre__chipkind > .bi {
  margin-right: -2px;
}

/* A day wide, the kind is told by its colour and its mark; its name is
   there for whoever hears the calendar, and on the pointer. */
.kz-pre__chip.is-narrow .kz-pre__chipname {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* How many days it runs, beside its kind. */
.kz-pre__chipdays {
  display: inline-block;
  padding: 0 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--kz-kind) 15%, transparent);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  white-space: nowrap;
}

.kz-pre__chiptitle {
  font-size: var(--kz-fs-sm);
  font-weight: 650;
  line-height: 1.3;
}

.kz-pre__chipproject {
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-xs);
}

.kz-pre__chipproject.is-unset {
  color: var(--kz-ink-3);
  font-style: italic;
}

/* Each day's hours, under its own day. */
.kz-pre__chipslots {
  display: grid;
  gap: 4px;
  margin-top: 2px;
}

.kz-pre__chiptime,
.kz-pre__chiplate {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-variant-numeric: tabular-nums;
}

a.kz-pre__chiptime {
  position: relative;
  z-index: 1;
  justify-self: start;
  margin: -2px -4px;
  padding: 2px 4px;
  border-radius: 6px;
  text-decoration: none;
}

a.kz-pre__chiptime:hover,
a.kz-pre__chiptime:focus-visible {
  background: color-mix(in srgb, var(--kz-kind) 14%, transparent);
  color: var(--kz-kind-ink);
}

.kz-pre__chiplate {
  align-self: flex-start;
  padding: 1px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--kz-danger) 12%, transparent);
  color: var(--kz-danger-ink);
  font-size: var(--kz-fs-xs);
  font-weight: 700;
  hyphens: manual;
}

/* A day wide, a sticker left behind says so by its red and a mark; the
   words are there for the ear and the pointer. */
.kz-pre__chip.is-narrow .kz-pre__chiplate {
  padding: 2px 5px;
}

.kz-pre__chip.is-narrow .kz-pre__chiplatetext {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.kz-pre__chip.is-fresh {
  animation: kz-pre-fresh 1.6s ease-out;
}

@keyframes kz-pre-fresh {
  from { box-shadow: 0 0 0 4px color-mix(in srgb, var(--kz-kind) 40%, transparent); }
  to   { box-shadow: 0 0 0 0 transparent; }
}

/* A sticker's end, dragged to make it longer or shorter: wide enough for a
   touchpad or a finger to find. */
.kz-pre__grip {
  position: absolute;
  top: 0;
  right: -6px;
  bottom: 0;
  width: 18px;
  cursor: ew-resize;
  touch-action: none;
}

.kz-pre__grip::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 7px;
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: var(--kz-kind);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .15s ease;
}

.kz-pre__chip:hover .kz-pre__grip::after,
.kz-pre__chip.is-resizing .kz-pre__grip::after {
  opacity: .85;
}

@media (hover: none) {
  .kz-pre__grip::after {
    opacity: .55;
  }
}

/* Where a sticker will go, and how far it will run: shown while one is
   dragged, carried, made longer or shorter — and a "+" on the place the
   pointer is on, where a click sticks one. */
.kz-pre__ghost {
  display: grid;
  grid-row: 1 / -1;
  place-items: center;
  margin: 0 5px;
  border: 2px dashed var(--kz-kind, var(--kz-accent));
  border-radius: 10px;
  background: color-mix(in srgb, var(--kz-kind, var(--kz-accent)) 10%, transparent);
  color: var(--kz-kind-ink, var(--kz-accent));
  font-size: var(--kz-fs-md);
  font-weight: 700;
  pointer-events: none;
}

.kz-pre__ghost--add {
  border-width: 1.5px;
  border-color: var(--kz-line-3);
  background: color-mix(in srgb, var(--kz-accent) 5%, transparent);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-lg);
}

.kz-pre__ghost.is-refused {
  --kz-kind: var(--kz-danger);
  --kz-kind-ink: var(--kz-danger-ink);
}

/* What is being dragged, under the pointer. */
.kz-pre__lift {
  position: fixed;
  z-index: 2000;
  margin: 0;
  opacity: .95;
  pointer-events: none;
  box-shadow: 0 22px 44px -16px color-mix(in srgb, var(--kz-shade) 50%, transparent);
  transform: rotate(-1.5deg);
}

.kz-pre.is-placing .kz-pre__line {
  cursor: copy;
}

.kz-pre__line.is-pointing {
  cursor: pointer;
}

html.is-pre-dragging,
html.is-pre-dragging * {
  cursor: grabbing !important;
  user-select: none;
  -webkit-user-select: none;
}

/* --- A sticker's form ----------------------------------------------------------- */

/* The dialog reads like a form, from the left — not a centred question. */
.kz-confirm.kz-pre__dialog {
  width: min(600px, calc(100vw / var(--kz-zoom) - 32px));
  max-height: calc(100vh / var(--kz-zoom) - 48px);
  overflow-y: auto;
  text-align: left;
}

.kz-preform__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.kz-preform__title {
  margin: 0;
  color: var(--kz-ink);
  font-size: 18px;
  font-weight: 700;
}

.kz-preform__sub {
  margin: 2px 0 0;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-md);
}

.kz-preform__register {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  background: var(--kz-primary-050);
}

.kz-preform__h {
  margin: 0 0 2px;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 700;
}

/* The kinds, side by side, each in its colour. */
.kz-prekinds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kz-prekinds__opt {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.kz-prekinds__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.kz-prekinds__face {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 14px;
  border: 1.5px dashed var(--kz-kind);
  border-radius: 999px;
  color: var(--kz-kind-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  transition: background .15s ease, color .15s ease;
}

.kz-prekinds__opt:hover .kz-prekinds__face {
  background: var(--kz-kind-050);
}

.kz-prekinds__opt input:focus-visible + .kz-prekinds__face {
  outline: 3px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-prekinds__opt input:checked + .kz-prekinds__face {
  border-style: solid;
  background: var(--kz-kind);
  color: var(--kz-white);
}

.kz-preform__remove {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--kz-line);
}

.kz-preform__removebtn {
  color: var(--kz-danger-ink);
}

.kz-preform__removebtn:hover,
.kz-preform__removebtn:focus-visible {
  background: var(--kz-danger-050);
  color: var(--kz-danger-ink);
}

/* Registering it, where it cannot be: what to do instead. */
.kz-preform__register--off {
  background: var(--kz-warning-050);
}

.kz-preform__register--off .kz-help {
  color: var(--kz-ink-2);
}

/* --- Which of SAFIA's lines: on a sticker's form and the session form ---------
   The four, or the three a session can be on, side by side: each its mark,
   its name and the projects it is for. */
.kz-linepick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.kz-linepick__opt {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.kz-linepick__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.kz-linepick__face {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 9px 12px;
  border: 1px solid var(--kz-line-3);
  border-radius: var(--kz-r);
  background: var(--kz-surface);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.kz-linepick__opt:hover .kz-linepick__face {
  border-color: var(--kz-accent);
}

.kz-linepick__opt input:focus-visible + .kz-linepick__face {
  outline: 3px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-linepick__opt input:checked + .kz-linepick__face {
  border-color: var(--kz-accent);
  background: var(--kz-primary-050);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kz-primary) 16%, transparent);
}

.kz-linepick__name {
  display: block;
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 600;
}

.kz-linepick__text {
  display: block;
  margin-top: 1px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  line-height: 1.35;
}

/* --- On a phone ------------------------------------------------------------------ */

@container kz-screen (max-width: 575.98px) {
  .kz-pre__bar {
    gap: 10px;
    padding: 12px;
  }

  /* The stickers in one row, scrolled sideways if they need more room, so
     the calendar starts where the thumb can reach it. */
  .kz-pre__palette {
    flex-wrap: nowrap;
    width: calc(100% + 24px);
    margin: 0 -12px;
    padding: 2px 12px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .kz-pre__palettelabel {
    display: none;
  }

  .kz-pre__sticker {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 5px 12px;
    font-size: var(--kz-fs-sm);
  }

  .kz-pre__legend {
    gap: 4px 12px;
    padding: 10px 12px;
    font-size: var(--kz-fs-xs);
  }

  .kz-pre__jump .kz-input {
    width: 150px;
  }

  /* Narrower days, and the lines' names in less room, so a phone shows
     most of a week beside them. */
  .kz-pre {
    --kz-pre-day: 100px;
    --kz-pre-head-w: 116px;
  }

  .kz-pre__linehead {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 8px;
  }

  .kz-line__badge {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    font-size: var(--kz-fs-md);
  }

  .kz-pre__linelabel {
    font-size: var(--kz-fs-md);
  }

  .kz-pre__linecycle {
    font-size: var(--kz-fs-xs);
  }

  .kz-pre__corner {
    padding: 10px 8px;
  }

  .kz-pre__more {
    width: 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kz-pre__sticker,
  .kz-pre__chip,
  .kz-pre__chip.is-fresh,
  .kz-pre__grip::after,
  .kz-pre__line,
  .kz-pre__linehead,
  .kz-pre__more.is-loading .bi {
    transition: none;
    animation: none;
  }
}

/* ==========================================================================
   The dashboard
   The platform's first page, read top to bottom: the headline and six
   figures; the projects in trouble beside the health of all the active ones;
   the three cycles; what comes next, the tasks and the reader's own; the
   production cycle's iterations beside what was done lately; the team.

   Everything is drawn from the tokens, so night mode needs nothing of its
   own. A figure with nothing to report goes quiet (.is-zero); a colour is
   always said again in words or by an icon.
   ========================================================================== */

/* Today's date, beside the page title. */
.kz-dash-today {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 500;
  white-space: nowrap;
}

.kz-dash-today .bi {
  color: var(--kz-accent);
}

/* Under the headline figure: what it is out of. */
.kz-spot__note {
  display: block;
  margin-top: 4px;
  color: color-mix(in srgb, var(--kz-white) 62%, transparent);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
}

.kz-symbol--danger { background: var(--kz-danger-050); color: var(--kz-danger-ink); }
.kz-empty__icon--success { background: var(--kz-success-050); color: var(--kz-success-ink); }

/* --- Six figures beside the headline --------------------------------------
   Each its number, what it counts, and one line more; the icon in its tone.
   As tall as the headline beside them, three to a row. */
.kz-dash-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 16px;
  height: calc(100% - 24px);
  margin-bottom: 24px;
}

.kz-dash-kpi {
  --kz-kt: var(--kz-primary-050);
  --kz-ki: var(--kz-accent);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto 1fr;
  column-gap: 12px;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  background: var(--kz-surface);
  box-shadow: var(--kz-shadow);
  color: var(--kz-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}

a.kz-dash-kpi:hover,
a.kz-dash-kpi:focus-visible {
  color: var(--kz-ink);
  border-color: var(--kz-primary);
  box-shadow: 0 10px 30px -14px color-mix(in srgb, var(--kz-primary) 35%, transparent);
}

a.kz-dash-kpi:focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-dash-kpi--danger  { --kz-kt: var(--kz-danger-050);  --kz-ki: var(--kz-danger-ink); }
.kz-dash-kpi--warning { --kz-kt: var(--kz-warning-050); --kz-ki: var(--kz-warning-ink); }
.kz-dash-kpi--success { --kz-kt: var(--kz-success-050); --kz-ki: var(--kz-success-ink); }
.kz-dash-kpi--info    { --kz-kt: var(--kz-info-050);    --kz-ki: var(--kz-info-ink); }
.kz-dash-kpi--neutral { --kz-kt: var(--kz-soft);        --kz-ki: var(--kz-ink-2); }

.kz-dash-kpi__icon {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-kt);
  color: var(--kz-ki);
  font-size: 18px;
}

.kz-dash-kpi__n {
  grid-column: 1;
  grid-row: 1;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

/* Late and in trouble say so in their own colour when there is any. */
.kz-dash-kpi--danger:not(.is-zero) .kz-dash-kpi__n {
  color: var(--kz-danger-ink);
}

.kz-dash-kpi__label {
  grid-column: 1;
  grid-row: 2;
  margin-top: 3px;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  line-height: 1.3;
}

.kz-dash-kpi__sub {
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: end;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--kz-line);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  line-height: 1.35;
}

.kz-dash-kpi__sub.is-alarm {
  color: var(--kz-danger-ink);
  font-weight: 600;
}

.kz-dash-kpi.is-zero .kz-dash-kpi__n {
  color: var(--kz-ink-3);
}

.kz-dash-kpi.is-zero .kz-dash-kpi__icon {
  background: var(--kz-soft);
  color: var(--kz-ink-4);
}

/* --- A list of named things: the projects in trouble, what comes next ------ */
.kz-dash-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kz-dash-list__row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 13px 24px;
  border-bottom: 1px solid var(--kz-line-2);
  color: var(--kz-ink);
  transition: background .15s ease;
}

.kz-dash-list > li:last-child .kz-dash-list__row {
  border-bottom: 0;
}

.kz-dash-list__row:hover,
.kz-dash-list__row:focus-visible {
  background: var(--kz-hover);
  color: var(--kz-ink);
}

.kz-dash-list__row:focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: -2px;
}

.kz-dash-list__row:hover .kz-dash-list__title {
  color: var(--kz-accent);
}

.kz-dash-list__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-primary-050);
  color: var(--kz-accent);
  font-size: var(--kz-fs-lg);
}

.kz-dash-list__main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kz-dash-list__title {
  overflow: hidden;
  font-size: var(--kz-fs-base);
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .15s ease;
}

.kz-dash-list__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-top: 3px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  line-height: 1.4;
}

.kz-dash-list__meta .bi {
  color: var(--kz-ink-4);
}

.kz-dash-list__why {
  flex: 0 1 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 48%;
}

/* Why a project is on the list — the reason in words, its tone and an icon. */
.kz-dash-why {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--kz-info-050);
  color: var(--kz-info-ink);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

.kz-dash-why--danger  { background: var(--kz-danger-050);  color: var(--kz-danger-ink); }
.kz-dash-why--warning { background: var(--kz-warning-050); color: var(--kz-warning-ink); }

/* "…and 3 more": under a list cut short. */
.kz-dash-more {
  margin: 0;
  padding: 11px 24px;
  border-top: 1px solid var(--kz-line-2);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  text-align: center;
}

/* The ways on from a card, along its foot. */
.kz-dash-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding: 12px 24px;
  border-top: 1px solid var(--kz-line-2);
}

.kz-dash-foot a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--kz-accent);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
}

.kz-dash-foot a:hover {
  color: var(--kz-accent-2);
}

/* --- What comes next: a day on a little calendar leaf ----------------------- */
.kz-dash-day {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-soft);
  box-shadow: inset 0 0 0 1px var(--kz-line);
}

.kz-dash-day__d {
  color: var(--kz-ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.kz-dash-day__m {
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.kz-dash-day.is-today {
  background: var(--kz-primary-050);
  box-shadow: inset 0 0 0 1px var(--kz-primary);
}

.kz-dash-day.is-today .kz-dash-day__d {
  color: var(--kz-accent);
}

/* How far off it is, in words. */
.kz-dash-when {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--kz-line-2);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.kz-dash-when.is-soon {
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
}

/* --- Rings: the health of the active projects, the tasks -------------------- */
.kz-dash-donut {
  position: relative;
  flex: 0 0 auto;
  width: 148px;
  height: 148px;
  margin: 0 auto 18px;
}

.kz-dash-donut--sm {
  width: 116px;
  height: 116px;
  margin: 0;
}

/* Turned a quarter back, so the first arc starts at twelve o'clock. */
.kz-dash-donut__ring {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.kz-dash-donut__ring circle {
  fill: none;
  stroke-width: 4.6;
}

.kz-dash-donut__track {
  stroke: var(--kz-line-2);
}

.kz-dash-donut__arc {
  stroke: var(--kz-psc, var(--kz-ptc));
}

.kz-dash-donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.kz-dash-donut__n {
  color: var(--kz-ink);
  font-size: var(--kz-fs-3xl);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.kz-dash-donut--sm .kz-dash-donut__n {
  font-size: var(--kz-fs-2xl);
}

.kz-dash-donut__n small {
  margin-left: 1px;
  color: var(--kz-ink-3);
  font-size: .6em;
  font-weight: 500;
}

.kz-dash-donut__unit {
  margin-top: 5px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
}

/* The health legend: a line per condition, the worst first. */
.kz-dash-legend .kz-pstats__row {
  min-height: 32px;
}

/* --- The three cycles ------------------------------------------------------- */
.kz-dash-cycle {
  display: flex;
  flex-direction: column;
}

.kz-dash-cycle > .kz-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kz-dash-cycle__go {
  flex: 0 0 auto;
  color: var(--kz-ink-4);
  font-size: 18px;
  transition: color .15s ease, transform .15s ease;
}

.kz-dash-cycle:hover .kz-dash-cycle__go,
.kz-dash-cycle:focus-visible .kz-dash-cycle__go {
  color: var(--kz-accent);
  transform: translateX(3px);
}

.kz-dash-figs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.kz-dash-figs--row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
}

.kz-dash-fig {
  min-width: 0;
  padding: 10px 12px;
  border: 1px dashed var(--kz-line-3);
  border-radius: var(--kz-r-sm);
}

.kz-dash-fig__v {
  display: block;
  color: var(--kz-ink);
  font-size: var(--kz-fs-xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.kz-dash-fig__k {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.kz-dash-fig.is-zero .kz-dash-fig__v {
  color: var(--kz-ink-3);
}

.kz-dash-fig.is-done .kz-dash-fig__v {
  color: var(--kz-success-ink);
}

.kz-dash-fig.is-late {
  border-color: var(--kz-danger);
  background: var(--kz-danger-050);
}

.kz-dash-fig.is-late :is(.kz-dash-fig__v, .kz-dash-fig__k) {
  color: var(--kz-danger-ink);
}

.kz-dash-cycle__progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  font-size: var(--kz-fs-md);
}

.kz-dash-cycle__progress-head span {
  color: var(--kz-ink-2);
  font-weight: 500;
}

.kz-dash-cycle__progress-head b {
  color: var(--kz-ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* The six phases under the bar, two columns of three. */
.kz-dash-phases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 18px;
}

.kz-dash-phase {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
}

.kz-dash-phase__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kz-dash-phase__n {
  flex: 0 0 auto;
  color: var(--kz-ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kz-dash-phase.is-zero,
.kz-dash-phase.is-zero .kz-dash-phase__n {
  color: var(--kz-ink-3);
  font-weight: 500;
}

.kz-dash-phase.is-zero .kz-pstats__dot {
  background: var(--kz-line-3);
}

/* The line at the foot of a cycle: in trouble, or all well. */
.kz-dash-cycle__alert,
.kz-dash-cycle__fine {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: auto 0 0;
  padding: 9px 12px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  line-height: 1.35;
}

.kz-dash-cycle__fine {
  background: var(--kz-success-050);
  color: var(--kz-success-ink);
}

/* --- The tasks -------------------------------------------------------------- */
.kz-dash-tasks {
  display: flex;
  align-items: center;
  gap: 22px;
}

.kz-dash-tasks__legend {
  flex: 1 1 auto;
  min-width: 0;
}

.kz-dash-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.kz-dash-chip {
  --kz-kt: var(--kz-primary-050);
  --kz-ki: var(--kz-accent);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 11px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-kt);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
}

.kz-dash-chip--danger  { --kz-kt: var(--kz-danger-050);  --kz-ki: var(--kz-danger-ink); }
.kz-dash-chip--warning { --kz-kt: var(--kz-warning-050); --kz-ki: var(--kz-warning-ink); }
.kz-dash-chip--info    { --kz-kt: var(--kz-info-050);    --kz-ki: var(--kz-info-ink); }

.kz-dash-chip .bi,
.kz-dash-chip b {
  color: var(--kz-ki);
}

.kz-dash-chip b {
  font-size: var(--kz-fs-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* A long name wraps under itself rather than being cut short. */
.kz-dash-chip span {
  min-width: 0;
  line-height: 1.3;
}

.kz-dash-chip.is-zero {
  background: var(--kz-soft);
  color: var(--kz-ink-3);
}

.kz-dash-chip.is-zero :is(.bi, b) {
  color: var(--kz-ink-4);
}

/* --- The reader's own ------------------------------------------------------- */
.kz-dash-mine {
  padding-top: 8px;
  padding-bottom: 8px;
}

.kz-dash-mine__row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px dashed var(--kz-line);
  color: var(--kz-ink);
}

.kz-dash-mine__row:last-child {
  border-bottom: 0;
}

a.kz-dash-mine__row:hover .kz-dash-mine__k,
a.kz-dash-mine__row:focus-visible .kz-dash-mine__k {
  color: var(--kz-accent);
}

.kz-dash-mine__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-primary-050);
  color: var(--kz-accent);
  font-size: var(--kz-fs-lg);
}

.kz-dash-mine__k {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 500;
  line-height: 1.35;
  transition: color .15s ease;
}

.kz-dash-mine__row--session .kz-dash-mine__k {
  display: block;
  overflow: hidden;
  color: var(--kz-ink);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kz-dash-mine__small {
  display: block;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 500;
}

.kz-dash-mine__v {
  flex: 0 0 auto;
  color: var(--kz-ink);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kz-dash-mine__v.is-zero {
  color: var(--kz-ink-3);
}

.kz-dash-mine__date {
  flex: 0 0 auto;
  color: var(--kz-ink);
  font-size: var(--kz-fs-base);
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.kz-dash-mine__date small {
  display: block;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-weight: 500;
}

.kz-dash-mine__none {
  flex: 0 0 auto;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
}

/* --- The production cycle --------------------------------------------------- */
.kz-dash-iter {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  background: var(--kz-soft);
  color: var(--kz-ink);
  transition: border-color .15s ease;
}

a.kz-dash-iter:hover,
a.kz-dash-iter:focus-visible {
  color: var(--kz-ink);
  border-color: var(--kz-primary);
}

a.kz-dash-iter:hover .kz-dash-iter__name {
  color: var(--kz-accent);
}

.kz-dash-iter__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.kz-dash-iter__name {
  font-size: var(--kz-fs-lg);
  font-weight: 700;
  line-height: 1.3;
  transition: color .15s ease;
}

.kz-dash-iter--none .kz-dash-iter__name {
  color: var(--kz-ink-2);
}

.kz-dash-iter__goal {
  margin: 6px 0 0;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  line-height: 1.5;
}

.kz-dash-iter__dates {
  display: block;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-variant-numeric: tabular-nums;
}

.kz-dash-iter__time {
  margin-top: 16px;
}

.kz-dash-iter__time-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.kz-dash-iter .kz-dash-fig {
  background: var(--kz-surface);
}

.kz-dash-iter .kz-dash-fig.is-late {
  background: var(--kz-danger-050);
}

.kz-dash-iter__next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px dashed var(--kz-line-3);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
}

.kz-dash-iter__next:hover {
  color: var(--kz-ink);
  border-color: var(--kz-primary);
}

.kz-dash-iter__next b {
  color: var(--kz-ink);
}

.kz-dash-iter__next .kz-dash-when {
  margin-left: auto;
}

/* The iterations side by side: a column each, as tall as its projects. */
.kz-dash-chart {
  margin-top: 24px;
}

.kz-dash-chart__title {
  margin: 0 0 12px;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  font-weight: 600;
}

.kz-dash-chart__cols {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 12px;
}

.kz-dash-chart__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 8px 4px 10px;
  border-radius: var(--kz-r-sm);
  color: var(--kz-ink-2);
  transition: background .15s ease;
}

.kz-dash-chart__col:hover,
.kz-dash-chart__col:focus-visible {
  background: var(--kz-soft);
  color: var(--kz-ink);
}

.kz-dash-chart__col.is-current {
  background: var(--kz-primary-050);
}

.kz-dash-chart__plot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: 170px;
}

.kz-dash-chart__n {
  margin-bottom: 6px;
  color: var(--kz-ink);
  font-size: var(--kz-fs-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Finished at the foot, then active, on hold and dropped on top. */
.kz-dash-chart__bar {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
  width: min(54px, 100%);
  height: calc(var(--kz-bar-h) * .82);
  min-height: 4px;
  border-radius: 6px 6px 3px 3px;
  background: var(--kz-line-2);
  overflow: hidden;
}

.kz-dash-chart__seg {
  flex: var(--kz-n, 1) 0 0;
  min-height: 3px;
  background: var(--kz-psc);
}

.kz-dash-chart__label {
  margin-top: 8px;
  max-width: 100%;
  font-size: var(--kz-fs-sm);
  line-height: 1.3;
  text-align: center;
}

.kz-dash-chart__label b {
  color: var(--kz-ink);
  font-weight: 700;
}

.kz-dash-chart__col.is-current .kz-dash-chart__label b {
  color: var(--kz-accent);
}

.kz-dash-chart__label small {
  display: block;
  overflow: hidden;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kz-dash-chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
}

.kz-dash-chart__legend li {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* --- What was done lately --------------------------------------------------- */
.kz-dash-feed {
  margin: 0;
  padding: 4px 0;
  list-style: none;
}

.kz-dash-feed__row {
  display: flex;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px dashed var(--kz-line);
}

.kz-dash-feed__row:last-child {
  border-bottom: 0;
}

.kz-dash-feed__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--kz-soft);
  box-shadow: inset 0 0 0 1px var(--kz-line);
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-md);
}

.kz-dash-feed__body {
  flex: 1 1 auto;
  min-width: 0;
}

.kz-dash-feed__line {
  margin: 0;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  line-height: 1.45;
}

.kz-dash-feed__line b {
  color: var(--kz-ink);
  font-weight: 600;
}

.kz-dash-feed__what {
  color: var(--kz-ink-3);
}

.kz-dash-feed__line :is(.badge, .kz-badge) {
  margin-left: 2px;
  vertical-align: 1px;
}

.kz-dash-feed__project {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--kz-accent);
  font-size: var(--kz-fs-md);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kz-dash-feed__project:hover {
  color: var(--kz-accent-2);
}

.kz-dash-feed__time {
  display: block;
  margin-top: 2px;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-xs);
  font-variant-numeric: tabular-nums;
}

/* --- The team --------------------------------------------------------------- */
.kz-dash-teamhead {
  flex-wrap: wrap;
}

/* This week's meetings across the team: amber until every one is ticked. */
.kz-dash-week {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 6px 11px;
  border-radius: 6px;
  background: var(--kz-warning-050);
  color: var(--kz-warning-ink);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
}

.kz-dash-week.is-done {
  background: var(--kz-success-050);
  color: var(--kz-success-ink);
}

.kz-dash-week + .kz-card__count {
  margin-left: 0;
}

.kz-dash-team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.kz-dash-member {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r);
  color: var(--kz-ink);
  transition: border-color .15s ease, background .15s ease;
}

.kz-dash-member:hover,
.kz-dash-member:focus-visible {
  border-color: var(--kz-primary);
  background: var(--kz-primary-050);
  color: var(--kz-ink);
}

.kz-dash-member__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  font-weight: 600;
}

.kz-dash-member__top .kz-person {
  flex: 1 1 auto;
}

.kz-dash-member:hover .kz-dash-member__top .kz-person {
  color: var(--kz-accent);
}

.kz-dash-member__all {
  flex: 0 0 auto;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
  white-space: nowrap;
}

.kz-dash-member__figs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kz-dash-member__figs > span {
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--kz-soft);
  box-shadow: inset 0 0 0 1px var(--kz-line);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.kz-dash-member__figs > span.is-zero {
  color: var(--kz-ink-3);
  font-weight: 500;
}

.kz-dash-member__figs > span.is-late {
  background: var(--kz-danger-050);
  box-shadow: none;
  color: var(--kz-danger-ink);
}

.kz-dash-member__week {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--kz-warning-ink);
  font-size: var(--kz-fs-sm);
  font-weight: 600;
}

.kz-dash-member__week.is-done {
  color: var(--kz-success-ink);
}

/* --- Narrower screens ------------------------------------------------------- */
@container kz-screen (max-width: 1199.98px) {
  .kz-dash-kpis {
    height: auto;
  }
}

@container kz-screen (max-width: 767.98px) {
  .kz-dash-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .kz-dash-kpi {
    padding: 14px;
  }

  .kz-dash-kpi__n {
    font-size: var(--kz-fs-2xl);
  }

  /* The reasons go under the project rather than squeeze beside it. */
  .kz-dash-list__row {
    flex-wrap: wrap;
    padding-left: 16px;
    padding-right: 16px;
  }

  .kz-dash-list__main {
    flex-basis: calc(100% - 50px);
  }

  .kz-dash-list__why {
    justify-content: flex-start;
    max-width: none;
    padding-left: 50px;
  }

  .kz-dash-list--dated .kz-dash-list__main {
    flex-basis: calc(100% - 60px);
  }

  /* How far off, under the words — level with them, not with the day. */
  .kz-dash-list--dated .kz-dash-when {
    margin-left: 60px;
  }

  .kz-dash-more,
  .kz-dash-foot,
  .kz-dash-feed__row {
    padding-left: 16px;
    padding-right: 16px;
  }

  .kz-dash-figs--row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kz-dash-chart__cols {
    gap: 6px;
  }

  .kz-dash-chart__label small {
    display: none;
  }

  .kz-dash-week {
    order: 5;
    margin-left: 56px;
  }
}

@container kz-screen (max-width: 419.98px) {
  .kz-dash-tasks {
    flex-direction: column;
    align-items: stretch;
  }

  .kz-dash-donut--sm {
    margin: 0 auto;
  }

  .kz-dash-chips {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   Resources — the library (resources/index)
   The search and the section chips in one card, then a card per section,
   each resource a row of the same list a session's links and materials use
   (.kz-reslist). The form beside it says link or file with two choice cards,
   and shows only the field of the one chosen.
   ========================================================================== */

.kz-resfind {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.kz-resshelf .kz-card__title > .bi:first-child {
  color: var(--kz-accent);
}

.kz-resshelf .kz-reslist {
  margin: 0;
}

/* What a resource teaches: two lines at most under its title. */
.kz-resrow__desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  line-height: 1.45;
}

.kz-resrow__acts {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

/* Side by side where there is room (the edit page), one above the other in
   the narrow column beside the list. */
.kz-resform__sources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 9px;
}

.kz-resform__sources .kz-choice {
  padding: 11px 12px;
}

.kz-resform:has(input[name="source"][value="file"]:checked) .kz-resform__link,
.kz-resform:has(input[name="source"][value="link"]:checked) .kz-resform__file {
  display: none;
}

/* The file a resource has now, above the field that replaces it. */
.kz-resform__now {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 6px;
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
  overflow-wrap: anywhere;
}

/* On a phone the buttons go under the title, so the title keeps the width. */
@container kz-screen (max-width: 575.98px) {
  .kz-resrow {
    flex-wrap: wrap;
  }

  .kz-resrow .kz-reslist__main {
    flex-basis: calc(100% - 46px);
  }

  .kz-resrow__acts {
    justify-content: flex-end;
    width: 100%;
  }
}

/* ==========================================================================
   The 2026-11 redesign layer
   The shared pieces — shell, headings, buttons, fields, tables, badges,
   menus, focus — restated on the tokens, after everything above so that it
   has the last word. Nothing here knows a page; a page gets it by using the
   pieces. What it settles:

     - the sidebar is one deep navy in both modes and wears the night tokens
       (its selector shares the night block), with the page you are on as a
       filled violet row;
     - nothing people read is under 12px, and body text is 15px on 1.5;
     - everything pressed is at least --kz-tap (40px) tall and shows a focus
       ring from the keyboard, wherever it is on the page;
     - a table has a heading band and solid hairlines, so rows can be
       followed across.
   ========================================================================== */

body {
  font-size: var(--kz-fs-base);
  line-height: var(--kz-lh);
  text-rendering: optimizeLegibility;
}

/* Roboto's bold is already tight; pulled tighter still it smears. */
h1, h2, h3, h4, h5, h6,
.kz-pagehead__title,
.kz-side__name,
.kz-card__title {
  letter-spacing: 0;
}

/* --- Sidebar ---------------------------------------------------------------- */

.kz-side {
  background: var(--kz-side);
  border-right: 1px solid var(--kz-line-2);
  color: var(--kz-ink-2);
}

.kz-side__brand,
.kz-side__foot {
  border-color: var(--kz-line-2);
}

.kz-side__scroll {
  padding-top: 14px;
}

.kz-nav {
  gap: 4px;
}

.kz-nav__label {
  padding-top: 20px;
  color: var(--kz-ink-4);
}

.kz-nav__link {
  min-height: 42px;
  border-radius: var(--kz-r-sm);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-md);
  line-height: 1.35;
}

.kz-nav__icon {
  color: var(--kz-ink-3);
}

.kz-nav__link:hover,
.kz-nav__link:focus-visible {
  background: var(--kz-soft);
  color: var(--kz-ink);
}

.kz-nav__link:hover .kz-nav__icon,
.kz-nav__link:focus-visible .kz-nav__icon {
  color: var(--kz-ink);
}

/* Where you are: filled, so it is found at a glance from across the desk. */
.kz-nav__link.is-active,
.kz-nav__link.is-active:hover {
  background: var(--kz-primary);
  color: var(--kz-on-primary);
  font-weight: 600;
  box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--kz-primary) 80%, transparent);
}

.kz-nav__link.is-active .kz-nav__icon,
.kz-nav__link.is-active:hover .kz-nav__icon {
  color: var(--kz-on-primary);
}

/* On the filled row the count turns white, or it is red on violet. */
.kz-nav__link.is-active .kz-navcount {
  background: var(--kz-white);
  color: var(--kz-primary-700);
}

.kz-nav__link:focus-visible,
.kz-userbtn:focus-visible {
  outline-offset: -2px;
}

/* --- Top bar ---------------------------------------------------------------- */

.kz-top {
  border-bottom: 1px solid var(--kz-line);
  box-shadow: var(--kz-shadow);
}

.kz-crumbs {
  font-size: var(--kz-fs-md);
}

.kz-topbtn {
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-sm);
}

.kz-zoom:not(.kz-langpick) {
  height: 40px;
}

.kz-zoom:not(.kz-langpick) button {
  min-width: 36px;
  height: 36px;
}

/* --- Page header ------------------------------------------------------------ */

.kz-pagehead {
  margin-bottom: var(--kz-sp-5);
}

.kz-pagehead__title {
  font-size: var(--kz-fs-2xl);
  line-height: 1.25;
}

.kz-pagehead__sub {
  margin-top: 6px;
  max-width: 76ch;
  color: var(--kz-ink-3);
  font-size: var(--kz-fs-base);
  line-height: var(--kz-lh);
}

@container kz-screen (min-width: 1600px) {
  .kz-pagehead__title {
    font-size: 28px;
  }
}

/* --- Cards ------------------------------------------------------------------- */

.kz-card__title {
  font-size: 17px;
  font-weight: 650;
}

.kz-card__sub {
  font-size: var(--kz-fs-sm);
  line-height: 1.45;
}

/* --- Buttons -----------------------------------------------------------------
   Primary, ghost (the secondary), soft, success, warning, danger; each with
   its hover, its press, its keyboard ring, its disabled and its waiting look. */

.kz-btn {
  min-height: var(--kz-tap);
  padding: 8px 16px;
  border-radius: var(--kz-r-sm);
  font-size: var(--kz-fs-md);
  line-height: 1.3;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}

.kz-btn--sm {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: var(--kz-r-sm);
  font-size: var(--kz-fs-sm);
}

/* Under a finger, the small ones are full height too. */
@media (pointer: coarse) {
  .kz-btn--sm {
    min-height: var(--kz-tap);
  }
}

.kz-btn--primary,
.kz-cta {
  box-shadow: 0 1px 2px color-mix(in srgb, var(--kz-shade) 18%, transparent);
}

.kz-btn--ghost {
  border-color: var(--kz-line-input);
  color: var(--kz-ink);
}

.kz-btn--ghost:hover:not(:disabled) {
  border-color: var(--kz-accent);
}

/* The hover was the pale red of a badge by night, under white words. */
.kz-btn--danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--kz-danger) 84%, var(--kz-shade));
  color: var(--kz-danger-on);
}

.kz-btn:active:not(:disabled),
.kz-cta:active:not(:disabled) {
  transform: translateY(1px);
}

.kz-btn:focus-visible,
.kz-cta:focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 2px;
}

.kz-btn:disabled,
.kz-btn[aria-disabled="true"],
.kz-cta:disabled {
  background: var(--kz-line-2);
  border-color: var(--kz-line);
  color: var(--kz-ink-disabled);
  box-shadow: none;
}

.kz-cta {
  min-height: 46px;
  font-size: var(--kz-fs-base);
}

/* Waiting on the server: the button keeps its place and turns a wheel. */
@keyframes kz-spin {
  to { transform: rotate(360deg); }
}

form[aria-busy="true"] button[type="submit"],
.kz-btn[aria-busy="true"] {
  opacity: .75;
  cursor: progress;
}

form[aria-busy="true"] :is(.kz-btn, .kz-cta)[type="submit"]::after,
.kz-btn[aria-busy="true"]::after {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: kz-spin .7s linear infinite;
}

/* --- Fields ------------------------------------------------------------------ */

.kz-label {
  font-size: var(--kz-fs-md);
}

.kz-input,
.kz-select {
  min-height: 44px;
  border-radius: var(--kz-r-sm);
  font-size: var(--kz-fs-base);
}

.kz-help {
  font-size: var(--kz-fs-sm);
  line-height: var(--kz-lh);
}

/* What is wrong with a field, under the field, in words and with a mark. */
.invalid-feedback,
.kz-error {
  color: var(--kz-danger-ink);
  font-size: var(--kz-fs-sm);
  font-weight: 500;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--kz-primary);
}

/* --- Tables -------------------------------------------------------------------
   A band behind the headings and solid hairlines between rows: a row is
   followed across by its line, and the headings stay put over a long list. */

.kz-table {
  font-size: var(--kz-fs-md);
}

.kz-table thead th {
  padding-top: 12px;
  padding-bottom: 12px;
  background: var(--kz-soft);
  border-bottom: 1px solid var(--kz-line);
  color: var(--kz-ink-2);
  font-size: var(--kz-fs-xs);
  letter-spacing: .05em;
}

.kz-table tbody td {
  border-bottom: 1px solid var(--kz-line-2);
  line-height: 1.45;
}

.kz-table :is(td, th).kz-table__num,
.kz-table__id {
  font-variant-numeric: tabular-nums;
}

.kz-table__sub {
  font-size: var(--kz-fs-xs);
}

/* --- Badges and chips ---------------------------------------------------------- */

.kz-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: var(--kz-fs-xs);
  line-height: 1.4;
}

.kz-badge::before {
  width: 7px;
  height: 7px;
}

.kz-tag {
  border-radius: 999px;
  font-size: var(--kz-fs-xs);
}

/* --- Menus ------------------------------------------------------------------- */

.dropdown-menu {
  font-size: var(--kz-fs-md);
}

.dropdown-menu .dropdown-item {
  min-height: var(--kz-tap);
  padding: 10px 12px;
  font-size: var(--kz-fs-md);
  line-height: 1.45;
}

/* --- Pagination ---------------------------------------------------------------- */

.kz-pagination .page-link {
  min-width: var(--kz-tap);
  min-height: var(--kz-tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* --- Focus, everywhere -----------------------------------------------------------
   The ring was drawn inside the page and the sign-in only; the bar, the
   menus and the dialogs take it too. Fields keep their own (a glow on the
   edge), so they are left out here. */

:is(a, button, summary, [role="button"], [role="tab"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 2px;
}

:is(input[type="checkbox"], input[type="radio"], input[type="file"], input[type="range"]):focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 2px;
}

/* --- Leaving for another page -------------------------------------------------
   A link followed or a form sent on a slow line: a thin bar runs along the
   top until the next page arrives (kaizen.js, "Leaving"). */

@keyframes kz-leaving {
  0%   { transform: scaleX(0); }
  40%  { transform: scaleX(.6); }
  100% { transform: scaleX(.92); }
}

.kz-leaving::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 2000;
  height: 3px;
  background: var(--kz-primary);
  transform-origin: 0 50%;
  animation: kz-leaving 6s cubic-bezier(.1, .7, .3, 1) forwards;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .kz-leaving::before {
    animation: none;
    transform: scaleX(.6);
  }
}

/* --- A placeholder for content on its way ---------------------------------------
   For anything filled in after the page has opened: a grey bar where the
   words will be. */

@keyframes kz-skeleton {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}

.kz-skeleton {
  display: block;
  min-height: 14px;
  border-radius: var(--kz-r-sm);
  background: var(--kz-line-2);
  color: transparent;
  animation: kz-skeleton 1.4s ease-in-out infinite;
}

[aria-busy="true"]:not(form, button, .kz-btn) {
  cursor: progress;
}

/* Under a finger, the small round controls are full height as well. */
@media (pointer: coarse) {
  .kz-iconbtn,
  .kz-fchip,
  .kz-viewswitch__btn {
    min-width: var(--kz-tap);
    min-height: var(--kz-tap);
  }
}

/* ==========================================================================
   The seasonal cycles a tracker runs (People → a tracker's page): one box a
   cycle, its two switches side by side, each with a line under it saying
   what it gives. One under the other on a phone.
   ========================================================================== */

.kz-cycles {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.kz-cycles__cycle {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px 22px;
  margin: 0;
  padding: 14px 16px 16px;
  border: 1px solid var(--kz-line);
  border-radius: var(--kz-r-sm);
  background: var(--kz-surface);
}

.kz-cycles__name {
  float: left;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: var(--kz-fs-base);
  font-weight: 600;
  color: var(--kz-ink);
}

.kz-cycles__name .bi {
  color: var(--kz-primary);
}

.kz-cycles__switch {
  align-items: flex-start;
}

.kz-cycles__switch .kz-switch__track {
  flex: none;
  margin-top: 1px;
}

.kz-cycles__what {
  display: grid;
  gap: 2px;
}

.kz-cycles__label {
  font-weight: 600;
  color: var(--kz-ink);
}

.kz-cycles__help {
  font-size: var(--kz-fs-sm);
  font-weight: 400;
  color: var(--kz-ink-3);
}

.kz-cycles .kz-formactions {
  margin-top: 2px;
}

/* --- Seldom needed: a quiet link in place of a button ------------------- */
/* A Kaizen project's second leader: most projects have one leader, so adding
   a second is offered as plain small text under the leader (and folded away
   on the new-project form) rather than as a tile or a button of its own. */
.kz-linkbtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--kz-fs-sm);
  color: var(--kz-ink-3);
  cursor: pointer;
}

.kz-linkbtn:hover {
  color: var(--kz-primary);
  text-decoration: underline;
}

.kz-linkbtn:focus-visible {
  outline: 2px solid var(--kz-focus);
  outline-offset: 1px;
}

.kz-fact__aside {
  display: block;
  margin-top: 6px;
}

.kz-optional {
  margin-top: -8px;
}

.kz-optional > summary {
  list-style: none;
}

.kz-optional > summary::-webkit-details-marker {
  display: none;
}

.kz-optional[open] > summary {
  display: none;
}
