/* pozor-ui v3. Dark, layered surfaces, one accent. Icons are Material Symbols only.
   Load the fonts yourself (see showcase.html for the links).
   Re-theme by overriding --pz-* on :root or any parent. A new accent needs two tokens:
   --pz-accent and --pz-accent-ink (the text colour that sits on it). */

:root {
  /* surfaces, darkest first */
  --pz-sunken: #0a0a09;
  --pz-bg: #0e0e0d;
  --pz-surface: #171716;
  --pz-surface-2: #1f1f1d;
  --pz-surface-3: #2a2a28;

  /* text, brightest first. --pz-fg-faint is for decoration, it is too dim for text */
  --pz-fg-strong: #ffffff;
  --pz-fg: #dddcd8;
  --pz-fg-dim: #a9a8a3;
  --pz-fg-mute: #7d7c77;
  --pz-fg-faint: #55544f;

  --pz-line-soft: #e8e4d614;
  --pz-line: #e8e4d61f;
  --pz-line-strong: #e8e4d633;

  --pz-accent: #ffffff;
  --pz-accent-ink: #000000;
  --pz-accent-press: color-mix(in srgb, var(--pz-accent) 80%, #000);
  --pz-accent-soft: color-mix(in srgb, var(--pz-accent) 14%, transparent);
  --pz-focus: color-mix(in srgb, var(--pz-accent) 70%, transparent);
  --pz-hover: color-mix(in srgb, var(--pz-fg) 7%, transparent);

  --pz-danger: #ff5c5c;
  --pz-danger-soft: #ff9a9a;
  --pz-warn: #ffc56b;
  --pz-ok: #6fe3a1;

  /* chart series, in order */
  --pz-series-1: var(--pz-accent);
  --pz-series-2: #6cb6ff;
  --pz-series-3: #ff9d6c;
  --pz-series-4: #c79bff;
  --pz-series-5: #6fe3a1;

  --pz-r-sm: 6px;
  --pz-r-md: 10px;
  --pz-r-lg: 14px;
  --pz-r-xl: 18px;

  --pz-ring: 0 0 0 1px var(--pz-line);
  --pz-lip: inset 0 -2px #0000003d;
  --pz-shadow-card: 0 0 0 1px var(--pz-line), inset 0 1px 0 #ffffff08, 0 1px 2px #0000004d, 0 6px 14px -4px #00000059;
  --pz-shadow-card-hover: 0 0 0 1px var(--pz-line-strong), inset 0 1px 0 #ffffff0d, 0 1px 2px #0000004d, 0 10px 22px -6px #00000080;
  --pz-shadow-pop: 0 0 0 1px var(--pz-line), 0 1px 2px #0000006b, 0 16px 36px -8px #000000a6;

  --pz-font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --pz-font-body: "Schibsted Grotesk", -apple-system, "Segoe UI", Roboto, sans-serif;
  --pz-font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* the whole type scale. no text in this file uses a size outside it */
  --pz-t1: 11px;
  --pz-t2: 12.5px;
  --pz-t3: 14px;
  --pz-t4: 15px;
  --pz-t5: 16px;
  --pz-t6: 18px;
  --pz-t7: 22px;
  --pz-display: clamp(34px, 9vw, 52px);
  --pz-display-lg: clamp(48px, 12vw, 88px);

  --pz-fast: 90ms;
  --pz-normal: 200ms;
  --pz-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --pz-ease-pop: cubic-bezier(0.34, 1.5, 0.64, 1);
}

/* ---------- base ---------- */

.pz-app {
  color-scheme: dark;
  margin: 0;
  padding: 0 16px 56px;
  background: var(--pz-bg);
  color: var(--pz-fg);
  font-family: var(--pz-font-body);
  font-size: var(--pz-t5);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.pz-app *, .pz-app *::before, .pz-app *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.pz-app :focus-visible { outline: 2px solid var(--pz-focus); outline-offset: 3px; }
.pz-app a { color: inherit; }
.pz-app [hidden] { display: none !important; }
.pz-app ::selection { background: var(--pz-accent-soft); }

.pz-container { max-width: 600px; margin-inline: auto; }
.pz-wide { max-width: 880px; }
.pz-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pz-stack { display: flex; flex-direction: column; gap: 44px; padding-top: 16px; }
.pz-stack--sm { gap: 10px; padding-top: 0; }
.pz-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pz-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pz-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

/* ---------- icons ---------- */

/* a fixed 1em box, so a ligature word that has not turned into its glyph yet cannot push the layout */
.pz-icon {
  font-family: "Material Symbols Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  width: 1em;
  height: 1em;
  overflow: hidden;
  display: inline-block;
  flex: none;
  white-space: nowrap;
  direction: ltr;
  letter-spacing: normal;
  text-transform: none;
  font-feature-settings: "liga";
  vertical-align: middle;
  user-select: none;
}

/* ---------- header ---------- */

.pz-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 4px; height: 60px; isolation: isolate; }
/* a fade that blurs what scrolls under it, strongest at the top */
.pz-header::before {
  content: "";
  position: absolute;
  inset: 0 -16px -28px;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(var(--pz-bg) 30%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(#000 50%, transparent);
  mask-image: linear-gradient(#000 50%, transparent);
  transition: opacity var(--pz-normal) ease-out;
}
.pz-header.is-scrolled::before { opacity: 1; }
.pz-header__spacer { flex: 1; }

.pz-brand { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px; margin-left: -8px; border-radius: var(--pz-r-md); color: var(--pz-fg-dim); font-family: var(--pz-font-mono); font-size: var(--pz-t2); text-decoration: none; transition: color var(--pz-fast); }
.pz-brand .pz-icon { font-size: 26px; color: var(--pz-accent); transition: scale var(--pz-normal) var(--pz-ease); }
.pz-navlink { display: inline-flex; align-items: center; height: 36px; padding: 0 10px; border-radius: var(--pz-r-md); color: var(--pz-fg-dim); font-size: var(--pz-t4); text-decoration: none; transition: color var(--pz-fast), background-color var(--pz-fast); }
.pz-navlink[aria-current="page"] { color: var(--pz-fg-strong); }
@media (hover: hover) {
  .pz-brand:hover { color: var(--pz-fg-strong); }
  .pz-brand:hover .pz-icon { scale: 1.08; }
  .pz-navlink:hover { color: var(--pz-fg-strong); background: var(--pz-hover); }
}

/* ---------- type ---------- */

.pz-headline { margin: 0; font-family: var(--pz-font-display); font-weight: 700; font-size: var(--pz-display); line-height: 1.08; letter-spacing: -0.03em; color: var(--pz-fg-mute); text-wrap: balance; }
.pz-headline b { font-weight: inherit; color: var(--pz-fg-strong); }
.pz-headline em { font-style: normal; color: var(--pz-accent); text-shadow: 0 0 24px color-mix(in srgb, var(--pz-accent) 40%, transparent); }

.pz-hero { display: flex; flex-direction: column; gap: 14px; }
.pz-kicker { font-family: var(--pz-font-mono); font-size: var(--pz-t2); color: var(--pz-fg-mute); }
.pz-prose { margin: 0; font-size: var(--pz-t6); line-height: 1.6; color: var(--pz-fg-dim); text-wrap: pretty; }
.pz-prose + .pz-prose { margin-top: 18px; }
.pz-prose b { font-weight: 500; color: var(--pz-fg-strong); }
.pz-prose a, .pz-link { color: var(--pz-fg); text-underline-offset: 3px; text-decoration-color: var(--pz-line-strong); transition: color var(--pz-fast), text-decoration-color var(--pz-fast); }
@media (hover: hover) { .pz-prose a:hover, .pz-link:hover { color: var(--pz-fg-strong); text-decoration-color: currentColor; } }

.pz-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; font-size: var(--pz-t5); }
.pz-links a { display: inline-flex; align-items: center; gap: 5px; color: var(--pz-fg-dim); text-decoration: none; transition: color var(--pz-fast), translate var(--pz-normal) var(--pz-ease); }
.pz-links .pz-icon { font-size: 16px; color: var(--pz-fg-mute); }
@media (hover: hover) { .pz-links a:hover { color: var(--pz-fg-strong); translate: 0 -1px; } }

.pz-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; font-size: var(--pz-t4); font-weight: 400; color: var(--pz-fg-mute); }
.pz-section-head a { display: inline-flex; align-items: center; gap: 4px; color: var(--pz-fg-dim); text-decoration: none; transition: color var(--pz-fast); }
@media (hover: hover) { .pz-section-head a:hover { color: var(--pz-fg-strong); } }

.pz-footer { margin-top: 56px; padding: 18px 4px 0; border-top: 1px solid var(--pz-line-soft); font-family: var(--pz-font-mono); font-size: var(--pz-t2); color: var(--pz-fg-mute); }
.pz-divider { display: flex; align-items: center; gap: 12px; font-family: var(--pz-font-mono); font-size: var(--pz-t2); color: var(--pz-fg-mute); }
.pz-divider::before, .pz-divider::after { content: ""; flex: 1; height: 1px; background: var(--pz-line-soft); }

/* ---------- buttons ---------- */

.pz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--pz-r-md);
  background: var(--pz-accent);
  color: var(--pz-accent-ink);
  font: 500 var(--pz-t4) / 1 var(--pz-font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  box-shadow: var(--pz-lip), 0 1px 2px #00000059;
  transition: background-color var(--pz-fast), box-shadow var(--pz-fast), color var(--pz-fast), scale var(--pz-normal) var(--pz-ease);
}
.pz-btn:active { scale: 0.97; }
.pz-btn:disabled, .pz-btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.pz-btn--line { background: var(--pz-surface); color: var(--pz-fg); box-shadow: var(--pz-ring), 0 1px 2px #0000004d; }
.pz-btn--ghost { background: none; color: var(--pz-fg-dim); box-shadow: none; }
.pz-btn--danger { background: var(--pz-danger); color: #000; }
.pz-btn--sm { height: 30px; padding: 0 10px; gap: 5px; font-size: var(--pz-t3); border-radius: var(--pz-r-sm); }
.pz-btn--sm .pz-icon { font-size: 16px; }
.pz-btn--block { width: 100%; }
.pz-btn--icon { width: 38px; padding: 0; }
.pz-btn--icon.pz-btn--sm { width: 30px; }
@media (hover: hover) {
  /* the lip goes on hover, so the button reads as pressed in */
  .pz-btn:hover { background: var(--pz-accent-press); box-shadow: 0 1px 2px #00000059; }
  .pz-btn--line:hover { background: var(--pz-surface-2); color: var(--pz-fg-strong); box-shadow: 0 0 0 1px var(--pz-line-strong), 0 1px 2px #0000004d; }
  .pz-btn--ghost:hover { background: var(--pz-hover); color: var(--pz-fg-strong); box-shadow: none; }
  .pz-btn--danger:hover { background: color-mix(in srgb, var(--pz-danger) 82%, #000); }
}

/* ---------- segmented control and tabs ---------- */

/* equal columns, so the pill is placed from --count and --index alone and nothing is measured */
.pz-seg {
  --count: 1;
  --index: 0;
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  height: 36px;
  padding: 3px;
  border-radius: var(--pz-r-md);
  background: var(--pz-sunken);
  box-shadow: 0 0 0 1px var(--pz-line-soft), inset 0 1px 2px #00000059;
  user-select: none;
}
.pz-seg__pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px - (var(--count) - 1) * 4px) / var(--count));
  translate: calc(var(--index) * (100% + 4px)) 0;
  border-radius: calc(var(--pz-r-md) - 3px);
  background: var(--pz-surface-2);
  box-shadow: inset 0 1px 0 #ffffff0d, 0 1px 2px #00000073;
  pointer-events: none;
  transition: translate var(--pz-normal) var(--pz-ease);
}
.pz-seg button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: calc(var(--pz-r-md) - 3px);
  background: none;
  color: var(--pz-fg-mute);
  font: 400 var(--pz-t3) / 1.3 var(--pz-font-body);
  white-space: nowrap;
  cursor: pointer;
  outline-offset: 0;
  transition: color var(--pz-fast), scale var(--pz-normal) ease-out;
}
.pz-seg button:active { scale: 0.97; }
.pz-seg button[aria-pressed="true"], .pz-seg button[aria-selected="true"] { color: var(--pz-fg-strong); }
.pz-seg button small { font-family: var(--pz-font-mono); font-size: var(--pz-t1); color: var(--pz-fg-mute); font-variant-numeric: tabular-nums; }
@media (hover: hover) { .pz-seg button:hover { color: var(--pz-fg-strong); } }
.pz-seg--block { display: grid; }
.pz-seg--tabs { display: grid; height: 52px; border-radius: var(--pz-r-lg); }
.pz-seg--tabs .pz-seg__pill, .pz-seg--tabs button { border-radius: calc(var(--pz-r-lg) - 3px); }
.pz-seg--tabs button { font-size: var(--pz-t4); }
/* the same control drawn as an underline */
.pz-seg--line { gap: 4px; height: 40px; padding: 0; border-radius: 0; background: none; box-shadow: inset 0 -1px 0 var(--pz-line-soft); }
.pz-seg--line .pz-seg__pill { top: auto; bottom: 0; left: 0; width: calc((100% - (var(--count) - 1) * 4px) / var(--count)); height: 2px; border-radius: 2px 2px 0 0; background: var(--pz-accent); box-shadow: none; }

/* ---------- status, chips, small things ---------- */

.pz-dot { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--pz-fg-faint); }
.pz-dot--on { background: var(--pz-ok); box-shadow: 0 0 8px color-mix(in srgb, var(--pz-ok) 55%, transparent); }
.pz-dot--busy { background: var(--pz-accent); box-shadow: 0 0 8px color-mix(in srgb, var(--pz-accent) 55%, transparent); animation: pz-pulse 2.4s ease-in-out infinite; }
.pz-dot--bad { background: var(--pz-danger); }
@keyframes pz-pulse { 50% { opacity: 0.35; } }
.pz-state { display: inline-flex; align-items: center; gap: 8px; color: var(--pz-fg-mute); }
.pz-state--busy { color: var(--pz-fg-strong); }
.pz-state--on { color: var(--pz-fg-dim); }
.pz-state--bad { color: var(--pz-danger-soft); }

.pz-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--pz-surface-2); box-shadow: var(--pz-ring); color: var(--pz-fg-dim); font-family: var(--pz-font-mono); font-size: var(--pz-t2); white-space: nowrap; }
.pz-chip .pz-icon { font-size: 15px; }
.pz-chip--solid { background: var(--pz-accent); color: var(--pz-accent-ink); box-shadow: none; }
.pz-chip--ghost { background: none; }
.pz-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--pz-accent); color: var(--pz-accent-ink); font-family: var(--pz-font-mono); font-size: var(--pz-t1); font-weight: 500; font-variant-numeric: tabular-nums; }
.pz-kbd { display: inline-block; min-width: 22px; padding: 1px 6px 2px; border-radius: 5px; background: var(--pz-surface-2); box-shadow: inset 0 -2px 0 #00000073, var(--pz-ring); color: var(--pz-fg); font-family: var(--pz-font-mono); font-size: var(--pz-t2); text-align: center; }
.pz-avatar { --size: 36px; display: inline-grid; place-items: center; width: var(--size); height: var(--size); border-radius: 50%; background: var(--pz-surface-2); box-shadow: var(--pz-ring); color: var(--pz-fg-strong); font-weight: 600; font-size: calc(var(--size) * 0.36); }
.pz-tile { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--pz-r-md); background: var(--pz-surface); color: var(--pz-accent); box-shadow: var(--pz-shadow-card); }
.pz-tile .pz-icon { font-size: 22px; }

/* ---------- figures: a small coloured label over a big number ---------- */

.pz-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; margin: 0; padding: 0; list-style: none; }
.pz-figure { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pz-figure__k { font-size: var(--pz-t1); font-weight: 500; letter-spacing: 0.01em; color: var(--c, var(--pz-fg-mute)); }
.pz-figure__v { font-size: var(--pz-t7); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; color: var(--pz-fg-strong); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-figure--off .pz-figure__v { color: var(--pz-fg-mute); }
@media (max-width: 440px) { .pz-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- list of items (icon, title, line, arrow) ---------- */

.pz-items { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pz-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-inline: -10px; padding: 10px; border-radius: var(--pz-r-lg); color: inherit; text-decoration: none; transition: background-color var(--pz-fast), scale var(--pz-normal) ease-out; }
.pz-item:active { scale: 0.985; }
.pz-item__title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--pz-t5); font-weight: 600; line-height: 1.35; color: var(--pz-fg-strong); }
.pz-item__desc { margin: 1px 0 0; font-size: var(--pz-t3); line-height: 1.5; color: var(--pz-fg-dim); text-wrap: pretty; }
.pz-item__arrow { color: var(--pz-fg-mute); opacity: 0; translate: -3px 0; transition: opacity var(--pz-fast), translate var(--pz-normal) var(--pz-ease); }
@media (hover: hover) {
  .pz-item:hover { background: var(--pz-hover); }
  .pz-item:hover .pz-item__arrow { opacity: 1; translate: 0; }
}
@media (hover: none) { .pz-item__arrow { opacity: 1; translate: 0; } }

/* ---------- cards ---------- */

.pz-list { display: flex; flex-direction: column; gap: 12px; }
.pz-card { position: relative; display: block; border-radius: var(--pz-r-xl); background: var(--pz-surface); box-shadow: var(--pz-shadow-card); color: inherit; text-decoration: none; overflow: clip; transition: box-shadow 160ms ease-out, translate var(--pz-normal) var(--pz-ease), scale var(--pz-normal) ease-out; }
a.pz-card:active { scale: 0.985; }
.pz-card__title { margin: 0; padding: 16px 60px 0 18px; font-size: var(--pz-t6); font-weight: 600; line-height: 1.35; color: var(--pz-fg-strong); overflow-wrap: anywhere; }
.pz-card__desc { margin: 4px 0 0; padding: 0 18px 16px; font-size: var(--pz-t4); line-height: 1.55; color: var(--pz-fg-dim); text-wrap: pretty; }
.pz-card__icon { position: absolute; top: 18px; right: 18px; font-size: 24px; color: var(--pz-fg-mute); }
.pz-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 14px 10px 18px; border-top: 1px solid var(--pz-line-soft); background: #00000033; font-family: var(--pz-font-mono); font-size: var(--pz-t2); color: var(--pz-fg-mute); }
.pz-strip__end { display: inline-flex; align-items: center; gap: 10px; }
.pz-chev { color: var(--pz-fg-mute); transition: color var(--pz-fast), translate var(--pz-normal) var(--pz-ease), rotate var(--pz-normal) var(--pz-ease); }
@media (hover: hover) {
  a.pz-card:hover { box-shadow: var(--pz-shadow-card-hover); translate: 0 -1px; }
  a.pz-card:hover .pz-chev { color: var(--pz-fg-strong); translate: 2px 0; }
}

.pz-box { border-radius: var(--pz-r-xl); background: var(--pz-surface); box-shadow: var(--pz-shadow-card); overflow: clip; }
.pz-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: baseline; gap: 16px; padding: 13px 18px; }
.pz-row + .pz-row { border-top: 1px solid var(--pz-line-soft); }
.pz-row__label { font-family: var(--pz-font-mono); font-size: var(--pz-t2); color: var(--pz-fg-mute); }
.pz-row__value { min-width: 0; font-size: var(--pz-t4); line-height: 1.5; color: var(--pz-fg); overflow-wrap: anywhere; }

.pz-disclosure + .pz-disclosure { border-top: 1px solid var(--pz-line-soft); }
.pz-disclosure > summary { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 18px 0 14px; list-style: none; cursor: pointer; user-select: none; font-size: var(--pz-t4); font-weight: 500; color: var(--pz-fg-strong); outline-offset: -2px; }
.pz-disclosure > summary::-webkit-details-marker { display: none; }
.pz-disclosure[open] > summary .pz-chev { rotate: 90deg; }
.pz-disclosure__meta { margin-left: auto; font-family: var(--pz-font-mono); font-size: var(--pz-t2); font-weight: 400; font-style: normal; color: var(--pz-fg-mute); }
.pz-disclosure__text { margin: 0; padding: 0 18px 18px 42px; font-size: var(--pz-t4); line-height: 1.6; color: var(--pz-fg-dim); text-wrap: pretty; }

.pz-panel { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; border-radius: var(--pz-r-xl); background: var(--pz-surface); box-shadow: var(--pz-shadow-card); }
.pz-panel__lead { margin: 0; font-size: var(--pz-t4); line-height: 1.6; color: var(--pz-fg-dim); text-wrap: pretty; }
.pz-bullets { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pz-bullets li { position: relative; display: flex; flex-direction: column; gap: 1px; padding-left: 18px; font-size: var(--pz-t4); line-height: 1.5; color: var(--pz-fg-strong); }
.pz-bullets li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: color-mix(in srgb, var(--pz-accent) 60%, transparent); }
.pz-bullets span { font-size: var(--pz-t3); color: var(--pz-fg-mute); }
.pz-panel__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------- stat card ---------- */

.pz-stat { position: relative; isolation: isolate; border-radius: var(--pz-r-xl); background: var(--pz-surface); box-shadow: var(--pz-shadow-card); overflow: clip; }
.pz-stat::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--pz-accent) 11%, transparent), transparent 60%); }
.pz-stat__art { position: absolute; right: 14px; top: 14px; z-index: -1; font-size: 150px; color: color-mix(in srgb, var(--pz-accent) 14%, transparent); }
.pz-stat__main { display: flex; flex-direction: column; justify-content: flex-end; min-height: 150px; padding: 22px 20px; }
.pz-stat__big { margin: 0; font-family: var(--pz-font-display); font-weight: 700; font-size: var(--pz-display); line-height: 1.05; letter-spacing: -0.03em; color: var(--pz-fg-strong); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pz-stat__sub { margin: 6px 0 0; max-width: 32ch; font-size: var(--pz-t4); line-height: 1.45; color: var(--pz-fg-dim); text-wrap: pretty; }

/* ---------- page head ---------- */

.pz-page-head { display: flex; flex-direction: column; }
.pz-page-head__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pz-page-head__title { margin: 0; font-family: var(--pz-font-display); font-size: var(--pz-display); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: var(--pz-fg-strong); overflow-wrap: anywhere; text-wrap: balance; }
.pz-page-head__icon { font-size: 40px; color: var(--pz-fg-mute); margin-top: 4px; }
.pz-page-head__desc { margin: 8px 0 0; font-size: var(--pz-t5); line-height: 1.55; color: var(--pz-fg-dim); text-wrap: pretty; }
.pz-page-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 12px; font-family: var(--pz-font-mono); font-size: var(--pz-t2); color: var(--pz-fg-mute); }
.pz-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; height: 36px; margin: 0 0 4px -10px; padding: 0 12px 0 6px; border-radius: var(--pz-r-md); color: var(--pz-fg-dim); font-size: var(--pz-t3); text-decoration: none; user-select: none; transition: color var(--pz-fast), background-color var(--pz-fast); }
.pz-back .pz-icon { transition: translate var(--pz-normal) var(--pz-ease); }
@media (hover: hover) {
  .pz-back:hover { color: var(--pz-fg-strong); background: var(--pz-hover); }
  .pz-back:hover .pz-icon { translate: -3px 0; }
}

/* ---------- code ---------- */

.pz-code { margin: 0; border-radius: var(--pz-r-lg); background: var(--pz-sunken); box-shadow: var(--pz-ring); overflow: clip; }
.pz-code__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 5px 5px 14px; border-bottom: 1px solid var(--pz-line-soft); font-family: var(--pz-font-mono); font-size: var(--pz-t2); color: var(--pz-fg-mute); }
.pz-code pre { margin: 0; padding: 12px 14px; overflow-x: auto; }
.pz-code code, .pz-snippet code { font-family: var(--pz-font-mono); font-size: var(--pz-t2); line-height: 1.6; color: var(--pz-fg); }
.pz-code code { white-space: pre; }

/* a one-tap copyable line. the tag shows on hover, and always on touch */
.pz-snippet { position: relative; display: block; width: 100%; padding: 12px 14px; border: 0; border-radius: var(--pz-r-lg); background: var(--pz-surface); box-shadow: inset 0 0 0 1px var(--pz-line); font: inherit; text-align: left; cursor: pointer; transition: background-color var(--pz-fast), scale var(--pz-normal) ease-out; }
.pz-snippet:active { scale: 0.99; }
.pz-snippet code { display: block; color: var(--pz-fg-dim); overflow-wrap: anywhere; }
.pz-snippet__tag { position: absolute; top: 6px; right: 6px; display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px 0 7px; border-radius: var(--pz-r-sm); background: var(--pz-surface-3); box-shadow: var(--pz-ring), 0 1px 2px #0000006b; color: var(--pz-fg-strong); font: 500 var(--pz-t2) / 1 var(--pz-font-body); opacity: 0; translate: 0 2px; pointer-events: none; transition: opacity 150ms var(--pz-ease), translate 150ms var(--pz-ease), color var(--pz-fast); }
.pz-snippet__tag .pz-icon { font-size: 14px; }
.pz-snippet:focus-visible .pz-snippet__tag, .pz-snippet.is-copied .pz-snippet__tag { opacity: 1; translate: 0; }
.pz-snippet.is-copied .pz-snippet__tag { color: var(--pz-ok); }
@media (hover: hover) {
  .pz-snippet:hover { background: var(--pz-surface-2); }
  .pz-snippet:hover .pz-snippet__tag { opacity: 1; translate: 0; }
}
@media (hover: none) { .pz-snippet__tag { opacity: 1; translate: 0; } }

/* ---------- forms ---------- */

.pz-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pz-label { font-size: var(--pz-t3); color: var(--pz-fg-mute); }
.pz-input {
  width: 100%;
  min-width: 0;
  padding: 9px 12px;
  border: 0;
  border-radius: var(--pz-r-md);
  background: var(--pz-sunken);
  color: var(--pz-fg-strong);
  caret-color: var(--pz-accent);
  font: 400 var(--pz-t4) / 1.45 var(--pz-font-body);
  box-shadow: var(--pz-ring);
  transition: box-shadow var(--pz-fast);
}
.pz-input::placeholder { color: var(--pz-fg-faint); }
.pz-app .pz-input:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--pz-bg), 0 0 0 3px var(--pz-focus); }
.pz-app .pz-input[aria-invalid="true"] { box-shadow: 0 0 0 1px var(--pz-danger); }
textarea.pz-input { resize: vertical; min-height: 84px; }
/* the select: a field-shaped button that opens a list. the list is ours, so it looks the same everywhere */
.pz-select { position: relative; display: block; }
.pz-select__trigger { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; }
.pz-select__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz-select__trigger .pz-icon { color: var(--pz-fg-mute); transition: color var(--pz-fast); }
.pz-select__trigger[aria-expanded="true"] { box-shadow: 0 0 0 1px var(--pz-line-strong); }
.pz-select__trigger[aria-expanded="true"] .pz-icon { color: var(--pz-fg-strong); }
@media (hover: hover) { .pz-select__trigger:hover .pz-icon { color: var(--pz-fg-strong); } }
.pz-select__list { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; max-height: 244px; overflow-y: auto; margin: 0; padding: 5px; list-style: none; border-radius: var(--pz-r-lg); background: var(--pz-surface-2); box-shadow: var(--pz-shadow-pop); scrollbar-width: thin; animation: pz-rise 160ms var(--pz-ease); }
.pz-select.is-up .pz-select__list { top: auto; bottom: calc(100% + 6px); }
.pz-select__list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 10px; border-radius: var(--pz-r-sm); font-size: var(--pz-t3); line-height: 1.4; color: var(--pz-fg); cursor: pointer; user-select: none; }
.pz-select__list li + li { margin-top: 2px; }
.pz-select__list li.is-active { background: var(--pz-hover); color: var(--pz-fg-strong); }
.pz-select__list li .pz-icon { font-size: 16px; color: var(--pz-accent); opacity: 0; scale: 0.5; transition: opacity var(--pz-fast), scale 200ms var(--pz-ease-pop); }
.pz-select__list li[aria-selected="true"] { color: var(--pz-fg-strong); }
.pz-select__list li[aria-selected="true"] .pz-icon { opacity: 1; scale: 1; }
.pz-hint { margin: 0; font-size: var(--pz-t3); color: var(--pz-fg-mute); }
.pz-error { display: flex; align-items: center; gap: 6px; margin: 0; font-size: var(--pz-t3); color: var(--pz-danger-soft); }
.pz-error .pz-icon { font-size: 16px; }

.pz-check, .pz-switch { display: inline-flex; align-items: center; gap: 10px; font-size: var(--pz-t4); color: var(--pz-fg); cursor: pointer; user-select: none; }
.pz-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
/* the box is a small sunken well. checked, it fills with the accent and the tick pops in */
.pz-check__box { position: relative; display: grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: var(--pz-r-sm); background: var(--pz-sunken); box-shadow: var(--pz-ring), inset 0 1px 2px #00000059; color: var(--pz-accent-ink); transition: background-color var(--pz-fast), box-shadow var(--pz-fast), scale var(--pz-normal) var(--pz-ease); }
.pz-check__box .pz-icon { font-size: 16px; opacity: 0; scale: 0.4; transition: opacity var(--pz-fast), scale 240ms var(--pz-ease-pop); }
.pz-check:active .pz-check__box { scale: 0.9; }
.pz-check input:checked + .pz-check__box, .pz-check input:indeterminate + .pz-check__box { background: var(--pz-accent); box-shadow: var(--pz-lip), 0 1px 2px #00000059; }
.pz-check input:checked + .pz-check__box .pz-icon { opacity: 1; scale: 1; }
/* "some of them": a dash where the tick would be */
.pz-check input:indeterminate + .pz-check__box .pz-icon { opacity: 0; }
.pz-check input:indeterminate + .pz-check__box::after { content: ""; position: absolute; width: 10px; height: 2px; border-radius: 1px; background: currentColor; }
.pz-check input:focus-visible + .pz-check__box { outline: 2px solid var(--pz-focus); outline-offset: 3px; }
.pz-check:has(input:disabled), .pz-switch:has(input:disabled) { opacity: 0.45; cursor: default; }
@media (hover: hover) { .pz-check:hover input:not(:checked):not(:indeterminate):not(:disabled) + .pz-check__box { box-shadow: 0 0 0 1px var(--pz-line-strong), inset 0 1px 2px #00000059; } }

/* the slider: a sunken track filled up to the thumb, and a thumb shaped like a chart's end dot */
.pz-slider__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pz-slider__value { font-family: var(--pz-font-mono); font-size: var(--pz-t2); color: var(--pz-fg); font-variant-numeric: tabular-nums; }
.pz-range { --v: 0%; -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 22px; margin: 0; background: none; cursor: pointer; touch-action: pan-y; }
.pz-app .pz-range:focus-visible { outline: none; }
.pz-range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--pz-accent) var(--v), var(--pz-sunken) var(--v)); box-shadow: inset 0 0 0 1px var(--pz-line-soft), inset 0 1px 2px #00000059; }
.pz-range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--pz-sunken); box-shadow: inset 0 0 0 1px var(--pz-line-soft), inset 0 1px 2px #00000059; }
.pz-range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--pz-accent); }
.pz-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border: 0; border-radius: 50%; background: radial-gradient(circle, var(--pz-accent) 0 4px, var(--pz-surface-3) 4.6px); box-shadow: 0 0 0 1px var(--pz-line-strong), 0 2px 6px #00000080; transition: scale var(--pz-normal) var(--pz-ease), box-shadow var(--pz-fast); }
.pz-range::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: radial-gradient(circle, var(--pz-accent) 0 4px, var(--pz-surface-3) 4.6px); box-shadow: 0 0 0 1px var(--pz-line-strong), 0 2px 6px #00000080; transition: scale var(--pz-normal) var(--pz-ease), box-shadow var(--pz-fast); }
.pz-range:active::-webkit-slider-thumb { scale: 1.12; }
.pz-range:active::-moz-range-thumb { scale: 1.12; }
.pz-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 1px var(--pz-bg), 0 0 0 3px var(--pz-focus); }
.pz-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 1px var(--pz-bg), 0 0 0 3px var(--pz-focus); }
.pz-range:disabled { opacity: 0.45; cursor: default; }
.pz-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pz-switch__track { position: relative; width: 40px; height: 22px; flex: none; border-radius: 999px; background: var(--pz-surface-3); box-shadow: inset 0 1px 2px #00000059; transition: background-color 180ms var(--pz-ease); }
.pz-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--pz-fg-dim); box-shadow: 0 1px 2px #00000073; transition: translate 180ms var(--pz-ease), background-color 180ms var(--pz-ease); }
.pz-switch input:checked + .pz-switch__track { background: var(--pz-accent); }
.pz-switch input:checked + .pz-switch__track::after { translate: 18px 0; background: var(--pz-accent-ink); }
.pz-switch input:focus-visible + .pz-switch__track { outline: 2px solid var(--pz-focus); outline-offset: 3px; }

/* ---------- notices, toasts ---------- */

.pz-notice { --tone: var(--pz-fg-dim); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-radius: var(--pz-r-lg); background: color-mix(in srgb, var(--tone) 7%, var(--pz-surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--tone) 24%, transparent); }
.pz-notice > .pz-icon { margin-top: 1px; font-size: 20px; color: var(--tone); }
.pz-notice__title { margin: 0; font-size: var(--pz-t4); font-weight: 600; color: var(--pz-fg-strong); }
.pz-notice__text { margin: 2px 0 0; font-size: var(--pz-t3); line-height: 1.55; color: var(--pz-fg-dim); }
.pz-notice--warn { --tone: var(--pz-warn); }
.pz-notice--danger { --tone: var(--pz-danger); }
.pz-notice--ok { --tone: var(--pz-ok); }

/* toasts live on the body, so they carry their own font and box model */
.pz-toasts { position: fixed; left: 50%; bottom: 20px; translate: -50% 0; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.pz-toast { box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--pz-r-md); background: var(--pz-surface-2); box-shadow: var(--pz-shadow-pop); color: var(--pz-fg-strong); font: 400 var(--pz-t3) / 1.4 var(--pz-font-body); animation: pz-rise 240ms var(--pz-ease) both; transition: opacity 180ms ease-out; }
.pz-toast .pz-icon { color: var(--pz-fg-dim); }
.pz-toast--warn .pz-icon { color: var(--pz-warn); }
.pz-toast--ok .pz-icon { color: var(--pz-ok); }
.pz-toast.is-leaving { opacity: 0; }
@keyframes pz-rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- dialog: a thin shell around stacked wells ---------- */

.pz-dialog { width: min(100% - 24px, 400px); padding: 22px 4px 4px; border: 0; border-radius: var(--pz-r-xl); background: var(--pz-bg); color: var(--pz-fg); box-shadow: var(--pz-shadow-pop); overflow: visible; }
.pz-dialog--wide { width: min(100% - 24px, 500px); }
.pz-dialog[open] { animation: pz-dialog-in 360ms var(--pz-ease-pop); }
.pz-dialog::backdrop { background: #00000080; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: pz-fade 200ms ease-out; }
@keyframes pz-dialog-in { from { opacity: 0; transform: translateY(12px) scale(0.94); } 40% { opacity: 1; } }
@keyframes pz-fade { from { opacity: 0; } }
.pz-dialog__close { position: absolute; top: 9px; right: 9px; }
.pz-dialog__title { margin: 0 46px 0 18px; font-size: var(--pz-t6); font-weight: 600; line-height: 1.2; color: var(--pz-fg-strong); }
.pz-dialog__text { margin: 8px 18px 0; font-size: var(--pz-t3); line-height: 1.45; color: var(--pz-fg-dim); text-wrap: pretty; }
.pz-dialog__title:last-child, .pz-dialog__text:last-child { margin-bottom: 18px; }
.pz-dialog__body { margin-top: 18px; padding: 0 14px 14px; }
.pz-wells { display: grid; gap: 4px; margin-top: 18px; }
.pz-well { border-radius: var(--pz-r-lg); background: var(--pz-surface); box-shadow: inset 0 0 0 1px var(--pz-line); padding: 12px 14px; }
.pz-well--center { display: grid; place-items: center; padding-block: 24px; }
.pz-dialog__foot { display: flex; gap: 6px; margin-top: 18px; }
.pz-dialog__foot > .pz-btn { flex: 1; }
.pz-wells + .pz-dialog__foot { margin-top: 4px; }

/* ---------- menu (details based) ---------- */

.pz-menu { position: relative; display: inline-block; }
.pz-menu > summary { list-style: none; }
.pz-menu > summary::-webkit-details-marker { display: none; }
.pz-menu[open] > summary .pz-chev { rotate: 180deg; }
.pz-menu__list { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; display: flex; flex-direction: column; gap: 2px; width: max-content; min-width: 180px; padding: 5px; border-radius: var(--pz-r-lg); background: var(--pz-surface-2); box-shadow: var(--pz-shadow-pop); animation: pz-rise 160ms var(--pz-ease); }
.pz-menu--end .pz-menu__list, .pz-menu.is-flipped .pz-menu__list { left: auto; right: 0; }
.pz-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--pz-r-sm); background: none; color: var(--pz-fg); font: 400 var(--pz-t3) / 1.4 var(--pz-font-body); text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; outline-offset: -2px; }
.pz-menu__item .pz-icon { color: var(--pz-fg-mute); }
.pz-menu__item--danger, .pz-menu__item--danger .pz-icon { color: var(--pz-danger-soft); }
.pz-menu__item:hover, .pz-menu__item:focus-visible { background: var(--pz-hover); color: var(--pz-fg-strong); }
.pz-menu__sep { height: 1px; margin: 3px 6px; background: var(--pz-line-soft); }

/* ---------- tooltip (reads data-tip) ---------- */

.pz-tip { position: relative; display: inline-flex; border-radius: var(--pz-r-sm); }
.pz-tip::after { content: attr(data-tip); position: absolute; z-index: 40; left: 50%; bottom: calc(100% + 8px); translate: -50% 3px; padding: 5px 8px; border-radius: var(--pz-r-sm); background: var(--pz-surface-3); box-shadow: var(--pz-shadow-pop); color: var(--pz-fg-strong); font: 400 var(--pz-t2) / 1.3 var(--pz-font-body); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--pz-fast), translate var(--pz-normal) var(--pz-ease); }
.pz-tip:hover::after, .pz-tip:focus-visible::after { opacity: 1; translate: -50% 0; }

/* ---------- table ---------- */

.pz-table-wrap { overflow-x: auto; border-radius: var(--pz-r-lg); background: var(--pz-surface); box-shadow: var(--pz-shadow-card); }
.pz-table { width: 100%; border-collapse: collapse; font-size: var(--pz-t3); }
.pz-table th, .pz-table td { padding: 11px 14px; text-align: left; white-space: nowrap; }
.pz-table th { font-family: var(--pz-font-mono); font-size: var(--pz-t2); font-weight: 400; color: var(--pz-fg-mute); border-bottom: 1px solid var(--pz-line-soft); }
.pz-table td { color: var(--pz-fg-dim); border-bottom: 1px solid var(--pz-line-soft); }
.pz-table tr:last-child td { border-bottom: 0; }
.pz-table td:first-child { color: var(--pz-fg-strong); }
.pz-table .pz-num { text-align: right; font-family: var(--pz-font-mono); font-size: var(--pz-t2); font-variant-numeric: tabular-nums; }

/* ---------- progress, skeleton, empty ---------- */

.pz-progress { position: relative; height: 8px; border-radius: 999px; background: var(--pz-sunken); box-shadow: inset 0 0 0 1px var(--pz-line-soft); overflow: hidden; }
.pz-progress > span { position: absolute; inset: 0 auto 0 0; width: var(--v, 0%); border-radius: inherit; background: var(--pz-accent); transition: width 300ms var(--pz-ease); }
.pz-skeleton { display: block; height: 14px; border-radius: var(--pz-r-sm); background: linear-gradient(100deg, #ffffff0a 30%, #ffffff1a 50%, #ffffff0a 70%) 0 0 / 200% 100%; animation: pz-shimmer 1.3s ease-in-out infinite; }
@keyframes pz-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.pz-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 20px; border-radius: var(--pz-r-xl); box-shadow: inset 0 0 0 1px var(--pz-line-soft); text-align: center; color: var(--pz-fg-mute); }
.pz-empty .pz-icon { font-size: 34px; color: var(--pz-fg-faint); }
.pz-empty__title { margin: 0; font-size: var(--pz-t5); font-weight: 600; color: var(--pz-fg-strong); }
.pz-empty__text { margin: 0; max-width: 34ch; font-size: var(--pz-t3); }

/* ---------- breadcrumbs, pager, timeline, toolbar ---------- */

.pz-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; font-family: var(--pz-font-mono); font-size: var(--pz-t2); color: var(--pz-fg-mute); }
.pz-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--pz-fg-faint); }
.pz-crumbs a { color: var(--pz-fg-dim); text-decoration: none; }
.pz-crumbs a:hover, .pz-crumbs [aria-current="page"] { color: var(--pz-fg-strong); }

.pz-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pz-pager a, .pz-pager span { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: var(--pz-r-md); color: var(--pz-fg-dim); font-family: var(--pz-font-mono); font-size: var(--pz-t2); text-decoration: none; transition: color var(--pz-fast), background-color var(--pz-fast); }
.pz-pager a:hover { color: var(--pz-fg-strong); background: var(--pz-hover); }
.pz-pager [aria-current="page"] { background: var(--pz-surface-2); box-shadow: var(--pz-ring); color: var(--pz-fg-strong); }
.pz-pager .is-off { opacity: 0.35; }
.pz-pager .is-gap { min-width: 20px; padding: 0; color: var(--pz-fg-faint); }

.pz-timeline { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.pz-timeline li { position: relative; padding: 0 0 18px 22px; border-left: 1px solid var(--pz-line); }
.pz-timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.pz-timeline li::before { content: ""; position: absolute; left: -4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--pz-fg-mute); box-shadow: 0 0 0 3px var(--pz-bg); }
.pz-timeline li:first-child::before { background: var(--pz-accent); }
.pz-timeline__when { display: block; font-family: var(--pz-font-mono); font-size: var(--pz-t2); color: var(--pz-fg-mute); }
.pz-timeline__text { margin: 2px 0 0; font-size: var(--pz-t4); line-height: 1.55; color: var(--pz-fg-dim); }

.pz-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; border-radius: var(--pz-r-lg); background: var(--pz-surface); box-shadow: var(--pz-ring); }
.pz-toolbar__spacer { flex: 1; }

/* ---------- year of month tiles ---------- */

.pz-year { border-radius: var(--pz-r-xl); background: var(--pz-surface); box-shadow: var(--pz-shadow-card); overflow: clip; }
.pz-year > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px 0 14px; list-style: none; cursor: pointer; user-select: none; outline-offset: -2px; }
.pz-year > summary::-webkit-details-marker { display: none; }
.pz-year[open] > summary .pz-chev { rotate: 90deg; }
.pz-year__label { font-size: var(--pz-t6); font-weight: 600; color: var(--pz-fg-strong); }
.pz-year__meta { margin-left: auto; font-family: var(--pz-font-mono); font-size: var(--pz-t2); color: var(--pz-fg-mute); }
.pz-months { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pz-year .pz-months { padding: 2px 12px 14px; }
.pz-month { position: relative; display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 11px 13px; border-radius: var(--pz-r-md); background: var(--pz-surface-2); box-shadow: inset 0 0 0 1px var(--pz-line-soft); color: var(--pz-fg-strong); font-size: var(--pz-t4); line-height: 1.35; text-decoration: none; transition: background-color var(--pz-fast), scale var(--pz-normal) ease-out; }
.pz-month small { font-family: var(--pz-font-mono); font-size: var(--pz-t2); color: var(--pz-fg-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-month > .pz-icon { position: absolute; top: 11px; right: 11px; color: var(--pz-fg-mute); transition: color var(--pz-fast); }
a.pz-month:active { scale: 0.98; }
@media (hover: hover) {
  a.pz-month:hover { background: var(--pz-surface-3); }
  a.pz-month:hover > .pz-icon { color: var(--pz-fg-strong); }
}
.pz-month.is-empty { background: none; color: var(--pz-fg-mute); }
@media (max-width: 520px) { .pz-months { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- rolling numbers ---------- */

.pz-roll { display: inline-flex; align-items: baseline; gap: 0.2em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pz-roll--hero { font-family: var(--pz-font-display); font-weight: 700; font-size: var(--pz-display-lg); line-height: 1; letter-spacing: -0.03em; color: var(--pz-fg-strong); }
.pz-roll__digits { display: inline-flex; align-items: baseline; }
/* one cell is 1.2em tall. the column shows exactly one, and fades its top and bottom edge */
.pz-roll__col { height: 1.2em; overflow: hidden; -webkit-mask-image: linear-gradient(#0000, #000 0.14em, #000 calc(100% - 0.14em), #0000); mask-image: linear-gradient(#0000, #000 0.14em, #000 calc(100% - 0.14em), #0000); }
/* the strip moves in percent of its own height, so a font-size change never starts a transition */
.pz-roll__strip { display: block; transition: transform 700ms var(--pz-ease); will-change: transform; }
.pz-roll__strip > span { display: block; height: 1.2em; line-height: 1.2; text-align: center; }
.pz-roll__sep { overflow: hidden; }
.pz-roll__unit { font-size: 0.4em; font-weight: 500; letter-spacing: 0; color: var(--pz-fg-mute); }
.pz-roll:not(.pz-roll--hero) .pz-roll__unit { font-size: 1em; font-weight: 400; }

/* ---------- charts ---------- */

/* how dim the line is to the right of the crosshair. registered, so it can ease */
@property --sa { syntax: "<number>"; inherits: true; initial-value: 1; }

/* --gutter is the room for the value labels on the right. widen it for a long unit.
   --pz-chart-bg is what the chart sits on; the readout is outlined in it to stay legible. */
.pz-chart { --gutter: 76px; --stroke: 2; --pz-chart-bg: var(--pz-bg); position: relative; margin: 0; transition: --sa 160ms ease-out; }
.pz-metric, .pz-card, .pz-box, .pz-panel, .pz-stat, .pz-well, .pz-year { --pz-chart-bg: var(--pz-surface); }
/* pan-y: a finger on the chart can still scroll the page */
.pz-chart__plot { position: relative; height: 240px; margin-right: var(--gutter); cursor: crosshair; touch-action: pan-y; }
.pz-chart__svg {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 var(--sx, 100%), rgb(0 0 0 / var(--sa)) var(--sx, 100%));
  mask-image: linear-gradient(90deg, #000 var(--sx, 100%), rgb(0 0 0 / var(--sa)) var(--sx, 100%));
}
/* a running chart also fades out at the left, where old points leave */
.pz-chart.is-live .pz-chart__svg {
  -webkit-mask-image: linear-gradient(90deg, #0000, #000 40px), linear-gradient(90deg, #000 var(--sx, 100%), rgb(0 0 0 / var(--sa)) var(--sx, 100%));
  mask-image: linear-gradient(90deg, #0000, #000 40px), linear-gradient(90deg, #000 var(--sx, 100%), rgb(0 0 0 / var(--sa)) var(--sx, 100%));
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.pz-chart__line { fill: none; stroke: var(--c); stroke-width: var(--stroke); stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pz-chart__area { stroke: none; }

/* a value label with its dotted grid line. the row spans the plot and the gutter */
.pz-chart__y { position: absolute; left: 0; right: calc(-1 * var(--gutter)); display: flex; align-items: center; gap: 8px; height: 14px; translate: 0 -50%; font-family: var(--pz-font-mono); font-size: var(--pz-t1); color: var(--pz-fg-mute); white-space: nowrap; font-variant-numeric: tabular-nums; opacity: var(--edge, 1); pointer-events: none; transition: opacity 300ms; }
.pz-chart__y::before { content: ""; flex: none; width: calc(100% - var(--gutter)); height: 1px; background: linear-gradient(90deg, var(--pz-line) 1px, #0000 0) 0 0 / 4px 1px; }
.pz-chart .is-gone { opacity: 0; }

/* the newest value: a dashed level, a dot on the line, and a tag with a tail pointing at it */
.pz-chart__base { position: absolute; left: 0; right: 0; height: 1px; margin-top: -0.5px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 40%, transparent) 4px, #0000 0) 0 0 / 8px 1px; pointer-events: none; }
.pz-chart__tip { position: absolute; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: var(--pz-surface-3); box-shadow: 0 1px 6px #00000066; pointer-events: none; }
.pz-chart__tip::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--c); }
.pz-chart__tip--plain { background: none; box-shadow: none; }
.pz-chart.is-live:not(.is-paused) .pz-chart__tip::after { content: ""; position: absolute; inset: -2.5px; border-radius: 50%; border: 1.5px solid var(--c); opacity: 0; animation: pz-ping 1.5s linear infinite; }
@keyframes pz-ping { 0% { scale: 1; opacity: 0.35; } 60%, 100% { scale: 2.3; opacity: 0; } }
.pz-chart__end { position: absolute; z-index: 1; left: 100%; margin-left: -1px; translate: 0 -50%; display: flex; align-items: center; height: 22px; padding: 0 10px 0 9px; border-radius: 3px 11px 11px 3px; background: var(--c); color: var(--pz-accent-ink); font-family: var(--pz-font-mono); font-size: var(--pz-t1); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; transition: background-color 500ms; }
.pz-chart__end::before { content: ""; position: absolute; left: -4px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; rotate: 45deg; border-radius: 2px; background: inherit; }
.pz-chart.is-up .pz-chart__end { background: var(--pz-ok); color: #000; }
.pz-chart.is-down .pz-chart__end { background: var(--pz-danger); color: #000; }

/* the scrub: a crosshair that follows the pointer, a dot per line, and the readout riding on top */
.pz-chart__cross, .pz-chart__dot, .pz-chart__read { opacity: 0; pointer-events: none; transition: opacity 160ms ease-out; }
.pz-chart.is-hover .pz-chart__cross, .pz-chart.is-hover .pz-chart__dot, .pz-chart.is-hover .pz-chart__read { opacity: var(--near, 1); }
.pz-chart__cross { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid color-mix(in srgb, var(--pz-fg-strong) 12%, transparent); }
.pz-chart__dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--c); }
.pz-chart__read { position: absolute; z-index: 2; top: 6px; left: 0; font-family: var(--pz-font-mono); font-size: var(--pz-t2); line-height: 1.3; color: var(--pz-fg-mute); white-space: nowrap; font-variant-numeric: tabular-nums; -webkit-text-stroke: 3px var(--pz-chart-bg); paint-order: stroke fill; }
.pz-chart__read b { font-weight: 400; color: var(--pz-fg); }
.pz-chart__read i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--c); }
.pz-chart__sep { margin: 0 0.8em; }

/* the time axis: a base line, a tick per label */
.pz-chart__x { position: relative; height: 26px; margin-right: var(--gutter); border-top: 1px solid var(--pz-line-soft); font-family: var(--pz-font-mono); font-size: var(--pz-t1); color: var(--pz-fg-mute); }
.pz-chart__x span { position: absolute; top: 0; padding-top: 9px; translate: -50% 0; white-space: nowrap; opacity: var(--edge, 1); transition: opacity 300ms; }
.pz-chart__x span::before { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 5px; background: var(--pz-line); }
.pz-chart__x span.is-first { translate: 0 0; }
.pz-chart__x span.is-first::before { left: 0; }
.pz-chart__x span.is-last { translate: -100% 0; }
.pz-chart__x span.is-last::before { left: auto; right: 0; }

/* the card-sized chart: no axes, a thinner line */
.pz-chart--mini { --gutter: 0px; --stroke: 1.5; }
.pz-chart--mini .pz-chart__plot { height: 110px; }
/* paused: grey, no pulse, still readable under the pointer */
.pz-chart.is-paused, .pz-chart.is-paused .pz-chart__line, .pz-chart.is-paused .pz-chart__tip, .pz-chart.is-paused .pz-chart__dot { --c: var(--pz-fg-faint) !important; }
.pz-chart.is-paused .pz-chart__area { display: none; }

/* ---------- metric cards ---------- */

.pz-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.pz-metric { display: flex; flex-direction: column; min-width: 0; padding: 14px 14px 12px; border-radius: var(--pz-r-xl); background: var(--pz-surface); box-shadow: var(--pz-shadow-card); }
.pz-metric__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px; }
.pz-metric__title { margin: 0; font-size: var(--pz-t5); font-weight: 600; line-height: 1.4; color: var(--pz-fg-strong); }
.pz-metric__value { font-size: var(--pz-t4); color: var(--pz-fg-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pz-metric.is-paused .pz-metric__value { color: var(--pz-fg-mute); }
.pz-metric__chart { margin: 6px -6px 4px; }
.pz-metric__specs { display: flex; flex-wrap: wrap; gap: 0 12px; margin: 0; padding: 0 2px; font-size: var(--pz-t2); line-height: 1.5; color: var(--pz-fg-mute); font-variant-numeric: tabular-nums; }
.pz-metric__specs div { display: flex; gap: 5px; white-space: nowrap; }
.pz-metric__specs dd { margin: 0; color: var(--pz-fg-dim); }
.pz-metric__foot { margin: 6px 0 0; padding: 6px 2px 0; border-top: 1px solid var(--pz-line-soft); font-size: var(--pz-t2); color: var(--pz-fg-mute); font-variant-numeric: tabular-nums; }
.pz-metric__foot .pz-roll { gap: 0.4em; }
.pz-metric__foot .pz-roll__digits { color: var(--pz-fg-dim); }

/* ---------- skyline frame (put a canvas inside) ---------- */

.pz-skyline { aspect-ratio: 8 / 3; border-radius: var(--pz-r-xl); background: #070707; box-shadow: var(--pz-shadow-card); overflow: clip; }
.pz-skyline canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }

/* ---------- reduced motion, narrow screens ---------- */

@media (prefers-reduced-motion: reduce) {
  .pz-app *, .pz-app *::before, .pz-app *::after, .pz-toast { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@media (max-width: 600px) {
  .pz-grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .pz-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .pz-row { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; }
  .pz-prose { font-size: var(--pz-t5); }
}
