@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,700;1,9..40,400&family=Inter+Tight:wght@700;900&family=IBM+Plex+Mono:wght@400&display=swap");

/*
 * Pulse standards: pulse.css, the shared component layer for every Level Pulse product.
 * Plain CSS on the pulse-* tokens (tokens.css). No framework, no script required.
 * Class prefix: p-. Classes starting ds- are for the design system's own previews only.
 * Modes: light on :root, dark under [data-theme="dark"]; a product adds the
 * prefers-color-scheme block for "Match system" (see the Distribution section).
 */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
:root, [data-theme] { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
:root, [data-theme="light"] { --p-show-on-light: inline-block; --p-show-on-dark: none; }
[data-theme="dark"] { --p-show-on-light: none; --p-show-on-dark: inline-block; }

html { scroll-padding-top: calc(var(--pulse-suitebar-height) + var(--pulse-space-md)); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--pulse-text);
  background: var(--pulse-bg-page);
}
.p-root { font-family: var(--font-sans); color: var(--pulse-text); background: var(--pulse-bg-page); font-size: 1rem; line-height: 1.6; }

h1, h2, h3, h4, .p-h1, .p-h2, .p-h3, .p-h4 { font-family: var(--font-display); color: var(--pulse-text); margin: 0; }
h1, .p-h1 { font-size: 2rem; line-height: 1.2; font-weight: 900; }
h2, .p-h2 { font-size: 1.5rem; line-height: 1.25; font-weight: 700; }
h3, .p-h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 700; }
h4, .p-h4 { font-size: 1rem; line-height: 1.4; font-weight: 700; }
@media (max-width: 639px) { h1, .p-h1 { font-size: 1.75rem; } }
p { margin: 0; }
.p-display { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.75rem, 1rem + 4vw, 4.5rem); line-height: 1.05; letter-spacing: -0.01em; margin: 0; }
.p-lede { font-size: 1.125rem; line-height: 1.6; color: var(--pulse-text-muted); max-width: var(--pulse-prose-max); }
.p-purpose { color: var(--pulse-text-muted); margin-top: var(--pulse-space-sm); max-width: var(--pulse-prose-max); }
.p-eyebrow { font-size: 0.8125rem; line-height: 1.4; font-weight: 700; color: var(--pulse-text-muted); margin: 0 0 var(--pulse-space-sm); }
.p-fine { font-size: 0.875rem; line-height: 1.5; color: var(--pulse-text-muted); }
.p-meta { font-size: 0.8125rem; line-height: 1.4; color: var(--pulse-text-muted); }
.p-num, .num { font-variant-numeric: tabular-nums; }
code, .p-code { font-family: var(--font-mono); font-size: 0.8125rem; background: var(--pulse-surface-2); border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-sm); padding: 0 var(--pulse-space-xs); overflow-wrap: anywhere; }
pre.p-command { font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.5; background: var(--pulse-surface-2); border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-sm); padding: var(--pulse-space-sm) var(--pulse-space-md); overflow-x: auto; margin: 0; }
.p-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- icons: Heroicons v1 outline style, as the brand library inlines them ---------- */
.p-icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.p-icon--16 { width: 16px; height: 16px; } .p-icon--24 { width: 24px; height: 24px; } .p-icon--32 { width: 32px; height: 32px; }

/* ---------- links ---------- */
a, .p-link { color: var(--pulse-link); text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover, .p-link:hover { color: var(--pulse-link-hover); text-decoration-thickness: 2px; }

/* ---------- focus: Level's two-tone ring ---------- */
:focus-visible, .is-focus {
  outline: var(--pulse-focus-width) solid var(--pulse-focus-inner);
  outline-offset: var(--pulse-focus-offset);
  box-shadow: 0 0 0 var(--pulse-focus-halo) var(--pulse-focus-outer);
}
.p-focus-inset:focus-visible, .p-focus-inset.is-focus { outline-offset: calc(-1 * var(--pulse-focus-width) - 2px); box-shadow: inset 0 0 0 var(--pulse-focus-halo) var(--pulse-focus-outer); }
[tabindex="-1"]:focus { outline: none; box-shadow: none; }

/* ---------- logo ---------- */
.p-logo { height: 20px; width: auto; display: block; }
.p-logo--on-light { display: var(--p-show-on-light); }
.p-logo--on-dark { display: var(--p-show-on-dark); }

/* ---------- skip link ---------- */
.p-skip { position: absolute; left: var(--pulse-space-md); top: -100px; z-index: var(--pulse-z-skip); background: var(--pulse-primary); color: var(--pulse-text-on-primary); padding: var(--pulse-space-sm) var(--pulse-space-md); border-radius: var(--pulse-radius-md); font-weight: 700; text-decoration: none; }
.p-skip:focus, .p-skip.is-shown { top: var(--pulse-space-sm); }

/* ---------- layout ---------- */
.p-container { width: 100%; max-width: var(--pulse-container-max); margin: 0 auto; padding: 0 var(--pulse-space-md); }
@media (min-width: 640px) { .p-container { padding: 0 var(--pulse-space-lg); } }
.p-page-head { padding: var(--pulse-space-xl) 0 var(--pulse-space-lg); }
.p-stack > * + * { margin-top: var(--pulse-space-md); }
.p-stack-lg > * + * { margin-top: var(--pulse-space-lg); }
.p-row { display: flex; flex-wrap: wrap; gap: var(--pulse-space-sm); align-items: center; }
.p-between { display: flex; flex-wrap: wrap; gap: var(--pulse-space-md); align-items: center; justify-content: space-between; }
.p-grid { display: grid; gap: var(--pulse-space-lg); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.p-footer { border-top: 1px solid var(--pulse-border-subtle); margin-top: var(--pulse-space-2xl); padding: var(--pulse-space-lg) 0; font-size: 0.875rem; color: var(--pulse-text-muted); }

/* ---------- suite bar (the shell contract) ---------- */
.p-suitebar { position: sticky; top: 0; z-index: var(--pulse-z-suitebar); background: var(--pulse-surface-1); border-bottom: 1px solid var(--pulse-border-subtle); }
.p-suitebar__inner { display: flex; align-items: center; gap: var(--pulse-space-sm) var(--pulse-space-md); min-height: var(--pulse-suitebar-height); padding: var(--pulse-space-xs) var(--pulse-space-md); flex-wrap: wrap; }
.p-suitebar__home { display: inline-flex; align-items: center; padding: var(--pulse-space-xs); margin-left: calc(-1 * var(--pulse-space-xs)); border-radius: var(--pulse-radius-sm); text-decoration: none; min-height: var(--pulse-target-min); }
.p-suitebar__product { font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.2; color: var(--pulse-text); text-decoration: none; padding: var(--pulse-space-xs); border-radius: var(--pulse-radius-sm); white-space: nowrap; }
.p-suitebar__product:hover { color: var(--pulse-text); text-decoration: underline; }
.p-suitebar__sep { width: 1px; align-self: stretch; margin: var(--pulse-space-sm) 0; background: var(--pulse-border-subtle); }
.p-suitebar__end { margin-left: auto; display: flex; align-items: center; gap: var(--pulse-space-xs); }
.p-suitebar__link { color: var(--pulse-text); font-weight: 700; font-size: 0.875rem; text-decoration: none; padding: var(--pulse-space-xs) var(--pulse-space-sm); border-radius: var(--pulse-radius-md); min-height: var(--pulse-target-min); display: inline-flex; align-items: center; }
.p-suitebar__link:hover { background: var(--pulse-surface-2); color: var(--pulse-text); }
@media (max-width: 639px) {
  .p-suitebar__inner { padding: var(--pulse-space-xs) var(--pulse-space-sm); gap: var(--pulse-space-xs) var(--pulse-space-sm); }
  .p-suitebar__client { order: 10; flex-basis: 100%; }
  .p-hide-phone { display: none; }
}

/* ---------- menus: details/summary first, script adds Esc and outside-click ---------- */
.p-menu { position: relative; }
.p-menu > summary { list-style: none; cursor: pointer; }
.p-menu > summary::-webkit-details-marker { display: none; }
.p-menu__btn { display: inline-flex; align-items: center; gap: var(--pulse-space-sm); min-height: 36px; padding: var(--pulse-space-xs) var(--pulse-space-sm); border: 1px solid transparent; border-radius: var(--pulse-radius-md); background: transparent; color: var(--pulse-text); font: inherit; font-size: 0.875rem; font-weight: 700; cursor: pointer; }
.p-menu__btn:hover, .p-menu[open] > .p-menu__btn { background: var(--pulse-surface-2); border-color: var(--pulse-border-subtle); }
.p-menu__btn--client { border-color: var(--pulse-border-control); background: var(--pulse-surface-1); font-weight: 400; max-width: 100%; }
.p-menu__btn--client:hover { border-color: var(--pulse-border-strong); }
.p-chev { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; flex: none; }
.p-menu[open] .p-chev { transform: rotate(180deg); }
.p-menu__panel { position: absolute; right: 0; top: calc(100% + var(--pulse-space-xs)); z-index: var(--pulse-z-menu); min-width: 18rem; max-width: min(24rem, calc(100vw - 2 * var(--pulse-space-sm))); background: var(--pulse-surface-3); border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-md); box-shadow: var(--pulse-elevation-2); padding: var(--pulse-space-sm); }
.p-menu__panel--left { left: 0; right: auto; }
.p-menu__panel.is-static { position: static; box-shadow: var(--pulse-elevation-2); min-width: 0; max-width: min(24rem, 100%); }
.p-menu__group + .p-menu__group { border-top: 1px solid var(--pulse-border-subtle); margin-top: var(--pulse-space-sm); padding-top: var(--pulse-space-sm); }
.p-menu__label { font-size: 0.8125rem; font-weight: 700; color: var(--pulse-text-muted); padding: var(--pulse-space-xs) var(--pulse-space-sm); }
.p-menu__item { display: flex; align-items: center; gap: var(--pulse-space-sm); width: 100%; min-height: 36px; padding: var(--pulse-space-xs) var(--pulse-space-sm); border-radius: var(--pulse-radius-sm); color: var(--pulse-text); text-decoration: none; font-size: 0.875rem; background: none; border: 0; font-family: inherit; text-align: left; cursor: pointer; }
.p-menu__item:hover { background: var(--pulse-surface-2); color: var(--pulse-text); }
.p-menu__item[aria-current] { background: var(--pulse-surface-selected); font-weight: 700; }
.p-menu__item .p-badge { margin-left: auto; }
.p-menu__item-main { display: flex; flex-direction: column; min-width: 0; }
.p-menu__item-sub { font-size: 0.8125rem; color: var(--pulse-text-muted); font-weight: 400; }
.p-menu__item[aria-disabled="true"] { cursor: default; }
.p-menu__item[aria-disabled="true"]:hover { background: none; }
.p-menu__who { padding: var(--pulse-space-sm); background: var(--pulse-surface-gray); border-radius: var(--pulse-radius-sm); margin-bottom: var(--pulse-space-sm); }
.p-menu__who strong { display: block; font-size: 0.875rem; }
.p-menu__who span { font-size: 0.8125rem; color: var(--pulse-text-muted); overflow-wrap: anywhere; }
[data-theme="dark"] .p-menu__who span { color: var(--pulse-text-muted); }

/* the "you are here" marker: accent fill + dark outline (passes 3:1 on white through the outline) */
.p-here { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--pulse-signal-here); box-shadow: 0 0 0 1px var(--pulse-marker-outline); flex: none; }
.p-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1px var(--pulse-marker-outline); flex: none; }
.p-dot--on { background: var(--pulse-signal-on); }
.p-dot--attention { background: var(--pulse-signal-attention); }
.p-dot--sample { background: var(--pulse-signal-sample); }
.p-dot--here { background: var(--pulse-signal-here); }

/* client picker (combobox) */
.p-picker { width: 22rem; max-width: 100%; }
.p-picker__search { margin-bottom: var(--pulse-space-sm); }
.p-picker__list { list-style: none; margin: 0; padding: 0; max-height: 20rem; overflow-y: auto; }
.p-picker__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--pulse-space-sm); align-items: center; }
.p-picker__code { font-size: 0.8125rem; color: var(--pulse-text-muted); font-variant-numeric: tabular-nums; }
.p-picker__opt[aria-selected="true"], .p-picker__opt.is-active { background: var(--pulse-surface-selected); }
.p-pin { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: var(--pulse-radius-sm); border: 0; background: none; color: var(--pulse-text-muted); cursor: pointer; font-size: 0.875rem; }
.p-pin:hover { background: var(--pulse-surface-2); color: var(--pulse-text); }

/* segmented choice (theme: Light / Dark / Match system) */
.p-segmented { display: inline-flex; border: 1px solid var(--pulse-border-control); border-radius: var(--pulse-radius-md); padding: 2px; gap: 2px; }
.p-segmented label { position: relative; }
.p-segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.p-segmented span { display: inline-flex; align-items: center; min-height: 28px; padding: 0 var(--pulse-space-sm); border-radius: var(--pulse-radius-sm); font-size: 0.8125rem; font-weight: 700; }
.p-segmented input:checked + span { background: var(--pulse-primary); color: var(--pulse-text-on-primary); }
.p-segmented input:focus-visible + span { outline: var(--pulse-focus-width) solid var(--pulse-focus-inner); outline-offset: 2px; box-shadow: 0 0 0 var(--pulse-focus-halo) var(--pulse-focus-outer); }

/* ---------- navigation ---------- */
.p-nav { border-bottom: 1px solid var(--pulse-border-subtle); background: var(--pulse-surface-1); }
.p-nav ul { list-style: none; margin: 0; padding: 0 var(--pulse-space-md); display: flex; flex-wrap: wrap; gap: 0 var(--pulse-space-xs); }
.p-nav a, .p-tabs a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--pulse-space-sm); color: var(--pulse-text); font-size: 0.875rem; font-weight: 400; text-decoration: none; border-radius: var(--pulse-radius-sm); }
.p-nav a:hover, .p-tabs a:hover { background: var(--pulse-surface-2); color: var(--pulse-text); }
.p-nav a[aria-current], .p-tabs a[aria-current] { font-weight: 700; }
.p-nav a[aria-current]::after, .p-tabs a[aria-current]::after { content: ""; position: absolute; left: var(--pulse-space-sm); right: var(--pulse-space-sm); bottom: 0; height: 4px; border-radius: 2px 2px 0 0; background: var(--pulse-signal-here); box-shadow: 0 0 0 1px var(--pulse-marker-outline); }
.p-tabs { border-bottom: 1px solid var(--pulse-border-subtle); margin-bottom: var(--pulse-space-lg); }
.p-tabs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--pulse-space-xs); }

.p-breadcrumbs ol { list-style: none; margin: 0 0 var(--pulse-space-sm); padding: 0; display: flex; flex-wrap: wrap; gap: var(--pulse-space-xs); font-size: 0.875rem; }
.p-breadcrumbs li + li::before { content: "/"; color: var(--pulse-text-muted); margin-right: var(--pulse-space-xs); }
.p-breadcrumbs [aria-current] { color: var(--pulse-text-muted); }

.p-sidenav { font-size: 0.875rem; }
.p-sidenav h2 { font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 700; color: var(--pulse-text-muted); margin: var(--pulse-space-md) var(--pulse-space-sm) var(--pulse-space-xs); }
.p-sidenav ul { list-style: none; margin: 0; padding: 0; }
.p-sidenav a { display: flex; align-items: center; gap: var(--pulse-space-sm); min-height: 36px; padding: 0 var(--pulse-space-sm); border-radius: var(--pulse-radius-sm); color: var(--pulse-text); text-decoration: none; }
.p-sidenav a:hover { background: var(--pulse-surface-2); }
.p-sidenav a[aria-current] { background: var(--pulse-surface-selected); font-weight: 700; }
.p-sidenav a .p-count { margin-left: auto; font-size: 0.8125rem; color: var(--pulse-text-muted); font-variant-numeric: tabular-nums; font-weight: 400; }

/* ---------- buttons ---------- */
.p-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--pulse-space-sm); min-height: var(--pulse-control-height); padding: var(--pulse-space-sm) var(--pulse-space-md); font-family: var(--font-display); font-weight: 700; font-size: 0.875rem; line-height: 1.4; border-radius: var(--pulse-radius-md); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background-color var(--pulse-duration-fast) var(--pulse-ease-standard), border-color var(--pulse-duration-fast) var(--pulse-ease-standard); }
.p-btn--primary { background: var(--pulse-primary); color: var(--pulse-text-on-primary); border-color: var(--pulse-primary); }
.p-btn--primary:hover, .p-btn--primary.is-hover { background: var(--pulse-primary-hover); border-color: var(--pulse-primary-hover); color: var(--pulse-text-on-primary); }
.p-btn--secondary { background: var(--pulse-surface-1); color: var(--pulse-text); border-color: var(--pulse-border-strong); }
.p-btn--secondary:hover, .p-btn--secondary.is-hover { background: var(--pulse-surface-gray); color: var(--pulse-text); }
.p-btn--quiet { background: transparent; color: var(--pulse-text); text-decoration: underline; text-underline-offset: 0.15em; padding-left: var(--pulse-space-sm); padding-right: var(--pulse-space-sm); }
.p-btn--quiet:hover, .p-btn--quiet.is-hover { background: var(--pulse-surface-2); color: var(--pulse-text); }
.p-btn:active, .p-btn.is-active { transform: translateY(1px); }
.p-btn--sm { min-height: var(--pulse-control-height-sm); padding: var(--pulse-space-xs) var(--pulse-space-sm); }
.p-btn--lg { min-height: 48px; padding: var(--pulse-space-sm) var(--pulse-space-lg); font-size: 1rem; }
.p-btn--block { width: 100%; }
.p-btn--icon { min-height: var(--pulse-target-min); min-width: var(--pulse-target-min); padding: var(--pulse-space-xs); font-family: var(--font-sans); }
.p-btn[disabled], .p-btn[aria-disabled="true"] { background: var(--pulse-surface-2); color: var(--pulse-text-disabled); border-color: var(--pulse-border-subtle); cursor: not-allowed; transform: none; }
.p-btn[aria-busy="true"] { cursor: progress; }
.p-btn:active { transition: none; }

/* small busy ring (CSS only): the button's text says what is happening */
.p-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: p-spin 0.8s linear infinite; flex: none; }
@keyframes p-spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.p-field { display: flex; flex-direction: column; gap: var(--pulse-space-xs); margin-bottom: var(--pulse-space-md); min-width: 0; }
.p-label { font-weight: 700; font-size: 0.875rem; line-height: 1.4; color: var(--pulse-text); }
.p-label .p-optional { font-weight: 400; color: var(--pulse-text-muted); }
.p-hint { font-size: 0.875rem; line-height: 1.5; color: var(--pulse-text-muted); }
.p-input, .p-select, .p-textarea { width: 100%; min-height: var(--pulse-control-height); padding: var(--pulse-space-sm) 12px; font: inherit; font-size: 1rem; line-height: 1.4; color: var(--pulse-text); background: var(--pulse-surface-1); border: 1px solid var(--pulse-border-control); border-radius: var(--pulse-radius-md); }
.p-input::placeholder, .p-textarea::placeholder { color: var(--pulse-text-muted); opacity: 1; }
.p-input:hover, .p-select:hover, .p-textarea:hover, .p-input.is-hover { border-color: var(--pulse-border-strong); }
.p-textarea { min-height: 6rem; resize: vertical; }
.p-select { appearance: none; padding-right: 2.25rem; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.p-input[disabled], .p-select[disabled], .p-textarea[disabled] { background: var(--pulse-surface-2); color: var(--pulse-text-disabled); border-color: var(--pulse-border-subtle); cursor: not-allowed; }
.p-input[readonly] { background: var(--pulse-surface-2); }
.p-field--error .p-input, .p-field--error .p-select, .p-field--error .p-textarea, .p-input[aria-invalid="true"] { border: 2px solid var(--pulse-error); }
.p-error-msg { display: flex; gap: var(--pulse-space-xs); align-items: baseline; color: var(--pulse-error); font-weight: 700; font-size: 0.875rem; }
.p-error-msg::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; border-radius: 50%; background: var(--pulse-error); color: var(--pulse-surface-1); font-size: 0.75rem; line-height: 1; font-weight: 700; transform: translateY(2px); }
.p-form-row { display: flex; flex-wrap: wrap; gap: 0 var(--pulse-space-md); align-items: flex-end; }
.p-form-row > .p-field { flex: 1 1 14rem; }
.p-form-row > .p-btn { margin-bottom: var(--pulse-space-md); }
.p-choice { display: flex; gap: var(--pulse-space-sm); align-items: flex-start; padding: var(--pulse-space-xs) 0; }
.p-choice input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--pulse-primary); flex: none; }
.p-choice__text { display: flex; flex-direction: column; }
.p-choice__text strong { font-size: 0.875rem; }
.p-choice__text span { font-size: 0.875rem; color: var(--pulse-text-muted); }
fieldset.p-fieldset { border: 0; padding: 0; margin: 0 0 var(--pulse-space-md); min-width: 0; }
fieldset.p-fieldset legend { font-weight: 700; font-size: 0.875rem; padding: 0; margin-bottom: var(--pulse-space-xs); }
.p-switch { display: inline-flex; align-items: center; gap: var(--pulse-space-sm); font-size: 0.875rem; font-weight: 700; }
.p-switch input { appearance: none; width: 40px; height: 24px; border-radius: 12px; border: 1px solid var(--pulse-border-control); background: var(--pulse-surface-2); position: relative; margin: 0; cursor: pointer; }
.p-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--pulse-text-muted); transition: left var(--pulse-duration-fast) var(--pulse-ease-standard); }
.p-switch input:checked { background: var(--pulse-primary); border-color: var(--pulse-primary); }
.p-switch input:checked::after { left: 19px; background: var(--pulse-signal-on); }

.p-error-summary { border: 2px solid var(--pulse-error); border-radius: var(--pulse-radius-md); padding: var(--pulse-space-md); margin-bottom: var(--pulse-space-lg); background: var(--pulse-surface-1); }
.p-error-summary h2 { font-size: 1.125rem; color: var(--pulse-text); margin-bottom: var(--pulse-space-sm); }
.p-error-summary ul { margin: 0; padding-left: 1.25rem; }
.p-error-summary a { color: var(--pulse-error); font-weight: 700; }

/* ---------- filters ---------- */
.p-filterbar { display: flex; flex-wrap: wrap; gap: var(--pulse-space-sm) var(--pulse-space-md); align-items: flex-end; padding: var(--pulse-space-md); background: var(--pulse-surface-2); border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-md); }
.p-filterbar .p-field { margin-bottom: 0; flex: 1 1 10rem; }
.p-chips { display: flex; flex-wrap: wrap; gap: var(--pulse-space-xs); align-items: center; }
.p-chip { display: inline-flex; align-items: center; gap: var(--pulse-space-xs); min-height: 28px; padding: 0 var(--pulse-space-xs) 0 var(--pulse-space-sm); border: 1px solid var(--pulse-border-control); border-radius: var(--pulse-radius-md); background: var(--pulse-surface-1); font-size: 0.8125rem; }
.p-chip strong { font-weight: 700; }
.p-chip a, .p-chip button { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; color: var(--pulse-text); text-decoration: none; border-radius: var(--pulse-radius-sm); border: 0; background: none; cursor: pointer; font: inherit; }
.p-chip a:hover, .p-chip button:hover { background: var(--pulse-surface-2); }
.p-stateline { font-size: 0.875rem; line-height: 1.5; color: var(--pulse-text-muted); max-width: 60rem; }
.p-stateline strong { color: var(--pulse-text); font-weight: 700; }

/* ---------- tables ---------- */
.p-table-wrap { overflow-x: auto; border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-md); background: var(--pulse-surface-1); max-width: 100%; }
.p-table-wrap:focus-visible { outline-offset: 2px; }
.p-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.875rem; line-height: 1.4; }
.p-table caption { text-align: left; padding: var(--pulse-space-sm) 12px; font-size: 0.875rem; color: var(--pulse-text-muted); caption-side: top; }
.p-table th, .p-table td { padding: 0 12px; height: var(--pulse-row-analyst); border-bottom: 1px solid var(--pulse-border-subtle); text-align: left; vertical-align: middle; white-space: nowrap; }
.p-table--exec th, .p-table--exec td { height: var(--pulse-row-exec); }
.p-table thead th { position: sticky; top: 0; z-index: 1; background: var(--pulse-surface-2); font-weight: 700; color: var(--pulse-text); }
.p-table th.num, .p-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.p-table tbody tr:hover td, .p-table tbody tr:hover th, .p-table tbody tr.is-hover td, .p-table tbody tr.is-hover th { background: var(--pulse-surface-2); }
.p-table tbody tr[aria-selected="true"] td, .p-table tbody tr[aria-selected="true"] th { background: var(--pulse-surface-selected); }
.p-table tbody th { font-weight: 700; }
.p-table tfoot td, .p-table tfoot th { font-weight: 700; border-top: 2px solid var(--pulse-border-strong); border-bottom: 0; background: var(--pulse-surface-1); }
.p-table--freeze tbody th, .p-table--freeze thead th:first-child, .p-table--freeze tfoot th { position: sticky; left: 0; z-index: 2; background: var(--pulse-surface-1); box-shadow: 1px 0 0 var(--pulse-border-subtle); }
.p-table--freeze thead th:first-child { z-index: 3; background: var(--pulse-surface-2); }
.p-table .p-wrap { white-space: normal; overflow-wrap: anywhere; min-width: 12rem; }
.p-sort { display: inline-flex; gap: var(--pulse-space-xs); align-items: center; color: inherit; text-decoration: none; }
.p-sort::after { content: "\2195"; font-size: 0.75rem; color: var(--pulse-text-muted); }
th[aria-sort="descending"] .p-sort::after { content: "\2193"; color: var(--pulse-text); }
th[aria-sort="ascending"] .p-sort::after { content: "\2191"; color: var(--pulse-text); }
.p-heat-1 { background: var(--pulse-heat-1); } .p-heat-2 { background: var(--pulse-heat-2); } .p-heat-3 { background: var(--pulse-heat-3); } .p-heat-4 { background: var(--pulse-heat-4); } .p-heat-5 { background: var(--pulse-heat-5); }
.p-cellbar { display: inline-block; height: 8px; background: var(--pulse-data-primary); border-radius: 1px; vertical-align: middle; margin-right: var(--pulse-space-sm); }

/* ---------- pagination ---------- */
.p-pagination { display: flex; flex-wrap: wrap; gap: var(--pulse-space-sm) var(--pulse-space-md); align-items: center; justify-content: space-between; margin-top: var(--pulse-space-md); font-size: 0.875rem; }
.p-pagination__links { display: flex; gap: var(--pulse-space-sm); }
.p-pagination__links a, .p-pagination__links span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--pulse-border-control); border-radius: var(--pulse-radius-md); color: var(--pulse-text); text-decoration: none; font-weight: 700; }
.p-pagination__links a:hover { background: var(--pulse-surface-2); }
.p-pagination__links span { color: var(--pulse-text-disabled); border-color: var(--pulse-border-subtle); font-weight: 400; }

/* ---------- cards, stats, facts ---------- */
.p-card { background: var(--pulse-surface-1); border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-lg); box-shadow: var(--pulse-elevation-1); padding: var(--pulse-space-lg); min-width: 0; }
.p-card__head { display: flex; flex-wrap: wrap; gap: var(--pulse-space-sm); align-items: baseline; justify-content: space-between; margin-bottom: var(--pulse-space-md); }
.p-card__title { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.3; font-weight: 700; margin: 0; }
.p-stats { display: grid; gap: var(--pulse-space-md); grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.p-stat { background: var(--pulse-surface-1); border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-lg); padding: var(--pulse-space-md); }
.p-stat__value { font-family: var(--font-display); font-weight: 900; font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; display: block; }
.p-stat__label { font-weight: 700; font-size: 0.875rem; }
.p-stat__context { font-size: 0.8125rem; color: var(--pulse-text-muted); margin-top: var(--pulse-space-xs); display: flex; gap: var(--pulse-space-xs); align-items: center; flex-wrap: wrap; }
.p-facts { display: grid; grid-template-columns: 1fr; gap: var(--pulse-space-xs) var(--pulse-space-lg); margin: 0; }
.p-facts div { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: var(--pulse-space-md); padding: var(--pulse-space-sm) 0; border-bottom: 1px solid var(--pulse-border-subtle); }
.p-facts dt { font-weight: 700; font-size: 0.875rem; }
.p-facts dd { margin: 0; font-size: 0.875rem; overflow-wrap: anywhere; }
@media (max-width: 639px) { .p-facts div { grid-template-columns: 1fr; gap: 0; } }

/* KPI tile */
.p-kpis { display: grid; gap: var(--pulse-space-md); grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.p-kpi { background: var(--pulse-surface-1); border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-lg); padding: var(--pulse-space-md); display: flex; flex-direction: column; gap: var(--pulse-space-xs); min-width: 0; }
.p-kpi__label { display: flex; gap: var(--pulse-space-xs); align-items: center; font-weight: 700; font-size: 0.875rem; }
.p-kpi__def { margin-left: auto; }
.p-kpi__def > summary { list-style: none; cursor: pointer; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--pulse-border-control); border-radius: 50%; font-size: 0.75rem; font-weight: 700; color: var(--pulse-text); }
.p-kpi__def > summary::-webkit-details-marker { display: none; }
.p-kpi__def p { font-size: 0.8125rem; font-weight: 400; color: var(--pulse-text); background: var(--pulse-surface-3); border: 1px solid var(--pulse-border-subtle); box-shadow: var(--pulse-elevation-2); padding: var(--pulse-space-sm); border-radius: var(--pulse-radius-md); margin-top: var(--pulse-space-xs); }
.p-kpi__value { font-family: var(--font-display); font-weight: 900; font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.p-kpi__delta { display: flex; flex-wrap: wrap; gap: var(--pulse-space-xs) var(--pulse-space-sm); align-items: center; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.p-kpi__foot { font-size: 0.8125rem; color: var(--pulse-text-muted); display: flex; gap: var(--pulse-space-xs); align-items: center; flex-wrap: wrap; }
.p-kpi__spark { width: 100%; height: 32px; display: block; }
.p-kpi--empty .p-kpi__value, .p-kpi--error .p-kpi__value { font-size: 1rem; font-family: var(--font-sans); font-weight: 700; }
/* polarity verdict: a small status chip; the arrow, sign and words carry the meaning */
.p-verdict { display: inline-flex; align-items: center; gap: var(--pulse-space-xs); padding: 0 var(--pulse-space-sm); min-height: 22px; border-radius: var(--pulse-radius-sm); font-size: 0.8125rem; font-weight: 700; border: 1px solid; }
.p-verdict--good { color: var(--pulse-success); background: var(--pulse-success-bg); border-color: var(--pulse-success-border); }
.p-verdict--bad { color: var(--pulse-error); background: var(--pulse-error-bg); border-color: var(--pulse-error-border); }
.p-verdict--neutral { color: var(--pulse-text); background: var(--pulse-surface-2); border-color: var(--pulse-border-subtle); }
/* pacing bullet */
.p-bullet { position: relative; height: 12px; background: var(--pulse-surface-2); border: 1px solid var(--pulse-border-control); border-radius: 2px; margin: var(--pulse-space-xs) 0; }
.p-bullet__fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--pulse-data-primary); }
.p-bullet__goal { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--pulse-data-goal); }

/* ---------- notices ---------- */
.p-notice { display: grid; grid-template-columns: auto 1fr; gap: var(--pulse-space-xs) 12px; padding: 12px var(--pulse-space-md); border: 1px solid; border-radius: var(--pulse-radius-md); font-size: 0.875rem; line-height: 1.5; color: var(--pulse-text); margin-bottom: var(--pulse-space-md); }
.p-notice__icon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.75rem; line-height: 1; color: var(--pulse-surface-1); margin-top: 1px; }
.p-notice__title { font-weight: 700; }
.p-notice__body { min-width: 0; }
.p-notice__actions { margin-top: var(--pulse-space-xs); display: flex; flex-wrap: wrap; gap: var(--pulse-space-md); }
.p-notice--success { background: var(--pulse-success-bg); border-color: var(--pulse-success-border); }
.p-notice--success .p-notice__icon { background: var(--pulse-success); }
.p-notice--success .p-notice__title { color: var(--pulse-success); }
.p-notice--error { background: var(--pulse-error-bg); border-color: var(--pulse-error-border); }
.p-notice--error .p-notice__icon { background: var(--pulse-error); }
.p-notice--error .p-notice__title { color: var(--pulse-error); }
.p-notice--warning { background: var(--pulse-warning-bg); border-color: var(--pulse-warning-border); }
.p-notice--warning .p-notice__icon { background: var(--pulse-warning); }
.p-notice--warning .p-notice__title { color: var(--pulse-warning); }
.p-notice--info { background: var(--pulse-info-bg); border-color: var(--pulse-info-border); }
.p-notice--info .p-notice__icon { background: var(--pulse-info); }
.p-notice--info .p-notice__title { color: var(--pulse-info); }

/* ---------- badges and pills ---------- */
.p-badge { display: inline-flex; align-items: center; gap: var(--pulse-space-xs); padding: 1px var(--pulse-space-sm); border-radius: var(--pulse-radius-pill); font-size: 0.8125rem; line-height: 1.4; font-weight: 700; white-space: nowrap; border: 1px solid transparent; color: var(--pulse-text); background: var(--pulse-surface-gray); }
[data-theme="dark"] .p-badge:not([class*="p-badge--"]) { background: var(--pulse-surface-3); border-color: var(--pulse-border-control); }
.p-badge--here { background: var(--pulse-signal-here); color: var(--pulse-text-on-accent); border-color: transparent; }
.p-badge--on { background: var(--pulse-signal-on); color: var(--pulse-text-on-accent); border-color: transparent; }
.p-badge--attention { background: var(--pulse-signal-attention); color: var(--pulse-text-on-accent); border-color: transparent; }
.p-badge--sample { background: var(--pulse-signal-sample); color: var(--pulse-text-on-accent); border-color: transparent; }
.p-badge--success { background: var(--pulse-success-bg); color: var(--pulse-success); border-color: var(--pulse-success-border); }
.p-badge--error { background: var(--pulse-error-bg); color: var(--pulse-error); border-color: var(--pulse-error-border); }
.p-badge--warning { background: var(--pulse-warning-bg); color: var(--pulse-warning); border-color: var(--pulse-warning-border); }
.p-badge--info { background: var(--pulse-info-bg); color: var(--pulse-info); border-color: var(--pulse-info-border); }

/* ---------- empty states ---------- */
.p-empty { border: 1px dashed var(--pulse-border-control); border-radius: var(--pulse-radius-lg); padding: var(--pulse-space-xl) var(--pulse-space-lg); background: var(--pulse-surface-1); max-width: 100%; }
.p-empty__title { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.3; margin: 0 0 var(--pulse-space-sm); }
.p-empty__teach { color: var(--pulse-text-muted); max-width: 40rem; margin-bottom: var(--pulse-space-md); }
.p-empty--inline { border: 0; padding: var(--pulse-space-md) 0; background: none; }

/* ---------- loading: Pulse ring + skeleton ---------- */
.p-ring { display: inline-block; width: 64px; height: 64px; }
.p-ring--lg { width: 96px; height: 96px; }
.p-ring--sm { width: 32px; height: 32px; }
.p-ring .disc { fill: #000000; }
.p-ring .glow { fill: none; stroke: var(--level-blue); stroke-width: 6; opacity: 0.1; }
.p-ring .ring { fill: none; stroke: var(--level-blue); stroke-width: 2.25; opacity: 0.8; }
.p-ring .wave { fill: none; stroke: #ffffff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100 100; stroke-dashoffset: 100; animation: p-trace var(--pulse-duration-ring) ease-in-out infinite; }
.p-ring .ring, .p-ring .glow { animation: p-breathe var(--pulse-duration-ring) ease-in-out infinite; }
@keyframes p-trace { 0% { stroke-dashoffset: 100; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -100; } }
@keyframes p-breathe { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.85; } }
.p-loading { display: flex; flex-direction: column; align-items: center; gap: var(--pulse-space-md); padding: var(--pulse-space-2xl) var(--pulse-space-md); text-align: center; color: var(--pulse-text-muted); font-size: 0.875rem; }
.p-skel { display: block; background: var(--pulse-surface-2); border-radius: var(--pulse-radius-sm); position: relative; overflow: hidden; min-height: 12px; }
.p-skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--pulse-surface-1), transparent); transform: translateX(-100%); animation: p-shimmer 1.4s var(--pulse-ease-standard) infinite; opacity: 0.7; }
@keyframes p-shimmer { to { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; animation-iteration-count: 1 !important; }
  .p-ring .wave { animation: none; stroke-dashoffset: 0; }
  .p-ring .ring, .p-ring .glow { animation: none; }
  .p-skel::after { display: none; }
  .p-spin { animation: none; border-right-color: currentColor; opacity: 0.6; }
}

/* ---------- product card (portal) ---------- */
.p-products { display: grid; gap: var(--pulse-space-md); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.p-product { position: relative; display: flex; flex-direction: column; gap: var(--pulse-space-sm); padding: var(--pulse-space-lg); border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-lg); background: var(--pulse-surface-1); color: var(--pulse-text); text-decoration: none; min-height: 10rem; }
a.p-product:hover, a.p-product.is-hover { border-color: var(--pulse-border-strong); background: var(--pulse-surface-1); color: var(--pulse-text); }
a.p-product[aria-current] { border-color: var(--pulse-border-strong); }
/* the Level lift: one element per portal page (deck guidelines' solid offset shadow, at UI scale) */
.p-lift { box-shadow: var(--pulse-lift); border-color: var(--pulse-border-strong); }
[data-theme="dark"] .p-lift { border: 2px solid var(--pulse-text); }
a.p-product.p-lift[aria-current] { padding: var(--pulse-space-lg); }
[data-theme="dark"] a.p-product.p-lift[aria-current] { padding: calc(var(--pulse-space-lg) - 1px); }
.p-product__name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.3; display: flex; align-items: center; gap: var(--pulse-space-sm); }
.p-product__desc { font-size: 0.875rem; line-height: 1.5; color: var(--pulse-text-muted); }
.p-product__open { margin-top: auto; font-family: var(--font-display); font-weight: 700; font-size: 0.875rem; display: inline-flex; gap: var(--pulse-space-xs); align-items: center; }
a.p-product .p-product__open::after { content: "\2192"; transition: transform var(--pulse-duration-fast) var(--pulse-ease-standard); }
a.p-product:hover .p-product__open::after { transform: translateX(3px); }
div.p-product { background: var(--pulse-surface-2); border-style: dashed; border-color: var(--pulse-border-control); }

.p-band { background: var(--pulse-surface-gray); }
/* flat panel: Level gray fill, no border (the deck guidelines' borderless panel, in the UI's brand gray) */
.p-panel { background: var(--pulse-surface-gray); border-radius: var(--pulse-radius-lg); padding: var(--pulse-space-lg); color: var(--pulse-text); }
.p-panel .p-input, .p-panel .p-select { background: var(--pulse-surface-1); }
.p-panel__title { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.3; margin: 0 0 var(--pulse-space-sm); }
.p-band--rule { border-bottom: 1px solid var(--pulse-border-subtle); }

/* client cards and list (portal) */
.p-clients { display: grid; gap: var(--pulse-space-md); grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.p-client-card { display: flex; flex-direction: column; gap: var(--pulse-space-xs); padding: var(--pulse-space-md) var(--pulse-space-lg); border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-lg); background: var(--pulse-surface-1); color: var(--pulse-text); text-decoration: none; }
.p-client-card:hover { border-color: var(--pulse-border-strong); color: var(--pulse-text); }
.p-client-card__name { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.3; }
.p-client-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-md); background: var(--pulse-surface-1); }
.p-client-list li + li { border-top: 1px solid var(--pulse-border-subtle); }
.p-client-list > li > a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--pulse-space-md); align-items: center; padding: 12px var(--pulse-space-md); color: var(--pulse-text); text-decoration: none; min-height: 56px; }
.p-client-list > li > a:hover { background: var(--pulse-surface-2); }
.p-client-list .p-meta { grid-column: 1; }
/* one client list for every product: a row is not a link; each product it has is its own link */
.p-client-card.p-lift { border-color: var(--pulse-border-strong); }
.p-client-card__name { display: flex; align-items: center; gap: var(--pulse-space-sm); }
.p-client-card .p-plinks { justify-content: flex-start; margin-top: var(--pulse-space-xs); }
.p-client-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--pulse-space-md); align-items: center; padding: 12px var(--pulse-space-md); min-height: 56px; }
.p-client-row__name { min-width: 0; }
.p-client-row > .p-meta { grid-column: 1; grid-row: 2; }
.p-client-row > .p-plinks { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 40rem) { .p-client-row > .p-plinks { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start; } }
.p-plinks { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.p-plink { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px; border: 1px solid var(--pulse-border-control); border-radius: var(--pulse-radius-md); background: var(--pulse-surface-1); color: var(--pulse-text); font-family: var(--font-display); font-weight: 700; font-size: 0.8125rem; text-decoration: none; white-space: nowrap; }
.p-plink:hover { border-color: var(--pulse-border-strong); background: var(--pulse-surface-2); color: var(--pulse-text); }

/* ---------- Ask Canvas ---------- */
.p-ask-launcher { position: fixed; right: var(--pulse-space-lg); bottom: var(--pulse-space-lg); z-index: var(--pulse-z-panel); display: inline-flex; align-items: center; gap: var(--pulse-space-sm); min-height: 44px; padding: var(--pulse-space-sm) var(--pulse-space-md) var(--pulse-space-sm) var(--pulse-space-sm); border-radius: var(--pulse-radius-pill); background: var(--pulse-primary); color: var(--pulse-text-on-primary); border: 1px solid var(--pulse-primary); font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; cursor: pointer; box-shadow: var(--pulse-elevation-3); }
.p-ask-launcher:hover { background: var(--pulse-primary-hover); }
.p-ask-launcher.is-static { position: static; }
.p-ask-launcher__mark { width: 28px; height: 28px; }
/* icon-only launcher (phone width, and wherever the label would cover content); the name moves to aria-label */
.p-ask-launcher--icon { padding: var(--pulse-space-sm); min-width: 44px; justify-content: center; }
@media (max-width: 40rem) { .p-ask-launcher:not(.is-static) { padding: var(--pulse-space-sm); right: var(--pulse-space-md); bottom: var(--pulse-space-md); } .p-ask-launcher:not(.is-static) .p-ask-launcher__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
/* Ask Pulse (portal): a non-modal chat panel anchored to the launcher; a full-height sheet at phone width */
.p-chatpop { position: fixed; right: var(--pulse-space-lg); bottom: var(--pulse-space-lg); z-index: var(--pulse-z-panel); width: min(25rem, calc(100vw - 2 * var(--pulse-space-md))); max-height: min(50rem, calc(100vh - 6rem)); display: flex; flex-direction: column; background: var(--pulse-surface-1); color: var(--pulse-text); border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-lg); box-shadow: var(--pulse-elevation-3); overflow: hidden; }
.p-chatpop.is-static { position: relative; right: auto; bottom: auto; }
.p-chatpop__head { display: flex; align-items: center; gap: var(--pulse-space-sm); padding: 12px var(--pulse-space-md); border-bottom: 1px solid var(--pulse-border-subtle); }
.p-chatpop__body { flex: 1; overflow-y: auto; padding: var(--pulse-space-md); display: flex; flex-direction: column; gap: 12px; }
.p-chatpop__foot { border-top: 1px solid var(--pulse-border-subtle); padding: 12px var(--pulse-space-md); display: flex; flex-direction: column; gap: var(--pulse-space-sm); }
.p-bubble { border-radius: var(--pulse-radius-lg); padding: 10px 14px; font-size: 0.875rem; line-height: 1.5; max-width: 88%; }
.p-bubble--me { align-self: flex-end; background: var(--pulse-surface-gray); }
.p-bubble--pulse { align-self: flex-start; border: 1px solid var(--pulse-border-subtle); }
@media (max-width: 40rem) { .p-chatpop:not(.is-static) { inset: 0; width: auto; max-height: none; border: 0; border-radius: 0; } }
[data-theme="dark"] .p-chatpop { box-shadow: 0 0 0 1px var(--pulse-border-control); }
[data-theme="dark"] .p-ask-launcher { box-shadow: 0 0 0 1px var(--pulse-border-control); }

.p-ask { display: flex; flex-direction: column; width: var(--pulse-panel-width); max-width: 100%; height: 100%; min-height: 36rem; background: var(--pulse-surface-1); border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-lg); box-shadow: var(--pulse-elevation-3); overflow: hidden; font-size: 0.875rem; line-height: 1.5; }
.p-ask--docked { border-radius: 0; border-width: 0 0 0 1px; }
.p-ask__head { display: flex; align-items: center; gap: var(--pulse-space-xs); padding: var(--pulse-space-sm) var(--pulse-space-sm) var(--pulse-space-sm) var(--pulse-space-md); border-bottom: 1px solid var(--pulse-border-subtle); flex-wrap: wrap; }
.p-ask__title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin-right: auto; display: flex; align-items: center; gap: var(--pulse-space-sm); }
.p-ask__sub { flex-basis: 100%; display: flex; align-items: center; gap: var(--pulse-space-sm); }
.p-ask__model { font-size: 0.8125rem; min-height: 32px; padding: 2px 2rem 2px var(--pulse-space-sm); width: auto; flex: 1; max-width: 100%; }
.p-ask__close { font-size: 1.25rem; text-decoration: none; line-height: 1; }
.p-ask__ctx { border-bottom: 1px solid var(--pulse-border-subtle); padding: var(--pulse-space-sm) var(--pulse-space-md); background: var(--pulse-surface-2); }
.p-ask__ctx > summary { cursor: pointer; font-size: 0.8125rem; display: flex; gap: var(--pulse-space-xs); align-items: center; flex-wrap: wrap; list-style: none; min-height: 24px; }
.p-ask__ctx > summary::-webkit-details-marker { display: none; }
.p-ask__ctx dl { margin: var(--pulse-space-sm) 0 0; display: grid; grid-template-columns: auto 1fr; gap: 2px var(--pulse-space-sm); font-size: 0.8125rem; }
.p-ask__ctx dt { font-weight: 700; }
.p-ask__ctx dd { margin: 0; }
.p-ask__ctx.is-stale > summary::after { content: "Out of date: refresh"; margin-left: auto; font-weight: 700; }
.p-ask__log { flex: 1; overflow-y: auto; padding: var(--pulse-space-md); display: flex; flex-direction: column; gap: var(--pulse-space-md); }
.p-ask__who { font-size: 0.8125rem; font-weight: 700; color: var(--pulse-text-muted); margin-bottom: 2px; }
.p-msg--you { align-self: flex-end; max-width: 85%; background: var(--pulse-surface-2); border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-lg); padding: var(--pulse-space-sm) 12px; }
.p-msg--ask { max-width: 100%; }
.p-msg--ask ul, .p-msg--ask ol { margin: var(--pulse-space-xs) 0; padding-left: 1.25rem; }
.p-based { margin-top: var(--pulse-space-sm); padding-top: var(--pulse-space-sm); border-top: 1px solid var(--pulse-border-subtle); font-size: 0.8125rem; color: var(--pulse-text-muted); }
.p-based strong { color: var(--pulse-text); }
.p-general { display: inline-flex; gap: var(--pulse-space-xs); align-items: center; font-size: 0.8125rem; font-weight: 700; padding: 1px var(--pulse-space-sm); border: 1px solid var(--pulse-border-control); border-radius: var(--pulse-radius-sm); margin-bottom: var(--pulse-space-xs); }
.p-tool { display: flex; align-items: center; gap: var(--pulse-space-sm); font-size: 0.8125rem; color: var(--pulse-text-muted); min-height: 24px; }
.p-tool__mark { width: 16px; height: 16px; display: grid; place-items: center; flex: none; font-weight: 700; color: var(--pulse-text); }
.p-tools > summary { cursor: pointer; font-size: 0.8125rem; color: var(--pulse-text-muted); min-height: 24px; }
.p-plan { margin: var(--pulse-space-xs) 0 0; padding-left: 1.5rem; font-size: 0.875rem; }
.p-plan li.is-done { color: var(--pulse-text-muted); }
.p-plan li.is-done::marker { content: "\2713  "; }
.p-plan li.is-now { font-weight: 700; }
.p-divider { display: flex; align-items: center; gap: var(--pulse-space-sm); font-size: 0.8125rem; color: var(--pulse-text-muted); }
.p-divider::before, .p-divider::after { content: ""; flex: 1; height: 1px; background: var(--pulse-border-subtle); }
.p-followups { display: flex; flex-wrap: wrap; gap: var(--pulse-space-xs); }
.p-followups button { font: inherit; font-size: 0.8125rem; min-height: 28px; padding: 0 var(--pulse-space-sm); border: 1px solid var(--pulse-border-control); border-radius: var(--pulse-radius-md); background: var(--pulse-surface-1); color: var(--pulse-text); cursor: pointer; text-align: left; }
.p-followups button:hover { background: var(--pulse-surface-2); }
.p-rate { display: flex; flex-wrap: wrap; gap: var(--pulse-space-xs); align-items: center; margin-top: var(--pulse-space-sm); font-size: 0.8125rem; }
.p-rate button { font: inherit; font-size: 0.8125rem; min-height: 28px; padding: 0 var(--pulse-space-sm); border: 1px solid var(--pulse-border-control); border-radius: var(--pulse-radius-md); background: var(--pulse-surface-1); color: var(--pulse-text); cursor: pointer; }
.p-rate button[aria-pressed="true"] { background: var(--pulse-primary); color: var(--pulse-text-on-primary); border-color: var(--pulse-primary); }
.p-ask__composer { border-top: 1px solid var(--pulse-border-subtle); padding: var(--pulse-space-sm) var(--pulse-space-md) var(--pulse-space-md); }
.p-ask__composer .p-textarea { min-height: 4.5rem; font-size: 0.875rem; }
.p-ask__composer-row { display: flex; align-items: center; justify-content: space-between; gap: var(--pulse-space-sm); margin-top: var(--pulse-space-sm); flex-wrap: wrap; }
.p-ask__meter { font-size: 0.8125rem; color: var(--pulse-text-muted); display: flex; align-items: center; gap: var(--pulse-space-xs); }

/* system cards: approval, applied, undone, expired, error, limit */
.p-syscard { border: 1px solid var(--pulse-border-strong); border-radius: var(--pulse-radius-lg); background: var(--pulse-surface-1); padding: var(--pulse-space-md); display: flex; flex-direction: column; gap: var(--pulse-space-sm); }
.p-syscard--strong { border-width: 2px; padding: calc(var(--pulse-space-md) - 1px); }
.p-syscard--quiet { border-color: var(--pulse-border-subtle); background: var(--pulse-surface-2); }
.p-syscard__head { display: flex; align-items: center; gap: var(--pulse-space-sm); flex-wrap: wrap; }
.p-syscard__icon { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.8125rem; flex: none; border: 2px solid var(--pulse-text); color: var(--pulse-text); background: var(--pulse-surface-1); }
.p-syscard__icon--attention { background: var(--pulse-signal-attention); color: var(--pulse-text-on-accent); border-color: var(--pulse-marker-outline); }
.p-syscard__icon--done { background: var(--pulse-success); color: var(--pulse-surface-1); border-color: var(--pulse-success); }
.p-syscard__icon--error { background: var(--pulse-error); color: var(--pulse-surface-1); border-color: var(--pulse-error); }
.p-syscard__title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.4; margin: 0; }
.p-syscard__time { margin-left: auto; font-size: 0.8125rem; color: var(--pulse-text-muted); font-variant-numeric: tabular-nums; }
.p-syscard__consequence { font-size: 0.9375rem; line-height: 1.5; }
.p-syscard__undo { font-size: 0.8125rem; color: var(--pulse-text-muted); }
.p-syscard__risk { font-size: 0.875rem; font-weight: 700; display: flex; gap: var(--pulse-space-xs); }
.p-diff { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.p-diff th, .p-diff td { text-align: left; padding: var(--pulse-space-xs) var(--pulse-space-sm); border-bottom: 1px solid var(--pulse-border-subtle); vertical-align: top; overflow-wrap: anywhere; }
.p-diff thead th { color: var(--pulse-text-muted); font-weight: 700; }
.p-diff del { text-decoration: line-through; color: var(--pulse-text-muted); }
.p-diff ins { text-decoration: none; font-weight: 700; }
.p-syscard details > summary { cursor: pointer; font-size: 0.8125rem; min-height: 24px; }
.p-syscard pre { font-family: var(--font-mono); font-size: 0.8125rem; background: var(--pulse-surface-2); border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-sm); padding: var(--pulse-space-sm); overflow-x: auto; margin: var(--pulse-space-xs) 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.p-syscard__actions { display: flex; flex-wrap: wrap; gap: var(--pulse-space-sm); align-items: center; }
.p-timeline { list-style: none; margin: 0; padding: 0; font-size: 0.8125rem; }
.p-timeline li { display: flex; gap: var(--pulse-space-sm); align-items: center; padding: var(--pulse-space-xs) 0; border-bottom: 1px solid var(--pulse-border-subtle); flex-wrap: wrap; }


/* ---------- charts (inline SVG drawn on the server or by a chart library) ---------- */
.p-chart { width: 100%; height: auto; display: block; overflow: visible; font-family: var(--font-sans); }
.p-chart text { font-size: 13px; /* draw charts at their display size so this stays 13px */ fill: var(--pulse-text-muted); font-variant-numeric: tabular-nums; }
.p-chart .lbl { fill: var(--pulse-text); font-weight: 700; }
.p-chart .grid { stroke: var(--pulse-data-grid); stroke-width: 1; }
.p-chart .axis { stroke: var(--pulse-border-control); stroke-width: 1; }
.p-chart .s-primary { stroke: var(--pulse-data-primary); fill: none; stroke-width: 2.5; }
.p-chart .s-context { stroke: var(--pulse-data-context); fill: none; stroke-width: 2; stroke-dasharray: 5 4; }
.p-chart .s-hl1 { stroke: var(--pulse-data-highlight-1); fill: none; stroke-width: 3; }
.p-chart .f-primary { fill: var(--pulse-data-primary); }
.p-chart .f-context { fill: var(--pulse-data-context); }
.p-chart .f-hl1 { fill: var(--pulse-data-highlight-1); }
.p-chart .f-hl2 { fill: var(--pulse-data-highlight-2); } .p-chart .f-hl3 { fill: var(--pulse-data-highlight-3); } .p-chart .f-hl4 { fill: var(--pulse-data-highlight-4); }
.p-chart .s-hl2 { stroke: var(--pulse-data-highlight-2); fill: none; stroke-width: 2.5; } .p-chart .s-hl3 { stroke: var(--pulse-data-highlight-3); fill: none; stroke-width: 2.5; } .p-chart .s-hl4 { stroke: var(--pulse-data-highlight-4); fill: none; stroke-width: 2.5; }
.p-chart .dot-end { fill: var(--pulse-surface-1); stroke-width: 2.5; }
.p-chart .goal { stroke: var(--pulse-data-goal); stroke-width: 1.5; stroke-dasharray: 2 3; }
.p-chart .note { stroke: var(--pulse-border-strong); stroke-width: 1; }
.p-chart .edge { stroke: var(--pulse-surface-1); stroke-width: 1; }
.p-legend { display: flex; flex-wrap: wrap; gap: var(--pulse-space-xs) var(--pulse-space-md); font-size: 0.8125rem; color: var(--pulse-text); margin: 0 0 var(--pulse-space-sm); padding: 0; list-style: none; }
.p-legend li { display: inline-flex; align-items: center; gap: var(--pulse-space-xs); }
.p-key { display: inline-block; width: 16px; height: 0; border-top: 3px solid var(--pulse-data-primary); }
.p-key--context { border-top: 2px dashed var(--pulse-data-context); }
.p-key--hl1 { border-top-color: var(--pulse-data-highlight-1); }

.p-chart.p-kpi__spark { height: 32px; }
.p-chart .dot-end, .p-chart polyline, .p-chart line { vector-effect: non-scaling-stroke; }

/* ---------- preview-only helpers (not part of pulse.css in products) ---------- */
.ds-modes { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); }
.ds-pane { padding: var(--pulse-space-lg); background: var(--pulse-bg-page); color: var(--pulse-text); font-family: var(--font-sans); }
.ds-pane + .ds-pane { border-top: 1px solid var(--pulse-border-subtle); }
.ds-pane__label { font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 700; color: var(--pulse-text-muted); margin: 0 0 var(--pulse-space-md); display: flex; gap: var(--pulse-space-sm); align-items: center; }
.ds-state { font-size: 0.8125rem; color: var(--pulse-text-muted); margin: 0 0 var(--pulse-space-xs); font-weight: 700; }
.ds-cell { min-width: 0; }
.ds-grid { display: grid; gap: var(--pulse-space-lg) var(--pulse-space-md); grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); align-items: start; }
.ds-grid--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.ds-concept { border: 2px dashed var(--pulse-border-strong); border-radius: var(--pulse-radius-lg); padding: var(--pulse-space-md); }
.ds-concept__tag { display: inline-flex; font-weight: 700; font-size: 0.8125rem; background: var(--pulse-surface-gray); color: var(--pulse-text); padding: 2px var(--pulse-space-sm); border-radius: var(--pulse-radius-sm); margin-bottom: var(--pulse-space-sm); }
.ds-frame { border: 1px solid var(--pulse-border-subtle); border-radius: var(--pulse-radius-md); overflow: hidden; background: var(--pulse-bg-page); }
body.ds-body { margin: 0; background: var(--pulse-bg-page); }
