@font-face { font-family: "Inter Tight"; src: url("/fonts/InterTight-wght.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Newsreader"; src: url("/fonts/Newsreader-opsz-wght.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/InstrumentSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Zilla Slab"; src: url("/fonts/ZillaSlab-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Zilla Slab"; src: url("/fonts/ZillaSlab-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Familjen Grotesk"; src: url("/fonts/FamiljenGrotesk-wght.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Archivo"; src: url("/fonts/Archivo-wdth-wght.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces-SOFT-WONK-opsz-wght.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/PlayfairDisplay-wght.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "DM Serif Display"; src: url("/fonts/DMSerifDisplay-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Anton"; src: url("/fonts/Anton-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Bebas Neue"; src: url("/fonts/BebasNeue-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Oswald"; src: url("/fonts/Oswald-wght.woff2") format("woff2"); font-weight: 200 700; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Syne"; src: url("/fonts/Syne-wght.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Roboto Slab"; src: url("/fonts/RobotoSlab-wght.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Unbounded"; src: url("/fonts/Unbounded-wght.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Space Mono"; src: url("/fonts/SpaceMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Space Mono"; src: url("/fonts/SpaceMono-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }

:root {
  --font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --t-hero: 28px; --t-title: 20px; --t-body: 16px; --t-label: 14px; --t-micro: 13px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 48px;
  --tap: 44px; --head: 52px; --bar: 64px; --rail: 88px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light dark;
}
:root[data-panel="client"] { --r-ctl: 14px; --r-tile: 20px; --r-pill: 999px; --r-card: 20px; }
:root[data-panel="admin"] { --r-ctl: 6px; --r-tile: 6px; --r-pill: 999px; --r-card: 8px; }

:root[data-panel="client"] {
  --bg: #fdfcfa; --surface: #ffffff; --surface-2: #f4f1ec; --surface-3: #ebe6df;
  --line: rgb(29 24 19 / 0.14); --line-strong: #8f857b;
  --ink: #0e0d0c; --ink-2: #3a322b; --ink-3: #5f554b;
  --accent: #a04a14; --accent-fill: #a04a14; --accent-text: #a04a14; --accent-ink: #ffffff;
  --accent-wash: color-mix(in srgb, #a04a14 10%, #ffffff);
  --anchor: #14181f; --anchor-ink: #ffffff;
  --ok: #1c7c4a; --ok-bg: #e6f3ec; --warn: #a04a14; --warn-bg: #fbeee4; --bad: #b3261e; --bad-bg: #fdecea; --off: #8f8378;
  --bubble-me: #14181f; --bubble-me-ink: #ffffff; --bubble-bot: #f4f1ec;
  --shadow: 0 1px 2px rgb(20 24 31 / .06), 0 8px 24px rgb(20 24 31 / .08);
}
@media (prefers-color-scheme: dark) { :root[data-panel="client"]:not([data-theme="light"]) {
  --bg: #0a0a0a; --surface: #151515; --surface-2: #1d1d1d; --surface-3: #262626;
  --line: #2d2d2d; --line-strong: #6b6b6b;
  --ink: #ececec; --ink-2: #b4b4b4; --ink-3: #8f8f8f;
  --accent: #f09a5d; --accent-fill: #f09a5d; --accent-text: #f09a5d; --accent-ink: #14181f;
  --accent-wash: color-mix(in srgb, #f09a5d 14%, #151515);
  --anchor: #151515; --anchor-ink: #ececec;
  --ok: #6cc292; --ok-bg: #14261d; --warn: #f09a5d; --warn-bg: #2c2013; --bad: #ff7a70; --bad-bg: #2e1517; --off: #6e6e6e;
  --bubble-me: #f09a5d; --bubble-me-ink: #14181f; --bubble-bot: #1d1d1d;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .3);
} }
:root[data-panel="client"][data-theme="dark"] {
  --bg: #0a0a0a; --surface: #151515; --surface-2: #1d1d1d; --surface-3: #262626;
  --line: #2d2d2d; --line-strong: #6b6b6b;
  --ink: #ececec; --ink-2: #b4b4b4; --ink-3: #8f8f8f;
  --accent: #f09a5d; --accent-fill: #f09a5d; --accent-text: #f09a5d; --accent-ink: #14181f;
  --accent-wash: color-mix(in srgb, #f09a5d 14%, #151515);
  --anchor: #151515; --anchor-ink: #ececec;
  --ok: #6cc292; --ok-bg: #14261d; --warn: #f09a5d; --warn-bg: #2c2013; --bad: #ff7a70; --bad-bg: #2e1517; --off: #6e6e6e;
  --bubble-me: #f09a5d; --bubble-me-ink: #14181f; --bubble-bot: #1d1d1d;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .3);
}

:root[data-panel="admin"] {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #eef0f3; --surface-3: #e3e6eb;
  --line: #dde1e7; --line-strong: #8a93a0;
  --ink: #14181f; --ink-2: #48505c; --ink-3: #5b6472;
  --accent: #a8521a; --accent-fill: #a8521a; --accent-text: #a8521a; --accent-ink: #ffffff;
  --accent-wash: color-mix(in srgb, #a8521a 10%, #ffffff);
  --anchor: #14181f; --anchor-ink: #ffffff;
  --ok: #1c7c4a; --ok-bg: #e6f3ec; --warn: #9a5b00; --warn-bg: #fdf1dc; --bad: #b3261e; --bad-bg: #fdecea; --off: #8a93a0;
  --bubble-me: #14181f; --bubble-me-ink: #ffffff; --bubble-bot: #eef0f3;
  --shadow: 0 1px 2px rgb(20 24 31 / .06), 0 8px 24px rgb(20 24 31 / .08);
}
@media (prefers-color-scheme: dark) { :root[data-panel="admin"]:not([data-theme="light"]) {
  --bg: #0f1216; --surface: #171b21; --surface-2: #1e232b; --surface-3: #262c36;
  --line: #2a303a; --line-strong: #6b7686;
  --ink: #e8eaee; --ink-2: #a8b0bd; --ink-3: #939cab;
  --accent: #f09a5d; --accent-fill: #f09a5d; --accent-text: #f09a5d; --accent-ink: #14181f;
  --accent-wash: color-mix(in srgb, #f09a5d 14%, #171b21);
  --anchor: #171b21; --anchor-ink: #e8eaee;
  --ok: #6cc292; --ok-bg: #14261d; --warn: #e0a34a; --warn-bg: #2c2213; --bad: #f2917f; --bad-bg: #2e1a17; --off: #6f7988;
  --bubble-me: #f09a5d; --bubble-me-ink: #14181f; --bubble-bot: #1e232b;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .3);
} }
:root[data-panel="admin"][data-theme="dark"] {
  --bg: #0f1216; --surface: #171b21; --surface-2: #1e232b; --surface-3: #262c36;
  --line: #2a303a; --line-strong: #6b7686;
  --ink: #e8eaee; --ink-2: #a8b0bd; --ink-3: #939cab;
  --accent: #f09a5d; --accent-fill: #f09a5d; --accent-text: #f09a5d; --accent-ink: #14181f;
  --accent-wash: color-mix(in srgb, #f09a5d 14%, #171b21);
  --anchor: #171b21; --anchor-ink: #e8eaee;
  --ok: #6cc292; --ok-bg: #14261d; --warn: #e0a34a; --warn-bg: #2c2213; --bad: #f2917f; --bad-bg: #2e1a17; --off: #6f7988;
  --bubble-me: #f09a5d; --bubble-me-ink: #14181f; --bubble-bot: #1e232b;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .3);
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; font-family: var(--font); font-size: var(--t-body); line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; font-weight: 750; }
p { margin: 0; }
a { color: var(--accent-text); }
img, svg, video { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.ico { flex: none; }
.muted { color: var(--ink-3); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
/* iOS zooms into any field under 16px. */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: 16px; }


body.has-shell { padding-block: calc(var(--head) + env(safe-area-inset-top, 0px)) calc(var(--bar) + env(safe-area-inset-bottom, 0px)); padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px); }
.main { max-width: 720px; margin-inline: auto; padding: var(--s4) var(--s4) var(--s7); }
:root[data-panel="admin"] .main { max-width: 1100px; }

.app-head { position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; align-items: center; gap: var(--s2);
  height: calc(var(--head) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) max(8px, env(safe-area-inset-right, 0px)) 0 max(8px, env(safe-area-inset-left, 0px));
  background: var(--surface); border-bottom: 1px solid var(--line); }
.app-head__spacer { flex: 1 1 auto; }
.app-chip { position: relative; min-width: 0; }
.app-chip__button { list-style: none; display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); max-width: 64vw; padding-inline: var(--s2); border-radius: var(--r-ctl); cursor: pointer; font-weight: 750; font-size: 17px; }
.app-chip__button::-webkit-details-marker { display: none; }
.app-chip__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-chip[open] .app-chip__button .ico:last-child { transform: rotate(180deg); }
.app-menu { position: absolute; inset-block-start: calc(100% + 6px); inset-inline-start: 0; z-index: 50; display: grid; gap: 2px; width: min(280px, calc(100vw - 16px)); padding: var(--s2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.app-menu__who { padding: var(--s1) var(--s3) var(--s2); font-size: var(--t-micro); color: var(--ink-3); overflow-wrap: anywhere; }
.app-menu__item { display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: 0 var(--s3); border: 0; border-radius: var(--r-ctl); background: none; color: var(--ink); font-size: 16px; font-weight: 600; text-align: start; text-decoration: none; cursor: pointer; width: 100%; }
.app-menu__item:hover { background: var(--surface-2); }
.app-menu__item .ico { color: var(--ink-3); }
.app-menu form { margin: 0; }
.app-lamp { display: grid; place-items: center; width: var(--tap); height: var(--tap); }
.app-bell { position: relative; display: grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: var(--r-ctl); color: var(--ink); text-decoration: none; }
.app-bell[aria-current="page"] { color: var(--accent-text); }
.app-bell .badge { position: absolute; inset-block-start: 4px; inset-inline-end: 2px; }

.app-bar { position: fixed; inset: auto 0 0 0; z-index: 40; display: flex; gap: var(--s1);
  height: calc(var(--bar) + env(safe-area-inset-bottom, 0px)); padding: 0 max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px));
  background: var(--surface); border-top: 1px solid var(--line); }
.app-bar__item { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--tap); color: var(--ink-3); text-decoration: none; font-size: 12.5px; font-weight: 650; }
.app-bar__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-bar__item[aria-current="page"] { color: var(--accent-text); font-weight: 800; }
.app-bar__item[aria-current="page"] .ico { stroke-width: 2.3; }
.app-bar__item[aria-current="page"]::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent-fill); }
.app-bar__item .badge { position: absolute; inset-block-start: 6px; inset-inline-start: calc(50% + 6px); }
body.kbd-open .app-bar { display: none; }
body.kbd-open.has-shell { padding-block-end: 0; }

/* Client top bar: the ink anchor in light mode (PM client-light-css). */
@media not all and (prefers-color-scheme: dark) {
  :root[data-panel="client"]:not([data-theme="dark"]) .app-head { background: var(--anchor); color: var(--anchor-ink); border-bottom-color: transparent; }
  :root[data-panel="client"]:not([data-theme="dark"]) .app-head :is(.app-chip__button, .app-bell) { color: var(--anchor-ink); }
}

@media (min-width: 900px) {
  body.has-shell { padding-block: 0; padding-inline-start: var(--rail); }
  .app-head { position: sticky; inset-block-start: 0; height: var(--head); padding-top: 0; }
  .app-bar { inset: 0 auto 0 0; width: var(--rail); height: auto; flex-direction: column; justify-content: flex-start; gap: var(--s2); padding: var(--s3) var(--s1); border-top: 0; border-inline-end: 1px solid var(--line); }
  .app-bar__item { flex: none; min-height: 64px; border-radius: var(--r-ctl); }
  .app-bar__item:hover { background: var(--surface-2); color: var(--ink); }
  .app-bar__item[aria-current="page"]::before { inset-block: 25%; inset-inline: 0 auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
}

/* Bare pages (sign-in): no bars, centred column. */
body.is-bare { display: grid; place-items: start center; padding: max(48px, env(safe-area-inset-top, 0px)) var(--s4) var(--s7); }
.bare { width: 100%; max-width: 400px; display: grid; gap: var(--s5); }



.ps-ill{display:block;width:100%;max-width:160px;height:auto;color:var(--ink-2)}
.ps-ill .ps-ill-s,.ps-ill .ps-ill-f,.ps-ill .ps-ill-a,.ps-ill .ps-ill-d,.ps-ill .ps-ill-af,.ps-ill .ps-ill-ok,.ps-ill .ps-ill-ok-f{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ps-ill .ps-ill-f{fill:var(--surface-2)}
.ps-ill .ps-ill-a,.ps-ill .ps-ill-af{stroke:var(--accent)}
.ps-ill .ps-ill-af{fill:color-mix(in srgb,var(--accent) 14%,transparent)}
.ps-ill .ps-ill-d{stroke:var(--bad)}
.ps-ill .ps-ill-ok,.ps-ill .ps-ill-ok-f{stroke:var(--ok)}
.ps-ill .ps-ill-ok-f{fill:var(--ok-bg)}
.ps-ill .ps-ill-k{fill:none;stroke:var(--ink);stroke-width:4;stroke-linecap:square}
.ps-ill circle.ps-ill-k{fill:var(--ink);stroke:none}
.ps-ill .ps-ill-dash{stroke-dasharray:4 5}

.pf-icon__svg{display:inline-block;vertical-align:middle;flex:none}
.pf-icon--unknown{display:inline-flex;align-items:center;gap:6px}
.pf-icon__name{font-size:.875em}
.pf-icon-text{display:inline-flex;align-items:center;gap:6px}

/* Black brand marks (TikTok, X, Threads, Buffer, ElevenLabs, Zernio) turn to the page ink on a dark page. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pf-icon__svg path:is([fill="#000000"], [fill="#231F20"], [fill="#14181F"]) { fill: var(--ink); } }
:root[data-theme="dark"] .pf-icon__svg path:is([fill="#000000"], [fill="#231F20"], [fill="#14181F"]) { fill: var(--ink); }
/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s5); border: 1px solid transparent; border-radius: var(--r-ctl); font-size: 16px; font-weight: 700; line-height: 1.1; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn--primary { background: var(--accent-fill); color: var(--accent-ink); }
.btn--primary:hover { filter: brightness(1.06); }
.btn--quiet { background: var(--surface-2); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn--lg { min-height: 56px; font-size: 17px; border-radius: var(--r-tile); }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.ibtn { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; border-radius: var(--r-ctl); background: transparent; color: inherit; cursor: pointer; text-decoration: none; }
.ibtn:hover { background: var(--surface-2); }
.ibtn--fill { background: var(--accent-fill); color: var(--accent-ink); border-radius: 50%; }
/* small marks */
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding-inline: 6px; border-radius: 10px; background: var(--accent-fill); color: var(--accent-ink); font-size: 12px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.lamp { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--off); flex: none; }
.lamp[data-tone="ok"] { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.lamp[data-tone="warn"], .lamp[data-tone="wait"], .lamp[data-tone="accent"] { background: var(--accent-fill); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.lamp[data-tone="bad"] { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 20%, transparent); }
.lamp[data-tone="wait"] { animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.sw { font-weight: 700; font-size: var(--t-label); }
.sw[data-tone="ok"] { color: var(--ok); } .sw[data-tone="bad"] { color: var(--bad); } .sw[data-tone="warn"], .sw[data-tone="wait"], .sw[data-tone="accent"] { color: var(--accent-text); } .sw[data-tone="off"] { color: var(--ink-3); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chips { display: flex; gap: var(--s2); overflow-x: auto; padding-block: 2px; scrollbar-width: none; }
/* rows */
.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.rows > li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: var(--s3); min-height: 60px; padding: var(--s2) var(--s4); color: var(--ink); text-decoration: none; }
a.row:hover { background: var(--surface-2); }
.row__lead { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; }
.row__lead--icon { background: var(--surface-2); color: var(--ink-2); }
.row__lead--icon[data-tone="accent"], .row__lead--icon[data-tone="warn"] { background: var(--accent-wash); color: var(--accent-text); }
.row__lead--icon[data-tone="ok"] { background: var(--ok-bg); color: var(--ok); }
.row__lead--icon[data-tone="bad"] { background: var(--bad-bg); color: var(--bad); }
.row__lead--thumb { overflow: hidden; background: var(--surface-2); }
.row__lead--thumb img { width: 100%; height: 100%; object-fit: cover; }
.row__lead--avatar { border-radius: 50%; background: var(--anchor); color: var(--anchor-ink); font-weight: 800; font-size: 15px; }
.row__text { display: grid; min-width: 0; flex: 1 1 auto; }
.row__title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__sub { font-size: var(--t-label); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__meta { flex: none; display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-label); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.row__go { flex: none; color: var(--ink-3); display: grid; }
/* sections, tiles */
.stack { display: grid; gap: var(--s5); }
.sec { display: grid; gap: var(--s3); }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.sec__title { font-size: 17px; font-weight: 800; }
.sec__act { font-size: var(--t-label); font-weight: 700; text-decoration: none; min-height: var(--tap); display: inline-flex; align-items: center; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.tile { position: relative; display: grid; align-content: space-between; gap: var(--s4); min-height: 112px; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--surface); color: var(--ink); text-decoration: none; }
.tile:hover { border-color: var(--line-strong); }
.tile__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); color: var(--ink-2); }
.tile[data-tone="accent"] .tile__icon { background: var(--accent-wash); color: var(--accent-text); }
.tile__label { font-weight: 750; font-size: 16px; line-height: 1.2; }
.tile__count { position: absolute; inset-block-start: var(--s4); inset-inline-end: var(--s4); min-width: 28px; height: 28px; padding-inline: 8px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-fill); color: var(--accent-ink); font-weight: 800; font-size: 14px; }
.card { padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
/* screen head */
.shead { display: flex; align-items: center; gap: var(--s1); min-height: var(--tap); margin-block-end: var(--s3); }
.shead__title { font-size: var(--t-title); font-weight: 800; }
.back { display: grid; place-items: center; width: var(--tap); height: var(--tap); margin-inline-start: -10px; color: var(--ink); border-radius: var(--r-ctl); }
/* forms */
.field { display: grid; gap: 6px; }
.field__label { font-size: var(--t-label); font-weight: 700; color: var(--ink-2); }
.field__hint { font-size: var(--t-micro); color: var(--ink-3); }
.input, textarea.input, select.input { width: 100%; min-height: 52px; padding: 0 var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); }
textarea.input { padding-block: var(--s3); min-height: 96px; resize: vertical; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.input--code { font-size: 28px !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.tgl { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 56px; cursor: pointer; }
.tgl__label { font-weight: 650; }
.tgl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tgl__track { position: relative; flex: none; width: 52px; height: 32px; border-radius: 16px; background: var(--surface-3); transition: background .2s var(--ease); }
.tgl__track::after { content: ""; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s var(--ease); }
.tgl input:checked + .tgl__track { background: var(--accent-fill); }
.tgl input:checked + .tgl__track::after { transform: translateX(20px); }
.tgl input:focus-visible + .tgl__track { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: flex; padding: 3px; gap: 3px; border-radius: var(--r-ctl); background: var(--surface-2); }
.seg__opt { flex: 1 1 0; display: grid; place-items: center; min-height: 40px; border-radius: calc(var(--r-ctl) - 2px); color: var(--ink-2); font-weight: 700; text-decoration: none; font-size: 15px; }
.seg__opt[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .1); }
.prog { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.prog > i { display: block; height: 100%; width: var(--w, 0%); background: var(--accent-fill); border-radius: inherit; transition: width .3s var(--ease); }
.banner { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); border-radius: var(--r-ctl); background: var(--warn-bg); color: var(--ink); font-weight: 600; font-size: 15px; }
.banner .ico { color: var(--accent-text); }
.banner[data-tone="bad"] { background: var(--bad-bg); } .banner[data-tone="bad"] .ico { color: var(--bad); }
.banner[data-tone="ok"] { background: var(--ok-bg); } .banner[data-tone="ok"] .ico { color: var(--ok); }
.banner a { margin-inline-start: auto; font-weight: 800; white-space: nowrap; }
/* bottom sheet */
.sheet__open { list-style: none; cursor: pointer; }
.sheet__open::-webkit-details-marker { display: none; }
.sheet[open] > .sheet__open::before { content: ""; position: fixed; inset: 0; z-index: 60; background: rgb(0 0 0 / .35); }
.sheet__panel { position: fixed; inset: auto 0 0 0; z-index: 61; max-height: 80dvh; overflow: auto; padding: var(--s3) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow); display: grid; gap: var(--s3); }
.sheet__head { display: grid; justify-items: center; gap: var(--s2); padding-block-end: var(--s1); }
.sheet__head::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); }
/* chat bubble (base; the chat package refines) */
.bub { max-width: 82%; padding: 10px 14px; border-radius: 20px; background: var(--bubble-bot); color: var(--ink); display: grid; gap: 2px; }
.bub--me { justify-self: end; background: var(--bubble-me); color: var(--bubble-me-ink); border-end-end-radius: 6px; }
.bub--bot { justify-self: start; border-end-start-radius: 6px; }
.bub--system { justify-self: center; background: transparent; color: var(--ink-3); font-size: var(--t-label); text-align: center; }
.bub__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bub__time { justify-self: end; font-size: 12px; opacity: .7; }
/* toasts */
.toasts { position: fixed; inset-inline: var(--s4); inset-block-end: calc(var(--bar) + env(safe-area-inset-bottom, 0px) + var(--s3)); z-index: 70; display: grid; gap: var(--s2); justify-items: center; pointer-events: none; }
.toast { padding: var(--s3) var(--s4); border-radius: var(--r-ctl); background: var(--anchor); color: var(--anchor-ink); font-weight: 650; box-shadow: var(--shadow); pointer-events: auto; }
/* states */
.st { display: grid; justify-items: center; gap: var(--s3); padding: var(--s7) var(--s4); text-align: center; }
.st .ps-ill { max-width: 140px; }
.st__title { font-size: 18px; font-weight: 800; }
.st__body { color: var(--ink-2); max-width: 32ch; }
.st__body--quiet { color: var(--ink-3); font-size: var(--t-label); }
.st--error .st__title, .st--refusal .st__title { color: var(--bad); }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }


.main--chat { max-width: 760px; padding: 0; display: flex; flex-direction: column; height: calc(100dvh - var(--head) - var(--bar) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) { .main--chat { height: calc(100dvh - var(--head)); } }
body.kbd-open .main--chat { height: calc(100dvh - var(--head) - env(safe-area-inset-top, 0px)); }
.chat { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.chat__top { padding: var(--s3) var(--s4) 0; }
.chat__log { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4) var(--s3) var(--s3); overscroll-behavior: contain; scroll-padding-block-end: var(--s3); }
.chat__log > .st { margin-block: auto; }
.chat__log > .msg:first-of-type, .chat__log > .chat__older + .msg { margin-block-start: auto; }
.chat__older { align-self: center; min-height: var(--tap); display: inline-flex; align-items: center; gap: 6px; padding: 0 var(--s4); border-radius: var(--r-ctl); color: var(--ink-2); font-weight: 700; font-size: var(--t-label); text-decoration: none; }
.chat__older svg { transform: rotate(180deg); }
.chat__older[aria-busy="true"] { opacity: .6; pointer-events: none; }
.chat__new { position: absolute; inset-inline-end: var(--s3); inset-block-end: 92px; z-index: 4; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 var(--s4); border: 0; border-radius: var(--r-ctl); background: var(--anchor); color: var(--anchor-ink); font-weight: 700; font-size: 14px; box-shadow: var(--shadow); cursor: pointer; }
.chat.is-working .chat__new { inset-block-end: 148px; }
.chat__input { position: relative; }
/* toasts on the conversation float above the composer, not over it */
body:has(.main--chat .chat) .toasts { inset-block-end: calc(var(--bar) + env(safe-area-inset-bottom, 0px) + 96px); }
@media (min-width: 900px) { body:has(.main--chat .chat) .toasts { inset-block-end: 104px; } }

/* messages */
.msg { display: grid; }
.msg + .msg--me, .msg--me + .msg:not(.msg--me) { margin-block-start: var(--s1); }
.msg--me { justify-items: end; }
.msg--bot, .msg--card { justify-items: start; }
.msg .bub { max-width: min(84%, 520px); }
.msg--card > * { width: min(100%, 440px); }
.bub__time { display: inline-flex; align-items: center; gap: 4px; }
.bub__via { display: inline-flex; align-items: center; gap: 2px; margin-inline-end: 4px; }
.bub__via svg { border-radius: 50%; }
.msg--note { justify-items: center; }
.note { display: inline-flex; align-items: center; gap: 6px; max-width: 92%; padding: 6px var(--s3); border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink-2); font-size: var(--t-label); font-weight: 600; text-align: start; }
.note svg { flex: none; }

/* own message on its way */
.msg.is-pending .bub { opacity: .78; }
.msg.is-failed .bub { opacity: 1; box-shadow: inset 0 0 0 2px var(--bad); }
.msg.is-failed .bub__time { color: var(--bad); opacity: 1; font-weight: 700; }
.bub__spin { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: chatspin .8s linear infinite; }
.msg.is-failed .bub__spin { display: none; }
@keyframes chatspin { to { transform: rotate(1turn); } }
.bub__retry { justify-self: end; min-height: 36px; margin-block-start: 4px; padding: 0 var(--s3); border: 0; border-radius: var(--r-ctl); background: var(--bad); color: #fff; font-weight: 800; font-size: 14px; cursor: pointer; }
.bub--me .bub__text--said, .bub--bot .bub__text--said { font-size: 15px; opacity: .9; }

/* voice note (audio attachment) */
.bub--voice { min-width: min(240px, 84%); }
.vnote { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: var(--s2); min-height: 44px; }
.vnote__play { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: color-mix(in srgb, currentColor 16%, transparent); color: inherit; cursor: pointer; }
.vnote__pause { display: none; width: 12px; height: 14px; border-inline: 4px solid currentColor; }
.vnote.is-playing .vnote__play svg { display: none; }
.vnote.is-playing .vnote__pause { display: block; }
.vnote__bars { position: relative; display: flex; align-items: center; gap: 2px; height: 28px; overflow: hidden; }
.vnote__bars i { flex: 1 1 0; min-width: 2px; height: var(--h, 40%); border-radius: 2px; background: currentColor; opacity: .38; }
.vnote__fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: currentColor; opacity: .22; mix-blend-mode: normal; border-radius: 4px; pointer-events: none; transition: width .2s linear; }
.vnote__len { display: inline-flex; align-items: center; min-width: 32px; justify-content: end; font-size: 12px; font-variant-numeric: tabular-nums; opacity: .8; }

/* attachments */
.att { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: var(--s3); align-items: center; padding: 6px; margin-block-end: 4px; border-radius: 14px; background: color-mix(in srgb, currentColor 8%, transparent); color: inherit; text-decoration: none; }
.att > img, .att__thumb, .att__ph { grid-row: 1 / 3; width: 56px; height: 56px; border-radius: 10px; }
.att__thumb { position: relative; overflow: hidden; background: var(--surface-3); }
.att__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att__play { position: absolute; inset: 0; margin: auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgb(0 0 0 / .55); color: #fff; }
.att__ph { display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.att__name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att__size { font-size: var(--t-micro); opacity: .75; }

/* delivery tile: finished material for the client (not an approval) */
.dlv { width: min(100%, 420px); display: grid; gap: var(--s2); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow); }
.dlv__kicker { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-micro); font-weight: 800; color: var(--ok); text-transform: uppercase; letter-spacing: .04em; }
.dlv .att { background: var(--surface-2); margin: 0; }
.dlv__more { display: grid; gap: var(--s2); }
.dlv .dlv__more .att[data-mime^="video/"] { grid-template-columns: 56px 1fr; grid-template-rows: auto auto; padding: var(--s2); background: var(--surface-2); }
.dlv .dlv__more .att[data-mime^="video/"] .att__thumb, .dlv .dlv__more .att[data-mime^="video/"] .att__ph { grid-row: 1 / span 2; width: 56px; height: 56px; aspect-ratio: auto; border-radius: 12px; }
.dlv__body { display: grid; gap: 2px; }
.dlv__title { font-size: 17px; font-weight: 800; line-height: 1.25; }
.dlv__text { color: var(--ink-2); font-size: 15px; white-space: pre-wrap; }
.dlv__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.dlv__get { min-height: 44px; }
.dlv .bub__time { font-size: 12px; color: var(--ink-3); }

/* composer: voice first (the mic is the big button), text, attach */
.composer { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: var(--s2); padding: var(--s2) var(--s3) var(--s3); background: var(--surface); border-top: 1px solid var(--line); }
.composer:not(:has(.composer__attach)) { grid-template-columns: 1fr auto; }
.composer__text { min-height: 48px; max-height: 160px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--bg); color: var(--ink); resize: none; line-height: 1.35; font-size: 16px; }
.composer__text:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.composer__send, .composer__mic { display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; }
.composer__send { width: 48px; height: 48px; background: var(--accent-fill); color: var(--accent-ink); }
.composer__mic { width: 60px; height: 60px; margin-block-start: -6px; background: var(--accent-fill); color: var(--accent-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .15s var(--ease); }
.composer__mic:active { transform: scale(.94); }
.composer__mic:focus-visible, .composer__send:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
/* Voice first: the send button shows only when there is text (web/chat.js toggles .has-text). */
.composer:not(.has-text):has(.composer__mic) .composer__send { display: none; }
.composer:not(:has(.composer__mic)):not(.has-text) .composer__send { opacity: .55; }
.composer.has-text .composer__mic { display: none; }
.composer__attach { width: 48px; height: 48px; border-radius: 50%; background: var(--surface-2); }


.bstate { padding: var(--s2) var(--s3); border-top: 1px solid var(--line); background: var(--surface); }
.bstate__run { display: flex; align-items: center; gap: var(--s2); min-height: 40px; font-size: var(--t-label); color: var(--ink-2); font-weight: 650; }
.bstate__dots { display: inline-flex; gap: 4px; padding-inline-start: var(--s1); }
.bstate__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-fill); animation: bdot 1.2s var(--ease) infinite; }
.bstate__dots i:nth-child(2) { animation-delay: .15s; } .bstate__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bdot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.bstate__label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bstate__stop { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.bstate__stop svg, .bstate__yes svg { color: var(--bad); }
.bstate__ask { display: grid; gap: var(--s2); }
.bstate__q { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--ink); }
.bstate__q svg { flex: none; color: var(--ink-3); }
.bstate__acts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.bstate__no, .bstate__yes { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 var(--s3); border-radius: var(--r-ctl); font-weight: 800; font-size: 15px; cursor: pointer; }
.bstate__no { border: 0; background: var(--surface-2); color: var(--ink); }
.bstate__yes { border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); background: var(--surface); color: var(--bad); }
.bstate__yes svg { color: currentColor; }
.bstate__yes[disabled] { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .bstate__dots i { animation: none; opacity: .7; } }


.vrec { position: absolute; inset-inline: 0; inset-block-end: 0; min-height: 100%; z-index: 6; display: grid; align-content: end; gap: 6px; padding: var(--s2) var(--s3) var(--s3); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgb(0 0 0 / .06); }
.vrec__msg { text-align: center; font-weight: 800; font-size: 15px; color: var(--ink); }
.vrec__msg:empty, .vrec__hint:empty { display: none; }
.vrec__hint { text-align: center; font-size: var(--t-label); color: var(--ink-3); }
.vrec__row { display: grid; grid-template-columns: 48px 1fr 60px; align-items: center; gap: var(--s2); }
.vrec__row > * { grid-row: 1; }
.vrec__discard { grid-column: 1; }
.vrec__mid { grid-column: 2; }
.vrec__end, .vrec__send, .vrec__retry, .vrec__close { grid-column: 3; justify-self: end; }
.vrec__btn { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); cursor: pointer; }
.vrec__btn:focus-visible, .vrec__play:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.vrec__end, .vrec__send { width: 60px; height: 60px; }
.vrec__end { background: var(--bad); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--bad) 35%, transparent); }
.vrec__send { background: var(--accent-fill); color: var(--accent-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.vrec__retry { background: var(--accent-fill); color: var(--accent-ink); width: 56px; height: 56px; }
.vrec__mid { display: flex; align-items: center; gap: var(--s2); min-width: 0; min-height: 56px; padding: 0 var(--s3); border-radius: 20px; background: var(--surface-2); }
.vrec__dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--bad); animation: vrecdot 1.1s ease-in-out infinite; }
@keyframes vrecdot { 50% { opacity: .25; } }
.vrec__time { flex: none; min-width: 40px; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 16px; }
.vrec__meter { flex: 1 1 auto; display: flex; align-items: center; justify-content: end; gap: 3px; height: 32px; overflow: hidden; }
.vrec__meter i { flex: 0 0 4px; height: var(--h, 10%); min-height: 4px; border-radius: 2px; background: var(--ink-2); transition: height .08s linear; }
.vrec__play { flex: none; position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--accent-fill); color: var(--accent-ink); cursor: pointer; }
.vrec__play { order: -1; }
.vrec[data-state="preview"] .vrec__time, .vrec[data-state="sending"] .vrec__time { order: 2; min-width: 0; }
.vrec__pause { display: none; width: 12px; height: 14px; border-inline: 4px solid currentColor; }
.vrec.is-playing .vrec__play svg { display: none; }
.vrec.is-playing .vrec__pause { display: block; }
.vrec__track { flex: 1 1 auto; position: relative; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.vrec__fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--accent-fill); transition: width .2s linear; }
.vrec__spin { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--accent-fill); border-inline-end-color: transparent; animation: chatspin .8s linear infinite; }

/* what each state shows */
.vrec__row > *, .vrec__mid > * { display: none; }
.vrec__mid { display: none; }
.vrec[data-state="rec"] .vrec__mid, .vrec[data-state="preview"] .vrec__mid, .vrec[data-state="sending"] .vrec__mid { display: flex; }
.vrec[data-state="rec"] :is(.vrec__discard, .vrec__end) { display: grid; }
.vrec[data-state="rec"] :is(.vrec__dot, .vrec__time) { display: block; }
.vrec[data-state="rec"] .vrec__meter { display: flex; }
.vrec[data-state="preview"] :is(.vrec__discard, .vrec__send, .vrec__play) { display: grid; }
.vrec[data-state="preview"] :is(.vrec__track, .vrec__time) { display: block; }
.vrec[data-state="sending"] :is(.vrec__spin, .vrec__track) { display: block; }
.vrec[data-state="failed"] .vrec__discard { display: grid; }
.vrec[data-state="failed"].has-blob .vrec__retry { display: grid; }
.vrec[data-state="failed"]:not(.has-blob) .vrec__close { display: grid; }
.vrec:is([data-state="asking"], [data-state="denied"], [data-state="nodevice"], [data-state="unsupported"]) .vrec__close { display: grid; }
/* message states: words on the left, the buttons on the right */
.vrec:is([data-state="asking"], [data-state="denied"], [data-state="nodevice"], [data-state="unsupported"], [data-state="failed"]) { grid-template-columns: 1fr auto; grid-template-areas: "msg row" "hint row"; align-items: center; align-content: center; column-gap: var(--s3); padding-inline-start: var(--s4); }
.vrec:is([data-state="asking"], [data-state="denied"], [data-state="nodevice"], [data-state="unsupported"], [data-state="failed"]) .vrec__msg { grid-area: msg; text-align: start; }
.vrec:is([data-state="asking"], [data-state="denied"], [data-state="nodevice"], [data-state="unsupported"], [data-state="failed"]) .vrec__hint { grid-area: hint; text-align: start; }
.vrec:is([data-state="asking"], [data-state="denied"], [data-state="nodevice"], [data-state="unsupported"], [data-state="failed"]) .vrec__row { grid-area: row; display: flex; gap: var(--s2); }
.vrec:is([data-state="denied"], [data-state="nodevice"], [data-state="unsupported"], [data-state="failed"]) .vrec__msg { color: var(--bad); }
.vrec:is([data-state="asking"]) .vrec__msg::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-inline-end: 8px; border-radius: 50%; background: var(--accent-fill); animation: vrecdot 1.1s ease-in-out infinite; }
/* the composer under an open sheet stays in place but is not reachable */
.chat[data-voice]:not([data-voice="idle"]) .composer { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .vrec__dot, .vrec__spin, .vrec__meter i { animation: none; transition: none; } }


.upl { display: contents; }
.upl__net { flex: none; display: flex; align-items: center; gap: var(--s2); margin: 0; padding: var(--s2) var(--s4); background: var(--warn-bg); color: var(--warn); font-weight: 700; font-size: var(--t-label); }
.upl__net[hidden], .upl__tray[hidden], .upl-sheet[hidden] { display: none; }
.upl__tray { position: relative; flex: none; list-style: none; margin: 0; padding: var(--s2) var(--s3); display: grid; gap: var(--s2); max-height: 38dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-top: 1px solid var(--line); }
.upl-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: var(--s3); padding: 6px; border-radius: 16px; background: var(--surface-2); }
.upl-item__thumb { position: relative; width: 48px; height: 48px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.upl-item__thumb > [data-ico] { display: none; }
.upl-item__thumb[data-kind="file"] > [data-ico="file"], .upl-item__thumb[data-kind="video"] > [data-ico="video"], .upl-item__thumb[data-kind="audio"] > [data-ico="audio"] { display: grid; }
.upl-item__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.upl-item__thumb[data-kind="video"]:has(img)::after { content: ""; position: absolute; inset-inline-start: 6px; inset-block-end: 6px; width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #fff; filter: drop-shadow(0 0 2px rgb(0 0 0 / .6)); }
.upl-item__main { display: grid; gap: 4px; min-width: 0; }
.upl-item__name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upl-item__line { display: flex; align-items: center; gap: 6px; font-size: var(--t-micro); color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.upl-item__line .ico { flex: none; }
.upl-item__status { overflow: hidden; text-overflow: ellipsis; }
.upl-item__size[hidden] { display: none; }
.upl-item__size::before { content: "·"; margin-inline-end: 6px; }
.upl-item .prog { height: 6px; }
.upl-item[data-state="done"] .prog, .upl-item[data-state="error"] .prog, .upl-item[data-state="queued"] .prog { display: none; }
.upl-item[data-state="done"] .upl-item__line { color: var(--ok); font-weight: 700; }
.upl-item[data-state="error"] .upl-item__line { color: var(--bad); font-weight: 700; }
.upl-item[data-state="paused"] .upl-item__line, .upl-item[data-state="offline"] .upl-item__line { color: var(--warn); font-weight: 700; }
.upl-item[data-state="paused"] .prog > i, .upl-item[data-state="offline"] .prog > i { background: var(--off); }
.upl-item__acts { display: flex; gap: 2px; }
.upl-item__acts .ibtn { width: 44px; height: 44px; border-radius: 50%; }
.upl-item__acts .ibtn[hidden] { display: none; }
/* Standalone upload (Materiały, Biblioteka): tray + note + send, only while files are picked. */
.upl-solo { display: grid; gap: var(--s2); }
.upl-solo:not(:has(.upl__tray:not([hidden]))) .upl-solo__form { display: none; }
.upl-solo .upl__tray { border: 1px solid var(--line); border-radius: var(--r-card, 20px); max-height: none; }
.upl-solo__form { grid-template-columns: 1fr; padding: 0; border: 0; background: none; }
.upl-solo__send { min-height: 52px; }
/* Files waiting for the next message: the send button shows even without text (beats chat.css voice-first rule). */
.composer.has-files .composer__send { display: grid; }
.composer.has-files .composer__mic { display: none; }
.composer.is-uploading .composer__send { opacity: .5; }
.composer__attach[aria-expanded="true"] { background: var(--accent-fill); color: var(--accent-ink); }
/* Sheet */
.upl-sheet { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; }
.upl-sheet__scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .4); animation: upl-fade .2s var(--ease); }
.upl-sheet__panel { position: relative; display: grid; gap: var(--s4); padding: var(--s3) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow); max-height: 86dvh; overflow-y: auto; animation: upl-up .25s var(--ease); }
@media (min-width: 900px) { .upl-sheet { place-items: center; } .upl-sheet__panel { width: min(480px, 92vw); border-radius: 20px; } }
.upl-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); font-size: 18px; }
.upl-sheet__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.upl-pick { display: grid; justify-items: start; gap: 2px; min-height: 112px; padding: var(--s4); border: 1px solid var(--line); border-radius: 20px; background: var(--surface-2); color: var(--ink); text-align: start; cursor: pointer; font: inherit; }
.upl-pick:active { transform: scale(.98); }
.upl-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.upl-pick__ico { display: grid; place-items: center; width: 48px; height: 48px; margin-block-end: var(--s2); border-radius: 14px; background: var(--accent-wash); color: var(--accent-text); }
.upl-pick__label { font-weight: 800; font-size: 16px; line-height: 1.2; }
.upl-pick__hint { font-size: var(--t-micro); color: var(--ink-3); }
.upl-sheet__limits { list-style: none; margin: 0; padding: var(--s3) var(--s4); display: grid; gap: var(--s2); border-radius: 16px; background: var(--surface-2); font-size: var(--t-label); color: var(--ink-2); }
.upl-sheet__limits li { display: flex; align-items: center; gap: var(--s2); }
.upl-sheet__limits .ico { flex: none; color: var(--ink-3); }
body.upl-open { overflow: hidden; }
/* Drop zone on a computer */
.chat.upl-drop { outline: 3px dashed var(--accent); outline-offset: -8px; }
@keyframes upl-up { from { transform: translateY(24px); opacity: 0; } }
@keyframes upl-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .upl-sheet__panel, .upl-sheet__scrim { animation: none; } }


.kcard { width: min(100%, 440px); display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow); }
.kcard--akcept { width: 100%; }
.kcard--closed { box-shadow: none; background: var(--surface-2); }
.kcard--closed .kcard__media { aspect-ratio: 16 / 6; filter: saturate(.4); opacity: .8; }
/* delivery card (contract 3 v1.5): first file big, then one row per file */
.kcard .kcard__media.kcard__media--doc { aspect-ratio: auto !important; min-height: 64px; grid-auto-flow: column; gap: var(--s2); justify-content: start; padding-inline: var(--s4); color: var(--accent); font-weight: 800; }
.kdl { list-style: none; margin: 0; padding: var(--s2) var(--s3) 0; display: grid; gap: 4px; }
.kdl__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--s2); min-height: 48px; padding-inline-start: var(--s2); border-radius: 14px; background: var(--surface-2); color: var(--ink-2); }
.kdl__name { min-width: 0; display: grid; color: var(--ink); font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kdl__name small { font-weight: 500; font-size: var(--t-micro); color: var(--ink-3); }
.kdl__act { width: 44px; height: 44px; color: var(--ink); }
.kcard__media { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); color: var(--ink-3); text-decoration: none; }
.kcard__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kcard__play { position: absolute; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgb(0 0 0 / .55); color: #fff; }
.kcard__where { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4) 0; flex-wrap: wrap; }
.kcard__chs { display: inline-flex; gap: 6px; }
.kcard__ch { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); }
.kcard__when { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-label); font-weight: 700; color: var(--ink-2); }
.kcard__when--past { color: var(--warn); }
.kcard__body { display: grid; gap: var(--s2); padding: var(--s3) var(--s4) var(--s4); }
.kcard__kicker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--t-micro); font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.kcard__tag { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; padding: 3px 9px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-text); text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 800; }
.kcard__title { font-size: 19px; font-weight: 800; line-height: 1.25; }
.kcard__text { color: var(--ink-2); }
.kcard__facts { display: grid; gap: 6px; padding: var(--s3); border-radius: 14px; background: var(--surface-2); }
.kcard__fact { display: flex; align-items: flex-start; gap: var(--s2); font-size: var(--t-label); color: var(--ink-2); }
.kcard__fact svg { flex: none; margin-top: 1px; color: var(--ink-3); }
.kcard__fact--bad, .kcard__fact--bad svg { color: var(--bad); font-weight: 700; }
.kcard__days { margin-inline-start: 6px; padding: 1px 7px; border-radius: 999px; background: var(--surface); font-size: 12px; font-weight: 800; color: var(--ink-3); }
.kcard__actions { display: grid; gap: var(--s2); margin-block-start: var(--s2); }
.kcard__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.kcard__opts > :only-child { grid-column: 1 / -1; }
.kcard__opts--stack { grid-template-columns: 1fr; }
.kcard__opts .btn { white-space: normal; text-align: center; }
.kcard__free { display: grid; gap: var(--s2); }
.kcard__reply { display: flex; align-items: flex-end; gap: var(--s2); padding: 6px 6px 6px var(--s3); border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); }
.kcard__reply textarea { flex: 1; min-height: 32px; max-height: 140px; padding: 6px 0; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink); font: inherit; }
.kcard__mic { display: flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s4); border: 1px dashed var(--line-strong); border-radius: var(--r-ctl); background: transparent; color: var(--ink-2); font: inherit; font-weight: 700; cursor: pointer; }
.kcard__mic[data-rec="1"] { border-style: solid; border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.kcard__mic[data-rec="1"] svg { animation: kcard-pulse 1s ease-in-out infinite; }
@keyframes kcard-pulse { 50% { opacity: .35; } }
.kcard__approve { min-height: 60px; font-size: 18px; }
.kcard__sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--s2); }
.kcard__side { min-height: 48px; }
.kcard__side[aria-expanded="true"] { background: var(--anchor); color: var(--anchor-ink); }
.kcard__panel { display: grid; gap: var(--s2); padding: var(--s3); border-radius: 16px; background: var(--surface-2); }
.kcard__panel[hidden] { display: none; }
.kcard__panel textarea { width: 100%; min-height: 64px; padding: var(--s2) var(--s3); border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; resize: vertical; }
.kcard__panelrow { display: grid; grid-template-columns: auto 1fr; gap: var(--s2); }
.kcard__panelrow .kcard__mic, .kcard__panelrow .btn { min-height: 48px; padding: 0 var(--s3); white-space: nowrap; }
.kcard__panelrow .kcard__mic[data-rec="1"] { grid-column: 1 / -1; white-space: normal; }
.kcard__status { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-label); font-weight: 700; color: var(--ink-2); }
.kcard__status[hidden] { display: none; }
.kcard__status[data-tone="bad"] { color: var(--bad); }
.kcard__status[data-tone="ok"] { color: var(--ok); }
.kcard__status button { margin-inline-start: auto; min-height: 36px; padding: 0 var(--s3); border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit; font: inherit; font-weight: 800; cursor: pointer; }
.kcard__done { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-weight: 700; font-size: var(--t-label); }
.kcard__done[hidden] { display: none; }
.kcard[data-busy="1"] .kcard__actions { opacity: .55; pointer-events: none; }


/* Video tiles in the conversation (ui/message.ts renders .att__thumb + .att__play itself; no second mark here).
   Delivery messages (.dlv) show the poster big, 16:10, with a big play mark. */
.att[data-mime^="video/"] { position: relative; cursor: pointer; }
.dlv .att[data-mime^="video/"] { grid-template-columns: 1fr; grid-template-rows: auto auto auto; row-gap: 4px; padding: 0; background: none; }
.dlv .att[data-mime^="video/"] .att__thumb, .dlv .att[data-mime^="video/"] .att__ph { grid-row: auto; width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 16px; }
.dlv .att[data-mime^="video/"] .att__thumb img { object-fit: cover; }
.dlv .att[data-mime^="video/"] .att__play { width: 56px; height: 56px; }
.dlv .att[data-mime^="video/"] .att__play svg { width: 26px; height: 26px; }
.dlv .att[data-mime^="video/"] .att__name, .dlv .att[data-mime^="video/"] .att__size { padding-inline: 4px; }
/* Any other tile that opens the viewer (cards, Gotowe, Biblioteka): pointer only, each owns its play mark. */
[data-video-src] { cursor: pointer; }
/* Layer */
.vv { position: fixed; inset: 0; z-index: 80; background: #000; color: #fff; }
.vv[hidden] { display: none; }
body.vv-open { overflow: hidden; }
.vv__panel { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.vv__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); }
.vv__name { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.vv__btn { width: 48px; height: 48px; border-radius: 50%; color: #fff; background: rgb(255 255 255 / .12); }
.vv__btn:hover { background: rgb(255 255 255 / .22); }
.vv__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vv__stage { position: relative; min-height: 0; overflow: hidden; }
.vv__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.vv__state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--s2); padding: var(--s5); text-align: center; background: rgb(0 0 0 / .55); }
.vv__state[hidden] { display: none; }
.vv__state[data-kind="loading"] { background: transparent; pointer-events: none; }
.vv__title { font-size: 18px; font-weight: 800; }
.vv__body { color: rgb(255 255 255 / .8); font-size: 15px; }
.vv__spin { width: 44px; height: 44px; border-radius: 50%; border: 4px solid rgb(255 255 255 / .25); border-top-color: #fff; animation: vv-spin .9s linear infinite; }
.vv__ico { display: none; color: #ffb37f; }
.vv__retry { display: none; margin-block-start: var(--s2); }
.vv__state:not([data-kind="loading"]) .vv__spin { display: none; }
.vv__state:not([data-kind="loading"]) .vv__ico { display: block; }
.vv__state:not([data-kind="loading"]) .vv__retry { display: inline-flex; }
.vv__state[data-kind="loading"] .vv__title { text-shadow: 0 1px 4px rgb(0 0 0 / .8); }
.vv__foot { display: grid; gap: var(--s2); justify-items: center; padding: var(--s3) var(--s4) var(--s4); }
.vv__note { display: flex; align-items: center; gap: var(--s2); margin: 0; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / .14); font-size: var(--t-label); font-weight: 700; }
.vv__note[hidden] { display: none; }
.vv__dl { min-width: 200px; background: rgb(255 255 255 / .14); color: #fff; }
.vv__dl:hover { background: rgb(255 255 255 / .24); }
.vv[data-state="error"] .vv__dl { background: var(--accent-fill); color: var(--accent-ink); }
@media (min-width: 900px) { .vv__panel { max-width: 960px; margin-inline: auto; } }
@keyframes vv-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vv__spin { animation-duration: 2.4s; } }


.login__head { display: grid; justify-items: center; gap: var(--s3); text-align: center; padding-block: var(--s5) var(--s2); }
.login__title { font-size: 24px; font-weight: 800; }
.login__sent { display: grid; gap: 4px; text-align: center; }
.login__sent h2 { font-size: 18px; }
.login__sent p { color: var(--ink-2); overflow-wrap: anywhere; }
.login__fine { text-align: center; font-size: var(--t-label); color: var(--ink-3); }
.login__fine a { font-weight: 700; display: inline-flex; min-height: var(--tap); align-items: center; }


.kit-block { display: grid; gap: var(--s3); padding-block-end: var(--s5); border-bottom: 1px solid var(--line); }
.kit-block__title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); }
.kit-grid--icons { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.kit-grid--ill { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.kit-cell { display: grid; justify-items: center; gap: 4px; padding: var(--s2); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); text-align: center; }
.kit-cell small { font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.kit-chat { padding: var(--s3); border: 1px dashed var(--line-strong); border-radius: var(--r-card); }
.conn-logo { display: grid; place-items: center; padding-block: var(--s3); }


.pwa-update { position: fixed; z-index: 60; inset-inline: var(--s3); inset-block-end: calc(var(--bar) + env(safe-area-inset-bottom, 0px) + var(--s3));
  display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s2) var(--s2) var(--s4);
  background: var(--anchor); color: var(--anchor-ink); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); box-shadow: var(--shadow); font-weight: 700; }
.pwa-update__text { flex: 1 1 auto; min-width: 0; }
.pwa-update .btn { min-height: 40px; padding-inline: var(--s3); }
.pwa-update .btn--quiet { background: transparent; color: var(--anchor-ink); }
body.is-bare .pwa-update, body.kbd-open .pwa-update { inset-block-end: calc(env(safe-area-inset-bottom, 0px) + var(--s3)); }
@media (min-width: 900px) { .pwa-update { inset-inline: auto var(--s5); inset-block-end: var(--s5); max-width: 420px; } }

.pwa-hint { display: grid; gap: var(--s3); }
.pwa-hint[hidden] { display: none; }
.pwa-hint__head { display: flex; align-items: center; gap: var(--s3); }
.pwa-hint__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-ctl); background: var(--accent-wash); color: var(--accent-text); }
.pwa-hint__text { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.pwa-hint__text span { color: var(--ink-3); font-size: var(--t-label); }
.pwa-hint__close { flex: none; margin-inline-end: calc(var(--s2) * -1); }
.pwa-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); counter-reset: step; }
.pwa-steps[hidden] { display: none; }
.pwa-steps li { display: flex; align-items: center; gap: var(--s3); min-height: var(--tap); padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--surface-2); font-weight: 650; }
.pwa-steps li::before { counter-increment: step; content: counter(step); flex: none; width: 22px; color: var(--ink-3); font-weight: 800; text-align: center; }
.pwa-steps__icon { flex: none; display: grid; place-items: center; color: var(--accent-text); }

.push__switch { display: grid; gap: var(--s1); padding-block: var(--s2) var(--s3); }
.push__switch .tgl__label { font-size: 17px; }
.push__state { margin: 0; color: var(--ink-3); font-size: var(--t-label); font-weight: 600; }
.push__switch .tgl:has(input:checked) + .push__state { color: var(--ok); }
.push__switch .tgl:has(input:disabled) { cursor: default; opacity: .7; }


.ps-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: var(--tap); margin-block-end: var(--s4); }
.ps-bar__title { font-size: var(--t-title); font-weight: 800; }
.ps-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
@media (min-width: 700px) { .ps-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ps-kpi { display: grid; gap: 2px; align-content: start; padding: var(--s3) var(--s4); background: var(--surface); color: var(--ink); text-decoration: none; }
.ps-kpi__label { font-size: var(--t-micro); font-weight: 650; color: var(--ink-3); }
.ps-kpi__num { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ps-kpi__num small { font-size: 14px; font-weight: 650; color: var(--ink-3); margin-inline-start: 2px; }
.ps-kpi__sub { font-size: var(--t-micro); color: var(--ink-3); }
.ps-kpi[data-tone="bad"] .ps-kpi__num { color: var(--bad); }
.ps-kpi[data-tone="warn"] .ps-kpi__num, .ps-kpi[data-tone="wait"] .ps-kpi__num { color: var(--accent-text); }
.ps-kpi[data-tone="ok"] .ps-kpi__num { color: var(--ok); }
.pa-card { display: grid; gap: var(--s3); padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.pa-card__title { font-size: 15px; font-weight: 800; }
.ps-lamp { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--off); flex: none; }
.ps-lamp[data-tone="ok"] { background: var(--ok); } .ps-lamp[data-tone="bad"] { background: var(--bad); } .ps-lamp[data-tone="warn"], .ps-lamp[data-tone="wait"] { background: var(--accent-fill); }
.ps-more > summary { list-style: none; display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); cursor: pointer; font-weight: 700; color: var(--ink-2); }
.ps-more > summary::-webkit-details-marker { display: none; }
.ps-more__chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.ps-more[open] .ps-more__chev { transform: rotate(180deg); }
.ol { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.ol__row + .ol__row { border-top: 1px solid var(--line); }
.ol__line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s3); min-height: 52px; padding: var(--s2) var(--s4); }
.ol__name { font-weight: 700; min-width: 0; }
.ol__what { color: var(--ink-3); font-size: var(--t-label); flex: 1 1 140px; min-width: 0; }
.ol__meta { margin-inline-start: auto; color: var(--ink-3); font-size: var(--t-label); font-variant-numeric: tabular-nums; display: inline-flex; gap: var(--s2); align-items: center; }
.ol__state { font-weight: 750; font-size: var(--t-label); }
.ol__state[data-tone="ok"] { color: var(--ok); } .ol__state[data-tone="bad"] { color: var(--bad); } .ol__state[data-tone="warn"] { color: var(--accent-text); } .ol__state[data-tone="off"] { color: var(--ink-3); }
.ol__fold > summary { padding: 0 var(--s4) var(--s2); font-size: var(--t-micro); color: var(--ink-3); cursor: pointer; }
.ol__body { padding: 0 var(--s4) var(--s3); }
.ol__ids { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.ol__note { color: var(--ink-3); padding: var(--s3) 0; }
.ps-hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.ps-hbars li { display: grid; grid-template-columns: minmax(80px, 30%) 1fr auto; align-items: center; gap: var(--s3); font-size: var(--t-label); }
.ps-hbars li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-hbars i { display: block; height: 10px; width: var(--w, 0%); border-radius: 5px; background: var(--accent-fill); }
.ps-hbars b { font-variant-numeric: tabular-nums; }


.achat .chat__top { padding-block-end: var(--s1); }
.achat__suggest { display: flex; flex-wrap: wrap; gap: var(--s2); padding: var(--s2) var(--s4); }
.achat__suggest .chip { min-height: var(--tap); border-radius: var(--r-ctl); font-weight: 650; font-size: var(--t-label); }
.achat .msg.is-pending .bub { opacity: .6; }
.achat .msg.is-failed .bub { box-shadow: inset 0 0 0 2px var(--bad); }
.achat .chat__older[aria-busy="true"] { opacity: .5; pointer-events: none; }
.achat .chat__older--none { color: var(--ink-3); font-weight: 600; }
.achat .bstate { border-top: 1px solid var(--line); background: var(--surface); }


.astan, .kq { display: grid; gap: var(--s5); }
.astan-upd { font-size: var(--t-micro); color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.astan-quiet { font-size: var(--t-label); color: var(--ink-3); }
.astan .ol__name, .kq .ol__name { display: inline-flex; align-items: center; gap: var(--s2); }
.astan .ol__name a, .kq .ol__name a { color: inherit; text-decoration: none; }
.astan .ol__name a:hover, .kq .ol__name a:hover { text-decoration: underline; }
.astan-ver { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.astan-facts { display: grid; gap: 2px; font-size: var(--t-label); }
.astan-facts span { color: var(--ink-3); }
.astan-facts b { font-weight: 650; font-variant-numeric: tabular-nums; }
.astan-more { display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--t-label); font-weight: 700; text-decoration: none; }
.astan .ol__row[data-status="offline"] .ol__name { color: var(--bad); }
.astan .ps-kpi__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


.kq .ps-kpi__sub:empty { display: none; }
.kq-renders { font-size: var(--t-label); font-weight: 750; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kq-renders[data-full="1"] { color: var(--accent-text); }
.kq-lane { display: grid; gap: var(--s2); }
.kq-lane__head { display: flex; align-items: center; gap: var(--s2); min-height: 32px; }
.kq-lane__title { font-size: 16px; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kq-lane__counts { margin-inline-start: auto; font-size: var(--t-micro); color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kq .ol__row[data-stuck="1"] { background: var(--bad-bg); box-shadow: inset 3px 0 0 var(--bad); }
.kq .ol__row[data-stuck="1"]:first-child { border-start-start-radius: var(--r-card); border-start-end-radius: var(--r-card); }
.kq .ol__row[data-stuck="1"]:last-child { border-end-start-radius: var(--r-card); border-end-end-radius: var(--r-card); }
.kq .ol__row[data-phase="done"] .ol__name { color: var(--ink-2); font-weight: 650; }
.kq-eta { font-weight: 650; color: var(--ink-2); }
.kq-eta--none { font-weight: 500; color: var(--ink-3); }
.kq-done > summary { font-size: var(--t-label); }
.kq-done > .ol { margin-block-start: var(--s1); }


.cst { display: grid; gap: var(--s4); }
.cst-month { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-block-end: var(--s3); }
.cst-month strong { font-size: 17px; font-weight: 800; text-transform: capitalize; text-align: center; }
.cst-month--day { margin: 0; }
.cst-month--day strong { font-size: 15px; text-transform: none; }
.cst-month [data-off] { opacity: .3; }
.cst-chart { margin: 0; display: grid; gap: var(--s1); }
.cst-chart__plot { position: relative; padding-inline-start: 56px; }
.cst-chart__y { position: absolute; inset-inline-start: 0; font-size: var(--t-micro); color: var(--ink-3); font-variant-numeric: tabular-nums; line-height: 1; }
.cst-chart__y.is-max { top: 0; } .cst-chart__y.is-zero { bottom: 0; }
.cst-chart__bars { display: flex; align-items: flex-end; gap: 2px; height: 112px; border-block: 1px solid var(--line); }
.cst-bar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; border-radius: 2px; }
.cst-bar > i { display: block; width: 100%; height: var(--h, 0%); background: var(--accent-fill); border-radius: 2px 2px 0 0; opacity: .85; }
.cst-bar:hover > i { opacity: 1; }
.cst-bar[aria-current="true"] { background: var(--accent-wash); }
.cst-bar[aria-current="true"] > i { opacity: 1; background: var(--ink); }
.cst-bar.is-gap > i { height: 2px; background: var(--ink-3); opacity: .5; }
.cst-chart__x { display: flex; justify-content: space-between; padding-inline-start: 56px; font-size: var(--t-micro); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cst-subs { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.cst-sub { display: grid; gap: 6px; }
.cst-sub__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.cst-sub__name { font-weight: 700; }
.cst-sub__pct { font-variant-numeric: tabular-nums; }
.cst-sub[data-tone="ok"] .cst-sub__pct { color: var(--ok); }
.cst-sub[data-tone="warn"] .cst-sub__pct { color: var(--accent-text); }
.cst-sub[data-tone="bad"] .cst-sub__pct { color: var(--bad); }
.cst-sub[data-tone="bad"] .prog > i { background: var(--bad); }
.cst-sub[data-tone="ok"] .prog > i { background: var(--ok); }
.cst-sub__meta { display: flex; justify-content: space-between; gap: var(--s2); font-size: var(--t-micro); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cst-sub__none { display: flex; align-items: center; gap: var(--s2); color: var(--ink-3); }
.cst-sub__none b { margin-inline-start: auto; color: var(--ink-2); }
.cst .ps-hbars li { grid-template-columns: minmax(80px, 42%) 1fr auto; }
.cst .ps-hbars li > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 650; }
.cst-time { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); font-size: var(--t-label); }
.cst-time li { display: flex; justify-content: space-between; gap: var(--s3); }
.cst-time b { font-variant-numeric: tabular-nums; }
.cst-foot { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-micro); color: var(--ink-3); }


.akl-page { display: grid; gap: var(--s4); }
.akl { align-items: center; min-height: 72px; }
.akl .row__text { gap: 3px; }
.akl__sub { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-label); color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.akl__tg { display: inline-grid; color: var(--ink-3); }
.akl__flag { display: inline-flex; align-items: center; gap: 2px; color: var(--bad); font-weight: 700; }
.akl__ch { display: flex; align-items: center; gap: 6px; min-height: 18px; }
.akl__more, .akl__none { font-size: var(--t-micro); color: var(--ink-3); font-weight: 700; }


.akk { display: grid; gap: var(--s5); }
.akk-state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); color: var(--ink-3); font-size: var(--t-label); margin-block-start: calc(-1 * var(--s2)); }
.akk-state__tg { display: inline-flex; align-items: center; gap: 4px; }
.akk-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.akk-actions .btn { flex: 1 1 160px; }
.akk-report { gap: var(--s2); }
.akk-report p { color: var(--ink-2); }
.akk-report__nums { display: flex; gap: var(--s4); font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink) !important; }
.akk-report__nums span { display: inline-flex; align-items: center; gap: 6px; }
.akk-report__nums .ico { color: var(--ink-3); }
.akk-ids .ol__ids { padding-block-end: var(--s2); }
.akk-ro { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-label); color: var(--ink-3); margin-block-end: var(--s3); }
.akk-older { margin-block-end: var(--s3); }
.akk-log { display: grid; gap: var(--s2); }
.akk-log .kcard__actions { display: none; }


.alm-page { display: grid; gap: var(--s4); }
.alm-filters { display: flex; flex-wrap: wrap; gap: var(--s2); }
.alm-live { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-micro); font-weight: 700; color: var(--ok); }
.alm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.alm { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s2) var(--s3); padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); border-inline-start: 4px solid var(--line-strong); }
.alm[data-level="alarm"] { border-inline-start-color: var(--bad); }
.alm[data-level="warn"] { border-inline-start-color: var(--accent-fill); }
.alm[data-closed] { opacity: .7; }
.alm.is-new { animation: alm-in .4s var(--ease); }
@keyframes alm-in { from { transform: translateY(-6px); opacity: 0; } }
.alm__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); }
.alm__icon[data-tone="bad"] { background: var(--bad-bg); color: var(--bad); }
.alm__icon[data-tone="warn"] { background: var(--accent-wash); color: var(--accent-text); }
.alm__main { display: grid; gap: 4px; min-width: 0; }
.alm__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s2); font-size: var(--t-micro); color: var(--ink-3); }
.alm__lvl { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.alm[data-level="alarm"] .alm__lvl { color: var(--bad); }
.alm[data-level="warn"] .alm__lvl { color: var(--accent-text); }
.alm__kind { font-weight: 700; color: var(--ink-2); }
.alm__top time { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.alm__title { font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.alm__body { color: var(--ink-2); overflow-wrap: anywhere; }
.alm__links { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); font-size: var(--t-label); font-weight: 700; }
.alm__links a { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; text-decoration: none; }
.alm__ack, .alm__done { grid-column: 2; justify-self: start; }
.alm__done { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-label); color: var(--ok); font-weight: 700; }
.alm__ack[data-sent] { color: var(--ok); }
.alm-push { margin-block-start: var(--s5); gap: var(--s2); }
.alm-push__title { display: flex; align-items: center; gap: var(--s2); margin: 0; font-size: 17px; font-weight: 750; }
.alm-push__state { margin: 0; color: var(--ink-3); font-size: var(--t-label); font-weight: 600; }
.alm-push .tgl:has(input:checked) ~ .alm-push__state { color: var(--ok); }
.alm-push .tgl:has(input:disabled) { cursor: default; opacity: .7; }
.alm-push__note { margin: 0; color: var(--ink-3); font-size: var(--t-label); }


.flt { display: grid; gap: var(--s5); }
.flt-nav { display: flex; flex-wrap: wrap; gap: var(--s2); }
.flt .ol__act .btn { min-height: var(--tap); }
.flt .ol__row[data-running="false"] .ol__name { color: var(--bad); }
.lrn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.lrn { display: grid; gap: var(--s2); padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); border-inline-start: 4px solid var(--accent-fill); }
.lrn[data-decided] { opacity: .75; border-inline-start-color: var(--line-strong); }
.lrn__head { font-size: var(--t-label); font-weight: 700; color: var(--ink-2); overflow-wrap: anywhere; }
.lrn__text { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.lrn__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s2) var(--s4); margin: 0; font-size: var(--t-label); }
.lrn__facts dt { color: var(--ink-3); }
.lrn__facts dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.lrn__acts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.lrn__acts .btn { flex: 1 1 140px; }
.lrn__done { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-label); font-weight: 700; color: var(--ok); }
.lrn__done[data-outcome="odrzuc"] { color: var(--ink-3); }


:is(a, button, input, select, textarea, summary, [tabindex], [contenteditable]):focus-visible { outline: 3px solid var(--focus, var(--accent)); outline-offset: 2px; }
.kcard__reply:focus-within, .composer:has(textarea:focus-visible), .kcard__panel:focus-within { outline: 3px solid var(--focus, var(--accent)); outline-offset: 2px; }
.kcard__reply textarea:focus-visible, .composer textarea:focus-visible { outline: none; }
:target { scroll-margin-block: 72px; }
.skip { position: fixed; z-index: 1000; inset-block-start: 8px; inset-inline-start: 8px; padding: 12px 16px; min-height: 44px; border-radius: var(--r-ctl); background: var(--anchor); color: var(--anchor-ink); font-weight: 700; text-decoration: none; transform: translateY(-200%); }
.skip:focus-visible { transform: none; }
@media (prefers-reduced-motion: reduce) {
  html, .chat__log, * { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-iteration-count: 1 !important; animation-delay: 0s !important; }
}
/* Touch targets (WCAG 2.5.5): every control at least 44 px on its short side; text links inside a sentence excepted. */
.chip, .seg__opt, .sheet__open, .bstate__stop, .bdraft__chip, .ps-more > summary, .ol__fold > summary { min-height: var(--tap); }
.ps-more > summary, .ol__fold > summary { display: flex; align-items: center; }
.back { min-width: var(--tap); }
main a:not([class]):not(p a):not(.doc a) { display: inline-flex; align-items: center; min-height: var(--tap); }
h1, h2, h3, p, li, dd, dt, label, .btn, .row, .kcard__title, .dlv__title { overflow-wrap: break-word; }
.bcard__ex, .row__sub, .zc-item { overflow-wrap: anywhere; }
@media (forced-colors: active) {
  .btn, .card, .kcard, .sheet, .ibtn, .composer, .tabbar { border: 1px solid CanvasText; }
  :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline-color: Highlight; }
}
