/* =====================================================================================
   PieceDesk « Ardoise » : the software components (DIRECTION.md section 5), on top of tokens.css.
   Import order: ../../tokens.css, ../../shared/slate.css, ../shared/app.css, ../shared/shell.css.
   Every colour is a role (--app-*, --paper-*); no raw value lives here (S11).
   Light by default; [data-theme="dark"] on the .pd-app element switches every role at once.
   State classes .is-hover, .is-focus, .is-active force a state for the kit only; real pages use
   the pseudo-classes. Hover rules live under @media (hover: hover) only (H16).
   ===================================================================================== */

/* ---------- 00. The narrow no-break space (U+202F) ----------
   fr() puts U+202F inside « » and before ? ! ; and in « 8.1 % ». The Source Sans 3 and Fragment Mono cuts in brand/fonts
   have no glyph for it (checked with fontTools, 2026-10-25 and 2026-10-26), and Chromium then draws half a word space
   (HarfBuzz's fallback), about 1.5 px at 15 px, so « 8.1 % » reads « 8.1% ». These faces join each family with the same
   descriptors and only U+202F: the character is taken from the system's Arial (0.2 em, the width of the text face's
   own word space), or the next local face that has it. Declared here and in site.css, so every page has them. */
@font-face { font-family: "PD Text"; src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans"), local("Arimo"); font-weight: 400; font-style: normal; unicode-range: U+202F; }
@font-face { font-family: "PD Text"; src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans"), local("Arimo"); font-weight: 500; font-style: normal; unicode-range: U+202F; }
@font-face { font-family: "PD Text"; src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans"), local("Arimo"); font-weight: 600; font-style: normal; unicode-range: U+202F; }
/* one face per weight, never a range: tokens.css declares Source Sans 3 at 600 and 700 separately, and Chromium picks a
   « 600 700 » face for a 600 request, so every other character fell through to Arial Bold (2026-10-26) */
@font-face { font-family: "PD Text"; src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans"), local("Arimo"); font-weight: 700; font-style: normal; unicode-range: U+202F; }
@font-face { font-family: "PD Display"; src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans"), local("Arimo"); font-weight: 600; font-style: normal; unicode-range: U+202F; }
@font-face { font-family: "PD Title"; src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans"), local("Arimo"); font-weight: 600; font-style: normal; unicode-range: U+202F; }
@font-face { font-family: "PD Mono"; src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans"), local("Arimo"); font-weight: 400; font-style: normal; unicode-range: U+202F; }

/* ---------- 0. Base inside the software ---------- */
.pd-app {
  --pd-hover-here: var(--app-hover-canvas);   /* quiet controls on the canvas */
  --pd-pad: var(--pd-s-4);                     /* content padding: 32, phone 16 */
  font: 400 var(--pd-app-body-size)/var(--pd-app-body-lh) var(--pd-font-text);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.pd-app, .pd-app *, .pd-app *::before, .pd-app *::after { box-sizing: border-box; }
.pd-app :where(h1, h2, h3, h4, h5, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.pd-app :where(ul, ol) { padding: 0; list-style: none; }
.pd-app :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
.pd-app :where(a) { color: inherit; text-decoration: none; }
.pd-app :where(table) { border-collapse: separate; border-spacing: 0; }
.pd-app :where(input, textarea) { font: inherit; color: inherit; margin: 0; }
.pd-app :where(svg) { flex: none; }
.pd-app [hidden] { display: none !important; }
.pd-app :focus { outline: none; }
.pd-app :focus-visible, .pd-app .is-focus {
  outline: 2px solid var(--app-focus); outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--app-focus-inner);
}
.pd-card, .pd-pop, .pd-dialog, .pd-sheet, .pd-cmd, .pd-top, .pd-table-wrap { --pd-hover-here: var(--app-hover); }
.pd-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pd-notrans, .pd-notrans * { transition: none !important; }

/* ---------- 1. Type (one title size and one body size per screen, 4.3) ----------
   Every size reads a token of tokens.css (Source Sans 3, 2026-10-26). A component that needs its own size takes the
   old one plus one step, as the tokens did: a control 16/20, a dialog title 21/28, a tag 14/16 (DIRECTION 4.3). */
.pd-h1 { font: 600 var(--pd-app-h1-size)/var(--pd-app-h1-lh) var(--pd-font-title); letter-spacing: var(--pd-app-h1-track); color: var(--app-text); text-wrap: balance; }
.pd-sub { font-size: var(--pd-app-body-size); line-height: var(--pd-app-body-lh); color: var(--app-text-2); }
.pd-title { font: 600 var(--pd-app-title-size)/var(--pd-app-title-lh) var(--pd-font-text); letter-spacing: var(--pd-app-title-track, 0); color: var(--app-text); }
.pd-dtitle { font: 600 var(--pd-app-dtitle-size, 21px)/var(--pd-app-dtitle-lh, 28px) var(--pd-font-title); letter-spacing: -0.01em; color: var(--app-text); }
.pd-strong { font-weight: 600; }
.pd-label { display: block; font: 500 var(--pd-app-label-size)/var(--pd-app-label-lh) var(--pd-font-text); color: var(--app-text); }
.pd-meta { font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-3); }
.pd-meta2 { font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-2); }
.pd-code { font-family: var(--pd-font-mono); font-size: var(--pd-app-mono-size); line-height: var(--pd-app-mono-lh); font-weight: 400; letter-spacing: 0; white-space: nowrap; }
.pd-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-amt { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; font-weight: 600; }
.pd-crit { color: var(--app-crit-ink); }
.pd-money { font: 600 var(--pd-app-money-size)/var(--pd-app-money-lh) var(--pd-font-title); letter-spacing: var(--pd-app-money-track, -0.01em); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--app-text); }
.pd-money .pd-cur { font: 400 17px/1 var(--pd-font-text); letter-spacing: 0; color: var(--app-text-2); margin-right: 6px; }
.pd-a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 600; }
@media (hover: hover) { .pd-a:hover { text-decoration-thickness: 2px; } }
.pd-kbd { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border: 1px solid var(--app-border); border-radius: var(--app-r-chip); font: 400 12px/18px var(--pd-font-mono); color: var(--app-text-2); white-space: nowrap; }
.pd-ic { display: block; flex: none; }

/* ---------- 2. Buttons (5.1) ---------- */
.pd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--pd-s-1);
  height: var(--pd-control-h); min-width: var(--pd-control-h); padding: 0 var(--pd-s-2);
  border: 1px solid transparent; border-radius: var(--app-r-control);
  font: 600 var(--pd-app-btn-size, 16px)/20px var(--pd-font-text); white-space: nowrap; text-decoration: none;
  color: var(--app-text); background: transparent; cursor: pointer; user-select: none;
  transition: background-color var(--pd-dur-2) var(--pd-ease-out), border-color var(--pd-dur-2) var(--pd-ease-out), color var(--pd-dur-2) var(--pd-ease-out), box-shadow var(--pd-dur-1) linear;
  -webkit-tap-highlight-color: transparent;
}
.pd-btn > .pd-ic { width: 20px; height: 20px; }
.pd-btn--primary { background: var(--app-solid); color: var(--app-on-solid); box-shadow: var(--app-shadow-primary); }
.pd-btn--secondary { background: var(--app-tint); border-color: var(--app-tint-edge); color: var(--app-text); }   /* tinted (the software), or white in its outline (a frame on the site) */
.pd-btn--quiet { background: transparent; color: var(--app-text); }
.pd-btn--danger { background: var(--app-danger); color: var(--app-on-danger); }
.pd-btn--crit { background: transparent; color: var(--app-crit-ink); }                 /* « Supprimer » outside a dialog, with Trash2 */
.pd-btn--accent { background: var(--app-accent); color: var(--app-on-accent); }        /* public pages only (3.2) */
.pd-btn--icon { width: var(--pd-control-h); padding: 0; background: transparent; color: var(--app-text-2); }
.pd-btn--block { display: flex; width: 100%; }
.pd-btn--compact { height: var(--pd-control-h-compact); min-width: var(--pd-control-h-compact); padding: 0 var(--pd-s-15); }
@media (hover: hover) {
  .pd-btn--primary:hover { background: var(--app-solid-hover); }
  .pd-btn--secondary:hover { background: var(--app-tint-hover); }
  .pd-btn--quiet:hover, .pd-btn--icon:hover, .pd-btn--crit:hover { background: var(--app-quiet-hover, var(--pd-hover-here)); color: var(--app-text); }
  .pd-btn--crit:hover { color: var(--app-crit-ink); }
  .pd-btn--danger:hover { background: var(--app-danger-hover); }
  .pd-btn--accent:hover { background: color-mix(in srgb, var(--app-accent) 84%, var(--app-text)); }
}
.pd-btn--primary.is-hover { background: var(--app-solid-hover); }
.pd-btn--secondary.is-hover { background: var(--app-tint-hover); }
.pd-btn--quiet.is-hover, .pd-btn--icon.is-hover { background: var(--app-quiet-hover, var(--pd-hover-here)); color: var(--app-text); }
.pd-btn--danger.is-hover { background: var(--app-danger-hover); }
/* pressed: the fill steps one tone darker and the button sinks into its own shade (an inner shadow); no scale, no lift,
   nothing moves (H4) */
.pd-btn--primary:active, .pd-btn--primary.is-active { background: var(--app-solid-press); box-shadow: var(--app-shadow-press); }
.pd-btn--secondary:active, .pd-btn--secondary.is-active { background: var(--app-tint-press); color: var(--app-text); }
.pd-btn--quiet:active, .pd-btn--quiet.is-active, .pd-btn--icon:active, .pd-btn--icon.is-active, .pd-btn--crit:active { background: var(--app-quiet-press, var(--app-selected)); color: var(--app-text); }
.pd-btn--crit:active { color: var(--app-crit-ink); }
.pd-btn--danger:active, .pd-btn--danger.is-active { background: var(--app-danger-hover); }
.pd-btn[aria-pressed="true"], .pd-btn[aria-expanded="true"].pd-btn--icon { background: var(--app-quiet-press, var(--app-selected)); color: var(--app-text); }
/* disabled: keeps its place (H14). Sunken fill and meta text: 7.22:1 light, 7.19:1 dark (see README) */
.pd-btn:disabled, .pd-btn[aria-disabled="true"] { cursor: not-allowed; }
.pd-btn--primary:disabled, .pd-btn--secondary:disabled, .pd-btn--danger:disabled, .pd-btn--accent:disabled,
.pd-btn--primary[aria-disabled="true"], .pd-btn--secondary[aria-disabled="true"], .pd-btn--danger[aria-disabled="true"], .pd-btn--accent[aria-disabled="true"] {
  background: var(--app-surface-2); border-color: transparent; color: var(--app-text-3); box-shadow: none;
}
.pd-btn--quiet:disabled, .pd-btn--icon:disabled, .pd-btn--crit:disabled, .pd-btn--quiet[aria-disabled="true"] { background: transparent; color: var(--app-text-3); }
/* loading over 300 ms: the label becomes the progress word, width kept, disabled. No spinner (S14) */
.pd-btn.is-loading { cursor: progress; }
.pd-btn.is-loading.pd-btn--primary { background: var(--app-solid-hover); color: var(--app-on-solid); }
.pd-btn.is-loading.pd-btn--secondary { background: var(--app-surface); color: var(--app-text); border-color: var(--app-border); }
.pd-btn .pd-btn__count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--app-r-chip); background: var(--app-solid); color: var(--app-on-solid); font: 600 var(--pd-app-count-size)/var(--pd-app-count-lh) var(--pd-font-text); }

/* the floating button (lists on phones) and the phone action bar */
.pd-fab {
  position: fixed; right: var(--pd-s-2); bottom: calc(var(--pd-tabbar-total, 0px) + var(--pd-actionbar-h, 0px) + var(--pd-s-2)); z-index: var(--pd-z-sticky);
  width: var(--pd-fab); height: var(--pd-fab); border-radius: var(--app-r-fab, var(--pd-r-2)); display: grid; place-items: center;
  background: var(--app-solid); color: var(--app-on-solid); box-shadow: var(--app-shadow-pop);
  transition: background-color var(--pd-dur-2) var(--pd-ease-out);
}
.pd-fab .pd-ic { width: 24px; height: 24px; }
.pd-fab:active { background: var(--app-solid-press); }
@media (hover: hover) { .pd-fab:hover { background: var(--app-solid-hover); } }
@media (min-width: 768px) { .pd-fab { display: none; } }
.pd-actionbar {
  position: fixed; left: 0; right: 0; bottom: var(--pd-tabbar-total, 0px); z-index: var(--pd-z-sticky);
  display: flex; gap: var(--pd-s-1); padding: var(--pd-s-15) var(--pd-s-2);
  background: var(--app-surface); border-top: 1px solid var(--app-line);
}
.pd-actionbar > .pd-btn { flex: 1; }
@media (max-width: 767px) { body.pd-app:has(.pd-actionbar) { --pd-actionbar-h: 69px; } }
@media (min-width: 768px) { .pd-actionbar { position: static; padding: var(--pd-s-2) 0 0; background: none; border: 0; justify-content: flex-end; } .pd-actionbar > .pd-btn { flex: none; } }

/* ---------- 3. Fields (5.2) ---------- */
.pd-field { display: flex; flex-direction: column; gap: var(--pd-s-1); min-width: 0; }
.pd-help { font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-3); }
.pd-error { display: flex; align-items: flex-start; gap: 6px; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-crit-ink); }
.pd-error .pd-ic { width: 16px; height: 16px; margin-top: 1px; color: var(--app-crit); }   /* centred on the capitals of the first 19 px line */
.pd-success { display: flex; align-items: center; gap: 6px; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-2); }
.pd-input, .pd-select, .pd-textarea {
  display: block; width: 100%; min-width: 0; height: var(--pd-control-h); padding: 0 var(--pd-s-15);
  border: 1px solid var(--app-border); border-radius: var(--app-r-control);
  background: var(--app-field); color: var(--app-text);
  font: 400 var(--pd-app-input-size)/var(--pd-app-input-lh) var(--pd-font-text);
  transition: border-color var(--pd-dur-2) var(--pd-ease-out);
  -webkit-appearance: none; appearance: none;
}
.pd-input::placeholder, .pd-textarea::placeholder { color: var(--app-text-3); opacity: 1; }
.pd-textarea { height: auto; min-height: calc(3 * 24px + 2 * 10px + 2px); max-height: calc(8 * 24px + 2 * 10px + 2px); padding: 10px var(--pd-s-15); resize: none; overflow-y: auto; field-sizing: content; }
@media (hover: hover) { .pd-input:hover:not(:disabled):not(:focus), .pd-select:hover:not(:disabled), .pd-textarea:hover:not(:disabled):not(:focus) { border-color: var(--app-text-2); } }
.pd-input.is-hover, .pd-select.is-hover { border-color: var(--app-text-2); }
.pd-input:focus, .pd-textarea:focus, .pd-select:focus-visible, .pd-select[aria-expanded="true"], .pd-input.is-focus, .pd-select.is-focus {
  border-color: var(--app-text); outline: 2px solid var(--app-focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--app-focus-inner);
}
.pd-input:disabled, .pd-textarea:disabled, .pd-select:disabled, .pd-select[aria-disabled="true"] { background: var(--app-surface-2); color: var(--app-text-3); cursor: not-allowed; }
.pd-input[readonly] { background: var(--app-surface-2); }
.pd-field.is-error .pd-input, .pd-field.is-error .pd-select, .pd-field.is-error .pd-textarea, .pd-input[aria-invalid="true"] { border: 2px solid var(--app-crit); padding-left: 11px; padding-right: 11px; }
.pd-field.is-error .pd-textarea { padding-top: 9px; padding-bottom: 9px; }
/* a field and its button share the line and the height (H13); under 640 the button goes under */
.pd-inline { display: flex; gap: var(--pd-s-1); align-items: flex-start; }
.pd-inline > .pd-input, .pd-inline > .pd-select, .pd-inline > .pd-money, .pd-inline > .pd-affix { flex: 1; }
.pd-inline > .pd-btn { flex: none; }
@media (max-width: 639px) { .pd-inline { flex-direction: column; align-items: stretch; } .pd-inline > * { flex: none !important; } .pd-inline > .pd-btn { width: 100%; } }

/* field with an icon button inside (date, time, password): the button is a 44 square at the right */
.pd-affix { position: relative; display: block; min-width: 0; }
.pd-affix > .pd-input { padding-right: 48px; }
.pd-affix > .pd-btn--icon { position: absolute; top: 0; right: 0; height: 44px; border: 1px solid transparent; background-clip: padding-box; border-radius: 0 var(--app-r-control) var(--app-r-control) 0; color: var(--app-text-2); }
.pd-affix > .pd-btn--icon[aria-pressed="true"] { background-color: transparent; color: var(--app-text); }
.pd-affix > .pd-btn--icon .pd-ic { width: 20px; height: 20px; }

/* money: « CHF » inside, digits right-aligned and tabular, chf() on blur, true minus */
.pd-money-in { position: relative; display: block; min-width: 0; }
.pd-money-in > .pd-cur { position: absolute; left: 13px; top: 0; height: 44px; display: flex; align-items: center; font-size: 16px; color: var(--app-text-2); pointer-events: none; }
.pd-money-in > .pd-input { padding-left: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.pd-money-in > .pd-input[readonly] { color: var(--app-text); font-weight: 600; }

/* custom select (ListPicker), never <select> (S2) */
.pd-select { display: flex; align-items: center; gap: var(--pd-s-1); text-align: left; cursor: pointer; padding-right: 10px; }
.pd-select > .pd-select__value { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-select > .pd-select__value.is-placeholder { color: var(--app-text-3); }
.pd-select > .pd-ic { width: 20px; height: 20px; color: var(--app-text-2); transition: transform var(--pd-dur-2) var(--pd-ease-out); }
.pd-select[aria-expanded="true"] > .pd-ic { transform: rotate(180deg); }
.pd-select .pd-select__pre { color: var(--app-text-2); }

/* checkbox 20 square radius 2, radio 20 circle, each in a 44 hit area */
.pd-check { position: relative; display: inline-flex; align-items: center; gap: var(--pd-s-1); min-height: 44px; cursor: pointer; font-size: var(--pd-app-body-size); line-height: var(--pd-app-body-lh); }
.pd-check__input { position: absolute; left: -12px; top: 50%; width: 44px; height: 44px; margin: -22px 0 0; opacity: 0; cursor: pointer; z-index: 1; }
.pd-check__box { position: relative; flex: none; width: 20px; height: 20px; border: 1px solid var(--app-border); border-radius: var(--app-r-chip); background: var(--app-surface); color: var(--app-on-solid); display: grid; place-items: center; transition: background-color var(--pd-dur-1) linear, border-color var(--pd-dur-1) linear; }
.pd-check__box .pd-ic { width: 16px; height: 16px; opacity: 0; stroke-width: 2.25; }
.pd-check--radio .pd-check__box { border-radius: var(--pd-r-round); }
.pd-check--radio .pd-check__box::after { content: ""; width: 10px; height: 10px; border-radius: var(--pd-r-round); background: var(--app-on-solid); opacity: 0; }
.pd-check__input:checked + .pd-check__box { background: var(--app-solid); border-color: var(--app-solid); }
.pd-check__input:checked + .pd-check__box .pd-ic, .pd-check--radio .pd-check__input:checked + .pd-check__box::after { opacity: 1; }
.pd-check__input:focus-visible + .pd-check__box { outline: 2px solid var(--app-focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--app-focus-inner); }
@media (hover: hover) { .pd-check:hover .pd-check__input:not(:checked):not(:disabled) + .pd-check__box { border-color: var(--app-text); } }
.pd-check__input:disabled + .pd-check__box { background: var(--app-surface-2); border-color: var(--app-border); }
.pd-check__input:disabled ~ .pd-check__label { color: var(--app-text-3); }
.pd-check:has(.pd-check__input:disabled) { cursor: not-allowed; }

/* switch: a 44 × 24 rectangle radius 2, a 20 square knob, never a stadium; in a 44 high button */
.pd-switch { position: relative; display: inline-flex; align-items: center; flex: none; width: 44px; height: 44px; cursor: pointer; border-radius: var(--pd-r-1); }
.pd-switch__track { position: relative; width: 44px; height: 24px; border: 1px solid var(--app-border); border-radius: var(--pd-r-1); background: var(--app-surface); transition: background-color var(--pd-dur-2) var(--pd-ease-out), border-color var(--pd-dur-2) var(--pd-ease-out); }
.pd-switch__track::after { content: ""; position: absolute; top: 1px; left: 1px; width: 20px; height: 20px; border-radius: 1px; background: var(--app-text-2); transition: transform var(--pd-dur-2) var(--pd-ease-out), background-color var(--pd-dur-2) var(--pd-ease-out); }
.pd-switch[aria-checked="true"] .pd-switch__track { background: var(--app-solid); border-color: var(--app-solid); }
.pd-switch[aria-checked="true"] .pd-switch__track::after { transform: translateX(20px); background: var(--app-on-solid); }
@media (hover: hover) { .pd-switch:hover:not(:disabled) .pd-switch__track { border-color: var(--app-text); } .pd-switch[aria-checked="true"]:hover:not(:disabled) .pd-switch__track { background: var(--app-solid-hover); border-color: var(--app-solid-hover); } }
.pd-switch:disabled { cursor: not-allowed; }
.pd-switch:disabled .pd-switch__track { background: var(--app-surface-2); border-color: var(--app-border); }
.pd-switch:disabled .pd-switch__track::after { background: var(--app-text-3); }
.pd-switch-row { display: inline-flex; align-items: center; gap: var(--pd-s-15); min-height: 44px; }
.pd-switch-row > span { font-size: var(--pd-app-body-size); line-height: var(--pd-app-body-lh); }

/* segmented control: 44 buttons in one 1 px outline, radius 4; selected = --app-selected and 600 */
/* the 1 px outline is drawn over the segments (outline, offset −1) so each segment is a full 44 target */
.pd-seg { display: inline-flex; align-items: stretch; height: var(--pd-control-h); outline: 1px solid var(--app-seg-edge); outline-offset: -1px; border-radius: var(--app-r-control); background: var(--app-seg-track); max-width: 100%; }
.pd-seg > button, .pd-seg > a {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; padding: 0 var(--pd-s-2);
  font: 500 var(--pd-app-btn-size, 16px)/20px var(--pd-font-text); color: var(--app-text-2); white-space: nowrap; border-radius: 0;
  transition: background-color var(--pd-dur-2) var(--pd-ease-out), color var(--pd-dur-2) var(--pd-ease-out);
}
.pd-seg > :first-child { border-radius: 3px 0 0 3px; }
.pd-seg > :last-child { border-radius: 0 3px 3px 0; }
.pd-seg > [aria-pressed="true"], .pd-seg > [aria-selected="true"], .pd-seg > [aria-current="page"] { background: var(--app-seg-thumb); color: var(--app-text); font-weight: 600; }
@media (hover: hover) { .pd-seg > :not([aria-pressed="true"]):not([aria-selected="true"]):not([aria-current="page"]):hover { background: var(--app-hover); color: var(--app-text); } }
.pd-seg > button:disabled { color: var(--app-text-3); cursor: not-allowed; }
.pd-seg > :focus-visible, .pd-tabs > :focus-visible { position: relative; z-index: 1; }
.pd-seg--block { display: flex; width: 100%; }
.pd-seg--block > * { flex: 1; padding: 0 var(--pd-s-1); }
.pd-seg .pd-seg__n { font-weight: 400; color: var(--app-text-2); }

/* page tabs: quiet 44 buttons, current = --app-selected and 600; no underline bar (5.6) */
.pd-tabs { display: flex; flex-wrap: wrap; gap: var(--pd-s-05); }
.pd-tabs > [role="tab"], .pd-tabs > a {
  display: inline-flex; align-items: center; gap: 6px; height: var(--pd-control-h); padding: 0 var(--pd-s-2); border-radius: var(--app-r-control);
  font: 500 var(--pd-app-btn-size, 16px)/20px var(--pd-font-text); color: var(--app-text-2); white-space: nowrap;
  transition: background-color var(--pd-dur-2) var(--pd-ease-out), color var(--pd-dur-2) var(--pd-ease-out);
}
.pd-tabs > [aria-selected="true"], .pd-tabs > [aria-current="page"] { background: var(--app-tab-on, var(--app-selected)); box-shadow: var(--app-tab-on-shadow, none); color: var(--app-text); font-weight: 600; }
@media (hover: hover) { .pd-tabs > :not([aria-selected="true"]):not([aria-current="page"]):hover { background: var(--app-quiet-hover, var(--pd-hover-here)); color: var(--app-text); } }
.pd-tabs-select { display: none; }
@media (max-width: 639px) { .pd-tabs.has-select { display: none; } .pd-tabs-select { display: flex; } }

/* ---------- 4. Cards, panels, banners (5.3) ---------- */
.pd-card { background: var(--app-surface); border: 1px solid var(--app-line); border-radius: var(--app-r-card); box-shadow: var(--app-shadow-card); padding: var(--pd-s-25); min-width: 0; }
.pd-card__head { display: flex; align-items: center; gap: var(--pd-s-1); min-height: 44px; margin: -12px 0 var(--pd-s-05); }
.pd-card__head > .pd-title { min-width: 0; }
.pd-card__head > .pd-meta, .pd-card__head > .pd-meta2 { min-width: 0; }
.pd-card__end { margin-left: auto; display: flex; align-items: center; gap: var(--pd-s-05); }
.pd-count { display: inline-grid; place-items: center; flex: none; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--app-r-chip); background: var(--app-solid); color: var(--app-on-solid); font: 600 var(--pd-app-count-size)/var(--pd-app-count-lh) var(--pd-font-text); font-variant-numeric: tabular-nums; }
.pd-more { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 var(--pd-s-1); margin-right: -8px; border-radius: var(--pd-r-2); font: 600 var(--pd-app-label-size)/20px var(--pd-font-text); color: var(--app-text); white-space: nowrap; transition: background-color var(--pd-dur-2) var(--pd-ease-out); }
.pd-more .pd-ic { width: 16px; height: 16px; transition: transform var(--pd-dur-3) var(--pd-ease-out); }
@media (hover: hover) { .pd-more:hover { background: var(--pd-hover-here); } .pd-more:hover .pd-ic { transform: translateX(3px); } }
.pd-rows > * + * { border-top: 1px solid var(--app-line); }
.pd-row { display: flex; align-items: center; gap: var(--pd-s-15); min-height: 48px; padding: var(--pd-s-15) 0; min-width: 0; }
.pd-row__main { flex: 1; min-width: 0; }
.pd-row__end { margin-left: auto; text-align: right; flex: none; }
.pd-card__foot { display: flex; align-items: center; gap: var(--pd-s-15); flex-wrap: wrap; border-top: 1px solid var(--app-line); padding-top: var(--pd-s-15); margin-top: var(--pd-s-05); margin-bottom: -8px; }
.pd-card__foot > .pd-btn:last-child { margin-left: auto; }
@media (max-width: 767px) { .pd-card { padding: var(--pd-s-2); } .pd-card__head { margin-top: -10px; } }

/* settings panels have no card: one row per subject (5.3) */
.pd-setrows { border-top: 1px solid var(--app-line); }
.pd-setrow { display: flex; align-items: center; gap: var(--pd-s-2); min-height: 64px; padding: var(--pd-s-1) 0; border-bottom: 1px solid var(--app-line); }
.pd-setrow > .pd-setrow__label { flex: 1; min-width: 0; font-weight: 600; }
.pd-setrow > .pd-setrow__value { color: var(--app-text-2); text-align: right; }
@media (max-width: 639px) { .pd-setrow { flex-wrap: wrap; row-gap: var(--pd-s-05); } .pd-setrow > .pd-setrow__value { text-align: left; } }

/* banner inside the content: sunken fill, glyph or icon 20, one action on the same line (5.3) */
.pd-banner { display: flex; align-items: center; gap: var(--pd-s-15); flex-wrap: wrap; padding: var(--pd-s-15) var(--pd-s-2); border-radius: var(--app-r-card); background: var(--app-surface-2); color: var(--app-text); min-height: 48px; }
.pd-banner > .pd-ic { width: 20px; height: 20px; color: var(--app-text-2); }
.pd-banner__text { flex: 1 1 260px; min-width: 0; font-size: var(--pd-app-body-size); line-height: var(--pd-app-body-lh); }
.pd-banner__text b { font-weight: 600; }
.pd-banner > .pd-btn { flex: none; margin: -6px 0; }
.pd-banner > .pd-tag { flex: none; }
/* phone: the words stay beside their icon down to a 320 px screen, or a window that keeps a 15 px scrollbar's place at 360 */
@media (max-width: 639px) { .pd-banner { align-items: flex-start; } .pd-banner > .pd-ic { margin-top: 2px; } .pd-banner__text { flex-basis: 200px; } .pd-banner > .pd-btn { margin: 0 0 0 32px; } }
/* the prototype banner (preview tenants, S30): full width at the very top of the app */
.pd-proto { display: flex; align-items: center; gap: var(--pd-s-15); min-height: 40px; padding: var(--pd-s-1) var(--pd-s-2); background: var(--app-proto-bg); color: var(--app-proto-text); border-bottom: 1px solid var(--app-proto-edge); font-size: var(--pd-app-label-size); line-height: 20px; }
.pd-proto__mark { display: inline-flex; color: var(--app-warn); }
.pd-proto b { font-weight: 600; }
.pd-proto__link { margin-left: auto; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; }

/* tags: names that are not statuses (5.5); never a stadium, never a filled status colour */
.pd-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 var(--pd-s-1); border: 1px solid var(--app-border); border-radius: var(--app-r-chip); font: 600 var(--pd-app-tag-size, 14px)/16px var(--pd-font-text); color: var(--app-text); white-space: nowrap; background: transparent; }
.pd-tag .pd-ic { width: 14px; height: 14px; }
/* status: a 10 px glyph in a 16 box, its word in the text colour, 6 px apart (glyphs.js). Its word gives the baseline and
   the glyph is centred on the word's line: centred as a whole (glyphs.js writes align-items: center inline), the status
   took its baseline from the glyph's foot and its word rode 3 to 4 px above the sentence or the cell beside it */
.pd-status { display: inline-flex; align-items: baseline !important; gap: 6px; white-space: nowrap; color: var(--app-text); }
.pd-status > span:first-child { align-self: center; }
.pd-statuses { display: flex; flex-wrap: wrap; gap: var(--pd-s-1) var(--pd-s-25); }

/* empty state: the component's icon (24, meta colour) and one fact line, at most one action (5.12) */
.pd-empty { display: flex; align-items: center; flex-wrap: wrap; gap: var(--pd-s-1) var(--pd-s-15); min-height: 48px; padding: var(--pd-s-05) 0; color: var(--app-text-2); }
.pd-empty > .pd-ic { width: 24px; height: 24px; color: var(--app-text-3); }
.pd-empty > span { flex: 1 1 auto; min-width: 0; font-size: var(--pd-app-body-size); line-height: var(--pd-app-body-lh); }
.pd-empty > .pd-btn { flex: none; }

/* skeleton: appears after 150 ms, the exact shape, no shimmer, no pulse (5.11) */
.pd-skel { display: block; background: var(--app-surface-2); border-radius: var(--app-r-bar); height: 12px; animation: pd-skel-in var(--pd-dur-1) linear 150ms both; }
.pd-skel--60 { width: 60%; } .pd-skel--80 { width: 80%; } .pd-skel--40 { width: 40%; }
.pd-skel--disc { width: 32px; height: 32px; border-radius: var(--pd-r-round); flex: none; }
.pd-skel--amount { width: 64px; margin-left: auto; flex: none; }
.pd-skel-row { display: flex; align-items: center; gap: var(--pd-s-15); min-height: 48px; }
.pd-skel-row > .pd-skel-lines { flex: 1; display: grid; gap: 8px; }
@keyframes pd-skel-in { from { opacity: 0; } to { opacity: 1; } }
.pd-app[data-theme="dark"] .pd-skel { background: var(--app-selected); }   /* surface-2 is 1.1:1 on a dark card: the shape would vanish */
.pd-fade-in { animation: pd-skel-in var(--pd-dur-1) linear both; }

/* avatars and the tenant square (5.14) */
.pd-av { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--pd-r-round); background: var(--app-surface-2); color: var(--app-text-2); font: 600 var(--pd-app-initials-size, 14px)/1 var(--pd-font-text); letter-spacing: 0.01em; }
.pd-av--36 { width: 36px; height: 36px; font-size: 15px; }
.pd-av--40 { width: 40px; height: 40px; font-size: var(--pd-app-initials-40, 16px); }
/* initials one step up with the text (Source Sans 3's capitals are 8 % shorter than the old face's) */
.pd-sq { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: var(--pd-r-4); background: var(--app-accent); color: var(--app-on-accent); font: 600 16px/1 var(--pd-font-text); letter-spacing: 0.02em; }
.pd-sq--36 { width: 36px; height: 36px; border-radius: var(--pd-r-3); font-size: 15px; }
.pd-sq--28 { width: 28px; height: 28px; border-radius: var(--pd-r-2); font-size: 13px; }
.pd-sq--64 { width: 64px; height: 64px; border-radius: 14px; font-size: 24px; }
.pd-sq--24 { width: 24px; height: 24px; border-radius: var(--pd-r-2); font-size: 12px; letter-spacing: 0; }
/* the neutral ink preset disappears on dark surfaces: give it its own edge */
.pd-sq.is-ink { box-shadow: inset 0 0 0 1px var(--app-chrome-line); }

/* keyboard tooltip (icon buttons, rail): one element, placed by ui.js, after 500 ms */
.pd-tooltip { position: fixed; z-index: var(--pd-z-toast); max-width: 240px; padding: var(--pd-s-05) var(--pd-s-1); border-radius: var(--app-r-chip); background: var(--app-solid); color: var(--app-on-solid); font: 500 var(--pd-app-meta-size)/var(--pd-app-meta-lh) var(--pd-font-text); pointer-events: none; white-space: nowrap; }

/* ---------- 5. The ledger table (5.4) ---------- */
.pd-table-wrap { background: var(--app-surface); border: 1px solid var(--app-line); border-radius: var(--app-r-card); box-shadow: var(--app-shadow-card); min-width: 0; }
.pd-table { width: 100%; font-size: var(--pd-app-body-size); line-height: var(--pd-app-body-lh); }
.pd-table th { position: sticky; top: var(--pd-sticky-top, 0px); z-index: 2; height: 40px; padding: 0 var(--pd-s-15); background: var(--app-surface); border-bottom: 1px solid var(--app-line); font: 600 var(--pd-app-meta-size)/var(--pd-app-meta-lh) var(--pd-font-text); color: var(--app-text-2); text-align: left; white-space: nowrap; vertical-align: middle; }
.pd-table th:first-child { border-top-left-radius: var(--app-r-card-in, var(--pd-r-2)); }
.pd-table th:last-child { border-top-right-radius: var(--app-r-card-in, var(--pd-r-2)); }
.pd-table td { height: var(--pd-row-h); padding: 0 var(--pd-s-15); border-top: 1px solid var(--app-line); vertical-align: middle; }
.pd-table tbody tr:first-child td { border-top: 0; }
.pd-table .num, .pd-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-table td.num { font-weight: 600; }
.pd-table td.code { font-family: var(--pd-font-mono); font-size: var(--pd-app-mono-size); white-space: nowrap; }
.pd-table td.nowrap { white-space: nowrap; }
.pd-table tbody tr { transition: background-color var(--pd-dur-1) linear; }
.pd-table tbody tr[data-href] { cursor: pointer; }
/* a row that opens its record takes the keyboard focus: the ring is drawn on its cells (a table row has no reliable outline) */
.pd-table tbody tr[data-href]:focus-visible { outline: none; box-shadow: none; }
.pd-table tbody tr[data-href]:focus-visible > td { background: var(--app-hover); box-shadow: inset 0 2px 0 var(--app-focus), inset 0 -2px 0 var(--app-focus); }
.pd-table tbody tr[data-href]:focus-visible > td:first-child { box-shadow: inset 2px 0 0 var(--app-focus), inset 0 2px 0 var(--app-focus), inset 0 -2px 0 var(--app-focus); }
.pd-table tbody tr[data-href]:focus-visible > td:last-child { box-shadow: inset -2px 0 0 var(--app-focus), inset 0 2px 0 var(--app-focus), inset 0 -2px 0 var(--app-focus); }
@media (hover: hover) { .pd-table tbody tr:hover { background: var(--app-hover); } }
.pd-table tbody tr.is-hover { background: var(--app-hover); }
.pd-table tr.pd-total td { border-top: 2px solid var(--app-text); font-weight: 600; }
.pd-table .pd-rowacts { display: inline-flex; gap: 0; opacity: 0; transition: opacity var(--pd-dur-1) linear; }
.pd-table tr:hover .pd-rowacts, .pd-table tr:focus-within .pd-rowacts, .pd-table tr.is-hover .pd-rowacts { opacity: 1; }
.pd-table td.acts { width: 1%; padding-right: var(--pd-s-05); white-space: nowrap; text-align: right; }
.pd-table td.acts .pd-btn--icon { margin: -2px 0; }
.pd-sort { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -2px -6px; padding: 0 6px; border-radius: var(--pd-r-2); font: inherit; color: inherit; }
.pd-sort .pd-ic { width: 16px; height: 16px; }
.pd-sort[data-dir], th[aria-sort="ascending"] .pd-sort, th[aria-sort="descending"] .pd-sort { color: var(--app-text); }   /* aria-sort sits on the th (ui.js) */
th.num .pd-sort { flex-direction: row-reverse; }
@media (hover: hover) { .pd-sort:hover { background: var(--app-hover); color: var(--app-text); } }
.pd-table[data-compact] td { height: var(--pd-control-h-compact); }
.pd-table-foot { display: flex; justify-content: center; padding: var(--pd-s-2) 0 var(--pd-s-4); }
/* under 768 the table becomes a list of cards: title, meta, amount at the right, status under it */
@media (max-width: 767px) {
  .pd-table-wrap { background: none; border: 0; border-radius: 0; }
  .pd-table, .pd-table tbody { display: block; }
  .pd-table thead { display: none; }
  .pd-table tbody { display: grid; gap: var(--pd-s-1); }
  .pd-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t a" "m s"; column-gap: var(--pd-s-15); row-gap: 2px; padding: var(--pd-s-15) var(--pd-s-2); background: var(--app-surface); border: 1px solid var(--app-line); border-radius: var(--app-r-card); box-shadow: var(--app-shadow-card); }
  .pd-table td { display: none; height: auto; padding: 0; border: 0; }
  .pd-table td[data-p="1"] { display: block; grid-area: t; font-weight: 600; min-width: 0; }
  .pd-table td[data-p="2"] { display: block; grid-area: m; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-3); font-weight: 400; text-align: left; min-width: 0; }
  .pd-table td[data-p="amount"] { display: block; grid-area: a; text-align: right; }
  .pd-table td[data-p="status"] { display: block; grid-area: s; text-align: right; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); }
  .pd-table tr.pd-total { border-width: 2px 0 0; border-color: var(--app-text); border-radius: 0; background: none; }
  .pd-table tr.pd-total td { border: 0; }
  .pd-compact-toggle, .pd-check:has(> [data-pd="compact"]) { display: none !important; }   /* compact is a desktop toggle (5.4) */
  .pd-table tbody tr[data-href]:focus-visible { outline: 2px solid var(--app-focus); outline-offset: 2px; }
  .pd-table tbody tr[data-href]:focus-visible > td { background: none; box-shadow: none !important; }
}

/* ---------- 6. Popovers, lists, menus (5.2, 5.9, 6.3) ---------- */
.pd-pop {
  position: fixed; z-index: var(--pd-z-popover); min-width: 200px; max-width: calc(100vw - 16px);
  background: var(--app-surface); color: var(--app-text); border-radius: var(--app-r-pop);
  box-shadow: var(--app-pop-ring, 0 0 0 1px var(--app-line)), var(--app-shadow-pop);
  transform-origin: var(--pd-origin, top left);
}
.pd-pop.is-in { animation: pd-pop-in var(--pd-dur-2) var(--pd-ease-out) both; }
.pd-pop.is-out { animation: pd-pop-out 120ms var(--pd-ease-in) both; }
@keyframes pd-pop-in { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes pd-pop-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(0.98); } }
.pd-pop--static { position: relative; z-index: auto; }
.pd-list { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; padding: var(--pd-s-05) 0; }
/* a row is 44 high on one line; a label that wraps gets the same 10 px above and below instead of touching its neighbours */
.pd-opt { display: flex; align-items: center; gap: var(--pd-s-15); min-height: 44px; padding: 10px var(--pd-s-15); margin: 0 var(--pd-s-05); border-radius: var(--pd-r-2); cursor: pointer; font-size: var(--pd-app-body-size); line-height: var(--pd-app-body-lh); color: var(--app-text); text-align: left; }
button.pd-opt { width: calc(100% - 2 * var(--pd-s-05)); }
.pd-opt:focus-visible { outline-offset: -2px; box-shadow: inset 0 0 0 4px var(--app-focus-inner); }
.pd-opt > .pd-opt__label { flex: 1; min-width: 0; }
.pd-opt > .pd-opt__sub { color: var(--app-text-2); font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); white-space: nowrap; }
.pd-opt > .pd-ic { width: 20px; height: 20px; color: var(--app-text-2); }
.pd-opt > .pd-opt__check { width: 16px; height: 16px; color: var(--app-text); visibility: hidden; }
.pd-opt[aria-selected="true"] { font-weight: 600; }
.pd-opt[aria-selected="true"] > .pd-opt__check { visibility: visible; }
.pd-opt.is-active { background: var(--app-selected); }
.pd-opt[aria-disabled="true"] { color: var(--app-text-3); cursor: not-allowed; }
.pd-opt--crit { color: var(--app-crit-ink); }
.pd-opt--crit > .pd-ic { color: var(--app-crit-ink); }
.pd-list-search { padding: var(--pd-s-1) var(--pd-s-1) var(--pd-s-05); border-bottom: 1px solid var(--app-line); }
.pd-list-empty { padding: var(--pd-s-15) var(--pd-s-2); color: var(--app-text-2); }
.pd-menu-sep { height: 1px; margin: var(--pd-s-05) var(--app-sep-in, 0px); background: var(--app-line); }
.pd-menu-head { display: flex; align-items: center; gap: var(--pd-s-15); padding: var(--pd-s-15) var(--pd-s-2); border-bottom: 1px solid var(--app-line); }
.pd-menu-row { display: flex; align-items: center; gap: var(--pd-s-15); min-height: 52px; padding: 0 var(--pd-s-2); }
@media (hover: hover) { .pd-opt:not([aria-disabled="true"]):hover { background: var(--app-selected); } }

/* date picker (never a native date input) */
.pd-cal { width: 332px; max-width: 100%; padding: var(--pd-s-15); }
.pd-cal__head { display: flex; align-items: center; gap: var(--pd-s-05); margin-bottom: var(--pd-s-05); }
.pd-cal__title { flex: 1; font: 600 var(--pd-app-title-size)/var(--pd-app-title-lh) var(--pd-font-text); padding-left: var(--pd-s-1); }
.pd-cal__grid { display: grid; grid-template-columns: repeat(7, 44px); justify-content: center; }
.pd-cal__dow { height: 32px; display: grid; place-items: center; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-3); }
.pd-cal__day { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--pd-r-2); font-size: var(--pd-app-body-size); line-height: var(--pd-app-body-lh); color: var(--app-text); font-variant-numeric: tabular-nums; transition: background-color var(--pd-dur-1) linear; }
.pd-cal__day.is-other { color: var(--app-text-3); }
.pd-cal__day.is-closed { color: var(--app-text-3); background: var(--app-surface-2); cursor: not-allowed; border-radius: 0; }
.pd-cal__day.is-today { box-shadow: inset 0 0 0 1px var(--app-text); }
.pd-cal__day[aria-selected="true"] { background: var(--app-solid); color: var(--app-on-solid); font-weight: 600; box-shadow: none; }
@media (hover: hover) { .pd-cal__day:not(.is-closed):not([aria-selected="true"]):hover { background: var(--app-selected); } }
.pd-cal__day.is-active:not([aria-selected="true"]) { background: var(--app-selected); }
/* meta grey is never on --app-selected (6.70:1): other months' and closed days step up to text-2 when lit */
.pd-cal__day.is-active.is-other, .pd-cal__day.is-active.is-closed { color: var(--app-text-2); }
@media (hover: hover) { .pd-cal__day.is-other:not(.is-closed):hover { color: var(--app-text-2); } }
.pd-cal__foot { display: flex; gap: var(--pd-s-05); margin-top: var(--pd-s-1); padding-top: var(--pd-s-1); border-top: 1px solid var(--app-line); }

/* ---------- 7. Dialogs, sheets, scrim (5.7): nothing pushes the page ---------- */
.pd-scrim { position: fixed; inset: 0; z-index: var(--pd-z-scrim); background: var(--app-scrim); animation: pd-fade var(--pd-dur-2) linear both; }
.pd-scrim.is-out { animation: pd-fade-out var(--pd-dur-2) var(--pd-ease-in) both; }
.pd-scrim--still { animation: none; }
@keyframes pd-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pd-fade-out { from { opacity: 1; } to { opacity: 0; } }
.pd-layer { position: fixed; inset: 0; z-index: var(--pd-z-dialog); display: grid; place-items: center; padding: var(--pd-s-2); pointer-events: none; }
.pd-layer > * { pointer-events: auto; }
/* a full-screen window (a drawing surface, « Écran entier ») takes the whole screen: no margin around it (5.7) */
.pd-layer.is-full, .pd-layer:has(> .pd-dialog--full) { padding: 0; }
.pd-dialog {
  position: relative; width: 100%; max-width: 560px; max-height: calc(100svh - 32px); display: flex; flex-direction: column;
  background: var(--app-surface); color: var(--app-text); border-radius: var(--app-r-dialog); box-shadow: var(--app-shadow-dialog); overflow: hidden;
  animation: pd-dialog-in var(--pd-dur-3) var(--pd-ease-out) both;
}
.pd-dialog.is-out { animation: pd-dialog-out var(--pd-dur-2) var(--pd-ease-in) both; }
.pd-dialog--form { max-width: 640px; }
.pd-dialog--wide { max-width: 880px; }
.pd-dialog--full { max-width: none; width: 100%; height: 100%; max-height: none; border-radius: 0; }
@keyframes pd-dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes pd-dialog-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(8px) scale(0.98); } }
.pd-dialog__head { display: flex; align-items: center; gap: var(--pd-s-1); min-height: 64px; padding: var(--pd-s-15) var(--pd-s-15) 0 var(--pd-s-3); flex: none; }
.pd-dialog__head > :first-child { flex: 1; min-width: 0; }
.pd-dialog__body { padding: var(--pd-s-1) var(--pd-s-3) var(--pd-s-1); overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--pd-s-2); }
/* a long body scrolls; its children keep their height (a 44 px link was squeezed to 37). A full window lays its own surface out */
:where(.pd-dialog:not(.pd-dialog--full)) > .pd-dialog__body > *, .pd-sheet__body > * { flex-shrink: 0; }   /* low specificity: a page's own flex on a child wins */
.pd-dialog__foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--pd-s-1); padding: var(--pd-s-25) var(--pd-s-3) var(--pd-s-3); flex: none; }
.pd-dialog--static { animation: none; box-shadow: 0 0 0 1px var(--app-line), var(--app-shadow-dialog); }
@media (max-width: 479px) {
  .pd-dialog__head { padding-left: var(--pd-s-2); }
  .pd-dialog__body { padding: var(--pd-s-1) var(--pd-s-2); }
  .pd-dialog__foot { padding: var(--pd-s-2); }
  .pd-dialog__foot > .pd-btn { flex: 1 1 auto; }
}
/* the facts of an irreversible act: a table, not a sentence (H6) */
.pd-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); border-top: 1px solid var(--app-line); }
.pd-facts > dt, .pd-facts > dd { padding: var(--pd-s-15) 0; border-bottom: 1px solid var(--app-line); min-height: 48px; display: flex; align-items: center; }
.pd-facts > dt { color: var(--app-text-2); padding-right: var(--pd-s-3); }
.pd-facts > dd { font-weight: 600; justify-content: flex-end; text-align: right; }
.pd-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--pd-z-dialog); max-height: 85svh; display: flex; flex-direction: column;
  background: var(--app-surface); color: var(--app-text); border-radius: var(--app-r-dialog) var(--app-r-dialog) 0 0; box-shadow: var(--app-shadow-dialog);
  padding-bottom: env(safe-area-inset-bottom);
  animation: pd-sheet-in var(--pd-dur-4) var(--pd-ease-out) both;
}
.pd-sheet.is-out { animation: pd-sheet-out var(--pd-dur-3) var(--pd-ease-in) both; }
.pd-sheet--full { top: 0; max-height: none; border-radius: 0; }
@keyframes pd-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes pd-sheet-out { from { transform: none; } to { transform: translateY(100%); } }
.pd-sheet__head { display: flex; align-items: center; gap: var(--pd-s-1); min-height: 60px; padding: var(--pd-s-1) var(--pd-s-1) 0 var(--pd-s-2); flex: none; }
.pd-sheet__head > :first-child { flex: 1; min-width: 0; }
.pd-sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--pd-s-2) var(--pd-s-2); flex: 1; min-height: 0; }
.pd-sheet--form .pd-sheet__body { display: flex; flex-direction: column; gap: var(--pd-s-2); padding-top: var(--pd-s-1); }
.pd-sheet .pd-opt { min-height: 52px; margin: 0; padding: 14px var(--pd-s-1); }
.pd-sheet button.pd-opt { width: 100%; }
.pd-sheet .pd-list { max-height: none; padding: 0; }
.pd-sheet__group { font: 600 var(--pd-app-meta-size)/var(--pd-app-meta-lh) var(--pd-font-text); color: var(--app-text-2); padding: var(--pd-s-2) var(--pd-s-1) var(--pd-s-05); }
.pd-sheet--static { position: relative; z-index: auto; animation: none; box-shadow: 0 0 0 1px var(--app-line); padding-bottom: 0; }
html.pd-locked, html.pd-locked body { overflow: hidden; }
/* --pd-sbw is the width the page loses to a classic scrollbar, measured by the lock (ui.js lockScroll): its gutter, which
   tokens.css keeps on a desktop, or the scrollbar itself. The gutter is let go and the width comes back as padding, so
   the page does not move and a window, its scrim and a sheet cover the whole screen and centre on it (they stopped
   15 px short of its right edge, the window 7.5 px left of centre). A lock that did not measure keeps the gutter */
html.pd-locked[style*="--pd-sbw"] { scrollbar-gutter: auto; padding-right: var(--pd-sbw); }
/* the fixed bars keep their width; a frame drawn inline in a page (.pd-demo: the kit, the site's frames) is not moved */
html.pd-locked body > .pd-top, html.pd-locked body > .pd-tabbar, html.pd-locked body > .pd-proto, html.pd-locked .pd-actionbar { right: var(--pd-sbw, 0px); }
@media (min-width: 768px) { html.pd-locked body > .pd-toasts { right: calc(var(--pd-s-3) + var(--pd-sbw, 0px)); } }

/* ---------- 8. Toasts (5.8) ---------- */
.pd-toasts { position: fixed; right: var(--pd-s-3); bottom: var(--pd-s-3); z-index: var(--pd-z-toast); width: 360px; max-width: calc(100vw - 32px); height: 0; }
.pd-toast {
  position: absolute; right: 0; bottom: 0; width: max-content; max-width: 100%; display: flex; align-items: center; gap: var(--pd-s-1); min-height: 48px; padding: 0 var(--pd-s-1) 0 var(--pd-s-2);
  background: var(--app-solid); color: var(--app-on-solid); border-radius: var(--app-r-card); box-shadow: var(--app-shadow-pop);
  font-size: var(--pd-app-body-size); line-height: var(--pd-app-body-lh); transform-origin: bottom center;
  transition: transform var(--pd-dur-3) var(--pd-ease-out), opacity var(--pd-dur-3) var(--pd-ease-out);
  animation: pd-toast-in var(--pd-dur-3) var(--pd-ease-out) both;
}
.pd-toast__text { flex: 1; min-width: 0; padding: 12px 8px 12px 0; }
.pd-toast > .pd-ic { width: 20px; height: 20px; }
.pd-toast .pd-btn--quiet { color: var(--app-on-solid); }
@media (hover: hover) { .pd-toast .pd-btn--quiet:hover { background: var(--app-solid-hover); color: var(--app-on-solid); } }
.pd-toast.is-out { animation: pd-toast-out var(--pd-dur-2) var(--pd-ease-in) both; }
@keyframes pd-toast-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes pd-toast-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
.pd-toast--static { position: relative; animation: none; }
@media (max-width: 767px) {
  .pd-toasts { left: 50%; right: auto; transform: translateX(-50%); bottom: calc(var(--pd-tabbar-total, 0px) + var(--pd-actionbar-h, 0px) + var(--pd-s-2)); }
  .pd-toast { left: 0; right: 0; width: auto; margin: 0 auto; }
}

/* ---------- 9. Bell panel (5.9) and command search (5.10) ---------- */
.pd-bell { width: 400px; max-width: 100%; max-height: 480px; display: flex; flex-direction: column; overflow: hidden; }
.pd-bell__head { display: flex; align-items: center; gap: var(--pd-s-1); min-height: 56px; padding: var(--pd-s-05) var(--pd-s-1) var(--pd-s-05) var(--pd-s-2); border-bottom: 1px solid var(--app-line); flex: none; }
.pd-bell__head > .pd-title { flex: 1; }
.pd-bell__list { overflow-y: auto; overscroll-behavior: contain; }
.pd-bell__empty { padding: var(--pd-s-1) var(--pd-s-2); }
.pd-bell__head { flex-wrap: wrap; }
.pd-pop--static .pd-bell { max-height: none; }
.pd-bell--sheet { width: auto; max-width: none; max-height: none; overflow: visible; margin: 0 calc(-1 * var(--pd-s-2)); }   /* rows run edge to edge */
.pd-bell--sheet .pd-bell__list { overflow: visible; border-top: 1px solid var(--app-line); }
/* phone: « Tout marquer comme lu » sits in the sheet's head between the title and Fermer; under 380 px
   it takes the line under the title, aligned with it (the three never fit one line there) */
.pd-sheet__head > [data-act="read-all"] { flex: none; padding: 0 var(--pd-s-1); }
@media (max-width: 379px) {
  .pd-sheet__head:has(> [data-act="read-all"]) { flex-wrap: wrap; row-gap: 0; }
  .pd-sheet__head:has(> [data-act="read-all"])::after { content: ""; order: 2; flex-basis: 100%; height: 0; }   /* the line break */
  .pd-sheet__head > [data-act="read-all"] { order: 3; margin: 0 0 var(--pd-s-05) calc(-1 * var(--pd-s-1)); }
}
.pd-note { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: var(--pd-s-15); align-items: start; min-height: 64px; padding: var(--pd-s-15) var(--pd-s-2) var(--pd-s-15) var(--pd-s-3); border-bottom: 1px solid var(--app-line); transition: background-color var(--pd-dur-1) linear; }
.pd-note:last-child { border-bottom: 0; }
.pd-note > .pd-ic { margin-top: 2px; color: var(--app-text-2); }   /* the 20 px icon and the 8 px disc on the middle of the title's 24 px line */
.pd-note__title { font-size: var(--pd-app-body-size); line-height: var(--pd-app-body-lh); }
.pd-note.is-unread .pd-note__title { font-weight: 600; }
.pd-note.is-unread::before { content: ""; position: absolute; left: 10px; top: 20px; width: 8px; height: 8px; border-radius: var(--pd-r-round); background: var(--app-text); }
.pd-note__text { display: block; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-note__at { display: block; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-3); font-variant-numeric: tabular-nums; margin-top: 2px; }
@media (hover: hover) { a.pd-note:hover, button.pd-note:hover { background: var(--app-hover); } }
.pd-cmd { position: fixed; z-index: var(--pd-z-dialog); top: 120px; left: 50%; transform: translateX(-50%); width: 640px; max-width: calc(100vw - 32px); max-height: calc(100svh - 160px); display: flex; flex-direction: column; background: var(--app-surface); color: var(--app-text); border-radius: var(--app-r-dialog); box-shadow: var(--app-shadow-dialog); overflow: hidden; }
.pd-cmd--static { position: relative; top: auto; left: auto; transform: none; z-index: auto; width: 100%; max-width: 640px; max-height: none; box-shadow: 0 0 0 1px var(--app-line), var(--app-shadow-dialog); }
.pd-cmd__bar { display: flex; align-items: center; gap: var(--pd-s-15); height: 52px; padding: 0 var(--pd-s-15) 0 var(--pd-s-2); border-bottom: 1px solid var(--app-line); flex: none; }
.pd-cmd__bar > .pd-ic { color: var(--app-text-2); }
.pd-cmd__input { flex: 1; min-width: 0; height: 50px; border: 0; background: transparent; font: 400 18px/24px var(--pd-font-text); color: var(--app-text); }
.pd-cmd__input::placeholder { color: var(--app-text-3); opacity: 1; }
.pd-cmd__input:focus-visible, .pd-app .pd-cmd__input:focus-visible, .pd-site .pd-app .pd-cmd__input:focus-visible { outline: none; box-shadow: none; }   /* the panel is the focus */
.pd-cmd__list { overflow-y: auto; overscroll-behavior: contain; padding: var(--pd-s-05) var(--pd-s-1) var(--pd-s-1); flex: 1; min-height: 0; }
.pd-cmd__group { font: 600 var(--pd-app-meta-size)/var(--pd-app-meta-lh) var(--pd-font-text); color: var(--app-text-2); padding: var(--pd-s-15) var(--pd-s-1) var(--pd-s-05); }
.pd-cmd__row { display: flex; align-items: center; gap: var(--pd-s-15); min-height: 44px; padding: var(--pd-s-05) var(--pd-s-1); border-radius: var(--pd-r-2); cursor: pointer; }
.pd-cmd__row > .pd-ic { color: var(--app-text-2); }
.pd-cmd__label { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: var(--pd-s-1); flex-wrap: wrap; font-size: var(--pd-app-body-size); line-height: var(--pd-app-body-lh); }
.pd-cmd__sub { font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-3); }
.pd-cmd__row .pd-kbd { visibility: hidden; }
.pd-cmd__row.is-active { background: var(--app-selected); }
.pd-cmd__row.is-active .pd-cmd__sub { color: var(--app-text-2); }   /* never --app-text-3 on --app-selected */
.pd-cmd__row.is-active .pd-kbd { visibility: visible; }
.pd-cmd__row mark { background: none; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.pd-cmd__foot { display: flex; align-items: center; gap: var(--pd-s-2); height: 36px; padding: 0 var(--pd-s-2); border-top: 1px solid var(--app-line); font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-3); flex: none; white-space: nowrap; overflow: hidden; }
.pd-cmd__empty { padding: var(--pd-s-2) var(--pd-s-1); color: var(--app-text-2); }
.pd-cmd__row--skel { cursor: default; }
.pd-cmd__row--skel > .pd-skel:last-child { flex: none; }
.pd-skel--ic { width: 20px; height: 20px; flex: none; }
.pd-cmd__close { display: none; }
@media (max-width: 767px) {
  .pd-cmd:not(.pd-cmd--static) { top: 0; left: 0; transform: none; width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; }
  .pd-cmd__foot, .pd-cmd .pd-kbd { display: none; }
  .pd-cmd__close { display: inline-flex; margin-right: -8px; }
}

/* ---------- 10. Agenda: day grid, week, phone time list (5.15) ---------- */
.pd-agenda { --h0: 8; --h1: 19; --hpx: 80px; --cols: 3; position: relative; background: var(--app-surface); border: 1px solid var(--app-line); border-radius: var(--app-r-card); box-shadow: var(--app-shadow-card); min-width: 0; }
.pd-agenda__head { position: sticky; top: var(--pd-sticky-top, 0px); z-index: 3; display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); background: var(--app-surface); border-bottom: 1px solid var(--app-line); border-radius: var(--app-r-card-in, var(--pd-r-2)) var(--app-r-card-in, var(--pd-r-2)) 0 0; }
.pd-agenda__who { display: flex; align-items: center; gap: var(--pd-s-1); min-height: 56px; padding: 0 var(--pd-s-15); min-width: 0; border-left: 1px solid var(--app-line); }
.pd-agenda__who b { display: block; font-weight: 600; font-size: var(--pd-app-body-size); line-height: var(--pd-app-body-lh); white-space: nowrap; }
.pd-agenda__who b + span { display: block; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-3); white-space: nowrap; }   /* not the avatar: its initials stay centred */
.pd-agenda__body { position: relative; display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); height: calc((var(--h1) - var(--h0)) * var(--hpx)); }
.pd-agenda__gutter { position: relative; }
.pd-agenda__hour { position: absolute; left: 0; right: 8px; top: calc((var(--h) - var(--h0)) * var(--hpx) - 9px); text-align: right; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-3); font-variant-numeric: tabular-nums; }
.pd-agenda__hour:first-child { top: 4px; }
.pd-agenda__col { position: relative; border-left: 1px solid var(--app-line); background: var(--app-surface); min-width: 0; }
.pd-agenda__past { position: absolute; left: 0; right: 0; top: 0; height: calc((var(--now) - var(--h0)) * var(--hpx)); background: var(--app-bg); }
.pd-agenda__lines { position: absolute; inset: 0 0 0 56px; pointer-events: none; background-image: repeating-linear-gradient(to bottom, var(--app-line) 0 1px, transparent 1px var(--hpx)); background-position: 0 var(--hpx); }
.pd-closed { position: absolute; left: 0; right: 0; top: calc((var(--s) - var(--h0)) * var(--hpx)); height: calc((var(--e) - var(--s)) * var(--hpx)); background: var(--app-surface-2); padding: 6px 8px; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-3); }
.pd-appt {
  --pd-gut: 0px;
  position: absolute; top: calc((var(--s) - var(--h0)) * var(--hpx) + 1px); height: calc((var(--e) - var(--s)) * var(--hpx) - 2px);
  left: calc(var(--lane, 0) / var(--lanes, 1) * (100% - var(--pd-gut)) + 2px); width: calc((100% - var(--pd-gut)) / var(--lanes, 1) - 4px);
  border-radius: var(--pd-r-2); padding: 6px 8px; overflow: hidden; text-align: left;
  background: var(--app-selected); color: var(--app-text); display: flex; flex-direction: column; gap: 0; z-index: 1;
  transition: background-color var(--pd-dur-1) linear;
}
.pd-appt__t { font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-2); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.pd-appt__who { font-size: var(--pd-app-appt-size, 16px); line-height: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.pd-appt__what { font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-appt__line { font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-appt__line b { font-weight: 600; }
/* a glyph written in the line (glyph() of glyphs.js) sits on the line's capitals instead of standing on its baseline,
   which raised the line to 21 px in an 18 px block (15 minutes) */
.pd-appt__line > span:has(> svg) { vertical-align: -3px; }
.pd-appt .pd-ic { width: 16px; height: 16px; color: var(--app-text-2); }
/* a block shows fewer lines, never a clipped line: its lines drop by the block's own height
   (time 19 + client 20 + service 19 = 58; the status 2 + 19 more) */
.pd-appt.is-60 { container-type: size; }
@container (max-height: 78px) { .pd-appt__st { display: none !important; } }
@container (max-height: 57px) { .pd-appt__what { display: none !important; } }
.pd-appt__st { margin-top: 2px; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); }
.pd-agenda__hour.is-under { visibility: hidden; }
.pd-appt.is-20 { padding: 1px 8px; flex-direction: row; align-items: center; gap: 6px; }
.pd-appt.is-20 .pd-appt__line { font-size: 13px; line-height: 16px; }
.pd-appt.is-40 { padding: 9px 8px; }
/* past two overlapping blocks (PD.lanes): the lanes leave a 28 px strip, the « +1 » marker sits in it at its time */
.pd-appt.has-more { --pd-gut: 28px; }
.pd-appt-more { position: absolute; z-index: 1; right: 2px; width: 24px; top: calc((var(--s) - var(--h0)) * var(--hpx) + 1px); height: calc((var(--e) - var(--s)) * var(--hpx) - 2px); display: flex; justify-content: center; padding-top: 6px; border-radius: var(--pd-r-2); background: var(--app-surface-2); color: var(--app-text); font: 600 var(--pd-app-meta-size)/var(--pd-app-meta-lh) var(--pd-font-text); font-variant-numeric: tabular-nums; transition: background-color var(--pd-dur-1) linear; }
@media (hover: hover) { .pd-appt-more:hover { background: var(--app-hover); } }
.pd-appt--request { background: var(--app-surface); border: 1px dashed var(--app-border); }
.pd-appt--deposit { background: var(--app-surface); border: 1px solid var(--app-border); }
.pd-appt--absent, .pd-appt--done { background: var(--app-surface-2); }
.pd-appt--done { color: var(--app-text-2); }
.pd-appt--done .pd-appt__who { font-weight: 500; }
@media (hover: hover) { .pd-appt:hover { background: var(--app-hover); } .pd-appt--confirmed:hover { background: var(--app-selected); box-shadow: inset 0 0 0 1px var(--app-border); } }
.pd-slot { position: absolute; top: calc((var(--s) - var(--h0)) * var(--hpx) + 1px); height: calc((var(--e) - var(--s)) * var(--hpx) - 2px); left: 2px; right: 2px; border: 1px dashed var(--app-border); border-radius: var(--pd-r-2); padding: 6px 8px; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-2); text-align: left; display: flex; align-items: flex-start; gap: 4px; background: transparent; z-index: 1; transition: background-color var(--pd-dur-1) linear; }
.pd-slot .pd-ic { width: 16px; height: 16px; margin-top: 1px; }
@media (hover: hover) { .pd-slot:hover { background: var(--app-hover); color: var(--app-text); } }
.pd-now { position: absolute; left: 56px; right: 0; top: calc((var(--now) - var(--h0)) * var(--hpx) - 1px); height: 2px; background: var(--app-now); z-index: 2; pointer-events: none; }
.pd-now__label { position: absolute; right: calc(100% + 4px); top: -9px; height: 20px; padding: 0 5px; border-radius: min(var(--app-r-chip), 4px); background: var(--app-solid); color: var(--app-on-solid); font: 400 12px/20px var(--pd-font-mono); white-space: nowrap; }
/* week view: seven columns, 64 px an hour, today in 600 with its date in an ink square */
.pd-agenda--week { --cols: 7; --hpx: 64px; }
/* a week column is narrow: the block is the time and the client at the meta size, so a name fits whole from 768 px */
.pd-agenda--week .pd-appt { padding: 4px 6px; }
.pd-agenda--week .pd-appt__who { font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); }
.pd-wday { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; padding: 0 var(--pd-s-1); border-left: 1px solid var(--app-line); font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-2); min-width: 0; }
.pd-wday b { display: inline-flex; align-items: center; gap: 6px; font-size: var(--pd-app-body-size); line-height: var(--pd-app-body-lh); font-weight: 500; color: var(--app-text); }
.pd-wday.is-today b { font-weight: 600; }
.pd-wday.is-today .pd-wday__n { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 4px; border-radius: var(--app-r-chip); background: var(--app-solid); color: var(--app-on-solid); }
/* phone: a Monday-first week strip and a time list (critique §5 item 3) */
.pd-wstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.pd-wstrip__day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 56px; min-width: 0; border-radius: var(--pd-r-2); font-size: var(--pd-app-strip-size, 14px); line-height: 16px; color: var(--app-text-2); }
.pd-wstrip__day b { font-size: 17px; line-height: 20px; font-weight: 600; color: var(--app-text); font-variant-numeric: tabular-nums; }
.pd-wstrip__day small { font: 600 var(--pd-app-count-size)/var(--pd-app-count-lh) var(--pd-font-text); color: var(--app-text-2); }
.pd-wstrip__day[aria-pressed="true"] { background: var(--app-solid); color: var(--app-on-solid); }
.pd-wstrip__day[aria-pressed="true"] b, .pd-wstrip__day[aria-pressed="true"] small { color: var(--app-on-solid); }
.pd-wstrip__day.is-closed { color: var(--app-text-3); }
@media (hover: hover) { .pd-wstrip__day:not([aria-pressed="true"]):hover { background: var(--pd-hover-here); } }
.pd-tl > li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; column-gap: var(--pd-s-15); padding: var(--pd-s-15) 0; border-top: 1px solid var(--app-line); align-items: start; }
.pd-tl > li:first-child { border-top: 0; }
.pd-tl__t b { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-tl__t span { display: block; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-3); }
.pd-tl__main { min-width: 0; }
.pd-tl__main > b { display: block; font-weight: 600; }
.pd-tl__main > span { display: block; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-2); }
.pd-tl__main > .pd-status { display: inline-flex; margin-top: 4px; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text); }
.pd-tl > li.is-free { border-top-style: solid; }
.pd-tl__free { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--pd-s-15); border: 1px dashed var(--app-border); border-radius: var(--pd-r-2); color: var(--app-text-2); font-size: var(--pd-app-body-size); }
.pd-tl > li.pd-tl__now { grid-template-columns: auto minmax(0, 1fr); align-items: center; padding: 0; border-top: 0; height: 0; position: relative; z-index: 1; }
.pd-tl__now .pd-now__label { position: static; transform: translateY(-50%); }
/* the 0-high row centres both in a 20 px track (the label's height): the label moves up half its height, the 2 px line
   up by the same 10 px, so it runs through the middle of « 14:10 » */
.pd-tl__now::after { content: ""; display: block; height: 2px; background: var(--app-now); transform: translateY(-10px); }
.pd-tl > li.pd-tl__now + li { border-top: 0; }

/* ---------- 11. The day ruler and the needle (5.16) ---------- */
.pd-ruler { --h0: 8; --hs: 10; --pd-ruler-in: 0px; --pd-ruler-ends: initial; --pd-ruler-shift: -1px; position: relative; padding-top: 22px; container-type: inline-size; }
/* A self-contained ruler (its scale, rows holding only bars, and its needle in one box, as kit.html and S01 draw it)
   insets its time axis by 20 px at both ends, half an hour label: the first and last labels sit centred on their ticks
   and stay inside the ruler, so a desktop ruler labels every hour (5.16) and 08:00 never touches 09:00. A ruler split
   across boxes (its scale in a header, its bars elsewhere) or with marks of its own in the rows keeps the flush axis,
   so its other parts stay aligned. To opt in by hand: class pd-ruler--inset; to opt out: --pd-ruler-in: 0px on it. */
:is(.pd-ruler--inset, .pd-ruler:where(:has(> .pd-ruler__scale):has(> .pd-ruler__rows):not(:has(> .pd-ruler__rows > :not(.pd-ruler__row))):not(:has(> .pd-ruler__rows > .pd-ruler__row > :not(.pd-bar))))) { --pd-ruler-in: 20px; --pd-ruler-ends: -50%; --pd-ruler-shift: 0px; }
.pd-ruler__scale { position: absolute; top: 0; left: var(--pd-ruler-in, 0px); right: var(--pd-ruler-in, 0px); height: 22px; }
.pd-ruler__h { position: absolute; top: 0; left: calc((var(--h) - var(--h0)) / var(--hs) * 100%); transform: translateX(-50%); font: 400 12px/16px var(--pd-font-mono); color: var(--app-text-3); white-space: nowrap; }
/* flush axis: the end labels are anchored inside (their tick at their outer edge); inset axis: centred like the others */
.pd-ruler__h:first-child { transform: translateX(var(--pd-ruler-ends, 0%)); }
.pd-ruler__h:last-child { transform: translateX(var(--pd-ruler-ends, -100%)); }
/* the tick of every hour stays when its label steps aside (odd hours on a narrow ruler, the hour under the needle) */
.pd-ruler__h::after { content: ""; position: absolute; left: 50%; top: 17px; width: 1px; height: 5px; background: var(--app-border); visibility: visible; }
.pd-ruler__h:first-child::after { left: calc(-1 * var(--pd-ruler-ends, 0%)); }
.pd-ruler__h:last-child::after { left: calc(-1 * var(--pd-ruler-ends, -100%)); margin-left: var(--pd-ruler-shift, -1px); }
.pd-ruler__h.is-under { visibility: hidden; }
/* one row per job: a slot of --pd-ruler-pitch (28 by default) with the 12 px track centred in it */
.pd-ruler__row { position: relative; height: var(--pd-ruler-pitch, 28px); }
.pd-ruler__row::before { content: ""; position: absolute; left: var(--pd-ruler-in, 0px); right: var(--pd-ruler-in, 0px); top: 50%; height: 12px; margin-top: -6px; border-radius: var(--app-r-bar); background: var(--app-chart-track); }
.pd-ruler__rows { position: relative; }
.pd-bar { position: absolute; top: 50%; height: 12px; margin-top: -6px; left: calc(var(--pd-ruler-in, 0px) + (var(--s) - var(--h0)) / var(--hs) * (100% - 2 * var(--pd-ruler-in, 0px)) + 1px); width: calc((var(--e) - var(--s)) / var(--hs) * (100% - 2 * var(--pd-ruler-in, 0px)) - 2px); border-radius: var(--app-r-bar); transform-origin: left center; }
.pd-bar--done { background: var(--app-chart-2); }
.pd-bar--planned { background: var(--app-surface); box-shadow: inset 0 0 0 1px var(--app-border); }
.pd-bar--free { background: var(--app-surface); box-shadow: none; border: 1px dashed var(--app-border); }
.pd-bar--progress { background: var(--app-surface); box-shadow: inset 0 0 0 1px var(--app-chart-1); overflow: hidden; }
.pd-bar--progress::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%); background: var(--app-chart-1); }
.pd-needle { position: absolute; top: 18px; bottom: -4px; left: calc(var(--pd-ruler-in, 0px) + (var(--t) - var(--h0)) / var(--hs) * (100% - 2 * var(--pd-ruler-in, 0px))); width: 2px; margin-left: -1px; background: var(--app-now); z-index: 2; pointer-events: none; }
.pd-needle__label { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); height: 20px; padding: 0 5px; border-radius: min(var(--app-r-chip), 4px);   /* 4: an empty label (the ghost before its first move) is 10 wide */ background: var(--app-solid); color: var(--app-on-solid); font: 400 12px/20px var(--pd-font-mono); white-space: nowrap; }
.pd-needle--ghost { background: var(--app-text-3); opacity: 0; transition: opacity var(--pd-dur-1) linear; }
.pd-needle--ghost .pd-needle__label { background: var(--app-surface); color: var(--app-text); box-shadow: inset 0 0 0 1px var(--app-border); }
.pd-ruler.is-scrubbing .pd-needle--ghost { opacity: 1; }
.pd-ruler .pd-ruler__scale:has(.pd-needle) { pointer-events: none; }
.pd-ruler[tabindex] { border-radius: var(--pd-r-1); }
/* labels every hour on a desktop, every two hours on a phone or a narrow ruler (5.16). A flush ruler needs 640 px for ten
   hours (its anchored end labels take half a label more); an inset one needs 480 (44 px an hour). A longer day than ten
   hours sets is-odd visibility itself */
@media (max-width: 767px) { .pd-ruler__h.is-odd { visibility: hidden; } }
@container (max-width: 640px) { :where(.pd-ruler:not(.pd-ruler--inset):not(:has(> .pd-ruler__scale):has(> .pd-ruler__rows):not(:has(> .pd-ruler__rows > :not(.pd-ruler__row))):not(:has(> .pd-ruler__rows > .pd-ruler__row > :not(.pd-bar))))) .pd-ruler__h.is-odd { visibility: hidden; } }
@container (max-width: 479px) { .pd-ruler__h.is-odd { visibility: hidden; } }
/* bars grow once from their start when they are drawn, then stay (no light pass in the software).
   Pure CSS: it always ends drawn, with or without script. */
.pd-grow .pd-bar, .pd-grow .pd-split > i, .pd-grow .pd-meter__fill { animation: pd-grow var(--pd-dur-4) var(--pd-ease-out) var(--d, 120ms) both; }
.pd-grow .pd-split > i + i { --d: 200ms; }
@keyframes pd-grow { from { transform: scaleX(0); } to { transform: none; } }
/* a screen reached through a page switch (README 13): the switch is its entrance, so the bars it opens with are already
   drawn (pageswitch.js holds pd-arriving on <html> until the switch has settled; shell.js then marks them pd-rest). A
   bar drawn later still grows once */
.pd-arriving .pd-grow :is(.pd-bar, .pd-split > i, .pd-meter__fill), .pd-grow :is(.pd-bar, .pd-split > i, .pd-meter__fill).pd-rest { animation: none; }

/* ---------- 12. Charts (5.18) ---------- */
.pd-split { display: flex; gap: 2px; height: 12px; }
.pd-split > i { display: block; height: 100%; border-radius: var(--app-r-bar); transform-origin: left center; }
.pd-split > .is-1 { background: var(--app-chart-1); }
.pd-split > .is-2 { background: var(--app-chart-2); }
.pd-split > .is-3 { background: var(--app-chart-3); }
.pd-split > .is-4 { background: repeating-linear-gradient(135deg, var(--app-chart-2) 0 2px, var(--app-surface) 2px 4px); box-shadow: inset 0 0 0 1px var(--app-chart-2); }
.pd-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--pd-s-1) var(--pd-s-2); margin-top: var(--pd-s-15); }
.pd-legend > div { min-width: 0; }
.pd-legend dt { display: flex; align-items: center; gap: 6px; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-2); }
.pd-legend dt i { width: 10px; height: 10px; border-radius: 1px; flex: none; }
.pd-legend dt .is-1 { background: var(--app-chart-1); } .pd-legend dt .is-2 { background: var(--app-chart-2); } .pd-legend dt .is-3 { background: var(--app-chart-3); }
/* a count and its amount (« 1 facture · CHF 2'910.00 ») may take two lines in a narrow column; the amount never splits
   (chf() binds « CHF » to its digits) */
.pd-legend dd { font-size: var(--pd-app-body-size); line-height: var(--pd-app-body-lh); font-weight: 600; margin-top: 2px; }
.pd-meter__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--pd-s-15); margin-bottom: var(--pd-s-1); font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); color: var(--app-text-2); }
.pd-meter__top b { color: var(--app-text); font-weight: 600; font-size: var(--pd-app-body-size); line-height: var(--pd-app-body-lh); }
.pd-meter__track { height: 8px; border-radius: min(var(--pd-r-1), 3px); background: var(--app-chart-track); overflow: hidden; }
.pd-meter__fill { height: 100%; width: calc(var(--v) * 100%); background: var(--app-chart-1); border-radius: min(var(--pd-r-1), 3px); transform-origin: left center; }

/* ---------- 13. Paper: A4 and the QR-bill (5.17). White in every theme ---------- */
.pd-a4 { width: 210mm; height: 297mm; position: relative; background: var(--paper-bg); color: var(--paper-text); font: 400 12.5px/18px var(--pd-font-text); font-variant-numeric: tabular-nums; overflow: hidden; }
.pd-a4__body { position: absolute; left: 0; right: 0; top: 0; height: 192mm; padding: 16mm 18mm 0; display: flex; flex-direction: column; }
.pd-a4__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10mm; }
.pd-a4__from { display: flex; gap: 4mm; align-items: flex-start; }
.pd-a4__from b { display: block; font-size: 15px; line-height: 20px; font-weight: 600; }
.pd-a4__from div > span { display: block; color: var(--paper-text-2); }
.pd-a4__to { min-width: 70mm; padding-top: 10mm; }
.pd-a4__to span { display: block; }
.pd-a4__title { margin-top: 14mm; font: 600 22px/28px var(--pd-font-title); letter-spacing: -0.01em; }
.pd-a4__dates { display: flex; flex-wrap: wrap; gap: 0 8mm; margin-top: 3mm; padding: 2.5mm 0; border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); color: var(--paper-text-2); }
.pd-a4__dates b { color: var(--paper-text); font-weight: 600; }
.pd-a4 table { width: 100%; margin-top: 7mm; border-collapse: collapse; }
.pd-a4 th { text-align: left; font-weight: 600; color: var(--paper-text-2); padding: 1.6mm 0 1.6mm 4mm; border-bottom: 1px solid var(--paper-line); font-size: 11.5px; white-space: nowrap; }
.pd-a4 td { padding: 2.2mm 0 2.2mm 4mm; border-bottom: 1px solid var(--paper-line); vertical-align: top; }
.pd-a4 th:first-child, .pd-a4 td:first-child { padding-left: 0; width: 100%; }
.pd-a4 .r { text-align: right; white-space: nowrap; }
.pd-a4__totals { margin-left: auto; width: 76mm; margin-top: 4mm; }
.pd-a4__totals div { display: flex; justify-content: space-between; padding: 1.2mm 0; }
.pd-a4__totals .is-total { border-top: 2px solid var(--paper-rule-total); margin-top: 1.5mm; padding-top: 2mm; font-weight: 600; font-size: 14px; }
.pd-a4__note { margin-top: auto; padding-bottom: 6mm; color: var(--paper-text-2); }
.pd-a4__demo { position: absolute; right: 18mm; top: 6mm; font-weight: 600; color: var(--paper-text-2); }
/* the receipt (62 × 105 mm) and the payment part (148 × 105 mm): black Arial, SIX */
.pd-bill { position: absolute; left: 0; bottom: 0; width: 210mm; height: 105mm; display: grid; grid-template-columns: 62mm 148mm; font-family: var(--pd-font-bill); color: var(--paper-bill-text); background: var(--paper-bg); font-variant-numeric: normal; }
.pd-bill--alone { position: relative; }
.pd-bill__cut-h { position: absolute; left: 0; right: 0; top: 0; border-top: 0.75px dashed var(--paper-bill-line); }
.pd-bill__cut-v { position: absolute; top: 0; bottom: 0; left: 62mm; border-left: 0.75px dashed var(--paper-bill-line); }
.pd-bill__sc { position: absolute; width: 4mm; height: 4mm; color: var(--paper-bill-line); background: var(--paper-bg); }
.pd-bill__sc--h { top: -2mm; left: 5mm; }
.pd-bill__sc--v { left: calc(62mm - 2mm); top: 5mm; transform: rotate(90deg); }
.pd-bill__sc svg { width: 100%; height: 100%; }
.pd-bill h4 { font: 700 11pt/1.2 var(--pd-font-bill); margin: 0; }
.pd-bill dt { font: 700 6pt/9pt var(--pd-font-bill); }
.pd-bill dd { font: 400 8pt/9pt var(--pd-font-bill); margin: 0 0 9pt; }
.pd-bill__rcpt { position: relative; padding: 5mm; display: flex; flex-direction: column; }
.pd-bill dl { margin: 0; }
.pd-bill__rcpt .pd-bill__inf { margin: 3.5mm 0 0; height: 56mm; overflow: hidden; }
.pd-bill__amt { display: grid; grid-template-columns: 13mm 1fr; gap: 0 1mm; height: 14mm; align-content: start; }
.pd-bill__amt dd { margin: 0; }
.pd-bill__accept { margin-top: auto; text-align: right; font: 700 6pt/9pt var(--pd-font-bill); padding-bottom: 0; }
.pd-bill__pay { position: relative; display: grid; grid-template-columns: 51mm 87mm; grid-template-rows: auto 1fr; padding: 5mm; column-gap: 5mm; }
.pd-bill__pay > h4 { grid-column: 1; grid-row: 1; }
.pd-bill__qr { grid-column: 1; grid-row: 2; padding-top: 5mm; display: flex; flex-direction: column; }
.pd-bill__qr svg { width: 46mm; height: 46mm; display: block; }
.pd-bill__qr .pd-bill__amt { margin-top: 3.5mm; grid-template-columns: 15mm 1fr; height: auto; }
.pd-bill__pay dt { font-size: 8pt; line-height: 11pt; }
.pd-bill__pay dd { font-size: 10pt; line-height: 11pt; margin-bottom: 11pt; }
.pd-bill__info { grid-column: 2; grid-row: 1 / span 2; }
.pd-bill__info dl { margin: 0; }
/* a sheet scaled to its container (phones, side previews): the true-size layout, drawn smaller */
.pd-fit { position: relative; width: 100%; overflow: hidden; }
.pd-fit > .pd-fit__in { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.pd-qr { display: block; background: var(--paper-bg); }
.pd-qr path, .pd-qr rect { fill: var(--paper-bill-text); }
.pd-qr .pd-qr__w { fill: var(--paper-bg); }
.pd-a4__sq { width: 40px; height: 40px; background: var(--app-accent, var(--paper-text)); color: var(--app-on-accent, var(--paper-bg)); }

/* ---------- 13b. The software's slates: « écran de pièces » (6.4, S02) and Réglages > Pièces (S18) ----------
   One slate per menu entry, 176 × 112, laid in courses by menu group; on a desktop every second course is offset by
   half a slate. Phones: two columns, no offset, 96 high. The slate itself is shared/slate.css (.pd-slate--app). The
   link wraps the slate so its focus ring is not cut by the clip-path. */
.pd-aroof { display: flex; flex-direction: column; gap: var(--pd-joint); }
.pd-aroof__course { display: flex; flex-wrap: wrap; gap: var(--pd-joint); }
@media (min-width: 768px) { .pd-aroof__course:nth-child(even) { padding-left: calc((176px + var(--pd-joint)) / 2); } }
.pd-aslate { display: block; flex: none; width: 176px; height: 112px; color: var(--app-text); filter: var(--app-slate-shadow); }
.pd-aslate > .pd-slate { display: block; height: 100%; }
.pd-aslate .pd-slate__in { display: flex; flex-direction: column; padding: 14px 16px 14px; }
.pd-aslate .pd-slate__in > .pd-ic { width: 20px; height: 20px; color: var(--app-text-2); margin-bottom: auto; }
.pd-aslate .pd-slate__title { font: 600 var(--pd-app-body-size)/20px var(--pd-font-text); }   /* 20: a two-line live line still fits the 112 slate */
.pd-aslate .pd-slate__data { margin-top: 0; font-size: var(--pd-app-meta-size); line-height: var(--pd-app-meta-lh); font-variant-numeric: tabular-nums; text-wrap: balance; }
@media (hover: hover) { .pd-aslate:hover .pd-slate--app > .pd-slate__in { background: var(--app-hover); } }
.pd-aslate:active .pd-slate--app > .pd-slate__in { background: var(--app-selected); }
/* phone: two columns; the icon sits before the label so a two-line live line still fits in 96 */
@media (max-width: 767px) {
  .pd-aroof { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-aroof__course { display: contents; }
  .pd-aslate { width: auto; height: 96px; }
  .pd-aslate .pd-slate__in { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: var(--pd-s-1); align-content: center; padding: 10px 12px 12px; }
  .pd-aslate .pd-slate__in > .pd-ic { margin: 1px 0 0; }
  .pd-aslate .pd-slate__data { grid-column: 2; }
}

/* ---------- 14. Page structure inside the content ---------- */
.pd-main { padding: var(--pd-pad); min-width: 0; }
.pd-main > .pd-offline { margin-bottom: var(--pd-s-3); }   /* the shell puts it first in the content: it keeps its distance from the page head */
.pd-stack { display: flex; flex-direction: column; gap: var(--pd-s-2); min-width: 0; }
.pd-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: var(--pd-s-2) var(--pd-s-3); margin-bottom: var(--pd-s-1); }
.pd-head__text { flex: 1 1 320px; min-width: 0; }
.pd-head__text > .pd-sub { margin-top: 2px; }
.pd-head__acts { display: flex; align-items: center; gap: var(--pd-s-1); flex-wrap: wrap; }
.pd-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--pd-s-2); align-items: start; }
.pd-grid > * { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 1024px) {
  .pd-span-3 { grid-column: span 3; } .pd-span-4 { grid-column: span 4; } .pd-span-5 { grid-column: span 5; } .pd-span-6 { grid-column: span 6; }
  .pd-span-7 { grid-column: span 7; } .pd-span-8 { grid-column: span 8; } .pd-span-9 { grid-column: span 9; } .pd-span-12 { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .pd-app { --pd-pad: var(--pd-s-2); }
  .pd-h1 { font-size: var(--pd-app-h1-phone, 24px); line-height: var(--pd-app-h1-phone-lh, 30px); }
  .pd-head { align-items: stretch; flex-direction: column; gap: var(--pd-s-2); }
  .pd-head__text { flex: none; }
  .pd-head__acts > .pd-btn { flex: 1 1 0; padding: 0 var(--pd-s-1); }
  .pd-dialog__foot { justify-content: stretch; }
  /* the search list on a phone: one rhythm, the subtitle always on the line under the label */
  .pd-cmd__label { flex-direction: column; align-items: flex-start; gap: 0; }
}
/* two header buttons side by side at 360 (P01): the words keep their room, the leading icon steps aside */
@media (max-width: 419px) { .pd-head__acts > .pd-btn:not(.pd-btn--icon) > .pd-ic:first-child { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .pd-pop.is-in, .pd-pop.is-out, .pd-dialog, .pd-dialog.is-out, .pd-sheet, .pd-sheet.is-out, .pd-toast, .pd-toast.is-out { animation-name: pd-fade; }
  .pd-dialog.is-out, .pd-sheet.is-out, .pd-toast.is-out, .pd-pop.is-out { animation-name: pd-fade-out; }
  .pd-grow .pd-bar, .pd-grow .pd-split > i, .pd-grow .pd-meter__fill { animation: none; }
}

/* =====================================================================================
   15. The premium pass (Youssef, 2026-10-27; tokens.css « THE PREMIUM PASS »). The software's own pages and, since the
   site phase (2026-10-28), the frames drawn inside a site page or the kit: :where(body.pd-app, body.pd-site .pd-app)
   adds no specificity, so a screen's or a site page's own local rule still wins over these.
   ===================================================================================== */
/* a quiet button on any ground: the hover is a tint of ink, so it reads on the canvas, a card or a banner alike */
:where(body.pd-app, body.pd-site .pd-app) .pd-btn--icon { border-radius: var(--app-r-control); }
/* a card's head row shares one baseline: its title, count, meta and « Tout voir » (centred, the 13 px meta and the 15 px
   link sat 1 px above the 17 px title). Only a head whose end is the link alone: its 44 px box sets the row's height, so
   nothing moves up */
:where(body.pd-app, body.pd-site .pd-app) .pd-card__head:has(> .pd-card__end > .pd-more:only-child) > :is(.pd-title, .pd-meta, .pd-meta2, .pd-count, .pd-card__end) { align-self: baseline; }
:where(body.pd-app, body.pd-site .pd-app) .pd-card__head:has(> .pd-card__end > .pd-more:only-child) > .pd-card__end { align-items: baseline; }
/* a sunken box inside a card takes the inner radius (the card's 12 minus its padding, never more than a control's) */
:where(body.pd-app, body.pd-site .pd-app) .pd-card .pd-banner { border-radius: var(--pd-r-2); }
/* the tenant's square is an app icon: 22.5 % of its side, as iOS draws one (40 → 9, 36 → 8, 28 → 6, 64 → 14) */
:where(body.pd-app, body.pd-site .pd-app) .pd-sq { border-radius: 22.5%; }
/* the bell's and the menu's counts are rounded squares, never circles or stadiums */
:where(body.pd-app, body.pd-site .pd-app) .pd-badge { border-radius: 5px; }

/* the segmented control (iOS): a rounded track, a white thumb with a soft shadow that slides to the chosen segment.
   Before the script measures (first paint, no script) the chosen segment draws its own thumb; ui.js then gives the
   track one thumb (.has-thumb) that moves with transform, 280 ms on the house ease-out */
:where(body.pd-app, body.pd-site .pd-app) .pd-seg { position: relative; isolation: isolate; }
:where(body.pd-app, body.pd-site .pd-app) .pd-seg > button, :where(body.pd-app, body.pd-site .pd-app) .pd-seg > a { position: relative; z-index: 1; border-radius: var(--app-r-control); background: transparent; }
:where(body.pd-app, body.pd-site .pd-app) .pd-seg > :is([aria-pressed="true"], [aria-selected="true"], [aria-current="page"]) { background: transparent; }
:where(body.pd-app, body.pd-site .pd-app) .pd-seg > :is(button, a)::before { content: ""; position: absolute; inset: 2px; z-index: -1; border-radius: var(--app-r-thumb); background: transparent; transition: background-color var(--pd-dur-2) var(--pd-ease-out); pointer-events: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-seg:not(.has-thumb) > :is([aria-pressed="true"], [aria-selected="true"], [aria-current="page"])::before { background: var(--app-seg-thumb); box-shadow: var(--app-shadow-thumb); }
@media (hover: hover) {
  :where(body.pd-app, body.pd-site .pd-app) .pd-seg > :not([aria-pressed="true"]):not([aria-selected="true"]):not([aria-current="page"]):not(:disabled):hover { background: transparent; color: var(--app-text); }
  :where(body.pd-app, body.pd-site .pd-app) .pd-seg > :not([aria-pressed="true"]):not([aria-selected="true"]):not([aria-current="page"]):not(:disabled):hover::before { background: var(--app-tint); }
}
:where(body.pd-app, body.pd-site .pd-app) .pd-seg.has-thumb::before {
  content: ""; position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 0; width: var(--pd-seg-w, 0px);
  transform: translateX(var(--pd-seg-x, 0px)); border-radius: var(--app-r-thumb); background: var(--app-seg-thumb); box-shadow: var(--app-shadow-thumb);
  transition: transform 280ms var(--pd-ease-out), width 280ms var(--pd-ease-out); pointer-events: none;
}
:where(body.pd-app, body.pd-site .pd-app) .pd-seg.is-still::before { transition: none; }

/* the switch (iOS): a 44 × 26 track (the one shape allowed half its height), a 22 round knob with its shadow */
:where(body.pd-app, body.pd-site .pd-app) .pd-switch { border-radius: var(--app-r-control); }
:where(body.pd-app, body.pd-site .pd-app) .pd-switch__track { width: 44px; height: 26px; border: 0; border-radius: 13px; background: var(--app-switch-off); transition: background-color 240ms var(--pd-ease-out); }
:where(body.pd-app, body.pd-site .pd-app) .pd-switch__track::after { top: 2px; left: 2px; width: 22px; height: 22px; border-radius: var(--pd-r-round); background: var(--app-knob); box-shadow: var(--app-shadow-knob); transition: transform 240ms var(--pd-ease-out), background-color 240ms var(--pd-ease-out); }
:where(body.pd-app, body.pd-site .pd-app) .pd-switch[aria-checked="true"] .pd-switch__track { background: var(--app-switch-on); }
:where(body.pd-app, body.pd-site .pd-app) .pd-switch[aria-checked="true"] .pd-switch__track::after { transform: translateX(18px); background: var(--app-knob-on); }
@media (hover: hover) { :where(body.pd-app, body.pd-site .pd-app) .pd-switch:hover:not(:disabled) .pd-switch__track { border-color: transparent; } }
:where(body.pd-app, body.pd-site .pd-app) .pd-switch:disabled .pd-switch__track::after { box-shadow: none; }

/* settings rows (5.3) become an inset grouped list, as in iOS Settings: one rounded white panel, the rows inside it with
   their separators stopping at the panel's padding, none under the last one. Inside a card they stay plain rows */
:where(body.pd-app, body.pd-site .pd-app) .pd-setrows:not(.pd-card .pd-setrows) {
  border: 1px solid var(--app-line); border-radius: var(--app-r-card); background: var(--app-surface); box-shadow: var(--app-shadow-card);
  padding: 0 var(--pd-s-25);
}
:where(body.pd-app, body.pd-site .pd-app) .pd-setrows:not(.pd-card .pd-setrows) > .pd-setrow:last-child { border-bottom: 0; }
@media (max-width: 767px) { :where(body.pd-app, body.pd-site .pd-app) .pd-setrows:not(.pd-card .pd-setrows) { padding: 0 var(--pd-s-2); } }

/* lists that open a screen end on a chevron (the « Plus » sheet, the back office's sections), as iOS lists do */
.pd-opt > .pd-opt__go { width: 16px; height: 16px; margin-right: -4px; color: var(--app-text-3); }

/* the bars' material (shell.css) where the browser has no backdrop-filter: opaque */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  body.pd-app { --app-bar: var(--app-surface); }
}

/* ---------- 16. Arrival (README 13b): the skeleton, then the screen settles ----------
   A screen reached from another one of ours (pageswitch.js): before its first paint <html> carries pd-skel-on, so its
   content waits, hidden, under the skeleton's picture (the screen's own layout: its cards, its lines of text as rounded
   bars, its controls as blocks, drawn once on a canvas). After 300 ms the skeleton fades and the content rises 8 px into
   place in 280 ms. The frame (menu, top bar, tab bar) never moves. Motion reduced, or no cross-document transitions:
   no skeleton. A timer in pageswitch.js lets the content go after 1.2 s whatever happens; without script nothing hides */
:root.pd-skel-on body.pd-app:is([data-layout="menu"], [data-layout="pieces"]) > main > * { opacity: 0; }
.pd-skelscreen {
  position: fixed; z-index: calc(var(--pd-z-sticky) - 1); left: var(--pd-side-w, 0px); right: 0; top: var(--pd-sticky-top, 0px);
  bottom: var(--pd-tabbar-total, 0px); overflow: hidden; pointer-events: none; contain: strict;
}
.pd-skelscreen > canvas { position: absolute; left: 0; top: 0; }
/* one soft light passes over it, once (H11: never a loop) */
.pd-skelscreen::after {
  content: ""; position: absolute; inset: 0; width: 60%;
  background: linear-gradient(100deg, transparent 0%, var(--app-skel-sweep) 50%, transparent 100%);
  transform: translateX(-110%); animation: pd-skel-sweep 520ms var(--pd-ease-out) 40ms 1 both;
}
@keyframes pd-skel-sweep { to { transform: translateX(190%); } }
/* the line under the top bar: it runs to its end while the screen loads, then goes */
.pd-skelscreen > .pd-skelscreen__bar { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--pd-switch-bar); transform-origin: left center; animation: pd-skel-bar 300ms cubic-bezier(0.3, 0.7, 0.4, 1) both; }
@keyframes pd-skel-bar { from { transform: scaleX(0.28); } to { transform: scaleX(1); } }
.pd-skelscreen.is-out { opacity: 0; transition: opacity 200ms var(--pd-ease-out); }
/* the content settles: a crossfade with the skeleton and an 8 px rise (a part holding a fixed bar or button only fades,
   so nothing fixed moves) */
:root.pd-skel-out body.pd-app > main > * { animation: pd-arrive-fade 280ms var(--pd-ease-out) both; }
:root.pd-skel-out body.pd-app > main > .pd-rise { animation: pd-arrive-fade 280ms var(--pd-ease-out) both, pd-arrive-rise 280ms var(--pd-ease-out) both; }
@keyframes pd-arrive-fade { from { opacity: 0; } }
@keyframes pd-arrive-rise { from { transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  :where(body.pd-app) .pd-switch__track, :where(body.pd-app) .pd-switch__track::after { transition-duration: 80ms; }
}

/* =====================================================================================
   18. LIQUID « the real Liquid Glass » (Youssef, 2026-10-27: « I want the real liquid glass feel to show please, i want
   a lot of attention to details small details »; DIRECTION-LIQUID.md). It replaces section 17 (Direction B): B's ground,
   its hue per menu entry and its chart hues are carried over; its frosted panes, sheen, glint, hover lift, 96 % press and
   spring overshoots are not. The software's own pages and the frames drawn inside a site page or the kit, through
   :where(body.pd-app, body.pd-site .pd-app): no added weight, a screen's or a site page's own rule still wins. On the
   site the materials are solid and the capsules rounded rectangles (tokens.css « THE SOFTWARE ON THE SITE », section 19
   below). Every colour is a role of tokens.css « LIQUID ».
   ===================================================================================== */

/* ---------- 18.1 Base: figures that stand, one icon weight, the selection, the caret, quiet scrollbars ---------- */
:where(body.pd-app, body.pd-site .pd-app) { font-variant-numeric: tabular-nums lining-nums; font-kerning: normal; text-rendering: optimizeLegibility; caret-color: var(--app-sky); }
/* figures stand in columns on every element (D12): a « font: » shorthand resets font-variant-numeric to normal, so the
   inherited value alone lost it on every component written with one (titles, counts, tags, pills, keys, segments, the
   screens' own rules). Paper and the QR-bill keep their own figures (never restyled) (integration, _requests/G1.md R1,
   G3.md 7, G4.md 11, G5.md R6, G6.md 12) */
body.pd-app :not(.pd-paper, .pd-paper *, [data-true-scale], [data-true-scale] *) { font-variant-numeric: tabular-nums lining-nums !important; }
/* a tablet's content runs on the capsules' lines: 24 from the rail and from the window's right edge (3.10, D5;
   _requests/G1.md R16) */
@media (min-width: 768px) and (max-width: 1023px) { body.pd-app { --pd-pad: var(--pd-s-3); } }
:where(body.pd-app, body.pd-site .pd-app) ::selection { background: var(--app-select); color: inherit; }
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-h1, .pd-title, .pd-dtitle, h1, h2, h3) { text-wrap: balance; }
:where(body.pd-app, body.pd-site .pd-app) :is(p, .pd-sub, .pd-banner__text) { text-wrap: pretty; }
body.pd-app .pd-ic { stroke-width: 1.75; }
body.pd-app .pd-check__box .pd-ic { stroke-width: 2.25; }   /* the tick of a check is drawn, not an icon (6.7) */
body.pd-app .pd-pi { stroke-width: 1.75; }   /* a piece's icon (piece-icons.js writes 1.5 for the site): one weight here (D11) */
:root.pd-appdoc { scrollbar-color: var(--app-scroll-root) transparent; scrollbar-width: thin; }
:where(body.pd-app, body.pd-site .pd-app) * { scrollbar-width: thin; scrollbar-color: var(--app-scroll-thumb) transparent; }
:where(body.pd-app, body.pd-site .pd-app) ::-webkit-scrollbar { width: 10px; height: 10px; }
:where(body.pd-app, body.pd-site .pd-app) ::-webkit-scrollbar-track { background: transparent; }
:where(body.pd-app, body.pd-site .pd-app) ::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: var(--app-scroll-thumb); background-clip: padding-box; }
:where(body.pd-app, body.pd-site .pd-app) ::-webkit-scrollbar-thumb:hover { background-color: var(--app-scroll-thumb-hover); }
/* truncation: one line, two lines; ui.js gives a cut text its full words as a title */
:where(body.pd-app, body.pd-site .pd-app) .pd-trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
:where(body.pd-app, body.pd-site .pd-app) .pd-clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* ---------- 18.2 The glass material (4.1 to 4.7) ----------
   .pd-glass: a clear rim band (the element: --app-glass-body over a backdrop blur, the lens in Chromium), a frosted core
   inset by the rim's width where the words sit (::before: the core, its top sheen, the pointer's light), and a true
   specular ring (::after, masked to 1 px, brightest at the top left, a counter-glint at the bottom right). Thick (menus,
   the palette, windows, sheets): one layer. Smoke (the side panel): the brand's stone. Dark (toasts, tooltips). */
:where(body.pd-app, body.pd-site .pd-app) :where(.pd-glass) { position: relative; }
:where(body.pd-app, body.pd-site .pd-app) .pd-glass {
  isolation: isolate; background-color: var(--app-glass-body); color: var(--app-text);
  -webkit-backdrop-filter: var(--app-glass-blur); backdrop-filter: var(--app-glass-blur);
  box-shadow: var(--app-shadow-glass);
  transition: background-color var(--app-dur-tint) linear, color var(--app-dur-tint) linear;
}
:where(body.pd-app, body.pd-site .pd-app) .pd-glass:not([data-glass])::before {
  content: ""; position: absolute; inset: var(--app-glass-rimw); z-index: -1; border-radius: inherit; pointer-events: none;
  background-color: var(--app-glass-core);
  background-image: linear-gradient(180deg, var(--app-glass-sheen), transparent 42%);
  transition: background-color var(--app-dur-tint) linear;
}
:where(body.pd-app, body.pd-site .pd-app) .pd-glass::after {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--app-glass-ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* the lens (Chromium: glass.js builds the map; the rim band bends what lies under it). The blur first, then the lens: a
   lens laid on the sharp backdrop left a bent copy of the words legible through the core (headed Chromium at 3x; the
   integration, _requests/G4.md 19) */
html.pd-lens body.pd-app .pd-glass[data-lens] { -webkit-backdrop-filter: var(--app-glass-blur) var(--pd-lens,); backdrop-filter: var(--app-glass-blur) var(--pd-lens,); }
/* elsewhere, a stronger light on the core's edge instead of bending */
html:not(.pd-lens) body.pd-app .pd-glass:not([data-glass])::before { box-shadow: var(--app-glass-edgelight); }
/* thick: one layer, its sheen on the material itself */
:where(body.pd-app, body.pd-site .pd-app) .pd-glass[data-glass="thick"] {
  background-color: var(--app-glass-thick); background-image: linear-gradient(180deg, var(--app-glass-sheen), transparent 120px);
  -webkit-backdrop-filter: var(--app-glass-blur-thick); backdrop-filter: var(--app-glass-blur-thick); box-shadow: var(--app-shadow-glass-pop);
}
/* smoke: the side panel and the back office's */
:where(body.pd-app, body.pd-site .pd-app) .pd-glass[data-glass="smoke"] {
  background-color: transparent; background-image: linear-gradient(180deg, var(--app-smoke-top), var(--app-smoke-bot)); color: var(--app-chrome-text);
  -webkit-backdrop-filter: var(--app-glass-blur-smoke); backdrop-filter: var(--app-glass-blur-smoke);
}
:where(body.pd-app, body.pd-site .pd-app) .pd-glass[data-glass="smoke"]::after { background: var(--app-chrome-ring); }
/* dark: toasts and tooltips */
:where(body.pd-app, body.pd-site .pd-app) .pd-glass[data-glass="dark"] { background-color: var(--app-toast); color: var(--app-on-toast); -webkit-backdrop-filter: var(--app-glass-blur); backdrop-filter: var(--app-glass-blur); box-shadow: var(--app-shadow-glass-pop); }
:where(body.pd-app, body.pd-site .pd-app) .pd-glass[data-glass="dark"]::after { background: var(--app-chrome-ring); }
/* the material through a first child (PD.glass.wrap), for an element whose own ::before and ::after are taken */
:where(body.pd-app, body.pd-site .pd-app) .pd-glass.has-mat { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-glass.has-mat::before, :where(body.pd-app, body.pd-site .pd-app) .pd-glass.has-mat::after { content: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-mat { position: absolute; inset: 0; z-index: -1; display: block; border-radius: inherit; pointer-events: none; background-color: var(--app-glass-body); -webkit-backdrop-filter: var(--app-glass-blur); backdrop-filter: var(--app-glass-blur); box-shadow: var(--app-shadow-glass); }
:where(body.pd-app, body.pd-site .pd-app) .pd-mat::before { content: ""; position: absolute; inset: var(--app-glass-rimw); border-radius: inherit; background-color: var(--app-glass-core); background-image: linear-gradient(180deg, var(--app-glass-sheen), transparent 42%); }
:where(body.pd-app, body.pd-site .pd-app) .pd-mat::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--app-glass-ring); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
/* the gel press (4.6): a pressed glass control squeezes and its light blooms where it was touched; released, it
   settles on the spring (its 4.6 % overshoot of a 6 % squeeze is felt, not seen). Only the pressed control moves */
body.pd-app [data-gel] { transition: background-color var(--app-dur-micro) linear, color var(--app-dur-micro) linear, box-shadow var(--app-dur-micro) linear, scale var(--app-dur-release) var(--app-spring); }
body.pd-app [data-gel][data-gel].is-pressed { scale: var(--app-gel); transition: background-color var(--app-dur-micro) linear, color var(--app-dur-micro) linear, box-shadow var(--app-dur-micro) linear, scale var(--app-dur-press-in) var(--app-ease); }
:where(body.pd-app, body.pd-site .pd-app) .pd-bloom { position: absolute; inset: 0; z-index: 2; display: block; border-radius: inherit; pointer-events: none; opacity: 0; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), var(--app-glass-bloom), transparent 60%); transition: opacity 420ms var(--app-ease); }
:where(body.pd-app, body.pd-site .pd-app) [data-gel].is-pressed > .pd-bloom { opacity: 1; transition-duration: var(--app-dur-press-in); }
/* reduced transparency and higher contrast (4.7): solid materials (tokens.css), no blur, no lens, no light */
html.pd-solid body.pd-app .pd-glass, html.pd-solid body.pd-app .pd-mat { -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (prefers-reduced-transparency: reduce) {
  body.pd-app .pd-glass, body.pd-app .pd-mat { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}
@media (prefers-contrast: more) {
  body.pd-app .pd-glass, body.pd-app .pd-mat { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background-color: var(--app-glass-solid); }
  body.pd-app .pd-glass:not([data-glass])::before { background: var(--app-glass-solid); }
  body.pd-app .pd-glass::after { background: var(--app-text-3); opacity: 0.6; }
  body.pd-app :is(.pd-card, .pd-table-wrap, .pd-agenda, .pd-inspector) { box-shadow: 0 0 0 1px var(--app-border); }
}

/* ---------- 18.3 The ground and the panes: content is solid (2) ----------
   A pane is white by day and a raised pane at night, drawn by a device-pixel edge and a soft shadow; no blur, no sheen,
   no glint, no lift. A pane that is a link shows the hover fill. */
.pd-ground {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(56% 48% at 8% 0%, var(--app-glow-1) 0%, transparent 72%),
    radial-gradient(46% 42% at 96% 4%, var(--app-glow-2) 0%, transparent 70%),
    radial-gradient(64% 56% at 72% 104%, var(--app-glow-3) 0%, transparent 72%),
    radial-gradient(40% 40% at 30% 70%, var(--app-glow-2) 0%, transparent 70%),
    var(--app-bg);
}
/* the window keeps the scrollbar's place (scrollbar-gutter), and only the root's flat colour paints under it: the ground
   meets that 10 px gutter at --app-bg, so no seam steps from a glow to the gutter at the top right (D20; integration,
   _requests/G6.md 16) */
@media (pointer: fine) and (min-width: 1024px) {
  .pd-ground { background:
    linear-gradient(90deg, transparent calc(100% - 64px), var(--app-bg) 100%),
    radial-gradient(56% 48% at 8% 0%, var(--app-glow-1) 0%, transparent 72%),
    radial-gradient(46% 42% at 96% 4%, var(--app-glow-2) 0%, transparent 70%),
    radial-gradient(64% 56% at 72% 104%, var(--app-glow-3) 0%, transparent 72%),
    radial-gradient(40% 40% at 30% 70%, var(--app-glow-2) 0%, transparent 70%),
    var(--app-bg); }
}
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-card, .pd-table-wrap, .pd-agenda) {
  position: relative; background: var(--app-pane); border: 0; border-radius: var(--app-r-pane); box-shadow: var(--app-shadow-pane);
  -webkit-backdrop-filter: none; backdrop-filter: none; transition: none; transform: none;
}
:where(body.pd-app, body.pd-site .pd-app) .pd-setrows:not(.pd-card .pd-setrows) { background: var(--app-pane); border: 0; border-radius: var(--app-r-pane); box-shadow: var(--app-shadow-pane); padding: 0 20px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-card { padding: 20px; min-width: 0; }
:where(body.pd-app, body.pd-site .pd-app) a.pd-card { color: inherit; }
@media (hover: hover) { :where(body.pd-app, body.pd-site .pd-app) a.pd-card:hover { background: linear-gradient(var(--app-hover), var(--app-hover)), var(--app-pane); } }
@media (max-width: 767px) { :where(body.pd-app, body.pd-site .pd-app) .pd-card { padding: 16px; } :where(body.pd-app, body.pd-site .pd-app) .pd-setrows:not(.pd-card .pd-setrows) { padding: 0 16px; } }
/* a box inside a pane (a well: a quote, a nested row, a preview stage) */
:where(body.pd-app, body.pd-site .pd-app) .pd-well { background: var(--app-pane-2); border-radius: var(--app-r-inset); }

/* ---------- 18.4 Tiles: B's hues, one per menu entry, lifted into the contrast band (3.5) ----------
   A tile names a subject; a status is always a pill with its glyph and its words, so a tile's colour is never read as a
   status. --t1, --t2 come from data-tone or data-entry. Sizes: 24 (the side menu), 26 (settings rows, the palette), 28
   (pane heads, touch), 30 (« Plus »), 32 (banners), 40 (empty states), 64 (the app icon). */
:where(body.pd-app, body.pd-site .pd-app) [data-tone="sky"] { --t1: var(--app-tile-sky); --t2: var(--app-tile-sky-2); }
:where(body.pd-app, body.pd-site .pd-app) [data-tone="green"] { --t1: var(--app-tile-green); --t2: var(--app-tile-green-2); }
:where(body.pd-app, body.pd-site .pd-app) [data-tone="amber"] { --t1: var(--app-tile-amber); --t2: var(--app-tile-amber-2); }
:where(body.pd-app, body.pd-site .pd-app) [data-tone="red"] { --t1: var(--app-tile-red); --t2: var(--app-tile-red-2); }
:where(body.pd-app, body.pd-site .pd-app) [data-tone="slate"] { --t1: var(--app-tile-slate); --t2: var(--app-tile-slate-2); }
:where(body.pd-app, body.pd-site .pd-app) [data-tone="teal"] { --t1: var(--app-tile-teal); --t2: var(--app-tile-teal-2); }
:where(body.pd-app, body.pd-site .pd-app) [data-tone="plum"] { --t1: var(--app-tile-plum); --t2: var(--app-tile-plum-2); }
:where(body.pd-app, body.pd-site .pd-app) [data-tone="ink"] { --t1: var(--app-tile-ink); --t2: var(--app-tile-ink-2); }
/* the menu's own hues, one per entry, B's mapping unchanged (the side panel, « Plus », the card heads, the slates) */
:where(body.pd-app, body.pd-site .pd-app) :is([data-entry="aujourdhui"], [data-entry="messages"], [data-entry="apercu"]) { --t1: var(--app-tile-sky); --t2: var(--app-tile-sky-2); }
:where(body.pd-app, body.pd-site .pd-app) :is([data-entry="validations"], [data-entry="prestations"], [data-entry="demandes"]) { --t1: var(--app-tile-amber); --t2: var(--app-tile-amber-2); }
:where(body.pd-app, body.pd-site .pd-app) :is([data-entry="factures"], [data-entry="sante"]) { --t1: var(--app-tile-green); --t2: var(--app-tile-green-2); }
:where(body.pd-app, body.pd-site .pd-app) :is([data-entry="agenda"], [data-entry="drapeaux"]) { --t1: var(--app-tile-red); --t2: var(--app-tile-red-2); }
:where(body.pd-app, body.pd-site .pd-app) :is([data-entry="planning"], [data-entry="appels"], [data-entry="espaces"]) { --t1: var(--app-tile-teal); --t2: var(--app-tile-teal-2); }
:where(body.pd-app, body.pd-site .pd-app) :is([data-entry="travaux"], [data-entry="equipe"]) { --t1: var(--app-tile-ink); --t2: var(--app-tile-ink-2); }
:where(body.pd-app, body.pd-site .pd-app) :is([data-entry="ma-journee"], [data-entry="devis"], [data-entry="assistants"], [data-entry="pieces"]) { --t1: var(--app-tile-plum); --t2: var(--app-tile-plum-2); }
:where(body.pd-app, body.pd-site .pd-app) :is([data-entry="taches"], [data-entry="contacts"], [data-entry="reglages"], [data-entry="aide"], [data-entry="journal"]) { --t1: var(--app-tile-slate); --t2: var(--app-tile-slate-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-tile {
  --tile: 30px; --tile-g: 18px; --tile-r: calc(var(--tile) * 0.25);
  display: inline-grid; place-items: center; flex: none; width: var(--tile); height: var(--tile); border-radius: var(--tile-r);
  color: var(--app-on-tile); background: var(--app-tile-gloss), linear-gradient(180deg, var(--t1, var(--app-tile-slate)), var(--t2, var(--app-tile-slate-2)));
  box-shadow: var(--app-tile-light), var(--app-tile-foot), var(--app-tile-contact);
}
:where(body.pd-app, body.pd-site .pd-app) .pd-tile > .pd-ic { width: var(--tile-g); height: var(--tile-g); filter: var(--app-tile-glyph-shadow); }
:where(body.pd-app, body.pd-site .pd-app) .pd-tile--24 { --tile: 24px; --tile-g: 14px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-tile--26 { --tile: 26px; --tile-g: 16px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-tile--28 { --tile: 28px; --tile-g: 16px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-tile--30 { --tile: 30px; --tile-g: 18px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-tile--32 { --tile: 32px; --tile-g: 18px; }
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-tile--40, .pd-tile--lg) { --tile: 40px; --tile-g: 22px; --tile-r: 9px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-tile--64 { --tile: 64px; --tile-g: 34px; --tile-r: 14.4px; }

/* ---------- 18.5 Type ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-h1 { font: 700 var(--pd-app-h1-size)/var(--pd-app-h1-lh) var(--pd-font-title); letter-spacing: var(--pd-app-h1-track); }
@media (max-width: 767px) { :where(body.pd-app, body.pd-site .pd-app) .pd-h1 { font-size: var(--pd-app-h1-size); line-height: var(--pd-app-h1-lh); } }
:where(body.pd-app, body.pd-site .pd-app) .pd-title { letter-spacing: var(--pd-app-title-track); }
:where(body.pd-app, body.pd-site .pd-app) .pd-dtitle { font: 600 var(--pd-app-dtitle-size)/var(--pd-app-dtitle-lh) var(--pd-font-title); letter-spacing: -0.012em; }
:where(body.pd-app, body.pd-site .pd-app) .pd-label { font-weight: 600; }
:where(body.pd-app, body.pd-site .pd-app) .pd-money { font-weight: 700; letter-spacing: var(--pd-app-money-track); }
/* « CHF » on the figure's cap height, 6 px before it; the figure is its final text from the first frame (money never moves) */
:where(body.pd-app, body.pd-site .pd-app) .pd-money .pd-cur { font: 600 15px/1 var(--pd-font-text); letter-spacing: 0.02em; color: var(--app-text-2); margin-right: 6px; vertical-align: 0.62em; }
:where(body.pd-app, body.pd-site .pd-app) .pd-code { font-size: var(--pd-app-mono-size); }
:where(body.pd-app, body.pd-site .pd-app) .pd-a { text-decoration-color: var(--app-sky); }
/* the page head: the large title, the date under it (desktop) or above it as an eyebrow (phone, P01 and P08) */
:where(body.pd-app, body.pd-site .pd-app) .pd-head { margin-bottom: 8px; gap: 16px 24px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-head__text > .pd-sub { margin-top: 2px; color: var(--app-text-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-eyebrow { display: block; font: 600 15px/20px var(--pd-font-text); color: var(--app-sky-ink); margin-bottom: 2px; }

/* ---------- 18.6 Pane heads and « Tout voir » ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-card__head { min-height: 44px; margin: -10px 0 8px; gap: 10px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-card__head > .pd-tile { --tile: 28px; --tile-g: 16px; align-self: center; }
/* a title that wraps keeps 12 px from the pane's top (D4); a one-line head is unchanged (34 inside its 44) (_requests/G3.md 20) */
:where(body.pd-app, body.pd-site .pd-app) .pd-card__head > .pd-title { padding-block: 5px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-card__end { gap: 4px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-more {
  position: relative; isolation: isolate; height: 44px; gap: 4px; padding: 0 12px; margin-right: -12px; border-radius: var(--app-r-capsule); background: none;
  font: 600 15px/20px var(--pd-font-text); color: var(--app-sky-ink); transition: none;
}
:where(body.pd-app, body.pd-site .pd-app) .pd-more::before { content: ""; position: absolute; inset: 6px 0; z-index: -1; border-radius: var(--app-r-capsule); background: transparent; transition: background-color var(--app-dur-micro) linear; }
:where(body.pd-app, body.pd-site .pd-app) .pd-more > .pd-ic { width: 16px; height: 16px; transition: translate var(--app-dur-micro) var(--app-ease); }
@media (hover: hover) {
  :where(body.pd-app, body.pd-site .pd-app) .pd-more:hover { background: none; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-more:hover::before { background: var(--app-tint); }
  :where(body.pd-app, body.pd-site .pd-app) .pd-more:hover > .pd-ic { transform: none; translate: 2px 0; }
}
:where(body.pd-app, body.pd-site .pd-app) .pd-more:active::before { background: var(--app-tint-press); }
:where(body.pd-app, body.pd-site .pd-app) .pd-card__foot { border-top: var(--app-hair) solid var(--app-line); }
/* a pane's foot keeps 12 px from the pane's edge on a phone too (D4; _requests/G1.md R2) */
@media (max-width: 767px) { :where(body.pd-app, body.pd-site .pd-app) .pd-card__foot { margin-bottom: -4px; } }
/* a link on glass (a window, a sheet): its words take text (the tenant's ink on thick glass measured 6.51:1), its arrow
   keeps the accent (3.3: on glass the tenant's colour is for icons; _requests/G2.md R13) */
body.pd-app .pd-glass .pd-more { color: var(--app-text); }
body.pd-app .pd-glass .pd-more > .pd-ic { color: var(--app-sky-ink); }

/* ---------- 18.7 Rows ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-rows > * + *, :where(body.pd-app, body.pd-site .pd-app) .pd-tl > li { border-color: var(--app-line); border-top-width: var(--app-hair); }
:where(body.pd-app, body.pd-site .pd-app) .pd-row { min-height: 52px; }
:where(body.pd-app, body.pd-site .pd-app) :is(a.pd-row, button.pd-row) { border-radius: var(--app-r-inset); transition: background-color var(--app-dur-micro) linear; }
@media (hover: hover) { :where(body.pd-app, body.pd-site .pd-app) :is(a.pd-row, button.pd-row):hover { background: var(--app-hover); } }
:where(body.pd-app, body.pd-site .pd-app) :is(a.pd-row, button.pd-row):active { background: var(--app-selected); }
@media (max-width: 767px) { :where(body.pd-app, body.pd-site .pd-app) .pd-row { min-height: 56px; } }

/* ---------- 18.8 Buttons: lit keys; in content nothing moves (6.3) ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-btn {
  position: relative; isolation: isolate; height: 44px; min-width: 44px; gap: 8px; padding: 0 18px; border: 0; border-radius: var(--app-r-capsule);
  font: 600 var(--pd-app-btn-size)/20px var(--pd-font-text); transform: none;
  transition: background-color var(--app-dur-micro) linear, color var(--app-dur-micro) linear, box-shadow var(--app-dur-micro) linear;
}
:where(body.pd-app, body.pd-site .pd-app) .pd-btn > .pd-ic { width: 18px; height: 18px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-btn::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; background: transparent; transition: opacity var(--app-dur-micro) linear; }
/* primary: the ink key lit from above */
:where(body.pd-app, body.pd-site .pd-app) .pd-btn--primary { background: linear-gradient(180deg, var(--app-solid-top), var(--app-solid)); color: var(--app-on-solid); box-shadow: var(--app-shadow-primary); }
:where(body.pd-app, body.pd-site .pd-app) .pd-btn--primary::after { background: var(--app-solid-veil); }
/* secondary: the white key with its bezel (desktop) */
:where(body.pd-app, body.pd-site .pd-app) .pd-btn--secondary { background: linear-gradient(180deg, var(--app-key-top), var(--app-key-bot)); color: var(--app-text); box-shadow: var(--app-shadow-raised); }
:where(body.pd-app, body.pd-site .pd-app) .pd-btn--secondary::after { background: var(--app-key-veil); }
:where(body.pd-app, body.pd-site .pd-app) .pd-btn--quiet { background: transparent; color: var(--app-text-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-btn--crit, :where(body.pd-app, body.pd-site .pd-app) .pd-btn--crit-plain { background: transparent; color: var(--app-crit-ink); }
:where(body.pd-app, body.pd-site .pd-app) .pd-btn--danger { background: var(--app-danger); color: var(--app-on-danger); box-shadow: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-btn--accent { background: linear-gradient(180deg, color-mix(in oklab, var(--app-accent) 92%, var(--pd-white)), var(--app-accent)); color: var(--app-on-accent); box-shadow: var(--app-shadow-primary); }
:where(body.pd-app, body.pd-site .pd-app) .pd-btn--accent::after { background: var(--app-solid-veil); }
:where(body.pd-app, body.pd-site .pd-app) .pd-btn--icon { width: 44px; padding: 0; border-radius: var(--app-r-capsule); background: transparent; color: var(--app-text-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-btn--icon > .pd-ic { width: 20px; height: 20px; }
@media (hover: hover) {
  :where(body.pd-app, body.pd-site .pd-app) :is(.pd-btn--primary, .pd-btn--secondary, .pd-btn--accent):hover::after { opacity: 1; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-btn--primary:hover { background: linear-gradient(180deg, var(--app-solid-top), var(--app-solid)); }
  :where(body.pd-app, body.pd-site .pd-app) .pd-btn--secondary:hover { background: linear-gradient(180deg, var(--app-key-top), var(--app-key-bot)); }
  :where(body.pd-app, body.pd-site .pd-app) .pd-btn--accent:hover { background: linear-gradient(180deg, color-mix(in oklab, var(--app-accent) 92%, var(--pd-white)), var(--app-accent)); }
  :where(body.pd-app, body.pd-site .pd-app) :is(.pd-btn--quiet, .pd-btn--icon):hover { background: var(--app-tint); color: var(--app-text); }
  :where(body.pd-app, body.pd-site .pd-app) :is(.pd-btn--crit, .pd-btn--crit-plain):hover { background: var(--app-crit-wash); color: var(--app-crit-ink); }
  :where(body.pd-app, body.pd-site .pd-app) .pd-btn--danger:hover { background: var(--app-danger); }
}
/* pressed: the key sinks into its own shade; nothing scales, nothing moves */
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-btn--primary:active, .pd-btn--primary.is-active) { background: var(--app-solid-press); box-shadow: var(--app-shadow-press); }
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-btn--accent:active) { background: var(--app-accent); box-shadow: var(--app-shadow-press); }
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-btn--secondary:active, .pd-btn--secondary.is-active) { background: var(--app-tint-press); box-shadow: var(--app-shadow-press); color: var(--app-text); }
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-btn--quiet, .pd-btn--icon):active { background: var(--app-tint-press); color: var(--app-text); }
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-btn--crit, .pd-btn--crit-plain):active { background: var(--app-crit-wash-2); color: var(--app-crit-ink); }
:where(body.pd-app, body.pd-site .pd-app) .pd-btn--danger:active { background: var(--app-danger); box-shadow: var(--app-shadow-press); }
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-btn:active, .pd-btn::after) { transform: none; }
/* disabled: sunken, its words in text-3, no shadow; never a lowered opacity */
:where(body.pd-app, body.pd-site .pd-app) .pd-btn:is(:disabled, [aria-disabled="true"]):not(.is-loading) { background: var(--app-pane-2); box-shadow: inset 0 0 0 var(--app-hair) var(--app-line); color: var(--app-text-3); cursor: not-allowed; opacity: 1; }
:where(body.pd-app, body.pd-site .pd-app) .pd-btn:is(:disabled, [aria-disabled="true"]):not(.is-loading)::after { opacity: 0; }
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-btn--quiet, .pd-btn--icon, .pd-btn--crit, .pd-btn--crit-plain):is(:disabled, [aria-disabled="true"]):not(.is-loading) { background: transparent; box-shadow: none; }
/* loading: the width fixed at the press, the word « Envoi… », no spinner; each key keeps its lit face (section 3 put a
   flat surface under a secondary key's « Enregistrement… »; _requests/G4.md 20) */
:where(body.pd-app, body.pd-site .pd-app) .pd-btn.is-loading.pd-btn--primary { background: linear-gradient(180deg, var(--app-solid-top), var(--app-solid)); color: var(--app-on-solid); box-shadow: var(--app-shadow-primary); }
:where(body.pd-app, body.pd-site .pd-app) .pd-btn.is-loading.pd-btn--secondary { background: linear-gradient(180deg, var(--app-key-top), var(--app-key-bot)); box-shadow: var(--app-shadow-raised); color: var(--app-text); }
@media (max-width: 767px) { :where(body.pd-app, body.pd-site .pd-app) .pd-btn.is-loading.pd-btn--secondary { background: var(--app-tint-btn); box-shadow: none; color: var(--app-on-tint-btn); } }
/* the phone: iOS's tinted button for the second action, a quiet button written in the accent */
@media (max-width: 767px) {
  :where(body.pd-app, body.pd-site .pd-app) .pd-btn { padding: 0 20px; line-height: 22px; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-btn--secondary { background: var(--app-tint-btn); box-shadow: none; color: var(--app-on-tint-btn); }
  :where(body.pd-app, body.pd-site .pd-app) .pd-btn--secondary::after { content: none; }
  :where(body.pd-app, body.pd-site .pd-app) :is(.pd-btn--secondary:active, .pd-btn--secondary.is-active) { background: var(--app-tint-btn-press); box-shadow: none; color: var(--app-on-tint-btn); }
  :where(body.pd-app, body.pd-site .pd-app) .pd-btn--quiet { color: var(--app-sky-ink); }
}
/* the floating button: the ink key with a glass ring */
:where(body.pd-app, body.pd-site .pd-app) .pd-fab { width: 56px; height: 56px; border-radius: var(--app-r-capsule); background: linear-gradient(180deg, var(--app-solid-top), var(--app-solid)); box-shadow: var(--app-shadow-primary), var(--app-shadow-glass); }
:where(body.pd-app, body.pd-site .pd-app) .pd-fab:active { background: var(--app-solid-press); }

/* ---------- 18.9 Focus: the ring follows the shape ---------- */
body.pd-app :focus-visible { outline: 2px solid var(--app-focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--app-focus-inner), 0 0 0 7px var(--app-focus-glow); }
body.pd-app .pd-glass :focus-visible, body.pd-app .pd-glass:focus-visible { outline-offset: 3px; box-shadow: none; }
body.pd-app :is(.pd-list, .pd-cmd__list, .pd-bell__list, .pd-side__scroll, .pd-inspector) :focus-visible { outline-offset: -2px; box-shadow: inset 0 0 0 4px var(--app-focus-inner); }
/* No ring after a tap (Youssef, 2026-10-28, « glitchy »; ui.js focusQuiet). WebKit never focuses a control on a tap, so
   the focus a sheet, a list or a closing window moved by script matched :focus-visible and ringed a row or the button that
   opened it. html.pd-by-pointer is set by a press and taken off by the first key, so the keyboard keeps every ring; text
   fields keep their own focus. A layer that took the focus itself after a tap (tabindex -1) keeps its glass shadow. */
html.pd-by-pointer body.pd-app :is(.pd-opt, .pd-btn, .pd-tab, .pd-me, .pd-top__home, .pd-cmd__row, [role="menuitem"], [role="menuitemradio"], .pd-cal__day, .pd-list, a.pd-a, .pd-seg > button):focus-visible { outline: none; box-shadow: none; }
html.pd-by-pointer body.pd-app .pd-btn--primary:focus-visible { box-shadow: var(--app-shadow-primary); }
html.pd-by-pointer body.pd-app .pd-cal__day.is-today:not([aria-selected="true"]):focus-visible { box-shadow: inset 0 0 0 1px var(--app-text); }
html.pd-by-pointer body.pd-app .pd-pop .pd-opt:focus-visible:not(.is-active) { background: transparent; color: inherit; }
html.pd-by-pointer body.pd-app .pd-pop .pd-opt:focus-visible:not(.is-active) > :is(.pd-ic, .pd-opt__sub, .pd-opt__check) { color: var(--app-text-2); }
body.pd-app :is(.pd-sheet, .pd-pop, .pd-dialog, .pd-cmd)[tabindex="-1"]:focus-visible { outline: none; box-shadow: var(--app-shadow-glass-pop); }
body.pd-app :is(.pd-sheet, .pd-pop, .pd-dialog, .pd-cmd)[tabindex="-1"]:focus { outline: none; }
/* a press shows no grey square over a control (iOS): inherited, so every control of the software is covered */
body.pd-app, :where(body.pd-site) .pd-app { -webkit-tap-highlight-color: transparent; }

/* ---------- 18.10 Fields (6.5) ---------- */
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-input, .pd-select, .pd-textarea) {
  height: 44px; padding: 0 14px; border: 1px solid var(--app-border); border-radius: var(--app-r-control);
  background: var(--app-field); box-shadow: inset 0 1px 2px var(--app-field-shade); font-size: var(--pd-app-input-size); caret-color: var(--app-sky);
  transition: border-color var(--app-dur-micro) linear, box-shadow var(--app-dur-micro) linear;
}
:where(body.pd-app, body.pd-site .pd-app) .pd-textarea { height: auto; padding: 10px 14px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-select { padding-right: 10px; }
@media (hover: hover) { :where(body.pd-app, body.pd-site .pd-app) :is(.pd-input, .pd-select, .pd-textarea):hover:not(:disabled):not(:focus) { border-color: var(--app-text-3); } }
body.pd-app :is(.pd-input:focus, .pd-textarea:focus, .pd-select:focus-visible, .pd-select[aria-expanded="true"]) { border-color: var(--app-sky); outline: 0; box-shadow: 0 0 0 1px var(--app-sky), 0 0 0 5px var(--app-focus-glow); }
:where(body.pd-app, body.pd-site .pd-app) .pd-input[readonly] { background: var(--app-pane-2); box-shadow: none; }
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-input, .pd-select, .pd-textarea):disabled { background: var(--app-pane-2); box-shadow: none; color: var(--app-text-3); }
:where(body.pd-app, body.pd-site .pd-app) .pd-money-in > .pd-cur { left: 15px; color: var(--app-text-3); }
:where(body.pd-app, body.pd-site .pd-app) .pd-affix > .pd-btn--icon { border-radius: 0 var(--app-r-control) var(--app-r-control) 0; }
:where(body.pd-app, body.pd-site .pd-app) .pd-error { color: var(--app-crit-ink); }

/* ---------- 18.11 The segmented control and page tabs (6.6) ----------
   A capsule track 44 tall (one height with the buttons of its row); one thumb, a capsule inset 3, placed by ui.js from
   layout boxes (offsetLeft, offsetWidth: a window that opens never skews it), gliding 300 ms and stretching 6 % at 45 %
   of its travel */
:where(body.pd-app, body.pd-site .pd-app) .pd-seg { position: relative; isolation: isolate; height: 44px; padding: 0; outline: 0; border-radius: var(--app-r-capsule); background: var(--app-seg-track); box-shadow: inset 0 1px 2px var(--app-field-shade); }
:where(body.pd-app, body.pd-site .pd-app) .pd-seg > :is(button, a) { position: relative; z-index: 1; height: 100%; padding: 0 16px; border-radius: var(--app-r-capsule); background: transparent; font: 500 14px/20px var(--pd-font-text); color: var(--app-text-2); transform: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-seg > :is([aria-pressed="true"], [aria-selected="true"], [aria-current="page"]) { background: transparent; color: var(--app-text); font-weight: 600; }
:where(body.pd-app, body.pd-site .pd-app) .pd-seg > :is(button, a)::before { inset: 3px; border-radius: var(--app-r-capsule); }
@media (hover: hover) { :where(body.pd-app, body.pd-site .pd-app) .pd-seg > :not([aria-pressed="true"]):not([aria-selected="true"]):not([aria-current="page"]):not(:disabled):hover::before { background: var(--app-tint); } }
:where(body.pd-app, body.pd-site .pd-app) .pd-seg.has-thumb::before {
  content: ""; position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; width: var(--pd-seg-w, 0px); border-radius: var(--app-r-capsule);
  transform: none; translate: var(--pd-seg-x, 0px) 0; background: var(--app-seg-thumb); box-shadow: var(--app-shadow-thumb); pointer-events: none;
  transition: translate var(--app-dur-thumb) var(--app-glide), width var(--app-dur-thumb) var(--app-glide);
}
:where(body.pd-app, body.pd-site .pd-app) .pd-seg.is-moving::before { animation: pd-l-thumb-stretch var(--app-dur-thumb) ease-in-out; }
@keyframes pd-l-thumb-stretch { 45% { scale: 1.06 1; } }
:where(body.pd-app, body.pd-site .pd-app) .pd-seg.is-still::before { transition: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-seg:active::before { scale: 1.03 0.95; }
/* every segment is a capsule, its focus ring too (section 3's 3 px ends outweighed the LIQUID capsule: the first and the
   last segments' rings were square around a capsule thumb; _requests/G2.md R14, G5.md R7, G6.md 12) */
body.pd-app .pd-seg > :is(button, a) { border-radius: var(--app-r-capsule); }
:where(body.pd-app, body.pd-site .pd-app) .pd-tabs > :is([role="tab"], a) { border-radius: var(--app-r-capsule); transform: none; }
/* page tabs use the same track (6.6): ui.js tabs() gives the row .pd-seg on the software's pages, so one thumb is placed
   under the chosen tab and glides to the next; a phone with more than three tabs keeps the « Afficher : » select
   (_requests/G1.md R17, G5.md R9, G6.md 6) */
:where(body.pd-app, body.pd-site .pd-app) .pd-tabs.pd-seg { display: inline-flex; flex-wrap: nowrap; align-self: flex-start; gap: 0; width: fit-content; max-width: 100%; height: 44px; padding: 0; border: 0; }
:where(body.pd-app, body.pd-site .pd-app) .pd-tabs.pd-seg > :is([role="tab"], a) { height: 100%; min-height: 0; padding: 0 16px; border: 0; background: transparent; box-shadow: none; font: 500 14px/20px var(--pd-font-text); color: var(--app-text-2); white-space: nowrap; }
:where(body.pd-app, body.pd-site .pd-app) .pd-tabs.pd-seg > :is([aria-selected="true"], [aria-current="page"]) { background: transparent; color: var(--app-text); font-weight: 600; }
@media (max-width: 419px) { :where(body.pd-app, body.pd-site .pd-app) .pd-tabs.pd-seg { display: flex; width: 100%; } :where(body.pd-app, body.pd-site .pd-app) .pd-tabs.pd-seg > :is([role="tab"], a) { flex: 1 1 auto; justify-content: center; padding: 0 8px; } }
@media (max-width: 639px) { :where(body.pd-app, body.pd-site .pd-app) .pd-tabs.pd-seg.has-select { display: none; } }

/* ---------- 18.12 Switch, check, radio (6.7) ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-switch { width: 56px; height: 44px; justify-content: center; border-radius: var(--app-r-capsule); transform: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-switch__track { width: 52px; height: 30px; border: 0; border-radius: 15px; background: var(--app-switch-off); box-shadow: inset 0 0 0 1px var(--app-switch-ring), inset 0 1px 3px var(--app-field-shade); transition: background-color 200ms linear, box-shadow 200ms linear; }
:where(body.pd-app, body.pd-site .pd-app) .pd-switch__track::after {
  top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 13px; background: var(--app-knob); box-shadow: var(--app-shadow-knob);
  transform: none; translate: 0 0; transform-origin: left center;
  transition: translate var(--app-dur-knob) var(--app-glide), scale var(--app-dur-knob) var(--app-glide), background-color var(--app-dur-micro) linear, box-shadow var(--app-dur-micro) linear;
}
:where(body.pd-app, body.pd-site .pd-app) .pd-switch[aria-checked="true"] .pd-switch__track { background: linear-gradient(180deg, var(--app-switch-on-2), var(--app-switch-on)); box-shadow: inset 0 1px 2px var(--app-field-shade); }
:where(body.pd-app, body.pd-site .pd-app) .pd-switch[aria-checked="true"] .pd-switch__track::after { transform: none; translate: 22px 0; transform-origin: right center; }
/* pressed (iOS 26): the knob turns to glass and stretches from its pressed side */
:where(body.pd-app, body.pd-site .pd-app) .pd-switch:active:not(:disabled) .pd-switch__track::after { width: 26px; scale: 1.18 1; background: var(--app-knob-glass); box-shadow: inset 0 0 0 1px var(--app-knob), var(--app-shadow-knob); }
:where(body.pd-app, body.pd-site .pd-app) .pd-switch[aria-checked="true"]:active:not(:disabled) .pd-switch__track::after { transform: none; translate: 22px 0; }
:where(body.pd-app, body.pd-site .pd-app) .pd-switch:disabled .pd-switch__track { background: var(--app-pane-2); box-shadow: inset 0 0 0 1px var(--app-line); }
/* an « on » switch stays green under the pointer and while pressed (section 3's ink hover outweighed it; _requests/G3.md 3) */
@media (hover: hover) { body.pd-app .pd-switch[aria-checked="true"]:hover:not(:disabled) .pd-switch__track { background: linear-gradient(180deg, var(--app-switch-on-2), var(--app-switch-on)); } }
/* checkbox 22, radius 7; checked: the sky fill and a tick that draws itself; round for tasks; radio a 22 circle */
:where(body.pd-app, body.pd-site .pd-app) .pd-check__box { width: 22px; height: 22px; border: 1px solid var(--app-border); border-radius: var(--app-r-check); background: var(--app-field); box-shadow: inset 0 1px 2px var(--app-field-shade); transform: none; transition: background-color var(--app-dur-micro) linear, border-color var(--app-dur-micro) linear; }
:where(body.pd-app, body.pd-site .pd-app) .pd-check__box .pd-ic { stroke-dasharray: 24; stroke-dashoffset: 24; opacity: 1; color: var(--app-on-sky); }
:where(body.pd-app, body.pd-site .pd-app) .pd-check__input:checked + .pd-check__box { background: linear-gradient(180deg, var(--app-sky-2), var(--app-sky)); border-color: transparent; box-shadow: var(--app-tile-light), var(--app-tile-foot); }
:where(body.pd-app, body.pd-site .pd-app) .pd-check__input:checked + .pd-check__box .pd-ic { stroke-dashoffset: 0; transition: stroke-dashoffset 260ms var(--app-ease); }
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-check--round, .pd-check--radio) .pd-check__box { border-radius: 50%; }
:where(body.pd-app, body.pd-site .pd-app) .pd-check--radio .pd-check__box::after { width: 10px; height: 10px; background: var(--app-on-sky); opacity: 1; scale: 0; transition: scale 200ms var(--app-ease); }
:where(body.pd-app, body.pd-site .pd-app) .pd-check--radio .pd-check__input:checked + .pd-check__box::after { scale: 1; }
:where(body.pd-app, body.pd-site .pd-app) .pd-check:active .pd-check__box { transform: none; }

/* ---------- 18.13 Status pills, counts, tags (6.8): opaque grounds, coloured words, the glyph kept ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-status {
  display: inline-flex; align-items: center !important; gap: 5px !important; height: var(--pd-app-pill-h); padding: 0 10px 0 7px; border-radius: var(--app-r-capsule);
  font: 600 var(--pd-app-pill-size)/var(--pd-app-pill-h) var(--pd-font-text); vertical-align: middle;
  background: var(--app-pill-planned); color: var(--app-pill-planned-ink); box-shadow: none;
}
:where(body.pd-app, body.pd-site .pd-app) .pd-status > span:first-child { align-self: center; }
:where(body.pd-app, body.pd-site .pd-app) .pd-status > span:first-child > svg { width: 14px; height: 14px; }
body.pd-app .pd-status > span:first-child { color: var(--app-pill-planned-glyph) !important; }
:where(body.pd-app, body.pd-site .pd-app) .pd-status[data-g="done"] { background: var(--app-pill-done); color: var(--app-pill-done-ink); }
body.pd-app .pd-status[data-g="done"] > span:first-child { color: var(--app-pill-done-glyph) !important; }
:where(body.pd-app, body.pd-site .pd-app) .pd-status[data-g="progress"] { background: var(--app-pill-progress); color: var(--app-pill-progress-ink); }
body.pd-app .pd-status[data-g="progress"] > span:first-child { color: var(--app-pill-progress-glyph) !important; }
:where(body.pd-app, body.pd-site .pd-app) .pd-status[data-g="wait"] { background: var(--app-pill-wait); color: var(--app-pill-wait-ink); }
body.pd-app .pd-status[data-g="wait"] > span:first-child { color: var(--app-pill-wait-glyph) !important; }
:where(body.pd-app, body.pd-site .pd-app) .pd-status[data-g="late"] { background: var(--app-pill-late); color: var(--app-pill-late-ink); }
body.pd-app .pd-status[data-g="late"] > span:first-child { color: var(--app-pill-late-glyph) !important; }
:where(body.pd-app, body.pd-site .pd-app) .pd-status[data-g="draft"] { background: transparent; box-shadow: inset 0 0 0 var(--app-hair) var(--app-line-strong); color: var(--app-text-2); }
body.pd-app .pd-status[data-g="draft"] > span:first-child { color: var(--app-text-2) !important; }
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-count, .pd-btn__count) { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--app-r-capsule); background: var(--app-count-bg); color: var(--app-on-count); font: 600 12px/16px var(--pd-font-text); box-shadow: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-tag { height: 24px; gap: 6px; padding: 0 10px; border: 0; border-radius: var(--app-r-capsule); background: var(--app-pill-planned); color: var(--app-pill-planned-ink); font: 600 12.5px/16px var(--pd-font-text); }
:where(body.pd-app, body.pd-site .pd-app) .pd-tag[data-tone="green"] { background: var(--app-pill-done); color: var(--app-pill-done-ink); }
:where(body.pd-app, body.pd-site .pd-app) .pd-tag[data-tone="sky"] { background: var(--app-pill-progress); color: var(--app-pill-progress-ink); }
:where(body.pd-app, body.pd-site .pd-app) .pd-tag > .pd-tile { --tile: 16px; --tile-g: 10px; --tile-r: 4px; margin-left: -4px; }
/* keycaps */
:where(body.pd-app, body.pd-site .pd-app) .pd-kbd { height: 22px; min-width: 22px; padding: 0 6px; justify-content: center; border: 0; border-radius: 6px; background: transparent; box-shadow: var(--app-keycap); font: 500 11.5px/20px var(--pd-font-mono); color: var(--app-text-2); }

/* ---------- 18.14 Banners and notices (6.9): solid ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-banner:not([data-tone]) { --t1: var(--app-tile-amber); --t2: var(--app-tile-amber-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-banner {
  min-height: 56px; padding: 10px 12px; gap: 12px; border-radius: var(--app-r-pane); background: var(--app-pane); box-shadow: var(--app-shadow-pane);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
:where(body.pd-app, body.pd-site .pd-app) .pd-banner > .pd-ic:first-child {
  box-sizing: border-box; width: 32px; height: 32px; padding: 7px; border-radius: 8px; color: var(--app-on-tile); flex: none;
  background: var(--app-tile-gloss), linear-gradient(180deg, var(--t1), var(--t2)); box-shadow: var(--app-tile-light), var(--app-tile-foot), var(--app-tile-contact);
}
:where(body.pd-app, body.pd-site .pd-app) .pd-banner__text { font-size: 15px; line-height: 22px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-banner > .pd-btn { margin: -2px 0; }
:where(body.pd-app, body.pd-site .pd-app) .pd-banner.is-warn { background: var(--app-warn-notice); box-shadow: inset 0 0 0 var(--app-hair) var(--app-warn-edge); }
:where(body.pd-app, body.pd-site .pd-app) .pd-card .pd-banner { background: var(--app-pane-2); box-shadow: none; border-radius: var(--app-r-inset); }
:where(body.pd-app, body.pd-site .pd-app) .pd-card .pd-banner.is-warn { background: var(--app-warn-notice); }
@media (max-width: 639px) {
  /* its words keep 12 px from the edge when they wrap (D4; _requests/G1.md R7) */
  :where(body.pd-app, body.pd-site .pd-app) .pd-banner { align-items: flex-start; padding: 12px; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-banner .pd-banner__text { flex-basis: 240px; align-self: center; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-banner > .pd-btn { margin: 0 0 0 44px; }
}

/* ---------- 18.15 Inset grouped lists (6.10) ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-setrow { min-height: 52px; gap: 12px; border-bottom: var(--app-hair) solid var(--app-line); }
:where(body.pd-app, body.pd-site .pd-app) .pd-setrow > .pd-tile { --tile: 26px; --tile-g: 16px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-setrows:not(.pd-card .pd-setrows) > .pd-setrow:last-child { border-bottom: 0; }
:where(body.pd-app, body.pd-site .pd-app) .pd-opt > .pd-opt__go { width: 16px; height: 16px; margin-right: -4px; color: var(--app-text-2); }

/* ---------- 18.16 The ledger (6.11) ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-table th { height: 40px; background: var(--app-pane); border-bottom: var(--app-hair) solid var(--app-line); font: 600 12.5px/16px var(--pd-font-text); letter-spacing: 0.01em; color: var(--app-text-3); }
/* the head's corners follow the pane's (20, D1): B's bordered card took 19 */
:where(body.pd-app, body.pd-site .pd-app) .pd-table th:first-child { border-top-left-radius: var(--app-r-pane); }
:where(body.pd-app, body.pd-site .pd-app) .pd-table th:last-child { border-top-right-radius: var(--app-r-pane); }
:where(body.pd-app, body.pd-site .pd-app) .pd-table td { height: 52px; border-top: var(--app-hair) solid var(--app-line); }
:where(body.pd-app, body.pd-site .pd-app) .pd-table tbody tr:first-child td { border-top: 0; }
:where(body.pd-app, body.pd-site .pd-app) .pd-table tr.pd-total td { border-top: 1.5px solid var(--app-text); }
/* a phone: each row a pane of its own, its cells as tall as their words with no rule inside it (the 52 px cells and their
   hairlines above outweighed section 5's card reset), 12 apart like every pane on a phone; the wrap is no pane behind
   them (a pane in a pane, D33) and the total is a 1.5 px rule, not a card (integration, _requests/G3.md 6, G4.md 12 and
   28, G6.md 3) */
@media (max-width: 767px) {
  :where(body.pd-app, body.pd-site .pd-app) .pd-table-wrap { background: none; box-shadow: none; border-radius: 0; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-table tbody { gap: 12px; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-table tbody tr { background: var(--app-pane); border: 0; border-radius: var(--app-r-pane); box-shadow: var(--app-shadow-pane); }
  :where(body.pd-app, body.pd-site .pd-app) .pd-table td { height: auto; padding: 0; border: 0; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-table tbody tr.pd-total { margin-top: 8px; padding: 12px 16px 0; background: none; box-shadow: none; border: 0; border-top: 1.5px solid var(--app-text); border-radius: 0; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-table tbody tr.pd-total td { border: 0; }
}

/* ---------- 18.17 Menus, popovers, lists (6.12): thick glass, rows that light in the accent ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-pop { border-radius: var(--app-r-pop); padding: 6px; min-width: 220px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-pop .pd-list { padding: 0; }
:where(body.pd-app, body.pd-site .pd-app) .pd-pop .pd-opt { min-height: 36px; margin: 0; padding: 8px 10px; gap: 10px; border-radius: 12px; font-size: 15px; line-height: 20px; transform: none; transition: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-pop button.pd-opt { width: 100%; }
:where(body.pd-app, body.pd-site .pd-app) .pd-pop .pd-opt > .pd-ic { width: 18px; height: 18px; color: var(--app-text-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-pop .pd-opt[aria-selected="true"] > .pd-opt__check { color: var(--app-sky); }
:where(body.pd-app, body.pd-site .pd-app) .pd-pop .pd-opt:is(.is-active, :focus-visible) { background: var(--app-menu-hi); color: var(--app-on-menu-hi); outline: 0; box-shadow: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-pop .pd-opt:is(.is-active, :focus-visible) > :is(.pd-ic, .pd-opt__sub, .pd-opt__check) { color: var(--app-on-menu-hi); }
@media (hover: hover) {
  :where(body.pd-app, body.pd-site .pd-app) .pd-pop .pd-opt:not([aria-disabled="true"]):hover { background: var(--app-menu-hi); color: var(--app-on-menu-hi); }
  :where(body.pd-app, body.pd-site .pd-app) .pd-pop .pd-opt:not([aria-disabled="true"]):hover > :is(.pd-ic, .pd-opt__sub, .pd-opt__check) { color: var(--app-on-menu-hi); }
}
:where(body.pd-app, body.pd-site .pd-app) .pd-pop .pd-opt--crit, :where(body.pd-app, body.pd-site .pd-app) .pd-pop .pd-opt--crit > .pd-ic { color: var(--app-crit-glass); }
:where(body.pd-app, body.pd-site .pd-app) .pd-menu-sep { height: var(--app-hair); margin: 6px 12px; background: var(--app-line-strong); }
@media (pointer: coarse), (max-width: 767px) { :where(body.pd-app, body.pd-site .pd-app) .pd-pop .pd-opt { min-height: 44px; border-radius: 14px; } :where(body.pd-app, body.pd-site .pd-app) .pd-pop { border-radius: var(--app-r-pop); } }
/* the bell inside its popover: rows of the glass, the unread disc in the accent */
:where(body.pd-app, body.pd-site .pd-app) .pd-pop .pd-bell { margin: -6px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-bell__head { border-bottom: var(--app-hair) solid var(--app-line); }
:where(body.pd-app, body.pd-site .pd-app) .pd-note { border-bottom: var(--app-hair) solid var(--app-line); }
:where(body.pd-app, body.pd-site .pd-app) .pd-note.is-unread::before { background: var(--app-sky); box-shadow: 0 0 0 3px var(--app-sky-soft); }
:where(body.pd-app, body.pd-site .pd-app) .pd-note__at { color: var(--app-text-2); }
/* a row's words take two lines before they are cut (an amount was cut right after « CHF »; shell.js marks the text
   pd-clamp-2, so its full words become its title), and the list fades over 16 px at an edge it scrolls past, never a row
   cut in half with no cue (6.21, 5.7; _requests/G1.md R19) */
:where(body.pd-app, body.pd-site .pd-app) .pd-note__text { white-space: normal; }
:where(body.pd-app, body.pd-site .pd-app) .pd-bell__list.is-more-down { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 16px), transparent); }
:where(body.pd-app, body.pd-site .pd-app) .pd-bell__list.is-more-up { -webkit-mask-image: linear-gradient(180deg, transparent, #000 16px); mask-image: linear-gradient(180deg, transparent, #000 16px); }
:where(body.pd-app, body.pd-site .pd-app) .pd-bell__list.is-more-up.is-more-down { -webkit-mask-image: linear-gradient(180deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(180deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); }
:where(body.pd-app, body.pd-site .pd-app) .pd-acct__theme { padding: 6px 4px 6px 10px; }

/* ---------- 18.18 The palette (6.13): thick glass grown out of the search capsule ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd { top: max(72px, 14vh); width: 680px; border-radius: var(--app-r-palette); }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__bar { height: 58px; gap: 12px; padding: 0 12px 0 18px; border-bottom: var(--app-hair) solid var(--app-line); }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__bar > .pd-ic { width: 20px; height: 20px; color: var(--app-text-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__input { height: 56px; font: 400 19px/24px var(--pd-font-text); letter-spacing: -0.01em; }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__input::placeholder { color: var(--app-text-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__list { padding: 8px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__group { font: 600 12px/16px var(--pd-font-text); color: var(--app-text-2); padding: 14px 12px 6px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__row { min-height: 44px; gap: 12px; padding: 4px 10px; border-radius: 18px; transform: none; transition: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__row > .pd-ic:first-child {
  --t1: var(--app-tile-slate); --t2: var(--app-tile-slate-2);
  box-sizing: border-box; width: 26px; height: 26px; padding: 5px; border-radius: 6.5px; flex: none; color: var(--app-on-tile);
  background: var(--app-tile-gloss), linear-gradient(180deg, var(--t1), var(--t2)); box-shadow: var(--app-tile-light), var(--app-tile-foot), var(--app-tile-contact);
}
/* each row's tile takes its subject's hue, read from the glyph's name (data-i) */
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__row > .pd-ic:is([data-i="house"], [data-i="message-circle"]) { --t1: var(--app-tile-sky); --t2: var(--app-tile-sky-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__row > .pd-ic:is([data-i="clipboard-check"], [data-i="tags"]) { --t1: var(--app-tile-amber); --t2: var(--app-tile-amber-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__row > .pd-ic:is([data-i="receipt-text"]) { --t1: var(--app-tile-green); --t2: var(--app-tile-green-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__row > .pd-ic:is([data-i="calendar-days"], [data-i="calendar-plus"]) { --t1: var(--app-tile-red); --t2: var(--app-tile-red-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__row > .pd-ic:is([data-i="chart-gantt"], [data-i="phone"]) { --t1: var(--app-tile-teal); --t2: var(--app-tile-teal-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__row > .pd-ic:is([data-i="hard-hat"], [data-i="map-pinned"], [data-i="id-card"]) { --t1: var(--app-tile-ink); --t2: var(--app-tile-ink-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__row > .pd-ic:is([data-i="file-pen-line"], [data-i="route"], [data-i="mouse-pointer-click"]) { --t1: var(--app-tile-plum); --t2: var(--app-tile-plum-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__label { gap: 12px; flex-wrap: nowrap; align-items: baseline; font-size: 15px; line-height: 20px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__label > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__sub { margin-left: auto; color: var(--app-text-2); font-size: 14px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__row.is-active { background: var(--app-menu-hi); color: var(--app-on-menu-hi); box-shadow: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__row.is-active :is(.pd-cmd__sub, .pd-code) { color: var(--app-on-menu-hi); }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__row.is-active > .pd-ic:first-child { box-shadow: var(--app-tile-light), var(--app-tile-moat), 0 0 0 2.5px var(--app-on-menu-hi); }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__row.is-active .pd-kbd { box-shadow: 0 0 0 var(--app-hair) var(--app-on-menu-hi); color: var(--app-on-menu-hi); }
:where(body.pd-app, body.pd-site .pd-app) .pd-cmd__foot { height: 40px; gap: 16px; padding: 0 18px; background: var(--app-cmd-foot); border-top: var(--app-hair) solid var(--app-line); color: var(--app-text-2); }
/* a phone: a result on two lines keeps its title and its subtitle together, 10 px inside the highlight (D4;
   _requests/G1.md R13) */
@media (max-width: 767px) { :where(body.pd-app, body.pd-site .pd-app) .pd-cmd:not(.pd-cmd--static) { border-radius: 0; } :where(body.pd-app, body.pd-site .pd-app) .pd-cmd__row { padding: 10px; } :where(body.pd-app, body.pd-site .pd-app) .pd-cmd__sub { margin-left: 0; } :where(body.pd-app, body.pd-site .pd-app) .pd-cmd__label { flex-wrap: nowrap; gap: 2px; align-content: center; } }

/* ---------- 18.19 Windows (6.14): centred thick glass, grown from their button; never a scale ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-scrim { background: var(--app-scrim); -webkit-backdrop-filter: var(--app-scrim-blur); backdrop-filter: var(--app-scrim-blur); animation: pd-fade 200ms linear both; }
:where(body.pd-app, body.pd-site .pd-app) .pd-scrim.is-out { animation: pd-fade-out var(--app-dur-win-out) var(--app-ease-exit) both; }
:where(body.pd-app, body.pd-site .pd-app) .pd-scrim--still { animation: none; }
/* a scrim over another window or sheet dims, it does not blur a second time (two full-screen blurs halved the frame rate
   of the opening on a phone; ui.js, S11) */
:where(body.pd-app, body.pd-site .pd-app) .pd-scrim.pd-scrim--dim { -webkit-backdrop-filter: none; backdrop-filter: none; }
/* The software's own pages (Youssef, 2026-10-28: « blur disappearing late and modals opening and closing feeling glitchy
   and fluttery on the phone »). ui.js drives every layer and its scrim (one clock; a close starts from where they are),
   so no CSS keyframe runs on them here: the keyframes above stay for a frame drawn on the site and the kit.
   The scrim is laid ON the page, at the scroll it opened at (ui.js sets --pd-scrim-y; the page is held), 80 px past
   each end for the rubber band and the toolbars: a fixed layer at the screen's edges is what iOS Safari reads to tint its
   status band and its toolbar, even at opacity 0, and it kept that tint after the layer had gone. The site's menu had
   the same and is laid on the page the same way (site.css 9). Colour and blur unchanged. */
:where(body.pd-app) .pd-scrim { position: absolute; inset: var(--pd-scrim-y, 0px) 0 auto 0; height: calc(100lvh + 160px); margin-top: -80px; }
body.pd-app :is(.pd-scrim, .pd-dialog, .pd-sheet:not(.pd-sheet--full):not(.pd-sheet--static), .pd-sheet, .pd-pop, .pd-cmd).is-out { animation: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-dialog { max-width: 560px; max-height: calc(100svh - 96px); border-radius: var(--app-r-dialog); overflow: hidden; animation: pd-l-win-in var(--app-dur-win-in) var(--app-ease-mac) both; }
:where(body.pd-app, body.pd-site .pd-app) .pd-dialog--form { max-width: 640px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-dialog--wide { max-width: 880px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-dialog.is-out { animation: pd-l-win-out var(--app-dur-win-out) var(--app-ease-exit) both; }
@keyframes pd-l-win-in { from { opacity: 0; translate: 0 12px; } }
@keyframes pd-l-win-out { to { opacity: 0; translate: 0 12px; } }   /* the entrance backwards: the same 12 px */
:where(body.pd-app, body.pd-site .pd-app) .pd-dialog__head { position: relative; min-height: 64px; padding: 18px 64px 0 24px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-dialog__head > [data-close] { position: absolute; top: 10px; right: 10px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-dialog__body { padding: 8px 24px 16px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-dialog__foot { padding: 10px; gap: 8px; border-top: var(--app-hair) solid var(--app-line); }
/* a full-screen window (a signature, a drawing surface) is the whole screen and opaque, as Apple's full-height sheets:
   LIQUID's 560 px and its 96 px of air outweighed the full variant (a square slab with the tab bar showing under it;
   integration, _requests/G3.md 5, G4.md 27) */
:where(body.pd-app, body.pd-site .pd-app) .pd-dialog--full { max-width: none; max-height: none; width: 100%; height: 100%; border-radius: 0; padding-top: env(safe-area-inset-top); background-color: var(--app-glass-thick-solid); background-image: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (max-width: 479px) { :where(body.pd-app, body.pd-site .pd-app) .pd-dialog__head { padding-left: 16px; } :where(body.pd-app, body.pd-site .pd-app) .pd-dialog__body { padding: 8px 16px 16px; } }
/* words on a window's or a sheet's glass are text or text-2, never text-3 (D23: help under a field, a meta line); red
   words take the glass's own red (3.2: --app-crit-ink measured 6.5:1 on thick glass over the worst ground); a box drawn
   inside (a quote, a thread) is the pane with a hairline ring, since thick glass by day is the well's own colour
   (integration, _requests/G1.md R18, G2.md R3, G3.md 19, G4.md 5, G6.md 4) */
body.pd-app .pd-glass :is(.pd-help, .pd-meta) { color: var(--app-text-2); }
body.pd-app :is(.pd-dialog, .pd-sheet) :is(.pd-btn--crit, .pd-btn--crit-plain) { color: var(--app-crit-glass); }
/* on glass a red word's ground never darkens (any tint took it under 7:1 over the worst ground): hovered it underlines,
   pressed it rings */
@media (hover: hover) { body.pd-app :is(.pd-dialog, .pd-sheet) :is(.pd-btn--crit, .pd-btn--crit-plain):hover { background: transparent; color: var(--app-crit-glass); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; } }
body.pd-app :is(.pd-dialog, .pd-sheet) :is(.pd-btn--crit, .pd-btn--crit-plain):active { background: transparent; color: var(--app-crit-glass); box-shadow: inset 0 0 0 1.5px var(--app-crit-glass); }
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-dialog, .pd-sheet) :is(.pd-quote, .pd-well) { background: var(--app-well-glass); box-shadow: var(--app-well-glass-ring); }
/* a window's facts: no rule under the last row, the window's foot draws its own (6.2; _requests/G6.md 11) */
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-dialog, .pd-sheet) .pd-facts > :nth-last-child(-n+2) { border-bottom: 0; }

/* ---------- 18.20 Phone sheets (6.15): inset 8, radius 34, a grabber ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-sheet:not(.pd-sheet--full):not(.pd-sheet--static) {
  left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); padding-bottom: 0; border-radius: var(--app-r-sheet);
  animation: pd-l-sheet-in var(--app-dur-sheet-in) var(--app-ease-mac) both;
}
:where(body.pd-app, body.pd-site .pd-app) .pd-sheet:not(.pd-sheet--full):not(.pd-sheet--static) > .pd-sheet__grab { position: absolute; top: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--app-line-strong); pointer-events: auto; touch-action: none; cursor: grab; }
/* the grabber takes a finger over 44 px (ui.js swipeable: the sheet follows it down); the head too, on a phone, where
   nothing in it scrolls */
:where(body.pd-app, body.pd-site .pd-app) .pd-sheet:not(.pd-sheet--full):not(.pd-sheet--static) > .pd-sheet__grab::before { content: ""; position: absolute; top: -6px; left: 50%; width: 120px; height: 44px; margin-left: -60px; }
@media (max-width: 767px) { :where(body.pd-app) .pd-sheet:not(.pd-sheet--full):not(.pd-sheet--static) > .pd-sheet__head { touch-action: none; } }
:where(body.pd-app, body.pd-site .pd-app) .pd-sheet.is-out { animation: pd-l-sheet-out var(--app-dur-sheet-out) var(--app-ease-exit) both; }
/* the exit as heavy as the entrance: at (0,2,0) against the entrance's (0,3,0) it never ran, no animationend came, and the
   sheet vanished in one frame 400 ms later (S1, a frame drawn on the site; the software's own pages are driven by ui.js) */
:where(body.pd-app, body.pd-site .pd-app) .pd-sheet:not(.pd-sheet--full):not(.pd-sheet--static).is-out { animation: pd-l-sheet-out var(--app-dur-sheet-out) var(--app-ease-exit) both; }
:where(body.pd-app, body.pd-site .pd-app) .pd-sheet.is-tall, :where(body.pd-app, body.pd-site .pd-app) .pd-sheet--full { background-color: var(--app-glass-thick-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
@keyframes pd-l-sheet-in { from { translate: 0 calc(100% + 16px); } }
@keyframes pd-l-sheet-out { to { translate: 0 calc(100% + 16px); } }
:where(body.pd-app, body.pd-site .pd-app) .pd-sheet__head { min-height: 60px; padding: 14px 10px 0 20px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-sheet__body { padding: 0 12px 12px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-sheet .pd-opt { min-height: 52px; border-radius: 22px; margin: 0; transform: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-sheet__group { padding: 14px 10px 4px; color: var(--app-text-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-facts > :is(dt, dd) { border-bottom: var(--app-hair) solid var(--app-line); }
:where(body.pd-app, body.pd-site .pd-app) .pd-facts { border-top: var(--app-hair) solid var(--app-line); }

/* ---------- 18.21 Toasts and tooltips (6.16): dark glass ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-toast { min-height: 52px; padding: 0 18px 0 14px; gap: 8px; border-radius: var(--app-r-capsule); font: 600 15px/20px var(--pd-font-text); animation: pd-l-toast-in var(--app-dur-toast-in) var(--app-ease-mac) both; }
:where(body.pd-app, body.pd-site .pd-app) .pd-toast.is-out { animation: pd-l-toast-out var(--app-dur-toast-out) var(--app-ease-exit) both; }
/* the stack's own moves (8 px up, 0.96) glide: the glass's tint transition, of the same weight and later, had replaced the
   toast's transform transition, so the slips behind jumped (D10) */
:where(body.pd-app, body.pd-site .pd-app) .pd-toast.pd-glass { transition: background-color var(--app-dur-tint) linear, color var(--app-dur-tint) linear, transform var(--app-dur-lift) var(--app-ease), height var(--app-dur-lift) var(--app-ease); }
:where(body.pd-app, body.pd-site .pd-app) .pd-toast .pd-btn--quiet { height: 36px; margin-right: -10px; color: var(--app-on-toast); }
@media (hover: hover) { :where(body.pd-app, body.pd-site .pd-app) .pd-toast .pd-btn--quiet:hover { background: transparent; color: var(--app-on-toast); text-decoration: underline; text-underline-offset: 3px; } }
@keyframes pd-l-toast-in { from { opacity: 0; translate: 0 16px; } }
@keyframes pd-l-toast-out { to { opacity: 0; translate: 0 8px; } }
/* a desktop: the stack sits at the bottom centre of the content area, as wide as a toast may be (its toasts are absolute:
   a max-content stack measured 0 and every toast folded one word a line), each toast as wide as its words and centred;
   above a floating toolbar when the page has one (6.16; integration, _requests/G1.md R8, G3.md 2, G4.md 1, G5.md R8) */
@media (min-width: 768px) {
  :where(body.pd-app) .pd-toasts { right: auto; left: calc(var(--pd-side-w, 0px) + (100% - var(--pd-side-w, 0px)) / 2); translate: -50% 0; width: min(560px, calc(100vw - var(--pd-side-w, 0px) - 64px)); max-width: none; bottom: 24px; }
  :where(body.pd-app) .pd-toast { left: 50%; right: auto; width: max-content; max-width: 100%; translate: -50% 0; animation-name: pd-l-toast-in-c; }
  :where(body.pd-app) .pd-toast.is-out { animation-name: pd-l-toast-out-c; }
  body.pd-app:has(> main .pd-toolbar.pd-glass:not(.pd-toolbar--inline)) > .pd-toasts { bottom: 92px; }
}
@keyframes pd-l-toast-in-c { from { opacity: 0; translate: -50% 16px; } }
@keyframes pd-l-toast-out-c { to { opacity: 0; translate: -50% 8px; } }
:where(body.pd-app, body.pd-site .pd-app) .pd-tooltip { padding: 4px 8px; border-radius: 8px; font: 500 12.5px/16px var(--pd-font-text); background: var(--app-toast); color: var(--app-on-toast); box-shadow: var(--app-shadow-glass); animation: pd-fade 120ms linear both; }

/* ---------- 18.22 Empty and loading states (6.18) ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-empty { color: var(--app-text-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-empty > .pd-ic:first-child {
  box-sizing: border-box; width: 40px; height: 40px; padding: 9px; border-radius: 9px; color: var(--app-on-tile);
  background: var(--app-tile-gloss), linear-gradient(180deg, var(--t1, var(--app-tile-slate)), var(--t2, var(--app-tile-slate-2))); box-shadow: var(--app-tile-light), var(--app-tile-foot), var(--app-tile-contact);
}
:where(body.pd-app, body.pd-site .pd-app) .pd-skel { border-radius: var(--app-r-capsule); background: var(--app-skel); }

/* ---------- 18.23 Avatars, paper, quotes (6.19) ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-av { background: linear-gradient(180deg, var(--app-av-top), var(--app-av-bot)); color: var(--app-text-2); box-shadow: inset 0 0 0 var(--app-hair) var(--app-line-strong); font-weight: 600; }
:where(body.pd-app, body.pd-site .pd-app) .pd-av--30 { width: 30px; height: 30px; font-size: 12px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-av--40 { width: 40px; height: 40px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-av--56 { width: 56px; height: 56px; font-size: 19px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-sq { border-radius: 22.5%; }
:where(body.pd-app, body.pd-site .pd-app) .pd-sq--32 { width: 32px; height: 32px; font-size: 13px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-sq--44 { width: 44px; height: 44px; font-size: 16px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-sq--52 { width: 52px; height: 52px; font-size: 17px; }
/* a quoted e-mail: a well with the accent's bar at its leading edge (FINAL 4.19) */
:where(body.pd-app, body.pd-site .pd-app) .pd-quote { position: relative; padding: 14px 18px 16px 20px; border-radius: var(--app-r-inset); background: var(--app-pane-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-quote::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; background: var(--app-sky); }
:where(body.pd-app, body.pd-site .pd-app) .pd-paper-stage { padding: 24px; border-radius: var(--app-r-inset); background: var(--app-pane-2); }
:where(body.pd-app, body.pd-site .pd-app) .pd-paper-stage .pd-paper { box-shadow: var(--app-paper-weight); }

/* ---------- 18.24 Charts (6.20) ---------- */
:where(body.pd-app, body.pd-site .pd-app) .pd-split { height: 10px; gap: 3px; }
:where(body.pd-app, body.pd-site .pd-app) .pd-split > i { border-radius: var(--app-r-capsule); box-shadow: var(--app-bar-light); }
/* one mapping (L13): each legend dot is exactly its segment's colour */
body.pd-app [data-viz="cash"] .is-1 { background: linear-gradient(180deg, var(--app-viz-late), var(--app-viz-late-2)); }
body.pd-app [data-viz="cash"] .is-2 { background: linear-gradient(180deg, var(--app-viz-due), var(--app-viz-due-2)); }
:where(body.pd-app, body.pd-site .pd-app) .pd-legend dt i { width: 10px; height: 10px; border-radius: 50%; }
:where(body.pd-app, body.pd-site .pd-app) .pd-ruler__row::before { height: 10px; margin-top: -5px; border-radius: var(--app-r-capsule); background: var(--app-viz-track); }
:where(body.pd-app, body.pd-site .pd-app) .pd-bar { height: 14px; margin-top: -7px; border-radius: var(--app-r-capsule); }
:where(body.pd-app, body.pd-site .pd-app) .pd-bar--done { background: linear-gradient(180deg, var(--app-viz-done), var(--app-viz-done-2)); box-shadow: var(--app-bar-light); }
:where(body.pd-app, body.pd-site .pd-app) .pd-bar--planned { background: var(--app-pane); box-shadow: inset 0 0 0 1.5px var(--app-sky); }
:where(body.pd-app, body.pd-site .pd-app) .pd-bar--progress { background: var(--app-sky-soft); box-shadow: inset 0 0 0 1.5px var(--app-sky); }
:where(body.pd-app, body.pd-site .pd-app) .pd-bar--progress::before { border-radius: var(--app-r-capsule); background: linear-gradient(180deg, var(--app-sky-2), var(--app-sky)); }
:where(body.pd-app, body.pd-site .pd-app) .pd-bar--free { background: repeating-linear-gradient(135deg, var(--app-viz-hatch) 0 2px, transparent 2px 6px); border: 0; box-shadow: inset 0 0 0 1px var(--app-line-strong); }
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-needle, .pd-now) { background: var(--app-now); box-shadow: 0 0 10px var(--app-sky-soft), 0 0 0 1px var(--app-sky-soft); }
:where(body.pd-app, body.pd-site .pd-app) :is(.pd-needle__label, .pd-now__label) { height: 22px; padding: 0 8px; border-radius: var(--app-r-capsule); background: var(--app-now-label); color: var(--app-on-now); font: 500 11.5px/22px var(--pd-font-mono); box-shadow: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-tl__now::after { background: var(--app-now); }
:where(body.pd-app, body.pd-site .pd-app) .pd-meter__track { height: 8px; border-radius: var(--app-r-capsule); background: var(--app-viz-track); }
:where(body.pd-app, body.pd-site .pd-app) .pd-meter__fill { border-radius: var(--app-r-capsule); background: linear-gradient(90deg, var(--app-sky-2), var(--app-sky)); }
/* the day gauge (PD.gauge): one 16 x 6 capsule per job, drawn from the same states as the words beside it */
:where(body.pd-app, body.pd-site .pd-app) .pd-gauge { display: inline-flex; gap: 3px; align-items: center; vertical-align: middle; }
:where(body.pd-app, body.pd-site .pd-app) .pd-gauge > i { width: 16px; height: 6px; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--app-border); }
:where(body.pd-app, body.pd-site .pd-app) .pd-gauge > i[data-s="done"] { background: var(--app-viz-done-2); box-shadow: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-gauge > i[data-s="progress"] { background: var(--app-sky); box-shadow: none; }
:where(body.pd-app, body.pd-site .pd-app) .pd-gauge > i[data-s="wait"] { background: var(--app-pill-wait-glyph); box-shadow: none; }   /* a visit that waits (S17 « À réattribuer », as its pill; _requests/G1.md R3) */
/* bars, segments and meters grow once from their start when their pane lands, then one soft light passes once */
:where(body.pd-app, body.pd-site .pd-app) .pd-grow :is(.pd-bar, .pd-split > i, .pd-meter__fill) { animation: pd-grow 900ms var(--app-ease) var(--d, 120ms) both; }

/* ---------- 18.25 Arrival (7.2, pageswitch.js): a grey skeleton, then the parts rise in reading order ----------
   The arriving screen shows its own layout in grey (no word, no colour) as the screen that leaves fades; from +180 ms
   each part in view rises 8 px and fades in (320 ms, 24 ms apart, six at most), its own region of the skeleton cleared
   80 ms after it starts; the rest of the skeleton fades. A part that holds glass does not fade as a whole (an ancestor's
   opacity would leave the glass blurring nothing): it rises, and its glass fades by its own opacity. */
:root.pd-skel-out body.pd-app > main > * { animation: none; }
/* a child of main that is display: contents (S01, S02, S07, S13, S20) takes no opacity: its parts are hidden one by one
   (pageswitch.js marks it pd-b-through), and every part that rises is hidden until it does, so no part shows, goes under
   the skeleton, then comes back (F2) */
:root.pd-skel-on body.pd-app .pd-b-unit, :root.pd-skel-on body.pd-app .pd-b-through > * { opacity: 0; }
:root.pd-skel-out body.pd-app .pd-b-unit { animation: pd-l-rise 320ms var(--app-ease) calc(var(--pd-i, 0) * 24ms) both, pd-arrive-fade 320ms var(--app-ease) calc(var(--pd-i, 0) * 24ms) both; }
:root.pd-skel-out body.pd-app .pd-b-unit.pd-b-glassy { animation: pd-l-rise 320ms var(--app-ease) calc(var(--pd-i, 0) * 24ms) both; }
:root.pd-skel-out body.pd-app .pd-b-unit.pd-b-glassy .pd-glass { animation: pd-arrive-fade 320ms var(--app-ease) calc(var(--pd-i, 0) * 24ms) both; }
/* a unit that is itself glass (an inline toolbar, a strip, an action bar) rises and fades by its own opacity (4.8.2;
   _requests/G2.md R5, G4.md 10) */
:root.pd-skel-out body.pd-app .pd-b-unit.pd-b-glassy.pd-glass { animation: pd-l-rise 320ms var(--app-ease) calc(var(--pd-i, 0) * 24ms) both, pd-arrive-fade 320ms var(--app-ease) calc(var(--pd-i, 0) * 24ms) both; }
/* a bar never grows while the skeleton hides it: it is drawn at its length in the skeleton (_requests/G4.md 22) */
:root.pd-skel-on body.pd-app .pd-grow :is(.pd-bar, .pd-split > i, .pd-meter__fill) { animation: none; }
:root.pd-skel-out body.pd-app .pd-b-unit.pd-b-still { animation: pd-arrive-fade 320ms var(--app-ease) calc(var(--pd-i, 0) * 24ms) both; }
@keyframes pd-l-rise { from { translate: 0 8px; } }
:where(body.pd-app) .pd-skelscreen { left: var(--pd-side-w, 0px); top: 0; contain: strict; }
:where(body.pd-app) .pd-skelscreen > canvas { filter: grayscale(1); }
:where(body.pd-app) .pd-skelscreen::after { width: 70%; background: linear-gradient(105deg, transparent 0%, var(--app-skel-sweep) 50%, transparent 100%); animation: pd-skel-sweep 640ms var(--app-ease) 40ms 1 both; }
:where(body.pd-app) .pd-skelscreen > .pd-skelscreen__bar { left: var(--pd-pad); right: var(--pd-pad); top: calc(var(--pd-sticky-top, 0px) - 4px); height: 2px; border-radius: 1px; background: var(--app-sky); box-shadow: 0 0 8px var(--app-sky); animation: pd-skel-bar 640ms var(--app-ease) both; }
:where(body.pd-app) .pd-skelscreen.is-out { opacity: 0; transition: opacity 200ms var(--app-ease); }
@media (max-width: 767px) { :where(body.pd-app) .pd-skelscreen { left: 0; } :where(body.pd-app) .pd-skelscreen > .pd-skelscreen__bar { left: 16px; right: 16px; } }

/* ---------- 18.26 Motion reduced (7.7): nothing moves; overlays fade in 80 ms ---------- */
@media (prefers-reduced-motion: reduce) {
  body.pd-app [data-gel][data-gel].is-pressed { scale: none; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-bloom { transition-duration: 120ms; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-seg.has-thumb::before { transition: none; animation: none; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-switch__track::after { transition-duration: 80ms; transition-timing-function: linear; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-switch:active:not(:disabled) .pd-switch__track::after { scale: none; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-check__input:checked + .pd-check__box .pd-ic { transition: none; }
  :where(body.pd-app, body.pd-site .pd-app) :is(.pd-pop.is-in, .pd-dialog, .pd-sheet, .pd-toast, .pd-tooltip) { animation: pd-fade 80ms linear both; }
  :where(body.pd-app, body.pd-site .pd-app) :is(.pd-pop.is-out, .pd-dialog.is-out, .pd-sheet.is-out, .pd-toast.is-out) { animation: pd-fade-out 80ms linear both; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-more > .pd-ic { transition: none; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-grow :is(.pd-bar, .pd-split > i, .pd-meter__fill) { animation: none; }
  :where(body.pd-app, body.pd-site .pd-app) .pd-skelscreen::after { content: none; }
}

/* =====================================================================================
   19. The software on the site (site phase, 2026-10-28; DIRECTION-LIQUID.md 19). A frame drawn inside a site page or the
   kit (a .pd-app inside body.pd-site) takes sections 15 and 18 through their :where(), in the solid form of tokens.css
   « THE SOFTWARE ON THE SITE »; its frame is shell.css « THE FRAME ON THE SITE ». Here: the rules of 18 that carry their
   own weight (body.pd-app …), written again for the frames, the ground, and the shapes the site's rules ask: no blur and
   no stadium (tools/audit-page.mjs on body.pd-site), so a pill, a count or a bar is a rounded rectangle under half its
   height. Static: no lens, no gel, no pointer light, no glide of a thumb (the chosen segment draws its own).
   The rules of 18 written again here weigh no more than :where(body.pd-site) .pd-app: a site page's own rule for its
   frame (a status on a dark slate, a stage's ground) still wins, as it did over the earlier look.
   ===================================================================================== */
/* the ground: the screen's paper and its glows (18.3), painted on the frame itself; above a page's own flat fill */
body.pd-site .pd-frame > .pd-app {
  background-image:
    radial-gradient(56% 48% at 8% 0%, var(--app-glow-1) 0%, transparent 72%),
    radial-gradient(46% 42% at 96% 4%, var(--app-glow-2) 0%, transparent 70%),
    radial-gradient(64% 56% at 72% 104%, var(--app-glow-3) 0%, transparent 72%),
    radial-gradient(40% 40% at 30% 70%, var(--app-glow-2) 0%, transparent 70%);
}
/* 18.1: figures that stand in columns, one icon weight */
:where(body.pd-site) .pd-app :not(.pd-paper, .pd-paper *, [data-true-scale], [data-true-scale] *) { font-variant-numeric: tabular-nums lining-nums !important; }
:where(body.pd-site) .pd-app .pd-ic { stroke-width: 1.75; }
:where(body.pd-site) .pd-app .pd-check__box .pd-ic { stroke-width: 2.25; }
:where(body.pd-site) .pd-app .pd-pi { stroke-width: 1.75; }
/* 18.2: never a blur on the site; the core's edge takes its light, as wherever no lens is drawn */
:where(body.pd-site) .pd-app :is(.pd-glass, .pd-mat, .pd-scrim) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
:where(body.pd-site) .pd-app .pd-glass:not([data-glass])::before { box-shadow: var(--app-glass-edgelight); }
/* 18.6: a link on glass */
:where(body.pd-site) .pd-app .pd-glass .pd-more { color: var(--app-text); }
:where(body.pd-site) .pd-app .pd-glass .pd-more > .pd-ic { color: var(--app-sky-ink); }
/* 18.9: the ring follows the shape, in the accent with its halo */
:where(body.pd-site) .pd-app :focus-visible { outline: 2px solid var(--app-focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--app-focus-inner), 0 0 0 7px var(--app-focus-glow); }
:where(body.pd-site) .pd-app .pd-glass :focus-visible, :where(body.pd-site) .pd-app .pd-glass:focus-visible { outline-offset: 3px; box-shadow: none; }
:where(body.pd-site) .pd-app :is(.pd-list, .pd-cmd__list, .pd-bell__list, .pd-side__scroll, .pd-inspector) :focus-visible { outline-offset: -2px; box-shadow: inset 0 0 0 4px var(--app-focus-inner); }
/* 18.10: a field in focus */
:where(body.pd-site) .pd-app :is(.pd-input:focus, .pd-textarea:focus, .pd-select:focus-visible, .pd-select[aria-expanded="true"]) { border-color: var(--app-sky); outline: 0; box-shadow: 0 0 0 1px var(--app-sky), 0 0 0 5px var(--app-focus-glow); }
/* 18.11: the segmented control; without its gliding thumb the chosen segment draws its own, concentric in the track */
:where(body.pd-site) .pd-app .pd-seg > :is(button, a) { border-radius: var(--app-r-capsule); }
:where(body.pd-site) .pd-app .pd-seg > :is(button, a)::before, :where(body.pd-site) .pd-app .pd-seg.has-thumb::before { border-radius: var(--app-r-thumb); }
/* 18.12: an « on » switch stays green under the pointer; its track and its knob are rounded rectangles (9, and 7 at 2) */
@media (hover: hover) { :where(body.pd-site) .pd-app .pd-switch[aria-checked="true"]:hover:not(:disabled) .pd-switch__track { background: linear-gradient(180deg, var(--app-switch-on-2), var(--app-switch-on)); } }
:where(body.pd-site) .pd-app .pd-switch__track { border-radius: 9px; }
:where(body.pd-site) .pd-app .pd-switch__track::after { border-radius: 7px; }
/* 18.13: each status keeps its glyph's colour (a page writes the glyph's colour inline for the site's own statuses) */
:where(body.pd-site) .pd-app .pd-status > span:first-child { color: var(--app-pill-planned-glyph) !important; }
:where(body.pd-site) .pd-app .pd-status[data-g="done"] > span:first-child { color: var(--app-pill-done-glyph) !important; }
:where(body.pd-site) .pd-app .pd-status[data-g="progress"] > span:first-child { color: var(--app-pill-progress-glyph) !important; }
:where(body.pd-site) .pd-app .pd-status[data-g="wait"] > span:first-child { color: var(--app-pill-wait-glyph) !important; }
:where(body.pd-site) .pd-app .pd-status[data-g="late"] > span:first-child { color: var(--app-pill-late-glyph) !important; }
:where(body.pd-site) .pd-app .pd-status[data-g="draft"] > span:first-child { color: var(--app-text-2) !important; }
/* 18.19: words on a window's or a sheet's material, red words there */
:where(body.pd-site) .pd-app .pd-glass :is(.pd-help, .pd-meta) { color: var(--app-text-2); }
:where(body.pd-site) .pd-app :is(.pd-dialog, .pd-sheet) :is(.pd-btn--crit, .pd-btn--crit-plain) { color: var(--app-crit-glass); }
@media (hover: hover) { :where(body.pd-site) .pd-app :is(.pd-dialog, .pd-sheet) :is(.pd-btn--crit, .pd-btn--crit-plain):hover { background: transparent; color: var(--app-crit-glass); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; } }
:where(body.pd-site) .pd-app :is(.pd-dialog, .pd-sheet) :is(.pd-btn--crit, .pd-btn--crit-plain):active { background: transparent; color: var(--app-crit-glass); box-shadow: inset 0 0 0 1.5px var(--app-crit-glass); }
/* 18.24: one mapping, each legend dot exactly its segment's colour */
:where(body.pd-site) .pd-app [data-viz="cash"] .is-1 { background: linear-gradient(180deg, var(--app-viz-late), var(--app-viz-late-2)); }
:where(body.pd-site) .pd-app [data-viz="cash"] .is-2 { background: linear-gradient(180deg, var(--app-viz-due), var(--app-viz-due-2)); }
/* the short shapes: a pill, a count, a tag, a badge, a label on the ruler (18 to 28 tall) */
:where(body.pd-site) .pd-app :is(.pd-status, .pd-tag, .pd-count, .pd-btn__count, .pd-badge, .pd-needle__label, .pd-now__label, .pd-appt-more) { border-radius: var(--app-r-short); }
/* the thin ones: a bar, a split, a meter, a skeleton line, a gauge's step (6 to 14 tall) */
:where(body.pd-site) .pd-app :is(.pd-split > i, .pd-bar, .pd-meter__track, .pd-meter__fill, .pd-skel, .pd-gauge > i) { border-radius: var(--app-r-thin); }
:where(body.pd-site) .pd-app :is(.pd-bar--progress, .pd-ruler__row)::before { border-radius: var(--app-r-thin); }
/* a sheet's row (52) and a touch menu's row (44): 14, under half of either */
:where(body.pd-site) .pd-app .pd-sheet .pd-opt { border-radius: 14px; }
/* a ledger's head on the site: the pane's own colour shows through it, so its first and last cells need no corner (a
   20 px corner on a 41 px cell reads as a stadium end) */
:where(body.pd-site) .pd-app .pd-table th { background: transparent; border-radius: 0; }
/* a status written on a slate (the trade pages' pieces) keeps its glyph and its words with no fill: the slate is its
   ground, and the page gives both the slate's own colours */
:where(body.pd-site) .pd-app .pd-slate .pd-status { background: none; box-shadow: none; padding-inline: 0; height: auto; }
/* the palette drawn in a page (the kit, /journee): in the flow, as wide as its column (18.18 sizes the floating one) */
:where(body.pd-site) .pd-app .pd-cmd--static { top: auto; width: 100%; max-width: 640px; }
/* a pill in a grid cell keeps its own width (a page's grid stretched it across the cell); a page's own placement wins */
:where(body.pd-site .pd-app) .pd-status { justify-self: start; }
