/* Commons viewer styles. Generated by tools/build-style.mjs from the Commons design kit
   (tokens.css, kit.css, web.css) and tools/layout.css. Do not edit by hand. */

/* ---- fonts ---- */

/* The Commons type, latin subsets, served by the sidecar from /fonts (both under the SIL Open Font License, see src/fonts). */
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---- tokens.css ---- */

/* Commons design tokens: the Indigo dye palette (owner, 2026-11-11). One file
   for the App, web apps and every other Commons surface.

   The palette is undyed wool and natural dyes. Neutrals share one warm hue,
   text is drawn from the deep indigo, and status colours are lichen, weld,
   woad and madder at matched lightness. Values were built in OKLCH and checked
   for contrast in both appearances.

   Names are the App's own (commons-app assets/tokens.css at 2bea78c), so the
   App adopts this file by value, without a rename. Light on :root, dark on
   :root.dark. */
:root {
  color-scheme: light;

  /* Surfaces: undyed wool */
  --bg: #F5F2EA;
  --side: #EDE9E0;
  --sur: #FDFBF6;
  --sur2: #F0EDE5;
  --hov: #E7E4DA;
  --line: #E0DCD2;
  --line2: #D0CCC1;
  /* The edge that identifies a field or switch: 3:1 on every surface. */
  --edge: #7F7C73;
  /* Translucent edges for buttons, cards and tables. */
  --hair: rgba(26, 29, 45, .10);
  --hair2: rgba(26, 29, 45, .18);

  /* Ink: drawn from the deep indigo */
  --ink: #1A1D2D;
  --ink2: #343747;
  --mu: #6A6455;

  /* Indigo dye: selection, focus and links. --prit is the same colour as text. */
  --pri: #3B48C3;
  --priw: #E2E9FE;
  --prit: #3B48C3;
  /* The focus ring: 3:1 or better on every surface, selected and hovered rows included. */
  --focus: #3B48C3;

  /* The primary button: deep indigo. One per view. */
  --action: #191A52;
  --on-action: #FDFBF6;
  --action-depth: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 2px rgba(26, 29, 45, .28);
  --action-hover: #2C2E7A;
  --action-press: #0E0F35;
  /* The switch knob, on either track. */
  --thumb: #FDFBF6;

  /* Natural dyes: colour, then its tint */
  --ok: #3A6E46;     /* lichen: current, verified */
  --okw: #E0EEE2;
  --warn: #84550F;   /* weld: needs a look */
  --warnw: #F5E7D7;
  --cy: #2D697E;     /* woad: information */
  --cyw: #DDECF3;
  --del: #9D3D31;    /* madder: careful actions, refusals */
  --delw: #FEE2DD;

  /* Floating */
  --toast: #222536;
  --toast-ink: #F3F0E8;
  --toast-mu: #B4B1A8;
  --toast-accent: #A7BAFF;
  --scrim: rgba(26, 29, 45, .30);
  --lift-1: 0 1px 1px rgba(26, 29, 45, .05);
  --lift-2: 0 1px 2px rgba(26, 29, 45, .05), 0 2px 6px rgba(26, 29, 45, .04);
  --shadow-card: 0 1px 2px rgba(26, 29, 45, .06), 0 14px 34px -14px rgba(26, 29, 45, .26);
  --shadow-pop: 0 16px 40px -10px rgba(26, 29, 45, .26), 0 0 0 1px rgba(26, 29, 45, .08);
  --shadow-seg: 0 1px 2px rgba(26, 29, 45, .08);
  --avatar: #191A52;

  /* Chart series, in this order. The first is the series that matters. All
     reach 3:1 on --sur in both appearances (they are the text-safe dyes). */
  --chart-1: var(--prit);
  --chart-2: var(--cy);
  --chart-3: var(--ok);
  --chart-4: var(--warn);
  --chart-5: var(--mu);

  /* Brand: the logo's colours. Fills and marks only, never body text. */
  --mark: #3B3DF5;
  --plum: #191A52;
  --am: #F5B23D;
  --cy-b: #14B8D4;

  /* Type */
  --font-text: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --t-hero: 28px;
  --t-title: 18px;
  --t-head: 14px;
  --t-body: 13.5px;
  --t-control: 13px;
  --t-small: 12.5px;
  --t-help: 12px;
  --t-cap: 11.5px;

  /* Controls: two heights and one large */
  --ctl: 32px;
  --ctl-sm: 28px;
  --ctl-lg: 40px;
  /* Pointer target floor; web apps raise it to 44 on touch (web.css). */
  --hit: 24px;

  /* Radius follows nesting: 6 inside 8 inside 12 */
  --r-in: 6px;
  --r-ctl: 8px;
  --r-panel: 12px;
  /* The App's names for the same ladder, kept so its pages need no rename. */
  --r-xs: 4px;
  --r-sm: 6px;
  --r: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 14px;

  /* Layers */
  --z-sticky: 1;
  --z-bar: 20;
  --z-pop: 30;
  --z-sheet: 40;
  --z-toast: 50;

  /* Space, in fours */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-6: 24px;
  --s-8: 32px;
  --s-12: 48px;
  --s-16: 64px;
  --s-24: 96px;

  /* App window */
  --sidebar-w: 264px;
  --bar-h: 48px;

  /* Web app page (web.css). Breakpoints, for media queries: 640, 1024, 1280. */
  --web-bar: 56px;
  --web-wrap: 1200px;
  --web-gutter: 24px;

  /* Motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --fast: 120ms;

  /* Story register: website, blog, docs, slides */
  --st-bg: #FDFBF6;
  --st-bg2: #F5F2EA;
  --st-display: clamp(40px, 4.8vw, 68px);
  --st-h2: clamp(32px, 3.4vw, 44px);
  --st-h3: 21px;
  --st-lead: 19px;
  --st-body: 17px;
  --st-small: 13.5px;
  --st-wrap: 1240px;
}

:root.dark {
  color-scheme: dark;

  /* Surfaces: indigo-black */
  --bg: #141622;
  --side: #0F111C;
  --sur: #1C1E2B;
  --sur2: #222431;
  --hov: #292C39;
  --line: #2C2E3B;
  --line2: #3B3E4B;
  --edge: #808493;
  --hair: rgba(243, 240, 232, .08);
  --hair2: rgba(243, 240, 232, .15);

  /* Ink: wool */
  --ink: #F3F0E8;
  --ink2: #D7D4CB;
  --mu: #ABA79F;

  --pri: #4D60DC;
  --priw: #202958;
  --prit: #A7BAFF;
  --focus: #A7BAFF;

  /* In the dark the primary button turns to wool. */
  --action: #F3F0E8;
  --on-action: #141622;
  --action-depth: 0 1px 2px rgba(0, 0, 0, .4);
  --action-hover: #D9D5CB;
  --action-press: #CBC7BD;
  --thumb: #141622;

  --ok: #8BCD99;
  --okw: #1C3422;
  --warn: #E8AE69;
  --warnw: #3E290F;
  --cy: #80C6E1;
  --cyw: #18323B;
  --del: #FE9C8C;
  --delw: #45231D;

  --toast: #313444;
  --toast-mu: #BDBAB1;  /* 6.3:1 on the dark toast */
  --scrim: rgba(0, 0, 0, .5);
  --lift-1: 0 1px 1px rgba(0, 0, 0, .2);
  --lift-2: 0 1px 2px rgba(0, 0, 0, .25);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -14px rgba(0, 0, 0, .7), 0 0 0 1px #3B3E4B;
  --shadow-pop: 0 16px 40px -10px rgba(0, 0, 0, .7), 0 0 0 1px #3B3E4B;
  --shadow-seg: 0 1px 2px rgba(0, 0, 0, .4);
  --avatar: #4D60DC;

  --mark: #7A7CFF;
  --plum: #F3F0E8;
  /* The logo's amber and cyan stay as they are in the dark (9.7:1 and 7.6:1 on --bg). */
  --am: #F5B23D;
  --cy-b: #14B8D4;

  --st-bg: #141622;
  --st-bg2: #1C1E2B;
}

/* The system's dark appearance, when no choice is remembered. The same values as :root.dark. */
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
  color-scheme: dark;

  /* Surfaces: indigo-black */
  --bg: #141622;
  --side: #0F111C;
  --sur: #1C1E2B;
  --sur2: #222431;
  --hov: #292C39;
  --line: #2C2E3B;
  --line2: #3B3E4B;
  --edge: #808493;
  --hair: rgba(243, 240, 232, .08);
  --hair2: rgba(243, 240, 232, .15);

  /* Ink: wool */
  --ink: #F3F0E8;
  --ink2: #D7D4CB;
  --mu: #ABA79F;

  --pri: #4D60DC;
  --priw: #202958;
  --prit: #A7BAFF;
  --focus: #A7BAFF;

  /* In the dark the primary button turns to wool. */
  --action: #F3F0E8;
  --on-action: #141622;
  --action-depth: 0 1px 2px rgba(0, 0, 0, .4);
  --action-hover: #D9D5CB;
  --action-press: #CBC7BD;
  --thumb: #141622;

  --ok: #8BCD99;
  --okw: #1C3422;
  --warn: #E8AE69;
  --warnw: #3E290F;
  --cy: #80C6E1;
  --cyw: #18323B;
  --del: #FE9C8C;
  --delw: #45231D;

  --toast: #313444;
  --toast-mu: #BDBAB1;  /* 6.3:1 on the dark toast */
  --scrim: rgba(0, 0, 0, .5);
  --lift-1: 0 1px 1px rgba(0, 0, 0, .2);
  --lift-2: 0 1px 2px rgba(0, 0, 0, .25);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -14px rgba(0, 0, 0, .7), 0 0 0 1px #3B3E4B;
  --shadow-pop: 0 16px 40px -10px rgba(0, 0, 0, .7), 0 0 0 1px #3B3E4B;
  --shadow-seg: 0 1px 2px rgba(0, 0, 0, .4);
  --avatar: #4D60DC;

  --mark: #7A7CFF;
  --plum: #F3F0E8;
  /* The logo's amber and cyan stay as they are in the dark (9.7:1 and 7.6:1 on --bg). */
  --am: #F5B23D;
  --cy-b: #14B8D4;

  --st-bg: #141622;
  --st-bg2: #1C1E2B;
}
}


/* ---- kit.css ---- */

/* The Commons component kit for the Product register: the App and web apps.

   Each component is defined once. The class names are the App's own
   (commons-app assets/kit.css at 2bea78c), so the App adopts this file by
   replacing its kit.css; see README.md for the page-sheet sweep that has to go
   with it. Values come from tokens.css. A page places these classes; it does
   not restyle them. */

/* Icons: Lucide at stroke 1.75. */
.k-ic { flex: none; stroke-width: 1.75; }

/* Focus: one ring everywhere, 2 px of --focus, keyboard only. An outline, not a
   shadow, so forced colours paint it too. */
:where(.k-btn, .k-ib, .k-seg-o, .k-chp-o, .k-sw, .k-toast-a, .k-toast-x, .k-radio, .k-check input, .k-select):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
:where(.k-input):focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.k-search:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.k-search input:focus-visible { outline: 2px solid transparent; }
/* Rows and menu items sit inside clipped containers: the ring goes inside. */
.k-tr:focus-visible, .k-mi:focus-visible, .k-radio:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

/* Buttons: one primary per view. Weight 500, one edge, a breath of depth. */
.k-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--ctl); padding: 0 12px; border: 0; border-radius: var(--r-ctl);
  font: 500 var(--t-control)/1 var(--font-text); letter-spacing: -.003em; white-space: nowrap; cursor: default;
  background: var(--sur); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair2), var(--lift-1);
  transition: background var(--fast) var(--ease);
}
.k-btn .k-ic { width: 15px; height: 15px; }
.k-btn:hover:not(:disabled) { background: var(--hov); }
.k-btn:active:not(:disabled) { background: var(--sur2); }
.k-btn.pri { background: var(--action); color: var(--on-action); box-shadow: var(--action-depth); -webkit-font-smoothing: antialiased; }
.k-btn.pri:hover:not(:disabled) { background: var(--action-hover); }
.k-btn.pri:active:not(:disabled) { background: var(--action-press); box-shadow: none; }
.k-btn.gho { background: transparent; color: var(--ink2); box-shadow: none; }
.k-btn.gho:hover:not(:disabled) { background: var(--hov); }
.k-btn.dan { color: var(--del); }
.k-btn.dan:hover:not(:disabled) { background: var(--delw); }
.k-btn.sm { height: var(--ctl-sm); padding: 0 10px; font-size: var(--t-small); }
.k-btn.lg { height: var(--ctl-lg); padding: 0 18px; font-size: 14px; }
.k-btn.ico { width: var(--ctl); padding: 0; }
.k-btn.sm.ico { width: var(--ctl-sm); }
.k-btn:disabled { opacity: .45; }
.k-btn .k-kbd { margin-left: 4px; }
.k-btn.pri .k-kbd { background: color-mix(in srgb, currentColor 16%, transparent); color: inherit; box-shadow: none; }
/* Busy: the label stays, a spinner leads it, and the button takes no second press. */
.k-btn[aria-busy="true"] { pointer-events: none; }
.k-btn[aria-busy="true"]::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%; flex: none;
  border: 1.5px solid currentColor; border-right-color: transparent; animation: k-spin .9s linear infinite;
}

.k-ib {
  width: var(--ctl-sm); height: var(--ctl-sm); padding: 0; border: 0; border-radius: var(--r-in); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--mu); cursor: default;
}
.k-ib .k-ic { width: 17px; height: 17px; }
.k-ib:hover:not(:disabled), .k-ib.on { background: var(--hov); color: var(--ink); }
.k-ib:disabled { opacity: .4; }

.k-kbd {
  font: 500 10.5px/1.5 var(--font-mono); padding: 1px 5px; border-radius: var(--r-xs);
  background: var(--sur2); color: var(--mu); box-shadow: inset 0 0 0 1px var(--line);
  white-space: nowrap;
}

/* Fields share the button's height and radius. Their edge identifies them, so it is --edge (3:1). */
.k-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.k-label { font-size: var(--t-small); font-weight: 500; color: var(--ink2); }
.k-label-row { display: flex; align-items: baseline; gap: 8px; }
.k-hint { margin-left: auto; font-style: normal; font-size: var(--t-help); color: var(--mu); }
.k-input, .k-select {
  height: var(--ctl); padding: 0 11px; border: 0; border-radius: var(--r-ctl); min-width: 0;
  background: var(--sur); color: var(--ink); box-shadow: inset 0 0 0 1px var(--edge), var(--lift-1);
  font: 400 var(--t-body) var(--font-text); caret-color: var(--pri);
}
.k-input.mono { font-family: var(--font-mono); font-size: var(--t-small); }
.k-input.multi { height: auto; min-height: 84px; padding: 8px 11px; resize: vertical; line-height: 1.45; }
.k-input::placeholder, .k-search input::placeholder { color: var(--mu); }
.k-field.invalid .k-input, .k-field.invalid .k-select { box-shadow: inset 0 0 0 1.5px var(--del); }
/* Help is for consequences, security notes and error remedies only (ruling 138). */
.k-help { margin: 0; font-size: var(--t-help); line-height: 1.4; color: var(--mu); }
.k-help.err { color: var(--del); }

/* Select: a native <select>, drawn like a field, with its own chevron. */
.k-select {
  appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: default;
  background-image: linear-gradient(45deg, transparent 50%, var(--mu) 50%), linear-gradient(135deg, var(--mu) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 11px) 52%;
  background-size: 4px 4px; background-repeat: no-repeat;
}

.k-search {
  display: flex; align-items: center; gap: 8px; height: var(--ctl); width: 210px; padding: 0 10px;
  border-radius: var(--r-ctl); background: var(--sur); box-shadow: inset 0 0 0 1px var(--edge), var(--lift-1);
  color: var(--mu); font-size: var(--t-small); white-space: nowrap;
}
.k-search .k-ic { width: 14px; height: 14px; }
.k-search input {
  flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; background: transparent;
  color: var(--ink); font: 400 var(--t-small) var(--font-text);
}
.k-search input::-webkit-search-cancel-button { display: none; }
.k-search .k-kbd { margin-left: auto; }

/* Check and radio */
.k-check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-body); color: var(--ink); cursor: default; }
.k-check input { width: 15px; height: 15px; min-height: 0; margin: 0; padding: 0; border: 0; accent-color: var(--pri); }
.k-check.off { opacity: .45; }
.k-radios { display: flex; flex-direction: column; border-radius: var(--r-panel); background: var(--sur); box-shadow: inset 0 0 0 1px var(--hair); overflow: hidden; }
.k-radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border: 0; border-top: 1px solid var(--hair); background: transparent; color: var(--ink); text-align: left; font: inherit; cursor: default; }
.k-radio:first-child { border-top: 0; }
.k-radio:hover { background: var(--hov); }
.k-radio[data-state="checked"] { background: var(--priw); }
.k-radio-dot { width: 16px; height: 16px; margin-top: 1px; flex: none; border-radius: 50%; background: var(--sur); box-shadow: inset 0 0 0 1.5px var(--edge); }
.k-radio[data-state="checked"] .k-radio-dot { box-shadow: inset 0 0 0 5px var(--focus); }
.k-radio-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.k-radio-t b { font-weight: 500; font-size: var(--t-body); }
.k-radio-t span { font-size: var(--t-small); color: var(--mu); line-height: 1.4; }

/* Switch: 28 by 16 to the eye, a 36 by 24 pointer target. */
.k-sw {
  position: relative; flex: none; width: 28px; height: 16px; padding: 0; border: 0;
  border-radius: 999px; background: var(--edge); cursor: default;
}
.k-sw::before { content: ""; position: absolute; inset: -4px; }
.k-sw[data-state="checked"] { background: var(--ok); }
.k-sw:disabled { opacity: .45; }
.k-sw-thumb {
  position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--thumb); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left var(--fast) var(--ease);
}
.k-sw[data-state="checked"] .k-sw-thumb { left: 14px; }
/* A switch lines up with its title; any help goes below. */
.k-swrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 2px; align-items: center; }
.k-swrow-t { font-size: var(--t-body); font-weight: 500; color: var(--ink); }
.k-swrow-h { grid-column: 1; margin: 0; font-size: var(--t-help); line-height: 1.4; color: var(--mu); }

/* Segmented control */
.k-seg {
  display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--r-ctl); width: max-content;
  background: var(--sur2);
}
.k-seg-o {
  height: var(--ctl-sm); padding: 0 12px; border: 0; border-radius: var(--r-in); background: transparent;
  display: flex; align-items: center; font: 500 var(--t-small) var(--font-text); color: var(--mu); cursor: default;
}
.k-seg-o:hover { color: var(--ink2); }
.k-seg-c { margin-left: 6px; font-size: var(--t-cap); color: var(--mu); font-variant-numeric: tabular-nums; }
.k-seg-o.on, .k-seg-o[data-state="checked"] { background: var(--sur); color: var(--ink); box-shadow: 0 0 0 1px var(--hair), var(--shadow-seg); }

/* Filter chips: the chosen one takes the indigo dye tint. `joined` is one bar. */
.k-chp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.k-chp-o {
  height: var(--ctl-sm); padding: 0 11px; border: 0; border-radius: var(--r-ctl); background: var(--sur);
  box-shadow: inset 0 0 0 1px var(--hair2); display: inline-flex; align-items: center; gap: 6px;
  font: 500 var(--t-small) var(--font-text); color: var(--ink2); white-space: nowrap; cursor: default;
}
.k-chp-o:hover:not(.on):not([data-state="checked"]) { background: var(--hov); }
.k-chp-o .k-ic { width: 14px; height: 14px; }
.k-chp-c { font-style: normal; color: var(--mu); font-variant-numeric: tabular-nums; }
.k-chp-o.on, .k-chp-o[data-state="checked"] { background: var(--priw); color: var(--prit); box-shadow: inset 0 0 0 1px var(--prit); }
.k-chp-o.on .k-chp-c, .k-chp-o[data-state="checked"] .k-chp-c { color: var(--prit); }
.k-chp-o:disabled { opacity: .45; }
.k-chp.joined { display: inline-flex; flex-wrap: nowrap; gap: 0; width: max-content; overflow: hidden; border-radius: var(--r-ctl); box-shadow: inset 0 0 0 1px var(--hair2); }
.k-chp.joined .k-chp-o { padding: 0 10px; border-radius: 0; box-shadow: none; background: transparent; font-size: var(--t-help); color: var(--mu); }
.k-chp.joined .k-chp-o.on, .k-chp.joined .k-chp-o[data-state="checked"] { background: var(--priw); color: var(--prit); }

/* Status: a coloured dot and a word, no box. Only what needs attention gets a fill.
   `plain` drops the dot, for tags and counts such as "40 new". */
.k-pill {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px 0 6px;
  border-radius: var(--r-in); font-size: var(--t-help); font-weight: 500; white-space: nowrap;
  background: transparent; color: var(--ink2);
}
.k-pill::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--mu); }
.k-pill:has(> .k-ic)::before, .k-pill.plain::before { display: none; }
.k-pill.plain { padding: 0 7px; background: var(--sur2); box-shadow: inset 0 0 0 1px var(--hair); }
.k-pill .k-ic { width: 12px; height: 12px; color: var(--mu); }
.k-pill.ok::before { background: var(--ok); }
.k-pill.ok .k-ic { color: var(--ok); }
.k-pill.pr::before { background: var(--prit); }
.k-pill.pr .k-ic { color: var(--prit); }
.k-pill.cy::before { background: var(--cy); }
.k-pill.cy .k-ic { color: var(--cy); }
.k-pill.mu::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--mu); }
.k-pill.wa { background: var(--warnw); color: var(--warn); }
.k-pill.wa::before, .k-pill.wa .k-ic { background: var(--warn); }
.k-pill.wa .k-ic { background: none; color: var(--warn); }
.k-pill.de { background: var(--delw); color: var(--del); }
.k-pill.de::before { background: var(--del); }
.k-pill.de .k-ic { color: var(--del); }
.k-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pri); color: #fff; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}

/* Marks and avatars */
.k-mk {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 20px; height: 20px; border-radius: var(--r-in); font-size: 10.5px; font-weight: 600;
  background: var(--priw); color: var(--prit);
}
.k-mk.b { background: var(--cyw); color: var(--cy); }
.k-mk.c { background: var(--okw); color: var(--ok); }
.k-mk.d { background: var(--warnw); color: var(--warn); }
.k-mk.e { background: var(--sur2); color: var(--ink2); box-shadow: inset 0 0 0 1px var(--line); }
.k-mk.s16 { width: 16px; height: 16px; border-radius: var(--r-xs); font-size: 9px; }
.k-mk.s30 { width: 30px; height: 30px; border-radius: var(--r-ctl); font-size: var(--t-small); }
.k-av {
  display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 13px; font-weight: 600; color: #fff; background: var(--avatar);
}
.k-av.s20 { width: 20px; height: 20px; font-size: 10px; }
.k-av.s28 { width: 28px; height: 28px; font-size: 11px; }
.k-av.s36 { width: 36px; height: 36px; font-size: 14px; }
.k-mk::before, .k-av::before { content: attr(data-letter); }

/* Tooltip: the name of an icon-only control. Put .k-tip inside the control and
   point aria-describedby or aria-label at the same words. */
.k-tip-root { position: relative; }
.k-tip {
  position: absolute; left: 50%; bottom: calc(100% + 6px); z-index: var(--z-pop);
  padding: 4px 8px; border-radius: var(--r-in); white-space: nowrap; pointer-events: none;
  background: var(--toast); color: var(--toast-ink); font: 500 var(--t-help)/1.3 var(--font-text);
  opacity: 0; transform: translate(-50%, 2px); transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.k-tip-root:hover > .k-tip, .k-tip-root:focus-visible > .k-tip { opacity: 1; transform: translate(-50%, 0); transition-delay: 400ms; }
.k-tip-root:focus-visible > .k-tip { transition-delay: 0ms; }

/* Cards, section heads, facts. Never a card inside a card. */
.k-card { border-radius: var(--r-panel); background: var(--sur); box-shadow: inset 0 0 0 1px var(--hair), var(--lift-2); overflow: hidden; }
.k-bh { display: flex; align-items: baseline; gap: 8px; }
.k-bh h2 { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink2); }
.k-bh > :last-child:not(h2) { margin-left: auto; font-size: var(--t-small); font-weight: 500; color: var(--prit); }
.k-fx { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: var(--t-small); color: var(--mu); }
.k-fx > span { display: inline-flex; gap: 5px; align-items: center; }
.k-fx .k-ic { width: 14px; height: 14px; }

/* Label list: no box, label, value, icon; hairlines between. */
.k-kvl-w { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.k-kvl-h { font-size: var(--t-small); font-weight: 500; color: var(--mu); }
.k-kvl { display: flex; flex-direction: column; margin: 0; }
.k-kvl-r {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: center;
  padding: 7px 0; border-bottom: 1px solid var(--hair); font-size: var(--t-small); color: var(--ink);
}
.k-kvl-r:last-child { border-bottom: 0; }
.k-kvl-r dt { color: var(--mu); }
.k-kvl-r dd { margin: 0; min-width: 0; display: flex; align-items: center; gap: 10px; }
.k-kvl-v { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.k-kvl-r dd > .k-ic { flex: none; width: 14px; height: 14px; color: var(--mu); }
.k-kvl-r dd > .k-ic.ok { color: var(--ok); }

/* Setting row: title left, control right, one line. */
.k-set { display: flex; align-items: center; gap: 12px; padding: 11px 16px; font-size: 13px; min-width: 0; }
.k-set + .k-set { border-top: 1px solid var(--hair); }
.k-set-t { flex: 1; min-width: 0; }
.k-set-t > b, .k-set-t > label { display: block; font-weight: 500; color: var(--ink); }
.k-set-t > span { display: block; margin-top: 1px; font-size: var(--t-help); color: var(--mu); }
.k-set-c { margin-left: auto; display: flex; gap: 8px; align-items: center; flex: none; }
.k-set-c .k-field { width: 220px; }

/* Tables: one grid template, on --cols, for every row. The header carries no
   tint but is opaque, because it sticks while the rows scroll under it. */
.k-tbl { border-radius: var(--r-panel); background: var(--sur); box-shadow: inset 0 0 0 1px var(--hair), var(--lift-2); overflow: auto; font-size: var(--t-small); overscroll-behavior: contain; }
.k-tr {
  display: grid; grid-template-columns: var(--cols); gap: 12px; align-items: center;
  min-height: 38px; padding: 0 14px; border-top: 1px solid var(--hair); color: var(--ink2); white-space: nowrap;
}
.k-tr:first-child { border-top: 0; }
.k-tr.hd {
  position: sticky; top: 0; z-index: var(--z-sticky); min-height: 32px;
  background: var(--sur); box-shadow: 0 1px 0 var(--hair); color: var(--mu); font-size: var(--t-help); font-weight: 500;
}
.k-tr[tabindex]:hover { background: var(--hov); }
.k-tr.sel { background: var(--priw); }
.k-tr.sel:hover { background: var(--priw); }
.k-td { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.k-td.n { text-align: right; font-variant-numeric: tabular-nums; }
.k-td.mono { font: 400 12px var(--font-mono); color: var(--ink); }
.k-td mark { background: var(--warnw); color: inherit; border-radius: 3px; padding: 0 1px; }
.k-th-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: default; }
.k-th-sort[aria-sort="ascending"]::after { content: "\2191"; }
.k-th-sort[aria-sort="descending"]::after { content: "\2193"; }
/* Operator tables may be dense: 32 px rows. The App's own tables stay at 38. */
.k-tbl.dense .k-tr { min-height: 32px; }

/* Sparkline: 14 bars, a missing day is a dot on the line. */
.k-spk { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; }
.k-spk i { display: block; width: 4px; border-radius: 1px; background: var(--prit); }
.k-spk i.z { height: 2px; background: var(--mu); }

/* Empty, loading, partial, failed */
.k-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 16px; color: var(--mu); font-size: var(--t-small); }
.k-empty b { color: var(--ink); font-size: var(--t-body); font-weight: 600; }
.k-empty p { margin: 0; line-height: 1.45; max-width: 46ch; }
.k-empty-i { width: 32px; height: 32px; border-radius: var(--r-ctl); display: flex; align-items: center; justify-content: center; background: var(--sur2); color: var(--mu); }
.k-empty.err b { color: var(--del); }
.k-loading { display: flex; align-items: center; gap: 8px; padding: 14px 16px; font-size: var(--t-small); color: var(--mu); }
.k-spin { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line2); border-top: 1.5px solid var(--prit); box-sizing: border-box; animation: k-spin .9s linear infinite; }
@keyframes k-spin { to { transform: rotate(1turn); } }
/* Skeleton: the page's real layout, waiting. Web apps' first load only. */
.k-skel { display: block; height: 12px; border-radius: var(--r-xs); background: linear-gradient(90deg, var(--sur2) 0, var(--hov) 50%, var(--sur2) 100%) 0 0 / 200% 100%; animation: k-skel 1.4s ease-in-out infinite; }
@keyframes k-skel { to { background-position: -200% 0; } }

/* Notice: something needs a look, or the page is partial or offline. */
.k-notice { display: flex; gap: 12px; align-items: center; padding: 10px 12px 10px 14px; border-radius: var(--r-ctl); background: var(--warnw); }
.k-notice > .k-ic { width: 18px; height: 18px; color: var(--warn); }
.k-notice.de { background: var(--delw); }
.k-notice.de > .k-ic { color: var(--del); }
.k-notice.mu { background: var(--sur2); box-shadow: inset 0 0 0 1px var(--hair); }
.k-notice.mu > .k-ic { color: var(--mu); }
.k-notice-t { flex: 1; min-width: 0; font-size: 13px; color: var(--ink2); }
.k-notice-t b { color: var(--ink); font-weight: 600; }
.k-notice-a { display: flex; gap: 6px; }

/* Sheets */
.k-scrim { position: fixed; inset: 0; z-index: var(--z-sheet); display: flex; justify-content: center; align-items: flex-start; padding-top: 70px; background: var(--scrim); overscroll-behavior: contain; }
.k-sheet { position: relative; max-height: calc(100vh - 110px); display: flex; flex-direction: column; border-radius: var(--r-panel); background: var(--sur); box-shadow: var(--shadow-pop); overflow: hidden; }
.k-sheet:focus { outline: 0; }
.k-sheet-h { display: flex; align-items: flex-start; gap: 12px; padding: 20px 52px 6px 22px; }
.k-sheet-ht { flex: 1; min-width: 0; }
.k-sheet-h h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
/* Only a consequence, a security note or an error remedy goes here (ruling 138). */
.k-sheet-h p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--mu); }
.k-sheet-aside { flex: none; padding-top: 3px; font-size: var(--t-small); color: var(--mu); }
.k-sheet-x { position: absolute; top: 14px; right: 14px; }
.k-sheet-b { padding: 10px 22px 18px; overflow: auto; overscroll-behavior: contain; }
.k-sheet-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--hair); }

/* Popovers and menus */
.k-pop-root, .k-menu-root { position: relative; display: inline-flex; }
.k-pop, .k-menu {
  position: absolute; z-index: var(--z-pop); min-width: 250px; padding: 4px; border-radius: var(--r-panel);
  background: var(--sur); box-shadow: var(--shadow-pop); color: var(--ink);
}
.k-pop { padding: 0; overflow: hidden; }
.k-pop.below, .k-menu.below { top: calc(100% + 6px); }
.k-pop.above, .k-menu.above { bottom: calc(100% + 6px); }
.k-pop.start, .k-menu.start { left: 0; }
.k-pop.end, .k-menu.end { right: 0; }
.k-pop:focus, .k-menu:focus { outline: 0; }
.k-ctx { position: fixed; }
.k-ctx-t, .k-ctx-plain, .k-ctx-wrap { display: contents; }
.k-mi {
  display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 8px; border-radius: var(--r-ctl);
  font-size: 13px; color: var(--ink2); cursor: default; white-space: nowrap;
}
.k-mi > .k-ic { width: 16px; height: 16px; color: var(--mu); }
.k-mi-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.k-mi-t small { display: block; margin-top: 1px; font-size: var(--t-help); color: var(--mu); }
.k-mi > em { font-style: normal; margin-left: auto; font-size: var(--t-help); color: var(--mu); }
.k-mi > .k-kbd { margin-left: auto; }
.k-mi > .k-mi-ck { margin-left: auto; color: var(--prit); width: 15px; height: 15px; }
.k-mi > .k-mi-sw { margin-left: auto; flex: none; position: relative; width: 28px; height: 16px; border-radius: 999px; background: var(--edge); transition: background .15s; }
.k-mi > .k-mi-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--thumb); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .15s; }
.k-mi > .k-mi-sw.on { background: var(--ok); }
.k-mi > .k-mi-sw.on::after { left: 14px; }
.k-mi:hover, .k-mi:focus, .k-mi[data-highlighted], .k-mi[data-focused="true"] { background: var(--hov); color: var(--ink); }
.k-mi.de, .k-mi.de > .k-ic { color: var(--del); }
.k-mi[aria-disabled="true"] { opacity: .45; }
.k-mi.two { height: auto; padding: 7px 8px; align-items: flex-start; }
.k-mi.two .k-mi-t { white-space: normal; }
.k-msep { height: 1px; margin: 4px 8px; background: var(--hair); }

/* Toasts: dark in both appearances, never wider than the screen. */
.k-toast {
  display: flex; align-items: center; gap: 12px; min-width: min(380px, 100vw - 32px); max-width: min(560px, 100vw - 32px);
  padding: 10px 10px 10px 14px; border-radius: var(--r-ctl); background: var(--toast); color: var(--toast-ink);
  box-shadow: 0 16px 40px -12px rgba(11, 16, 32, .5); font-size: 13px; -webkit-font-smoothing: antialiased;
}
.k-toast > .k-ic { width: 16px; height: 16px; color: var(--toast-accent); }
.k-toast-t { flex: 1; min-width: 0; }
.k-toast-t em { display: block; margin-top: 2px; font-style: normal; font-size: var(--t-help); color: var(--toast-mu); }
.k-toast-a {
  height: 28px; padding: 0 10px; border: 0; border-radius: var(--r-in); background: rgba(255, 255, 255, .1);
  color: #fff; font: 500 var(--t-small) var(--font-text); cursor: default;
}
.k-toast-a:hover { background: rgba(255, 255, 255, .18); }
.k-toast-x { display: flex; padding: 4px; border: 0; border-radius: var(--r-in); background: transparent; color: var(--toast-mu); cursor: default; }
.k-toast-x:hover { color: var(--toast-ink); }

/* ---- Patterns (2026-11-11, from the reference study in GUIDELINES.md) ---- */

/* Grouped list heading: Today, Yesterday, Last 7 days. Plain text, no rule. */
.k-group-h { margin: 0; padding: 16px 14px 6px; font-size: var(--t-small); font-weight: 500; color: var(--mu); }
.k-tbl .k-group-h { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--sur); }

/* Row actions: the end of a row, shown on hover or keyboard focus. Every action
   here is also in the row's right-click menu. On touch they always show. */
.k-tr { position: relative; }
.k-ra { display: inline-flex; gap: 2px; justify-self: end; opacity: 0; }
.k-tr:hover .k-ra, .k-tr:focus-within .k-ra, .k-tr.sel .k-ra { opacity: 1; }
@media (pointer: coarse) { .k-ra { opacity: 1; } }
.mobile .k-ra { opacity: 1; }

/* Inline add row: the last row of a small table, a field in place of each cell. */
.k-tr.add { background: var(--sur2); }
.k-tr.add .k-input { height: var(--ctl-sm); }

/* Progress bar and progress line. */
.k-prog { position: relative; height: 4px; border-radius: 999px; background: var(--sur2); box-shadow: inset 0 0 0 1px var(--hair); overflow: hidden; }
.k-prog > i { position: absolute; inset: 0 auto 0 0; width: var(--v, 0%); border-radius: inherit; background: var(--prit); }
.k-prog.ok > i { background: var(--ok); }
/* One line for a long job: what, how far, state. "4 of 12 records · Catching up" */
.k-pline { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--t-small); color: var(--mu); }
.k-pline b { font-weight: 500; color: var(--ink2); font-variant-numeric: tabular-nums; }
.k-pline .k-prog { flex: 0 0 80px; }
.k-pline .k-spin { flex: none; }

/* Setup checklist: Home's first-run steps (ruling 136). */
.k-steps { border-radius: var(--r-panel); background: var(--sur); box-shadow: inset 0 0 0 1px var(--hair), var(--lift-2); overflow: hidden; }
.k-steps-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.k-steps-h b { font-weight: 600; font-size: var(--t-body); }
.k-steps-h .k-prog { flex: 0 0 96px; margin-left: auto; }
.k-steps-h em { font-style: normal; font-size: var(--t-small); color: var(--mu); font-variant-numeric: tabular-nums; }
.k-step { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 14px; border-top: 1px solid var(--hair); font-size: var(--t-body); color: var(--ink2); }
.k-step::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--edge); }
.k-step.done { color: var(--mu); }
.k-step.done::before { background: var(--ok); box-shadow: none;
  -webkit-mask: radial-gradient(circle, #000 70%, transparent 71%); mask: radial-gradient(circle, #000 70%, transparent 71%); }
.k-step.done span { text-decoration: line-through; text-decoration-color: var(--line2); }
.k-step.next { background: var(--priw); color: var(--ink); }
.k-step.next::before { box-shadow: inset 0 0 0 1.5px var(--prit); }
.k-step > .k-btn { margin-left: auto; }

/* Filter bar: dropdown chips that each show their current value, and filter
   the whole page. The value is in the chip, never only in a hidden menu. */
.k-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.k-fchip {
  display: inline-flex; align-items: center; gap: 6px; height: var(--ctl-sm); padding: 0 8px 0 10px; border: 0;
  border-radius: var(--r-ctl); background: var(--sur); box-shadow: inset 0 0 0 1px var(--hair2);
  font: 500 var(--t-small) var(--font-text); color: var(--ink2); white-space: nowrap; cursor: default;
}
.k-fchip .k-ic { width: 14px; height: 14px; color: var(--mu); }
.k-fchip::after { content: ""; width: 6px; height: 6px; margin: -3px 0 0 2px; border: solid var(--mu); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.k-fchip:hover { background: var(--hov); }
.k-fchip.set { background: var(--priw); color: var(--prit); box-shadow: inset 0 0 0 1px var(--prit); }
.k-fchip.set .k-ic, .k-fchip.set::after { color: var(--prit); border-color: var(--prit); }
.k-filters-x { margin-left: 2px; }

/* Bulk action bar: appears when rows are selected, at the foot of the view. */
.k-bulk {
  position: sticky; bottom: 12px; z-index: var(--z-pop); display: flex; align-items: center; gap: 8px;
  width: max-content; max-width: calc(100% - 24px); margin: 12px auto 0; padding: 6px 6px 6px 14px;
  border-radius: var(--r-panel); background: var(--toast); color: var(--toast-ink); box-shadow: var(--shadow-pop);
  font-size: var(--t-small);
}
.k-bulk b { font-weight: 600; font-variant-numeric: tabular-nums; margin-right: 6px; }
.k-bulk .k-btn { height: var(--ctl-sm); background: transparent; color: var(--toast-ink); box-shadow: none; }
.k-bulk .k-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .1); }
.k-bulk .k-btn.dan { color: var(--toast-ink); }

/* Metrics: a small label over a large number, an optional change below. */
.k-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.k-metric { padding: 12px 14px; border-radius: var(--r-panel); background: var(--sur); box-shadow: inset 0 0 0 1px var(--hair), var(--lift-2); }
.k-metric span { display: block; font-size: var(--t-small); color: var(--mu); }
.k-metric b { display: block; margin-top: 2px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.k-metric em { display: block; margin-top: 2px; font-style: normal; font-size: var(--t-help); color: var(--mu); font-variant-numeric: tabular-nums; }
.k-metric em.up { color: var(--ok); }
.k-metric em.down { color: var(--del); }

/* Chart card: a head (title, range, export), the chart, a legend. Draw charts in
   SVG with the series colours below, one accent for the series that matters. */
.k-chart { border-radius: var(--r-panel); background: var(--sur); box-shadow: inset 0 0 0 1px var(--hair), var(--lift-2); }
.k-chart-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; }
.k-chart-h b { font-weight: 600; font-size: var(--t-body); }
.k-chart-h > :last-child { margin-left: auto; display: flex; gap: 6px; }
.k-chart-b { padding: 12px 14px; }
.k-chart-b svg { display: block; width: 100%; height: auto; overflow: visible; font: 400 11px var(--font-text); }
.k-chart-b .axis { stroke: var(--line); }
.k-chart-b .tick { fill: var(--mu); }
.k-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0 14px 12px; font-size: var(--t-help); color: var(--ink2); }
.k-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; background: var(--c, var(--mu)); }

/* A value with its share drawn behind it, inside a table cell. Set --v: 0-100%. */
.k-cellbar { position: relative; display: block; padding: 2px 6px; border-radius: var(--r-xs); font-variant-numeric: tabular-nums; z-index: 0; }
.k-cellbar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v, 0%); border-radius: inherit; background: var(--priw); z-index: -1; }
/* A score: a coloured dot and a number. */
.k-score { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; color: var(--ink2); }
.k-score::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--mu)); }

/* WebKit keeps a native-appearance button's colour from before a theme
   change; the kit's and shell's buttons draw themselves. */
.s-app button, .k-scrim button, .k-pop button, .k-menu button { -webkit-appearance: none; appearance: none; }

@media (prefers-reduced-motion: reduce) {
  .k-btn, .k-sw-thumb, .k-mi > .k-mi-sw, .k-mi > .k-mi-sw::after, .k-tip { transition: none; }
  .k-spin, .k-btn[aria-busy="true"]::before { animation-duration: 3s; }
  .k-skel { animation: none; }
}

/* Forced colours remove backgrounds and shadows. Anything drawn only with them
   gets a real border or a system colour here. */
@media (forced-colors: active) {
  .k-btn, .k-ib, .k-seg-o, .k-chp-o, .k-input, .k-select, .k-search { border: 1px solid ButtonText; }
  .k-seg-o.on, .k-seg-o[data-state="checked"], .k-chp-o.on, .k-chp-o[data-state="checked"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .k-tr.sel { outline: 2px solid Highlight; outline-offset: -2px; }
  .k-mi:hover, .k-mi:focus, .k-mi[data-highlighted], .k-mi[data-focused="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .k-sw, .k-mi > .k-mi-sw { forced-color-adjust: none; background: Canvas; box-shadow: inset 0 0 0 1px ButtonText; }
  .k-sw-thumb, .k-mi > .k-mi-sw::after { forced-color-adjust: none; background: ButtonText; box-shadow: none; }
  .k-sw[data-state="checked"], .k-mi > .k-mi-sw.on { background: Highlight; box-shadow: none; }
  .k-sw[data-state="checked"] .k-sw-thumb, .k-mi > .k-mi-sw.on::after { background: HighlightText; }
  .k-radio-dot { forced-color-adjust: none; background: Canvas; box-shadow: inset 0 0 0 1.5px ButtonText; }
  .k-radio[data-state="checked"] .k-radio-dot { box-shadow: inset 0 0 0 5px Highlight; }
  .k-fchip { border: 1px solid ButtonText; }
  .k-fchip.set { outline: 2px solid Highlight; outline-offset: -2px; }
  .k-prog { border: 1px solid ButtonText; }
  .k-prog > i, .k-step.done::before, .k-legend i, .k-score::before { forced-color-adjust: none; background: Highlight; }
  .k-bulk { border: 1px solid ButtonText; }
}

/* ---- web.css ---- */

/* web.css. Web apps: the Product register in a browser tab (the Explorer, operator
   consoles, any future Commons web app). Load after tokens.css and kit.css and
   put class="web" on <html>. The desktop App does not load this file: it is a
   window with its own shell (commons-app assets/shell.css).

   Breakpoints: 640 (phone), 1024 (tablet and narrow windows), 1280 (wide).
   New rules use logical properties (inline, block) so a right-to-left page can
   follow later; right-to-left is not yet designed. */

/* A web page uses the pointer cursor for things you can click. */
.web :where(a[href], button:not(:disabled), [role="button"], [role="tab"], summary, label[for], select,
  .k-btn, .k-ib, .k-seg-o, .k-chp-o, .k-sw, .k-mi, .k-radio, .k-check, .k-tr[tabindex]) { cursor: pointer; }
.web :where(button:disabled, .k-btn:disabled, [aria-disabled="true"]) { cursor: not-allowed; }
.web { -webkit-tap-highlight-color: transparent; }
.web :where(button, a, .k-btn) { touch-action: manipulation; }

/* Page shell: a top bar, then one centred column. */
.w-shell { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 400 var(--t-body)/1.5 var(--font-text); }
.w-bar { position: sticky; top: 0; z-index: var(--z-bar); height: var(--web-bar); display: flex; align-items: center; gap: var(--s-6); padding: 0 var(--web-gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--hair); }
.w-brand { display: flex; align-items: center; gap: 10px; flex: none; font-weight: 600; color: var(--ink); text-decoration: none; }
.w-brand img { height: 18px; width: auto; }
.w-tabs { display: flex; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none;
  /* Tabs that do not fit fade at the edge, so the overflow shows. */
  mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
.w-tabs:not(:has(> :last-child:nth-child(n+4))) { mask-image: none; }
.w-tab { flex: none; display: inline-flex; align-items: center; gap: 7px; height: var(--ctl-sm); padding: 0 10px; border-radius: var(--r-ctl);
  font-size: var(--t-control); font-weight: 500; color: var(--mu); text-decoration: none; }
.w-tab:hover { background: var(--hov); color: var(--ink); }
.w-tab[aria-current="page"] { background: var(--sur); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair2), var(--lift-1); }
.w-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.w-end { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.w-wrap { width: 100%; max-width: var(--web-wrap); margin: 0 auto; padding: var(--s-8) var(--web-gutter) var(--s-16); }
.w-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-6); }
.w-head h1 { margin: 0; font-size: var(--t-hero); font-weight: 600; letter-spacing: -.025em; line-height: 1.15; text-wrap: balance; }
.w-wrap.wide { max-width: none; }
/* More than five sections: a sidebar instead of tabs. */
.w-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); flex: 1; min-height: 0; }
.w-side { display: flex; flex-direction: column; gap: 1px; padding: var(--s-4) var(--s-2); background: var(--side); border-inline-end: 1px solid var(--hair); position: sticky; top: var(--web-bar); align-self: start; max-height: calc(100dvh - var(--web-bar)); overflow-y: auto; }
.w-side a { display: flex; align-items: center; gap: 9px; height: var(--ctl-sm); padding-inline: 10px; border-radius: var(--r-ctl); font-size: var(--t-control); font-weight: 500; color: var(--ink2); text-decoration: none; }
.w-side a:hover { background: var(--hov); }
.w-side a[aria-current="page"] { background: var(--priw); color: var(--prit); }
.w-side a:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.w-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-4); }

/* Section scrolling stops below the sticky bar, so focus is never hidden. */
.web { scroll-padding-top: calc(var(--web-bar) + 12px); }

/* Touch screens: 44 px targets and 16 px fields (no zoom on focus in iOS Safari). */
@media (pointer: coarse) {
  .web { --ctl: 44px; --ctl-sm: 44px; --hit: 44px; }
  .web .k-input, .web .k-search input { font-size: 16px; }
  .web .k-mi { height: 44px; }
  .web .k-sw::before { inset: -14px -8px; }
  .web .w-tab { height: 44px; }
}

@media (max-width: 1024px) {
  .w-layout { grid-template-columns: minmax(0, 1fr); }
  .w-side { display: none; }
  .w-bar { gap: var(--s-4); }
  .web .k-search { width: 100%; }
}
@media (max-width: 640px) {
  .web { --web-gutter: 16px; }
  .w-wrap { padding-top: var(--s-6); }
  .w-head h1 { font-size: 22px; }
  .w-brand span { display: none; }
  /* Tables become one record per card on a phone: give each cell a data-label. */
  .web .k-tbl[data-stack] .k-tr.hd { display: none; }
  .web .k-tbl[data-stack] .k-tr { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; padding: 12px 14px; }
  .web .k-tbl[data-stack] .k-td[data-label]::before { content: attr(data-label); display: block; font-size: var(--t-cap); color: var(--mu); }
}
@media (prefers-reduced-motion: reduce) { .web { scroll-behavior: auto; } }

/* ---- layout.css ---- */

/* Commons viewer: page layout only. The kit (tokens.css, kit.css, web.css)
   draws every component and carries every colour, size, radius and font. This
   file places them: grids, gaps, widths and the few element resets the kit
   leaves to the page. It names no colour that a token does not carry. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
:where(.k-ic) { width: 16px; height: 16px; }
a { color: var(--prit); text-underline-offset: .16em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-in); }
a.k-btn, a.k-seg-o, a.k-chp-o, a.k-pill, a.k-mi { text-decoration: none; }
h1, h2, h3, p, ul, ol, dl { margin: 0; }
.w-wrap h1, .w-wrap h2 { font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: var(--s-2); top: var(--s-2); z-index: var(--z-toast); padding: var(--s-2) var(--s-3); border-radius: var(--r-ctl); background: var(--sur); color: var(--ink); box-shadow: var(--shadow-pop); }

/* Small text helpers */
.muted { color: var(--mu); }
.mono { font-family: var(--font-mono); font-size: var(--t-small); overflow-wrap: anywhere; }
.num { font-variant-numeric: tabular-nums; }
.nullv { color: var(--mu); }
mark { background: var(--warnw); color: inherit; border-radius: 3px; padding: 0 1px; }
.k-help:empty { display: none; }

/* Page rhythm */
.v-stack { display: flex; flex-direction: column; gap: var(--s-6); min-width: 0; }
.v-stack.tight { gap: var(--s-4); }
.v-sec { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.v-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.v-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-3) var(--s-4); }
.v-card-b { padding: var(--s-4); }
.v-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-6); align-items: start; }
.w-head h1.v-key { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0; font-size: var(--t-title); overflow-wrap: anywhere; }
.w-head h1 { overflow-wrap: anywhere; min-width: 0; }

/* Crumbs: the kit has no breadcrumb, so this is its muted text line. */
.v-crumbs { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); font-size: var(--t-small); color: var(--mu); overflow-wrap: anywhere; }
.v-crumbs a { color: var(--mu); }
.v-crumbs [aria-current] { color: var(--ink2); }

/* Brand and header */
.v-mark { color: var(--mark); flex: none; }
.v-logo { display: block; height: 18px; width: auto; max-width: 160px; object-fit: contain; }
.w-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 28ch; }
.w-end .k-tip { bottom: auto; top: calc(100% + 6px); }
.v-hsearch .k-search { width: 240px; }
.v-pagesearch { display: flex; width: 100%; max-width: 520px; }
.v-pagesearch .k-search { width: 100%; }
.v-banner { padding-top: var(--s-3); }
[hidden] { display: none !important; }
.v-sug { list-style: none; margin: 0; padding: 4px; width: min(420px, 90vw); max-height: min(420px, 70vh); overflow: auto; }
.v-sug .k-mi-t > span { display: block; font-weight: 500; color: var(--ink); }

/* Filters */
.v-facets { display: flex; flex-direction: column; gap: var(--s-3); }
.v-facet { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.v-facet > .k-label { min-width: 56px; }
.v-sort { display: flex; align-items: center; gap: var(--s-2); }
.v-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.v-tabs .k-seg-o { white-space: nowrap; }

/* Tables */
.v-scroll { max-height: 640px; }
.v-scroll .k-tr, .v-val .k-tr { min-width: var(--min, 0); }
.v-reg { --cols: minmax(180px, 1.1fr) minmax(0, 1.6fr) 84px 110px 118px; }
.v-reg.changed { --cols: minmax(180px, 1.1fr) minmax(0, 1.6fr) 84px 110px 118px 118px; }
.v-reg .k-td a { font-weight: 500; }
.v-val .k-tr { white-space: normal; align-items: start; padding-block: var(--s-2); }
.v-val .k-tr.hd { padding-block: 0; align-items: center; }
.v-val .k-td { overflow: visible; overflow-wrap: anywhere; }
.v-val .k-td.t { color: var(--mu); font-size: var(--t-help); }
.v-val .k-tr.grp .k-td:first-child { font-weight: 600; color: var(--ink); }
.v-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s-1); }
.v-pre { margin: 0; padding: var(--s-4); overflow: auto; max-height: 480px; font: 400 var(--t-small)/1.55 var(--font-mono); color: var(--ink); white-space: pre; }
.v-rawbar { display: flex; justify-content: flex-end; padding: var(--s-2) var(--s-2) 0; }
.preview { display: flex; flex-direction: column; gap: var(--s-3); }
.preview img { max-width: 100%; height: auto; border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--hair); }
.preview embed { width: 100%; height: 520px; border: 0; border-radius: var(--r-panel); }
.preview > pre { margin: 0; max-height: 520px; overflow: auto; padding: var(--s-4); border-radius: var(--r-panel); background: var(--sur); box-shadow: inset 0 0 0 1px var(--hair); font: 400 var(--t-small)/1.55 var(--font-mono); }

/* Pager and paging footer */
.v-tfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-4); }
.v-pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.v-goto { display: inline-flex; align-items: center; gap: var(--s-2); margin-inline-start: var(--s-2); }
.v-goto .k-input { width: 72px; height: var(--ctl-sm); text-align: center; font-variant-numeric: tabular-nums; }

/* Lists and steps */
.v-list, .v-steps { padding-inline-start: 20px; display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--t-body); }
.v-hist { list-style: none; padding: 0; display: flex; flex-direction: column; }
.v-hist li { padding: var(--s-2) 0; border-top: 1px solid var(--hair); font-size: var(--t-small); }
.v-hist li:first-child { border-top: 0; }
.v-hist-t { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.v-hist-t > :last-child { margin-inline-start: auto; }
.v-cite { font-size: var(--t-small); overflow-wrap: anywhere; color: var(--ink2); }
.v-body { font-size: var(--t-body); max-width: 68ch; display: flex; flex-direction: column; gap: var(--s-3); }
.v-code-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--hair); }

/* Sheet, toast, footer */
.v-sheet { width: min(420px, calc(100vw - 32px)); }
.v-sheet .k-sheet-b { display: flex; flex-direction: column; gap: var(--s-2); }
.v-toasts { position: fixed; inset-inline: 0; bottom: var(--s-6); z-index: var(--z-toast); display: flex; justify-content: center; padding-inline: var(--s-4); pointer-events: none; }
.v-toasts > * { pointer-events: auto; }
.v-foot { margin-top: auto; border-top: 1px solid var(--hair); }
.v-foot .w-wrap { padding-block: var(--s-6); }

@media (max-width: 1024px) {
  .v-split { grid-template-columns: minmax(0, 1fr); }
  .v-reg, .v-reg.changed { --cols: minmax(160px, 1fr) 84px 110px 118px; }
  .v-reg.changed { --cols: minmax(160px, 1fr) 84px 110px 118px 118px; }
  .v-reg .v-sum { display: none; }
}
@media (max-width: 640px) {
  .v-hsearch { display: none; }
  .v-status.ok { display: none; }
  .v-toolbar { align-items: stretch; }
  .v-pagesearch { max-width: none; }
}
@media print {
  .w-bar, .v-banner, .v-foot, .v-tabs, .v-pager { display: none; }
}
.k-search.v-wide { width: 100%; max-width: 520px; }
.v-stack > .w-head { margin-bottom: 0; }
.k-td a, .v-crumbs a, .k-chp-o { text-decoration: none; }
.k-td a:hover, .v-crumbs a:hover { text-decoration: underline; }
/* A tooltip near the edge must not widen the page. */
.w-shell { overflow-x: clip; }
.w-end .k-tip { left: auto; right: 0; transform: none; }
.w-end .k-tip-root:hover > .k-tip, .w-end .k-tip-root:focus-visible > .k-tip { transform: none; }
body { font: 400 var(--t-body)/1.5 var(--font-text); }

/* Home: the node and what it holds, then the way in. */
.v-home { gap: var(--s-12); }
.v-hero { display: flex; flex-wrap: wrap; gap: var(--s-8) var(--s-12); align-items: flex-start; padding-top: var(--s-4); }
.v-hero-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-8); }
.v-hero-aside { flex: 1 1 300px; max-width: 360px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-3); padding-top: var(--s-2); }
.v-display { margin: 0; font-size: clamp(32px, 4.4vw, 48px); font-weight: 600; letter-spacing: -.03em; line-height: 1.08; text-wrap: balance; }
.v-lede { margin: 0; font-size: 18px; color: var(--ink2); max-width: 56ch; }
.v-hero-search { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.v-hero-search .v-pagesearch { flex: 1 1 360px; max-width: 560px; }
.v-hero-search .k-search { height: 44px; }
.v-intro { display: flex; flex-wrap: wrap; gap: var(--s-8) var(--s-16); padding-top: var(--s-6); border-top: 1px solid var(--hair); }
.v-intro > * { flex: 1 1 360px; }
.v-intro h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.v-intro p, .v-intro ol { margin: 0; color: var(--ink2); max-width: 60ch; }
.v-intro ol { padding-inline-start: 20px; display: flex; flex-direction: column; gap: var(--s-2); }
.v-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.v-fact { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-1); }
.v-fact b { font-weight: 600; }
.v-fact span { color: var(--mu); font-size: var(--t-small); }
.v-big { padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-3); min-height: 150px; color: var(--ink); text-decoration: none; }
.v-big:hover { background: var(--hov); text-decoration: none; }
.v-big-t { font-weight: 500; overflow-wrap: anywhere; }
.v-big-n { margin-top: auto; font-size: 34px; font-weight: 600; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.v-big-m { font-size: var(--t-small); color: var(--mu); }

/* A value: what it is and how to read it, then the bytes as a table. */
.v-strip { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: var(--sur); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--hair); flex-wrap: wrap; }
.v-strip > .k-ic { width: 20px; height: 20px; color: var(--mu); flex: none; }
.v-strip-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.v-strip-t span:first-child { font-weight: 500; }
.v-strip-t .muted { font-size: var(--t-small); }
.v-pane { min-width: 0; }
.v-hexcard { padding: 0; overflow-x: auto; }
.v-hex { min-width: 640px; font: 400 12.5px/1 var(--font-mono); }
.v-hx { display: flex; align-items: center; gap: 20px; height: 28px; padding: 0 var(--s-4); }
.v-hx:nth-child(even) { background: color-mix(in srgb, var(--sur2) 55%, transparent); }
.v-hx.hd { height: 36px; background: none; border-bottom: 1px solid var(--hair); color: var(--mu); font-weight: 500; }
.v-hx.hd .o, .v-hx.hd .t { font-family: var(--font-text); font-size: 12px; }
.v-hx .o { width: 56px; color: var(--mu); flex: none; }
.v-hx .g { display: flex; width: 192px; flex: none; }
.v-hx .g > span { width: 24px; text-align: center; }
.v-hx .t { flex: 1; display: flex; letter-spacing: .08em; }
.v-hx .t > span { width: 1ch; }
.v-hx .z { color: var(--mu); }

@media (max-width: 1024px) {
  .v-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .v-facts { grid-template-columns: minmax(0, 1fr); }
  .v-hero-aside { max-width: none; }
}

