/* kelpie — generated from tokens.json */
:root, [data-theme="light"] {
  --ink-950: oklch(99% 0.004 84);
  --ink-900: oklch(97% 0.005 84);
  --ink-850: oklch(93% 0.007 84);
  --ink-800: oklch(88% 0.009 84);
  --ink-700: oklch(74% 0.012 84);
  --ink-500: oklch(53% 0.014 84);
  --ink-300: oklch(36% 0.014 84);
  --ink-100: oklch(20% 0.01 84);
  --bg: var(--ink-950);
  --surface: var(--ink-900);
  --line: var(--ink-850);
  --line-strong: var(--ink-800);
  --faint: var(--ink-700);
  --muted: var(--ink-500);
  --text-2: var(--ink-300);
  --text: var(--ink-100);
  --kelpie: #2c5fc0;
  --kelpie-deep: oklch(42% 0.15 262);
  --kelpie-rail: #4a74c9;
  --kelpie-soft: oklch(95% 0.03 262);
  --amber: oklch(58% 0.15 68);
  --amber-strong: oklch(50% 0.14 68);
  --amber-soft: oklch(96% 0.04 80);
  --amber-ink: oklch(42% 0.11 60);
  --rose: oklch(52% 0.21 24);
  --green: oklch(48% 0.16 152);
  --green-soft: oklch(95% 0.04 152);
  --on-accent: #ffffff;
  --scrim: rgba(28, 26, 22, 0.32);
  --term-bg: oklch(19% 0.01 84);
  --term-bar: oklch(25% 0.01 84);
  --term-line: oklch(34% 0.012 84);
  --term-fg: oklch(93% 0.006 84);
  --term-dim: oklch(66% 0.012 84);
  --term-accent: oklch(74% 0.11 255);
  --term-amber: oklch(80% 0.13 75);
  --term-green: oklch(78% 0.14 152);
  --shadow-modal: 0 24px 48px -12px rgba(28, 26, 22, 0.28), 0 2px 6px rgba(28, 26, 22, 0.08);
}
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
  --fs-2xs: 11px;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --sidebar-w: 288px;
  --content-w: 48rem;
  --modal-w: 36rem;
  --dot: 6px;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}
.title { font-family: var(--font-sans); font-size: 1.125rem; line-height: 1.4; font-weight: 700; }
.question { font-family: var(--font-sans); font-size: 1rem; line-height: 1.4; font-weight: 600; }
.body { font-family: var(--font-sans); font-size: 0.875rem; line-height: 1.6; font-weight: 400; }
.small { font-family: var(--font-sans); font-size: 0.75rem; line-height: 1.4; font-weight: 400; }
.label { font-family: var(--font-sans); font-size: 0.75rem; line-height: 1.3; font-weight: 600; }
.pill { font-family: var(--font-sans); font-size: 11px; line-height: 1; font-weight: 600; }
.terminal { font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.55; font-weight: 400; }
.code { font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.6; font-weight: 400; }
/* The mark's paint and motion, for the SVG in the DS's ds/mark.js. The panel and the web app both load this file. */
.k-mark svg { display: block; overflow: visible; }
.k-mark__word { fill: var(--text); }
.k-mark__dot, .k-mark__dog { fill: var(--kelpie); }
.k-mark__eye { fill: var(--bg); }
.k-mark__rail { fill: none; stroke: var(--kelpie-rail); stroke-width: 3; stroke-dasharray: 10.2 10.2; stroke-linejoin: round; }
.k-mark__wipe { fill: none; stroke: #fff; stroke-width: 14; stroke-dasharray: 90 910; animation: 15s linear infinite; }
.k-mark__run { offset-path: path("M180 25.9 L216.3 25.7 L231.4 25.8 L242.7 26.4 L251.6 27.4 L258.8 28.9 L264.6 30.8 L269.2 32.9 L272.9 35.2 L276.3 37.4 L279.5 39.5 L283 41.4 L287 43 L291.7 44.4 L297 45.6 L303.1 47 L309.5 48.6 L315.9 50.6 L322.1 53.5 L327.5 57.3 L331.9 62.6 L335 70.3 L336.6 90 L336.7 109.9 L335.6 118.1 L333.4 124 L330.3 128.7 L326.9 132.6 L323.2 136 L319.6 139 L316.1 141.8 L312.9 144.6 L309.7 147.3 L306.3 150 L302.5 152.5 L298 154.8 L292.6 156.8 L286 158.2 L278.1 159 L268.8 159.1 L258.2 158.6 L246.3 157.4 L232.6 155.8 L216 153.8 L180 151.8 L146.2 149.8 L133.4 148 L124.1 146.6 L116.1 145.7 L108.7 145.1 L101.4 144.9 L94 145 L86.6 145.1 L79.3 145.1 L72.3 144.8 L65.9 144.1 L60.3 142.8 L55.6 141 L51.9 138.7 L49.1 135.8 L47.2 132.6 L45.7 128.9 L44.5 124.8 L43.3 120.2 L41.7 114.9 L39.8 107.8 L37.4 90 L34.7 71.5 L31.8 63.3 L29.1 56.5 L27 50.6 L25.8 45.2 L25.8 40.4 L27.3 36.3 L30.3 32.9 L35 30.3 L41 28.4 L48.2 27.3 L56.3 26.8 L64.9 26.8 L73.7 27 L82.5 27.4 L91.2 27.7 L99.8 27.8 L108.7 27.7 L118.3 27.4 L129.5 26.9 L144.1 26.4 Z"); offset-rotate: 0deg; animation: k-mark-run 15s linear infinite; }
.k-mark__trot { animation: k-mark-trot .45s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes k-mark-run { 0% { offset-distance: 0% } 28% { offset-distance: 36% } 34% { offset-distance: 36% } 66% { offset-distance: 72% } 73% { offset-distance: 72% } 100% { offset-distance: 100% } }
@keyframes k-mark-trot { from { rotate: -4deg } to { rotate: 4deg } }
@keyframes k-mark-w0 { 0% { stroke-dashoffset: 109.2 } 28% { stroke-dashoffset: -250.8 } 34% { stroke-dashoffset: -250.8 } 66% { stroke-dashoffset: -610.8 } 73% { stroke-dashoffset: -610.8 } 100% { stroke-dashoffset: -890.8 } }
@keyframes k-mark-w1 { 0% { stroke-dashoffset: 199.2 } 28% { stroke-dashoffset: -160.8 } 34% { stroke-dashoffset: -160.8 } 66% { stroke-dashoffset: -520.8 } 73% { stroke-dashoffset: -520.8 } 100% { stroke-dashoffset: -800.8 } }
@keyframes k-mark-w2 { 0% { stroke-dashoffset: 289.2 } 28% { stroke-dashoffset: -70.8 } 34% { stroke-dashoffset: -70.8 } 66% { stroke-dashoffset: -430.8 } 73% { stroke-dashoffset: -430.8 } 100% { stroke-dashoffset: -710.8 } }
@media (prefers-reduced-motion: reduce) { .k-mark__run, .k-mark__rails { display: none; } }

/* The one navigation (page G's anav, 2.9) on the board, map, inbox, tasks and tree pages: the mark, the Org and Project
   pickers, Play and Project, then notifications and the person. A phone draws it as a top bar whose pages scroll. */
.anav { width: 232px; flex: none; box-sizing: border-box; border-right: 1px solid var(--line); background: var(--surface); padding: 18px 12px;
  display: flex; flex-direction: column; gap: 2px; overflow: visible; font-family: var(--font-sans); color: var(--text); }
.anav > .k-mark { display: inline-flex; padding: 0 2px 10px; }
.anav > .col { display: flex; flex-direction: column; gap: 6px; padding: 0 4px 10px; }
.anav .its { position: relative; display: flex; flex-direction: column; gap: 2px; }
.anav .it { position: relative; }
.selbox-d { position: relative; }
.selbox-d > summary { list-style: none; cursor: pointer; }
.selbox-d > summary::-webkit-details-marker { display: none; }
.selbox { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--bg); font-size: 12px; white-space: nowrap; overflow: hidden; text-decoration: none; color: var(--text); }
.selbox .mut { color: var(--muted); }
.selbox b { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; font-weight: 650; }
.selbox .ic { color: var(--muted); flex: none; transition: transform .2s; }
.selbox-d[open] .selbox .ic { transform: rotate(180deg); }
.selbox-d .k-menu { top: calc(100% + 6px); bottom: auto; left: 0; right: auto; width: 16rem; }
.selbox-d .k-menu__row { color: var(--text); text-decoration: none; font-size: 13px; }
.selbox-d .k-menu__row[aria-current] { background: var(--kelpie-soft); color: var(--kelpie-deep); font-weight: 600; }
.selbox-d .proj-n { font-size: 12px; color: var(--muted); }
.selbox-d .proj-n.is-on { color: var(--amber-ink); }
.anav .it { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; font-size: 13px; text-decoration: none; color: var(--text-2); white-space: nowrap; }
.anav .it:hover { background: var(--bg); color: var(--text); }
.anav .it.on { background: var(--kelpie-soft); color: var(--kelpie-deep); font-weight: 650; }
.anav .it svg { flex: none; }
.anav .grp { margin: 16px 10px 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 650; color: var(--muted); }
.anav .nav-n { margin-left: auto; min-width: 20px; height: 20px; box-sizing: border-box; padding: 0 6px; display: grid; place-items: center; border-radius: 999px;
  background: var(--amber-soft); color: var(--amber-ink); font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.anav .grow { flex: 1; }
/* The account card "<name> · <role>" (UX-27) opens the account menu: a popover above the card on a desktop, a bottom
   sheet on a phone. Kit tokens, an 8px rhythm: 16px rows of 14px type, 12px and 11px for what qualifies them. */
.anav .me { position: relative; font-size: 12px; color: var(--text-2); }
.anav .me > summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; list-style: none; cursor: pointer; }
.anav .me > summary::-webkit-details-marker { display: none; }
.anav .me > summary:hover, .anav .me[open] > summary { background: var(--bg); color: var(--text); }
.anav .me > summary:focus-visible { outline: 2px solid var(--kelpie); outline-offset: -2px; }
.anav .me > summary .ic { flex: none; color: var(--muted); transform: rotate(180deg); transition: transform .2s; }
.anav .me[open] > summary .ic { transform: none; }
.anav .me .who-me { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am { position: absolute; left: 0; bottom: calc(100% + var(--space-2)); z-index: 40; width: 20rem; box-sizing: border-box; padding: var(--space-2);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-2xl); box-shadow: var(--shadow-modal); font-size: var(--fs-sm); color: var(--text); }
.am-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-2) var(--space-3); }
.am-head .k-avatar { width: 40px; height: 40px; border-radius: var(--radius-xl); font-size: var(--fs-base); }
.am-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.am-who b { font-size: var(--fs-sm); font-weight: 650; line-height: 20px; }
.am-who span { font-size: var(--fs-xs); line-height: 16px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-list { display: flex; flex-direction: column; gap: 2px; }
.am .k-menu__row { min-height: 40px; padding: var(--space-2); color: var(--text); text-decoration: none; }
.am .k-menu__row:hover { background: var(--surface); }
.am .k-menu__row:focus-visible { background: var(--surface); }
.am-l { display: inline-flex; align-items: center; gap: var(--space-3); min-width: 0; }
.am-l .ic { flex: none; color: var(--muted); }
.am .k-menu__value { font-size: var(--fs-xs); max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am .k-menu__value .k-dot { --dot: 6px; }
.am .k-dot--ink { background: var(--faint); }
.am-sep { height: 1px; margin: var(--space-1) var(--space-2); background: var(--line); }
.am-hint { display: block; margin: 0; font-size: var(--fs-2xs); line-height: 16px; font-weight: 400; color: var(--muted); }
.am-theme { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: var(--space-2); }
.am-theme .am-l { flex-wrap: wrap; row-gap: 2px; }
.am-theme .am-l .am-hint { flex-basis: 100%; margin-left: 28px; }
.am-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-left: 28px; padding: 2px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.am-seg button { height: 32px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-md); background: transparent; font: inherit; font-size: var(--fs-xs); font-weight: 550; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.am-seg button:hover { color: var(--text); }
.am-seg button[aria-checked=true] { background: var(--bg); color: var(--kelpie-deep); font-weight: 650; box-shadow: 0 1px 2px rgba(28, 26, 22, .12), 0 0 0 1px var(--line); }
.am-seg button:focus-visible { outline: 2px solid var(--kelpie); outline-offset: -2px; }
.am-sw { position: relative; flex: none; width: 32px; height: 20px; border-radius: var(--radius-full); background: var(--line-strong); transition: background .2s; }
.am-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: var(--radius-full); background: var(--bg); box-shadow: 0 1px 2px rgba(28, 26, 22, .2); transition: transform .2s; }
.notify-on[aria-checked=true] .am-sw { background: var(--kelpie); }
.notify-on[aria-checked=true] .am-sw::after { transform: translateX(12px); }
.notify-on:disabled { cursor: not-allowed; opacity: .5; }
.am-out { margin: 0; }
.am-out .am-hint { padding: 0 var(--space-2) var(--space-1) 36px; }
@media (prefers-reduced-motion: reduce) { .am-sw, .am-sw::after, .anav .me > summary .ic { transition: none; } }
.k-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.frame { display: flex; min-height: 100vh; min-height: 100dvh; }
.frame > .anav { position: sticky; top: 0; height: 100vh; height: 100dvh; z-index: 20; }
.frame > .root { flex: 1; min-width: 0; }
@media (max-width: 760px) {
  .frame { display: block; }
  .frame > .anav, .play .anav { position: sticky; top: 0; z-index: 30; width: auto; height: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
    gap: 6px 10px; padding: 8px 12px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .anav > .k-mark { padding: 0; }
  .anav > .k-mark svg { width: 92px; height: 44px; }
  .anav > .col { padding: 0; min-width: 0; }

  .selbox-d .k-menu { position: fixed; top: 56px; left: 12px; right: 12px; width: auto; }
  .anav .its { grid-column: 1 / -1; flex-direction: row; gap: 4px; padding-bottom: 8px; }
  .anav .its::-webkit-scrollbar { display: none; }
  .anav .its .grp { display: none; }
  .anav .it { flex: 1 1 0; min-width: 0; justify-content: center; gap: 6px; height: 40px; padding: 0 6px; }
  .anav .nav-n { margin-left: 0; }
  .anav .grow { display: none; }
  .anav .me { grid-area: 1 / 3; }
  .anav .me > summary { padding: 4px; }
  .anav .me > summary .ic, .anav .me .who-me { display: none; }
  .anav .me[open]::before { content: ""; position: fixed; inset: 0; z-index: 39; background: var(--scrim); }
  .am { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 85dvh; overflow-y: auto;
    padding: var(--space-3) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom)); border-radius: var(--radius-2xl) var(--radius-2xl) 0 0; border-bottom: 0; }
  .am::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto var(--space-2); border-radius: var(--radius-full); background: var(--line-strong); }
  .am .k-menu__row { min-height: 48px; }
}
/* One Org / Project switcher (S5, 2.10): projects grouped by org with their waiting counts, Org settings at the foot. */
.selbox.sw { gap: 0; padding: 0 5px 0 8px; font-size: 12px; }
.selbox.sw .proj-cur { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selbox.sw .ic { margin-left: auto; padding-left: 4px; width: 12px; height: 12px; }
.selbox.sw .k-dot { margin-left: 6px; flex: none; }
.sw .sw-org { color: var(--muted); font-weight: 500; white-space: pre; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.k-menu.swm { padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.swm .og { padding: 8px 10px 4px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 650; color: var(--muted); }
.swm .k-menu__row { display: flex; align-items: center; gap: 8px; border-radius: 6px; }
.swm .k-menu__row .proj-n { margin-left: auto; flex: none; }
.swm .k-menu__row.ft { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; border-radius: 0; }
.swm .k-menu__row.ft .proj-name { display: inline-flex; align-items: center; gap: 8px; }
/* The mark holds its whole trail (2.10): nothing of it is drawn past its box, so no header or page edge clips it. */
.anav > .k-mark svg, .gt .k-mark svg { overflow: hidden; }
/* The switcher sits on one row (S5, 2.11): "Org / Project", the org shrinking first, each cut with an ellipsis and the
   whole name on hover; on a phone the org is left to the menu. */
.selbox.sw .sw-org { flex: 0 100 auto; }
@media (max-width: 760px) { .anav .sw .sw-org { display: none; } }

/* A job's steps, one rule set for every job card (Play, Tasks' Make, Your agents), drawn by the server or live: done
   with a tick, now spinning, next dashed. */
.steps { display: flex; flex-direction: column; gap: 6px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.step > .ic { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.step.ok > .ic { background: var(--green-soft); color: var(--green); }
.step.ok > .ic::after { content: ""; width: 3px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.step.now { color: var(--text); font-weight: 600; }
.step.now > .ic { border: 2px solid var(--kelpie); border-right-color: transparent; animation: k-step-spin 1s linear infinite; }
.step.wait { color: var(--muted); }
.step.wait > .ic { border: 1.5px dashed var(--line-strong); }
@keyframes k-step-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .step.now > .ic { animation: none; } }

/* Tasks' job sections (Make, Already built, Check in code): one rule set, Play's job card with its values scoped to
   the item, done ticked, now spinning, next dashed. */
.wk-sec.wk-job { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wk-job .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wk-job .asks { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.wk-job .inl { display: inline; margin: 0; }
.wk-job .mut { font-size: 12px; line-height: 1.45; color: var(--muted); }
.wk-job .t2 { font-size: 12px; line-height: 1.45; color: var(--text-2); }
.wk-job .jc, .wk-job .ci-done, .wk-job .mk-held { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.wk-job .jc { border-color: color-mix(in srgb, var(--kelpie) 45%, var(--line)); box-shadow: 0 0 0 3px var(--kelpie-soft); }
.wk-job .mk-held { border-color: color-mix(in srgb, var(--rose) 30%, var(--line)); background: color-mix(in srgb, var(--rose) 4%, var(--bg)); }
.wk-job .jh { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--text); }
.wk-job .jh svg { width: 15px; height: 15px; flex: none; color: var(--kelpie); }
.wk-job .mk-held .jh svg { color: var(--rose); }
.wk-job .jm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.wk-job .jm svg { width: 12px; height: 12px; }
.wk-job .flag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 700; background: color-mix(in srgb, var(--rose) 12%, var(--bg)); color: var(--rose); white-space: nowrap; }
.wk-job .flag svg { width: 12px; height: 12px; }
.wk-job .ci-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.wk-job .ci-f { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.wk-job .mk-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--text-2); min-width: 0; }
.wk-job .mk-facts .mono { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11.5px; overflow-wrap: anywhere; min-width: 0; }
.wk-job .mk-facts svg { width: 12px; height: 12px; color: var(--muted); flex: none; }
.wk-job .mk-add { color: var(--green); font-weight: 650; }
.wk-job .mk-del { color: var(--rose); font-weight: 650; }
.wk-job .ci-refs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); overflow-wrap: anywhere; }
.wk-job .ci-st { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.wk-job .ci-st svg { width: 14px; height: 14px; color: var(--amber-ink); flex: none; }
.wk-job .ci-fail { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--rose) 7%, var(--bg)); border: 1px solid color-mix(in srgb, var(--rose) 25%, var(--line)); }
.wk-job .ci-fail b { color: var(--rose); }
.wk-job .ci-fix { font-size: 12px; color: var(--text); overflow-wrap: anywhere; }
.wk-job .mk-calm { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.wk-job .mk-calm .k-btn svg { width: 14px; height: 14px; }
.wk-job code { font-family: var(--font-mono); font-size: 11.5px; padding: 1px 5px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; }
.wk-job .live.k { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; font-weight: 650; color: var(--kelpie-deep); }
.wk-job .live.k::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--kelpie); animation: mk-pulse 1.6s ease-in-out infinite; }
.wk-job .bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.wk-job .bar i { display: block; height: 100%; border-radius: 4px; background: var(--kelpie); }
.wk-job .r-pct { font-size: 12px; font-weight: 700; color: var(--kelpie-deep); }
.wk-job .grow { flex: 1; min-width: 0; }
.wk-job .why-off { display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.wk-job .chip.off { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; height: 28px; padding: 0 10px; border-radius: var(--radius-full); background: var(--line); color: var(--text-2); }
.wk-job .k-dot--ink { background: var(--faint); }
.wk-job .mk-go svg { width: 14px; height: 14px; }
.mk-tag--held { background: color-mix(in srgb, var(--rose) 12%, var(--bg)); color: var(--rose); }
.mk-tag--answered { background: var(--green-soft); color: var(--green); }
.mk-tag--checking, .mk-tag--opening, .mk-tag--signing, .mk-tag--sent { background: var(--kelpie-soft); color: var(--kelpie-deep); }
.mk-tag--failed_locally, .mk-tag--refused_locally { background: var(--amber-soft); color: var(--amber-ink); }
@keyframes mk-pulse { 50% { opacity: .35; } }
.wk-job .mk-whys { display: flex; flex-direction: column; gap: 6px; }
.wk-job .mk-why { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.wk-job .mk-src { overflow-wrap: anywhere; }
.wk-job .mk-nore { font-style: italic; }
.wk-job .ci-res { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.wk-job .ci-res li { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12px; line-height: 1.45; color: var(--text-2); }
.wk-job .ci-res .k-tag { align-self: flex-start; }
.wk-job .ci-res .mono { font-family: var(--font-mono); font-size: 11.5px; overflow-wrap: anywhere; }
.wk-job .ci-done.is-back { border-color: color-mix(in srgb, var(--amber-ink) 30%, var(--line)); background: color-mix(in srgb, var(--amber-soft) 40%, var(--bg)); }
.wk-job .ci-done.is-back .jh svg { color: var(--amber-ink); }
.wk-job .wk-mark { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.wk-job .wk-mark .k-field { flex: 1 1 14rem; min-width: 0; }
.wk-job .k-btn svg { width: 14px; height: 14px; }
.am-dens .am-seg { grid-template-columns: repeat(2, 1fr); }
.am-dens .am-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ag-tog { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--radius-full); font-size: 13px; font-weight: 600;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--text-2); cursor: pointer; }
.ag-tog:has(input:checked) { border-color: var(--kelpie); background: var(--kelpie); color: var(--on-accent); }
.ag-tog:has(input:checked)::before { content: "✓"; font-weight: 800; }
.ag-tog input { position: absolute; opacity: 0; pointer-events: none; }
.ag-tog:has(input:disabled) { opacity: .6; cursor: default; }
.ag-tog:has(input:focus-visible) { outline: 2px solid var(--kelpie); outline-offset: 2px; }
.k-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.k-icon{flex:none;display:block}
.k-empty{margin:0;padding:var(--space-1) var(--space-2);font-size:var(--fs-xs);color:var(--muted)}

.k-shell{display:flex;flex-wrap:wrap;align-items:stretch;height:100vh;overflow:auto;background:var(--bg);color:var(--text);font-family:var(--font-sans);font-size:var(--fs-sm);line-height:1.45}
.k-shell__side{flex:1 1 var(--sidebar-w);max-width:100%;display:flex;min-height:0;height:100%}
.k-shell__main{flex:999 1 560px;min-width:0;height:100%;display:flex;flex-direction:column;position:relative;background:var(--bg)}
.k-thread{flex:1 1 auto;min-height:0;overflow:auto;padding:var(--space-6) var(--space-4)}
.k-thread__inner{max-width:var(--content-w);margin:0 auto;display:flex;flex-direction:column;gap:var(--space-5)}
.k-hello{display:flex;flex-direction:column;align-items:center;gap:var(--space-4);padding:var(--space-10) 0;text-align:center}
.k-hello__mark{width:28px;height:28px}
.k-hello__text{margin:0;font-size:var(--fs-base);color:var(--text-2)}
.k-hello__ideas{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--space-2)}
.k-working{display:flex;align-items:center;gap:var(--space-2);margin:0;font-size:var(--fs-xs);color:var(--muted)}

.k-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);font:inherit;font-family:var(--font-sans);font-weight:600;font-size:var(--fs-sm);line-height:1.25rem;border-radius:var(--radius-lg);border:1px solid transparent;padding:var(--space-2) var(--space-4);cursor:pointer;transition:background-color .15s,border-color .15s,color .15s;white-space:nowrap}
.k-btn:focus-visible{outline:2px solid var(--kelpie);outline-offset:2px}
.k-btn:disabled{cursor:not-allowed;opacity:.5}
.k-btn--primary{background:var(--kelpie);color:var(--on-accent)}
.k-btn--primary:hover:not(:disabled){background:var(--kelpie-deep)}
.k-btn--ghost{background:var(--bg);color:var(--text);border-color:var(--line-strong)}
.k-btn--ghost:hover:not(:disabled){background:var(--line)}
.k-btn--danger{background:var(--rose);color:var(--on-accent)}
.k-btn--icon{background:transparent;color:var(--text-2);padding:var(--space-2);border-radius:var(--radius-md)}
.k-btn--icon:hover:not(:disabled){background:var(--line);color:var(--text)}
.k-btn--sm{padding:var(--space-1) var(--space-3);font-size:var(--fs-xs);border-radius:var(--radius-md)}

.k-tag{display:inline-flex;align-items:center;font-family:var(--font-mono);font-size:var(--fs-2xs);font-weight:500;line-height:1;padding:3px 6px;border-radius:var(--radius-md);background:var(--line);color:var(--text-2);white-space:nowrap}
.k-tag--kelpie{background:var(--kelpie-soft);color:var(--kelpie-deep)}
.k-tag--amber{background:var(--amber-soft);color:var(--amber-ink)}
.k-tag--green{background:var(--green-soft);color:var(--green)}

.k-dot{display:inline-block;flex:none;width:var(--dot);height:var(--dot);border-radius:var(--radius-full);background:var(--green)}
.k-dot--kelpie{background:var(--kelpie)}
.k-dot--amber{background:var(--amber)}
.k-dot--rose{background:var(--rose)}
.k-dot--green{background:var(--green)}
.k-dot--ink{background:var(--faint)}
.k-dot--pulse{animation:k-pulse 2s cubic-bezier(.4,0,.6,1) infinite}
@keyframes k-pulse{50%{opacity:.4}}
.k-status{display:inline-flex;align-items:center;gap:var(--space-2);font-size:var(--fs-xs);color:var(--muted)}
.k-pill{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 6px;box-sizing:border-box;border-radius:var(--radius-full);background:var(--amber-strong);color:var(--on-accent);font-family:var(--font-sans);font-size:var(--fs-2xs);font-weight:600;line-height:1}
.k-section{display:flex;align-items:center;gap:var(--space-2);padding:0 var(--space-2);margin:var(--space-3) 0 2px}
.k-section__label{font-size:var(--fs-xs);font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.k-bucket{margin:var(--space-2) 0 2px;padding:0 var(--space-2);font-size:var(--fs-xs);color:var(--muted)}

.k-field{display:flex;align-items:center;gap:var(--space-2);height:32px;padding:0 var(--space-3);border:1px solid var(--line-strong);border-radius:var(--radius-lg);background:var(--bg);color:var(--muted);font-family:var(--font-sans)}
.k-field:focus-within{border-color:var(--kelpie);box-shadow:0 0 0 3px var(--kelpie-soft)}
.k-field__input{flex:1;min-width:0;border:0;outline:0;background:transparent;font:inherit;font-size:var(--fs-sm);color:var(--text)}
.k-field__input::placeholder{color:var(--muted)}

.k-side{flex:1;display:flex;min-width:0;background:var(--surface);border-right:1px solid var(--line);font-family:var(--font-sans);font-size:var(--fs-sm);color:var(--text)}
.k-side__panel{flex:1;display:flex;flex-direction:column;gap:var(--space-2);min-width:0;padding:var(--space-3)}
.k-side__brand{display:flex;align-items:center;justify-content:space-between;padding:0 0 0 var(--space-2)}
.k-mark{display:inline-block;flex:none;line-height:0}.k-mark svg{display:block;overflow:visible}.k-mark__word{fill:var(--text)}.k-mark__dot,.k-mark__dog{fill:var(--kelpie)}.k-mark__eye{fill:var(--bg)}.k-mark__rail{fill:none;stroke:var(--kelpie-rail);stroke-width:3;stroke-dasharray:10.2 10.2;stroke-linejoin:round}.k-mark__wipe{fill:none;stroke:#fff;stroke-width:14;stroke-dasharray:90 910;animation:15s linear infinite}.k-mark__run{offset-path:path("M180 25.9 L216.3 25.7 L231.4 25.8 L242.7 26.4 L251.6 27.4 L258.8 28.9 L264.6 30.8 L269.2 32.9 L272.9 35.2 L276.3 37.4 L279.5 39.5 L283 41.4 L287 43 L291.7 44.4 L297 45.6 L303.1 47 L309.5 48.6 L315.9 50.6 L322.1 53.5 L327.5 57.3 L331.9 62.6 L335 70.3 L336.6 90 L336.7 109.9 L335.6 118.1 L333.4 124 L330.3 128.7 L326.9 132.6 L323.2 136 L319.6 139 L316.1 141.8 L312.9 144.6 L309.7 147.3 L306.3 150 L302.5 152.5 L298 154.8 L292.6 156.8 L286 158.2 L278.1 159 L268.8 159.1 L258.2 158.6 L246.3 157.4 L232.6 155.8 L216 153.8 L180 151.8 L146.2 149.8 L133.4 148 L124.1 146.6 L116.1 145.7 L108.7 145.1 L101.4 144.9 L94 145 L86.6 145.1 L79.3 145.1 L72.3 144.8 L65.9 144.1 L60.3 142.8 L55.6 141 L51.9 138.7 L49.1 135.8 L47.2 132.6 L45.7 128.9 L44.5 124.8 L43.3 120.2 L41.7 114.9 L39.8 107.8 L37.4 90 L34.7 71.5 L31.8 63.3 L29.1 56.5 L27 50.6 L25.8 45.2 L25.8 40.4 L27.3 36.3 L30.3 32.9 L35 30.3 L41 28.4 L48.2 27.3 L56.3 26.8 L64.9 26.8 L73.7 27 L82.5 27.4 L91.2 27.7 L99.8 27.8 L108.7 27.7 L118.3 27.4 L129.5 26.9 L144.1 26.4 Z");offset-rotate:0deg;animation:k-mark-run 15s linear infinite}.k-mark__trot{animation:k-mark-trot .45s ease-in-out infinite alternate;transform-box:fill-box;transform-origin:center}@keyframes k-mark-run{0%{offset-distance:0%} 28%{offset-distance:36%} 34%{offset-distance:36%} 66%{offset-distance:72%} 73%{offset-distance:72%} 100%{offset-distance:100%}}@keyframes k-mark-trot{from{rotate:-4deg}to{rotate:4deg}}@keyframes k-mark-w0{0%{stroke-dashoffset:109.2} 28%{stroke-dashoffset:-250.8} 34%{stroke-dashoffset:-250.8} 66%{stroke-dashoffset:-610.8} 73%{stroke-dashoffset:-610.8} 100%{stroke-dashoffset:-890.8}}@keyframes k-mark-w1{0%{stroke-dashoffset:199.2} 28%{stroke-dashoffset:-160.8} 34%{stroke-dashoffset:-160.8} 66%{stroke-dashoffset:-520.8} 73%{stroke-dashoffset:-520.8} 100%{stroke-dashoffset:-800.8}}@keyframes k-mark-w2{0%{stroke-dashoffset:289.2} 28%{stroke-dashoffset:-70.8} 34%{stroke-dashoffset:-70.8} 66%{stroke-dashoffset:-430.8} 73%{stroke-dashoffset:-430.8} 100%{stroke-dashoffset:-710.8}}@media (prefers-reduced-motion:reduce){.k-mark__run,.k-mark__rails{display:none}}
.k-side__org{display:flex;align-items:center;gap:var(--space-2);min-width:0;font-size:var(--fs-sm);font-weight:600}
.k-side__org-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.k-side__brand .k-mark{margin:-8px 0 -8px -21px}
.k-side__body{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column}
.k-side__body .k-section:first-child{margin-top:0}
.k-side__foot{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);padding:var(--space-1) var(--space-2);border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--bg)}
.k-side__foot-label{font-size:var(--fs-xs);font-weight:600}

.k-item{display:flex;align-items:flex-start;gap:var(--space-2);width:100%;box-sizing:border-box;text-align:left;font:inherit;font-family:var(--font-sans);color:var(--text);background:transparent;border:0;border-radius:var(--radius-lg);padding:var(--space-1) var(--space-2);cursor:pointer;min-width:0}
.k-item:hover{background:var(--line)}
.k-item+.k-item{margin-top:2px}
.k-item:focus-visible{outline:2px solid var(--kelpie);outline-offset:-2px}
.k-item.is-active{background:var(--kelpie-soft);box-shadow:inset 2px 0 0 var(--kelpie-rail)}
.k-item>.k-dot,.k-item>.k-status{margin-top:7px}
.k-item__body{display:flex;flex-direction:column;min-width:0;flex:1}
.k-item__title{font-size:var(--fs-sm);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.k-item__sub{font-size:var(--fs-xs);color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.k-wait__icon{display:none;flex:none;width:24px;height:24px;align-items:center;justify-content:center;border-radius:var(--radius-md);background:var(--amber-soft);color:var(--amber-ink)}
.k-wait--peer .k-wait__icon{background:var(--kelpie-soft);color:var(--kelpie-deep)}
.k-wait--pair .k-wait__icon{background:var(--line);color:var(--text-2)}
.k-wait__end{flex:none;display:flex;align-items:center;gap:var(--space-1);align-self:center;font-size:var(--fs-2xs);color:var(--muted)}
.k-wait__chev{display:none;color:var(--faint)}
div.k-wait{cursor:default}
div.k-wait:hover{background:transparent}
.k-side--list .k-wait__end>:not(.k-tag){display:none}
.k-side:not(.k-side--list) .k-wait__icon{display:flex}
.k-side:not(.k-side--list) .k-wait>.k-status{display:none}
.k-side:not(.k-side--list) .k-item{align-items:center}
.k-side:not(.k-side--list) .k-wait.is-active{background:transparent;box-shadow:none}
.k-side:not(.k-side--list) .k-wait:hover{background:var(--line)}
.k-side:not(.k-side--list) div.k-wait:hover{background:transparent}
.k-side:not(.k-side--list) .k-item.is-active{background:var(--line);box-shadow:none}
.k-side:not(.k-side--list) .k-chat .k-item__title{font-weight:400}
.k-side:not(.k-side--list) .k-chat.is-active .k-item__title{font-weight:600}
.k-side:not(.k-side--list) .k-section__label{text-transform:none;letter-spacing:0;color:var(--text-2)}
.k-side:not(.k-side--list) .k-section .k-pill{background:var(--amber-soft);color:var(--amber-ink)}
.k-side:not(.k-side--list) .k-bucket{font-size:var(--fs-2xs);margin-top:var(--space-3)}

.k-avatar{flex:none;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:var(--radius-md);background:var(--kelpie-soft);color:var(--kelpie-deep);font-size:var(--fs-xs);font-weight:600;line-height:1}
.k-avatar--remote{background:var(--line);color:var(--text-2);box-shadow:inset 0 0 0 1px var(--line-strong)}

.k-inbox{display:flex;flex-direction:column;margin-bottom:var(--space-1);border:1px solid var(--line-strong);border-radius:var(--radius-xl);background:var(--bg);overflow:hidden}
.k-side .k-inbox>.k-section{margin:0;padding:var(--space-2) var(--space-3);border-bottom:1px solid var(--line)}
.k-inbox>.k-section .k-section__label{color:var(--text)}
.k-inbox .k-item{border-radius:0;padding:var(--space-2) var(--space-3)}
.k-inbox .k-item+.k-item{margin-top:0;border-top:1px solid var(--line)}
.k-inbox .k-wait__chev{display:block}
.k-inbox div.k-wait{background:var(--surface)}

.k-seg{display:flex;gap:2px;padding:2px;border-radius:var(--radius-lg);background:var(--line)}
.k-seg__tab{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:6px;height:28px;padding:0 var(--space-2);border:0;border-radius:var(--radius-md);background:transparent;font:inherit;font-family:var(--font-sans);font-size:var(--fs-xs);font-weight:600;color:var(--text-2);cursor:pointer;white-space:nowrap}
.k-seg__tab.is-active{background:var(--bg);color:var(--text);box-shadow:0 1px 2px rgba(28,26,22,.08)}
.k-seg__tab:focus-visible{outline:2px solid var(--kelpie);outline-offset:-2px}
.k-side--tabs .k-side__body>.k-bucket:first-child{margin-top:var(--space-1)}

.k-wait__from{margin-right:var(--space-1);padding:0 5px;border-radius:var(--radius-md);background:var(--line);font-size:var(--fs-2xs);font-weight:600;color:var(--text-2)}
.k-side--dense .k-item{padding:3px var(--space-2);min-height:28px}
.k-side--dense .k-item+.k-item{margin-top:0}
.k-side--dense .k-item__body{flex-direction:row;align-items:baseline;gap:var(--space-2)}
.k-side--dense .k-item__title{flex:none;max-width:62%}
.k-side--dense .k-item__sub{flex:1;min-width:0}
.k-side--dense .k-wait__icon,.k-side--dense .k-avatar{width:18px;height:18px;font-size:var(--fs-2xs)}
.k-side--dense .k-wait__icon{background:transparent;color:var(--amber)}
.k-side--dense .k-wait--peer .k-wait__icon{color:var(--kelpie)}
.k-side--dense .k-wait--pair .k-wait__icon{color:var(--muted)}
.k-side--dense .k-section{margin-top:var(--space-4)}

.k-rail{flex:none;display:flex;flex-direction:column;align-items:center;gap:var(--space-2);width:52px;padding:var(--space-3) 0;border-right:1px solid var(--line);background:var(--line)}
.k-rail__btn{position:relative;display:flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:0;border-radius:var(--radius-lg);background:transparent;cursor:pointer}
.k-rail__btn:hover{background:var(--line-strong)}
.k-rail__btn:focus-visible{outline:2px solid var(--kelpie);outline-offset:-2px}
.k-rail__btn .k-avatar{width:32px;height:32px;border-radius:var(--radius-lg);font-size:var(--fs-sm)}
.k-rail__btn.is-active .k-avatar{box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--kelpie)}
.k-rail__btn.is-offline .k-avatar{opacity:.5}
.k-rail__btn>.k-pill{position:absolute;top:-2px;right:-2px;min-width:16px;height:16px;padding:0 4px;box-shadow:0 0 0 2px var(--line)}

.k-chat-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding:var(--space-3) var(--space-6);border-bottom:1px solid var(--line);min-height:52px;box-sizing:border-box;font-family:var(--font-sans)}

.k-msg{display:flex;flex-direction:column;gap:var(--space-1);font-family:var(--font-sans)}
.k-msg--user{align-items:flex-end}
.k-bubble{max-width:85%;background:var(--line);color:var(--text);border-radius:var(--radius-2xl);padding:var(--space-2) var(--space-4);font-size:var(--fs-sm);line-height:1.5}
.k-msg__who{font-size:var(--fs-xs);font-weight:600;color:var(--muted)}
.k-msg__body{font-size:var(--fs-sm);line-height:1.6;color:var(--text)}
.k-msg__body p{margin:0 0 var(--space-2)}
.k-msg__body p:last-child{margin-bottom:0}
.k-msg__body code,.k-note code,.k-flow-step code{font-family:var(--font-mono);font-size:.9em;background:var(--line);padding:1px 4px;border-radius:var(--radius-md)}
.k-code{margin:var(--space-2) 0;border:1px solid var(--line);border-radius:var(--radius-lg);overflow:hidden;background:var(--surface)}
.k-code__file{display:block;padding:var(--space-1) var(--space-3);font-family:var(--font-mono);font-size:var(--fs-xs);color:var(--muted);border-bottom:1px solid var(--line)}
.k-code__pre{margin:0;padding:var(--space-2) 0;font-family:var(--font-mono);font-size:var(--fs-xs);line-height:1.6;overflow:auto}
.k-code__line{display:flex;padding:0 var(--space-3)}
.k-code__line.is-mark{background:var(--amber-soft)}
.k-code__line code{background:none;padding:0;font-size:inherit}
.k-chat-head__end{display:flex;align-items:center;gap:var(--space-3);flex:none}
.k-chat-head__agents{display:inline-flex;align-items:center;gap:var(--space-2);height:28px;padding:0 var(--space-3);border:1px solid var(--line-strong);border-radius:var(--radius-full);background:var(--bg);font:inherit;font-family:var(--font-sans);font-size:var(--fs-xs);font-weight:600;color:var(--text-2);cursor:pointer}
.k-chat-head__agents:hover{background:var(--line);color:var(--text)}
.k-chat-head__agents:focus-visible{outline:2px solid var(--kelpie);outline-offset:2px}



.k-adetail{display:flex;flex-direction:column;gap:var(--space-3)}
.k-adetail__head{display:flex;align-items:center;gap:var(--space-2)}
.k-adetail__name{flex:1;min-width:0;margin:0;font-size:var(--fs-base);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.k-adetail__parent{margin:0;font-size:var(--fs-xs);color:var(--muted)}
.k-adetail__task{display:flex;flex-direction:column;gap:var(--space-1);padding:var(--space-2) var(--space-3);border-radius:var(--radius-lg);background:var(--surface);font-size:var(--fs-sm)}
.k-adetail__task>span,.k-trace__answer>span{font-size:var(--fs-2xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.k-adetail__task p,.k-trace__answer p{margin:0}
.k-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;margin:0;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--line);overflow:hidden}
.k-metrics>div{padding:var(--space-2) var(--space-3);background:var(--bg)}
.k-metrics dt{font-size:var(--fs-2xs);color:var(--muted)}
.k-metrics dd{margin:0;font-family:var(--font-mono);font-size:var(--fs-xs);color:var(--text)}
.k-trace{display:flex;flex-direction:column;gap:var(--space-2);padding-left:var(--space-3);border-left:2px solid var(--line)}
.k-trace__say{margin:0;font-size:var(--fs-sm);color:var(--text)}
.k-trace__answer{display:flex;flex-direction:column;gap:var(--space-1);padding:var(--space-2) var(--space-3);border-radius:var(--radius-lg);background:var(--kelpie-soft);font-size:var(--fs-sm)}


.k-code__no{width:3ch;flex:none;color:var(--muted);text-align:right;margin-right:var(--space-3);user-select:none}
.k-note{display:flex;gap:var(--space-2);align-items:flex-start;margin:0;padding:var(--space-2) var(--space-3);border-radius:var(--radius-lg);background:var(--surface);border:1px solid var(--line);font-family:var(--font-sans);font-size:var(--fs-xs);color:var(--text-2)}
.k-note--amber{background:var(--amber-soft);border-color:var(--amber-soft);color:var(--amber-ink)}
.k-note>.k-dot{margin-top:5px}
.k-note>span:not(.k-dot){flex:1;min-width:0}
.k-note__act{flex:none;align-self:center}
.k-composer__note--amber{display:flex;align-items:center;gap:var(--space-2);color:var(--amber-ink)}

.k-qcard{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3) var(--space-4);border:1px solid var(--line-strong);border-left:3px solid var(--amber);border-radius:var(--radius-xl);background:var(--amber-soft);font-family:var(--font-sans)}
.k-qcard--answered{border-left-color:var(--green);background:var(--surface)}
.k-qcard--closed{border-left-color:var(--faint);background:var(--surface)}
.k-qcard__head{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-2);font-size:var(--fs-xs);font-weight:600;color:var(--text-2)}
.k-qcard__count{font-weight:400}
.k-qcard__text{margin:0;font-size:var(--fs-sm);font-weight:500;color:var(--text)}
.k-qcard__foot{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-3)}
.k-qcard__code{margin:0;display:flex;align-items:baseline;flex-wrap:wrap;gap:var(--space-2);font-size:var(--fs-xs);color:var(--text-2)}
.k-qcard__code code{font-family:var(--font-mono);font-size:var(--fs-lg);font-weight:600;letter-spacing:.12em;color:var(--text)}
.k-qcard__head .k-icon{color:var(--text-2)}
.k-qcard__hint{font-size:var(--fs-xs);color:var(--text-2)}
.k-qcard__result{margin:0;display:flex;align-items:center;gap:var(--space-2);font-size:var(--fs-xs);color:var(--text-2)}
.k-qcard--answered .k-qcard__result .k-icon{color:var(--green)}

.k-composer{padding:var(--space-3) var(--space-4) var(--space-4);border-top:1px solid var(--line);background:var(--bg);font-family:var(--font-sans)}
.k-composer__box{max-width:var(--content-w);margin:0 auto;display:flex;align-items:flex-end;gap:var(--space-2);border:1px solid var(--line-strong);border-radius:var(--radius-2xl);padding:var(--space-2) var(--space-2) var(--space-2) var(--space-4);background:var(--bg)}
.k-composer__box:focus-within{border-color:var(--kelpie);box-shadow:0 0 0 3px var(--kelpie-soft)}
.k-composer__input{flex:1;min-width:0;border:0;outline:0;resize:none;background:transparent;font:inherit;font-size:var(--fs-sm);line-height:1.5rem;color:var(--text);padding:var(--space-1) 0;max-height:160px}
.k-composer__input::placeholder{color:var(--muted)}
.k-composer__send{border-radius:var(--radius-full);padding:var(--space-2)}
.k-composer__note{max-width:var(--content-w);margin:var(--space-2) auto 0;font-size:var(--fs-xs);color:var(--muted)}

.k-overlay{position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;padding:var(--space-4);background:var(--scrim)}
.k-modal{width:100%;max-width:var(--modal-w);max-height:100%;display:flex;flex-direction:column;background:var(--bg);color:var(--text);border:1px solid var(--line-strong);border-radius:var(--radius-2xl);box-shadow:var(--shadow-modal);font-family:var(--font-sans);font-size:var(--fs-sm);outline:none;overflow:hidden}
.k-modal__top{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-3) var(--space-3) 0 var(--space-4)}
.k-modal__context{flex:1;min-width:0;font-size:var(--fs-xs);color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.k-tabs{display:flex;gap:var(--space-1);padding:0 var(--space-4);border-bottom:1px solid var(--line);overflow-x:auto}
.k-tab{display:inline-flex;align-items:center;gap:var(--space-2);font:inherit;font-size:var(--fs-sm);font-weight:500;color:var(--text-2);background:transparent;border:0;border-bottom:2px solid transparent;padding:var(--space-2) var(--space-3);margin-bottom:-1px;cursor:pointer;white-space:nowrap}
.k-tab:hover{color:var(--text)}
.k-tab.is-active{color:var(--kelpie);border-bottom-color:var(--kelpie)}
.k-tab:focus-visible{outline:2px solid var(--kelpie);outline-offset:-2px;border-radius:var(--radius-md)}
.k-tab__mark{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;box-sizing:border-box;border-radius:var(--radius-full);border:1.5px solid var(--line-strong);color:var(--on-accent)}
.k-tab__mark.is-done{background:var(--green);border-color:var(--green)}
.k-modal__body{padding:var(--space-4);overflow:auto;display:flex;flex-direction:column;gap:var(--space-3)}
.k-modal__text{margin:0;font-size:var(--fs-base);font-weight:600;line-height:1.4}
.k-modal__hint{margin:0;font-size:var(--fs-xs);color:var(--muted)}
.k-opts{display:flex;flex-direction:column;gap:var(--space-2)}
.k-opt{border:1px solid var(--line-strong);border-radius:var(--radius-lg);background:var(--bg);transition:border-color .15s,background-color .15s;font-family:var(--font-sans)}
.k-opt:hover{border-color:var(--faint)}
.k-opt.is-checked{border-color:var(--kelpie);background:var(--kelpie-soft)}
.k-opt__row{display:flex;align-items:flex-start;gap:var(--space-3);padding:var(--space-3);cursor:pointer}
.k-opt__input{margin:2px 0 0;width:16px;height:16px;flex:none;accent-color:var(--kelpie)}
.k-opt__input:focus-visible{outline:2px solid var(--kelpie);outline-offset:2px}
.k-opt__text{display:flex;flex-direction:column;gap:2px;min-width:0}
.k-opt__label{font-size:var(--fs-sm);font-weight:600;color:var(--text)}
.k-opt__desc{font-size:var(--fs-xs);color:var(--text-2)}
.k-opt__more{padding:0 var(--space-3) var(--space-3) calc(var(--space-6) + 16px)}
.k-opt__other{width:100%;box-sizing:border-box;height:36px;padding:0 var(--space-3);border:1px solid var(--line-strong);border-radius:var(--radius-md);font:inherit;font-size:var(--fs-sm);color:var(--text);background:var(--bg)}
.k-opt__other::placeholder{color:var(--muted)}
.k-opt__other:focus{outline:2px solid var(--kelpie);outline-offset:0;border-color:transparent}
.k-review{margin:0;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:var(--radius-lg)}
.k-review__row{display:flex;gap:var(--space-4);padding:var(--space-2) var(--space-3);border-top:1px solid var(--line)}
.k-review__row:first-child{border-top:0}
.k-review dt{width:96px;flex:none;font-family:var(--font-mono);font-size:var(--fs-xs);color:var(--muted);padding-top:2px}
.k-review dd{margin:0;font-size:var(--fs-sm);font-weight:500}
.k-review dd.is-empty{color:var(--rose);font-weight:400}
.k-modal__foot{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--space-3);padding:var(--space-3) var(--space-4);border-top:1px solid var(--line);background:var(--surface)}
.k-modal__keys{font-size:var(--fs-xs);color:var(--muted)}
.k-kbd{font-family:var(--font-mono);font-size:var(--fs-2xs);border:1px solid var(--line-strong);border-bottom-width:2px;border-radius:4px;padding:1px 4px;color:var(--text-2);background:var(--bg)}

.k-term{display:flex;flex-direction:column;height:100%;box-sizing:border-box;background:var(--term-bg);color:var(--term-fg);border-radius:var(--radius-xl);overflow:hidden;font-family:var(--font-mono);font-size:var(--fs-sm);line-height:1.55;box-shadow:var(--shadow-modal)}
.k-term__bar{display:flex;align-items:center;gap:6px;padding:var(--space-2) var(--space-3);background:var(--term-bar)}
.k-term__light{width:10px;height:10px;border-radius:var(--radius-full);background:var(--term-line)}
.k-term__title{flex:1;text-align:center;font-size:var(--fs-xs);color:var(--term-dim);margin-right:42px}
.k-term__body{flex:1;min-height:0;overflow:auto;padding:var(--space-4);display:flex;flex-direction:column;gap:2px}
.k-tl{white-space:pre-wrap;word-break:break-word}
.k-tl--dim{color:var(--term-dim)}
.k-tl--accent{color:var(--term-accent)}
.k-tl--amber{color:var(--term-amber)}
.k-tl--green{color:var(--term-green)}
.k-tl--strong{font-weight:700}
.k-tl__prefix{color:var(--term-accent)}
.k-tl-gap{height:var(--space-3)}
.k-tl__cursor{display:inline-block;width:.6em;height:1.1em;vertical-align:text-bottom;background:var(--term-fg)}
.k-picker{display:flex;flex-direction:column;gap:1px;margin:var(--space-1) 0}
.k-picker__head{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--space-2);margin-bottom:var(--space-1)}
.k-picker__tag{background:var(--term-accent);color:var(--term-bg);padding:0 6px;border-radius:3px;font-size:var(--fs-xs);font-weight:700}
.k-picker__title{font-weight:700}
.k-picker__filter{color:var(--term-dim)}
.k-picker__opt{display:grid;grid-template-columns:2ch 1fr}
.k-picker__cursor{color:var(--term-accent)}
.k-picker__opt.is-sel .k-picker__label{color:var(--term-accent)}
.k-picker__desc{grid-column:2;padding-left:2ch;color:var(--term-dim)}
.k-picker__foot{margin-top:var(--space-1);color:var(--term-dim)}
.k-tcard{margin:var(--space-1) 0;padding:var(--space-2) var(--space-3);border:1px solid var(--term-line);border-radius:var(--radius-md)}
.k-tcard__title{font-weight:700;margin-bottom:var(--space-1)}
.k-tcard__row{display:grid;grid-template-columns:10ch 1fr;gap:var(--space-2)}
.k-tcard__key{color:var(--term-dim)}

.k-flow{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-8);box-sizing:border-box;min-height:100vh;background:var(--bg);color:var(--text);font-family:var(--font-sans)}
.k-flow__title{margin:0 0 var(--space-4);font-size:var(--fs-lg);font-weight:700}
.k-flow__row{display:flex;align-items:stretch}
.k-flow__row>.k-flow-step{flex:1 1 0}
.k-flow__branch{flex:1.3 1 0;display:flex;flex-direction:column;gap:var(--space-2);min-width:0}
.k-flow-step{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-4);border:1px solid var(--line-strong);border-top:3px solid var(--line-strong);border-radius:var(--radius-xl);background:var(--bg);min-width:0}
.k-flow-step--kelpie{border-top-color:var(--kelpie)}
.k-flow-step--amber{border-top-color:var(--amber)}
.k-flow-step--green{border-top-color:var(--green)}
.k-flow-step--rose{border-top-color:var(--rose)}
.k-flow-step__head{display:flex;align-items:center;gap:var(--space-2)}
.k-flow-step__n{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex:none;border-radius:var(--radius-full);background:var(--text);color:var(--bg);font-size:var(--fs-xs);font-weight:700}
.k-flow-step__title{margin:0;font-size:var(--fs-sm);font-weight:700}
.k-flow-step__body{font-size:var(--fs-xs);line-height:1.5;color:var(--text-2)}
.k-flow-step__body p{margin:0 0 var(--space-1)}
.k-flow-step__tags{display:flex;flex-wrap:wrap;gap:var(--space-1);margin-top:auto}
.k-flow-arrow{display:flex;align-items:center;justify-content:center;gap:var(--space-1);color:var(--muted);font-size:var(--fs-2xs);font-weight:600;text-align:center}
.k-flow-arrow--right{flex:0 0 64px;flex-direction:column;padding:0 var(--space-1)}
.k-flow-arrow--down{flex-direction:row;padding:var(--space-1) 0}
.k-flow-arrow__shaft{display:flex;align-items:center;color:var(--faint)}
.k-flow-arrow--right .k-flow-arrow__shaft{flex-direction:row;width:100%}
.k-flow-arrow--down .k-flow-arrow__shaft{flex-direction:column}
.k-flow-arrow__line{background:var(--faint)}
.k-flow-arrow--right .k-flow-arrow__line{flex:1;height:2px;margin-right:-6px}
.k-flow-arrow--down .k-flow-arrow__line{width:2px;height:16px;margin-bottom:-6px}
.k-term-screen{height:100vh;box-sizing:border-box;padding:var(--space-6);background:var(--bg)}

.k-shell__aside{flex:0 0 18rem;max-width:100%;height:100%;display:flex;flex-direction:column;min-height:0;border-left:1px solid var(--line);background:var(--bg)}
.k-shell__aside.is-wide{flex-basis:30rem}
.k-chat-head__title{display:flex;align-items:center;gap:var(--space-1);min-width:0;margin:0;font-size:var(--fs-sm);font-weight:600}
.k-chat-head__title>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.k-chat-head__title>.k-icon{flex:none;color:var(--muted)}
.k-chat-head__agents.is-on,.k-btn--icon.is-on{background:var(--line);color:var(--text)}
.k-chat__end{display:inline-flex;align-items:center;gap:var(--space-2);flex:none;margin-left:auto;color:var(--muted);font-size:var(--fs-2xs);font-family:var(--font-mono)}
.k-chat__agents{display:inline-flex;align-items:center;gap:2px}
.k-chat__agents.is-running{color:var(--kelpie-deep)}
.k-chat__remote{display:inline-flex}
.k-fold+.k-fold{margin-top:var(--space-3)}
.k-fold__head{display:flex;align-items:center;gap:var(--space-2);width:100%;box-sizing:border-box;padding:var(--space-1) var(--space-2);border:0;border-radius:var(--radius-md);background:transparent;font:inherit;font-family:var(--font-sans);font-size:var(--fs-xs);font-weight:500;color:var(--muted);text-align:left;cursor:pointer}
.k-fold__head:hover{color:var(--text)}
.k-fold__head:focus-visible{outline:2px solid var(--kelpie);outline-offset:-2px}
.k-fold__label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.k-fold__caret{flex:none;transition:transform .15s}
.k-fold__head[aria-expanded=false] .k-fold__caret{transform:rotate(-90deg)}
.k-fold__end{margin-left:auto}
.k-fold__body{display:flex;flex-direction:column;padding-top:2px}
.k-fold.is-offline .k-fold__body{opacity:.55}
.k-side--app .k-nav{align-items:center;color:var(--text-2)}
.k-side--app .k-nav>.k-icon{color:var(--muted)}
.k-cards{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-3)}
.k-card{border:1px solid var(--line);border-radius:var(--radius-xl);background:var(--bg);padding:var(--space-2)}
.k-card .k-fold__head{font-size:var(--fs-sm);font-weight:600;color:var(--text)}
.k-card .k-fold__body{gap:2px;padding:var(--space-1) 0 0}
.k-card__foot{margin:var(--space-2) var(--space-2) 0;font-size:var(--fs-2xs);color:var(--muted)}
.k-crow{display:flex;align-items:center;gap:var(--space-2);width:100%;box-sizing:border-box;min-width:0;padding:var(--space-1) var(--space-2);border:0;border-radius:var(--radius-md);background:transparent;font:inherit;font-family:var(--font-sans);font-size:var(--fs-sm);color:var(--text);text-align:left}
button.k-crow{cursor:pointer}
button.k-crow:hover{background:var(--line)}
.k-crow:focus-visible{outline:2px solid var(--kelpie);outline-offset:-2px}
.k-crow.is-active{background:var(--surface)}
.k-crow>.k-icon{flex:none;color:var(--muted)}
.k-crow__title{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.k-crow__meta{flex:none;font-size:var(--fs-xs);color:var(--muted)}
.k-usage{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-1) var(--space-2)}
.k-usage__top{display:flex;justify-content:space-between;font-size:var(--fs-sm);font-weight:500}
.k-usage__of{font-family:var(--font-mono);font-size:var(--fs-xs);color:var(--muted)}
.k-usage__bar{display:flex;gap:2px;height:8px;border-radius:var(--radius-full);background:var(--line);overflow:hidden}
.k-usage__seg{display:block;height:100%}
.k-usage__seg--kelpie{background:var(--kelpie)}
.k-usage__seg--deep{background:var(--kelpie-deep)}
.k-usage__seg--amber{background:var(--amber)}
.k-usage__seg--green{background:var(--green)}
.k-usage__seg--rose{background:var(--rose)}
.k-usage__seg--ink{background:var(--faint)}
.k-usage__rows{display:flex;flex-direction:column;gap:var(--space-1);margin:0;font-size:var(--fs-xs)}
.k-usage__rows>div{display:grid;grid-template-columns:1fr auto 3.5rem;gap:var(--space-2);align-items:center}
.k-usage__rows dt{display:flex;align-items:center;gap:var(--space-2);color:var(--text-2)}
.k-usage__rows dd{margin:0;text-align:right;font-family:var(--font-mono);color:var(--muted)}
.k-usage__key{flex:none;width:8px;height:8px;border-radius:2px}
.k-panel{flex:1;min-height:0;display:flex;flex-direction:column;font-family:var(--font-sans)}
.k-panel__head{display:flex;align-items:center;gap:var(--space-1);padding:var(--space-2) var(--space-2) var(--space-2) var(--space-4);min-height:52px;box-sizing:border-box;border-bottom:1px solid var(--line)}
.k-panel__title{flex:1;min-width:0;font-size:var(--fs-sm);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.k-panel__body{flex:1;min-height:0;overflow:auto;padding:var(--space-3)}
.k-panel__empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-1);padding:var(--space-6);text-align:center;font-size:var(--fs-xs);color:var(--muted)}
.k-panel__empty p{margin:0}
.k-panel__empty-title{font-size:var(--fs-sm);font-weight:600;color:var(--text)}
.k-panel__foot{padding:var(--space-3) var(--space-4);border-top:1px solid var(--line)}
.k-panel__ro{display:flex;align-items:center;gap:var(--space-2);font-size:var(--fs-xs);color:var(--text-2)}
.k-arow{border-radius:var(--radius-lg)}
.k-arow.is-open{background:var(--surface);padding-bottom:var(--space-3)}
.k-arow+.k-arow{margin-top:2px}
.k-arow__head{display:flex;align-items:center;gap:var(--space-2);width:100%;box-sizing:border-box;min-width:0;padding:var(--space-2);border:0;border-radius:var(--radius-lg);background:transparent;font:inherit;font-family:var(--font-sans);font-size:var(--fs-sm);color:var(--text);text-align:left;cursor:pointer}
.k-arow__head:hover{background:var(--line)}
.k-arow__head:focus-visible{outline:2px solid var(--kelpie);outline-offset:-2px}
.k-arow__head>.k-icon{flex:none;color:var(--muted)}
.k-arow__time{flex:none;font-family:var(--font-mono);font-size:var(--fs-xs);color:var(--muted)}
.k-arow .k-adetail{padding:0 var(--space-3)}
.k-arow .k-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
.k-arow__acts{display:flex;flex-wrap:wrap;gap:var(--space-2)}
.k-padd{display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-3)}
.k-padd>.k-field{flex:1;min-width:0}
.k-call{display:flex;flex-direction:column;gap:var(--space-1)}
.k-call>span{font-size:var(--fs-2xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.k-trace__cmd,.k-trace__out{margin:0;padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);font-family:var(--font-mono);font-size:var(--fs-2xs);line-height:1.5;white-space:pre-wrap;word-break:break-word}
.k-trace__cmd{background:var(--bg);border:1px solid var(--line);color:var(--text-2)}
.k-trace__cmd b{font-weight:600;color:var(--kelpie-deep)}
.k-trace__out{margin-top:calc(-1 * var(--space-1));background:var(--line);color:var(--text-2)}
.k-act{max-width:var(--content-w);margin:0 auto;width:100%;font-family:var(--font-sans)}
.k-act__head{display:inline-flex;align-items:center;gap:var(--space-2);padding:2px 0;border:0;background:transparent;font:inherit;font-size:var(--fs-sm);color:var(--muted);text-align:left;cursor:pointer}
.k-act__head:hover{color:var(--text)}
.k-act__head:focus-visible{outline:2px solid var(--kelpie);outline-offset:2px;border-radius:var(--radius-md)}
.k-act__caret{flex:none;transition:transform .15s}
.k-act.is-open .k-act__caret{transform:rotate(90deg)}
.k-act>.k-trace{margin-top:var(--space-2)}
.k-composer__foot{max-width:var(--content-w);margin:var(--space-2) auto 0;display:flex;align-items:center;gap:var(--space-3)}
.k-composer__foot>.k-composer__note{flex:1;min-width:0;margin:0}
.k-composer__add{align-self:flex-end;margin-left:calc(-1 * var(--space-2))}
.k-model{position:relative;flex:none}
.k-model__chip{display:inline-flex;align-items:center;gap:var(--space-2);height:26px;padding:0 var(--space-2);border:0;border-radius:var(--radius-md);background:var(--line);font:inherit;font-family:var(--font-sans);font-size:var(--fs-xs);font-weight:500;color:var(--text);cursor:pointer}
.k-model__chip:hover,.k-model__chip.is-open{background:var(--line-strong)}
.k-model__chip:focus-visible{outline:2px solid var(--kelpie);outline-offset:2px}
.k-model__effort{color:var(--muted)}
.k-menu{position:absolute;right:0;bottom:calc(100% + var(--space-2));z-index:30;width:15rem;padding:var(--space-1);border:1px solid var(--line);border-radius:var(--radius-xl);background:var(--bg);box-shadow:var(--shadow-modal);font-family:var(--font-sans)}
.k-menu__row{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);width:100%;box-sizing:border-box;padding:var(--space-2) var(--space-3);border:0;border-radius:var(--radius-lg);background:transparent;font:inherit;font-size:var(--fs-sm);color:var(--text);text-align:left;cursor:pointer}
.k-menu__row:hover{background:var(--line)}
.k-menu__row:focus-visible{outline:2px solid var(--kelpie);outline-offset:-2px}
.k-menu__sub{display:block;font-size:var(--fs-2xs);color:var(--muted)}
.k-menu__check{color:var(--kelpie)}
.k-menu__line{border-top:1px solid var(--line);margin-top:var(--space-1);padding-top:var(--space-1)}
button.k-menu__line{border-radius:0 0 var(--radius-lg) var(--radius-lg)}
.k-menu__value{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--muted)}
.k-menu__back{justify-content:flex-start;font-weight:600}
.k-menu__back>.k-icon{transform:rotate(180deg);color:var(--muted)}
.k-menu__label{margin:0;padding:var(--space-2) var(--space-3) 0;font-size:var(--fs-xs);color:var(--muted)}
.k-switch input{position:absolute;opacity:0;pointer-events:none}
.k-switch__track{position:relative;flex:none;width:34px;height:20px;border-radius:var(--radius-full);background:var(--line-strong);transition:background .15s}
.k-switch__track::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:var(--radius-full);background:var(--bg);box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform .15s}
.k-switch input:checked+.k-switch__track{background:var(--kelpie)}
.k-switch input:checked+.k-switch__track::after{transform:translateX(14px)}
.k-switch input:focus-visible+.k-switch__track{outline:2px solid var(--kelpie);outline-offset:2px}
@media (max-width:900px){.k-shell__aside{flex-basis:100%;height:auto;border-left:0;border-top:1px solid var(--line)}}
.k-composer__box{position:relative}
.k-slash{position:absolute;left:0;right:0;bottom:calc(100% + var(--space-2));z-index:30;padding:var(--space-1);border:1px solid var(--line);border-radius:var(--radius-xl);background:var(--bg);box-shadow:var(--shadow-modal)}
.k-slash__row{justify-content:flex-start;gap:var(--space-3)}
.k-slash__row.is-on{background:var(--kelpie-soft)}
.k-slash__name{flex:none;min-width:7rem;font-family:var(--font-mono);font-size:var(--fs-xs);color:var(--text)}
.k-slash__desc{flex:1;min-width:0;color:var(--muted);font-size:var(--fs-xs)}
.k-slash__hint{margin:0;padding:var(--space-1) var(--space-3);font-size:var(--fs-2xs);color:var(--muted)}
.k-tlink{display:inline-flex;align-items:center;gap:var(--space-2);padding:var(--space-1) var(--space-2);border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--bg);font:inherit;font-size:var(--fs-xs);color:var(--kelpie-deep);cursor:pointer}
.k-tlink:hover,.k-tlink.is-active{background:var(--kelpie-soft);border-color:transparent}
.k-tlink .k-avatar{width:18px;height:18px;font-size:var(--fs-2xs)}
.k-tlink__count{font-weight:600}
.k-tlink__meta{color:var(--muted)}
.k-at__row .k-avatar,.k-at__new{width:20px;height:20px;font-size:var(--fs-2xs)}
.k-at__new{flex:none;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-md);background:var(--kelpie-soft);color:var(--kelpie-deep)}
.k-at__name{flex:none;min-width:6rem;font-size:var(--fs-xs);font-weight:600;color:var(--text)}
.k-tpanel{display:flex;flex-direction:column;gap:var(--space-3)}
.k-tpeople{list-style:none;margin:0;padding:0 0 var(--space-3);display:grid;gap:var(--space-2);border-bottom:1px solid var(--line)}
.k-tpeople__row{display:flex;align-items:center;gap:var(--space-2)}
.k-tpeople__who{flex:1;min-width:0;display:flex;flex-direction:column}
.k-tpeople__name{font-size:var(--fs-sm);font-weight:600;color:var(--text)}
.k-tpeople__meta{font-size:var(--fs-xs);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.k-tpanel__msgs{display:flex;flex-direction:column;gap:var(--space-4)}
.k-panel__foot .k-composer{padding:0;border:0}
/* The settings, Inbox, Tasks and Tidy pages (board_page): the title and a panel beside the one nav; one column on a phone. */
body { margin: 0; }
.root { position: relative; background: var(--bg); color: var(--text); font-family: var(--font-sans);
  background-image: radial-gradient(color-mix(in srgb, var(--line-strong) 55%, transparent) 1px, transparent 1.2px); background-size: 24px 24px; }
.top { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; padding: 0 8px; }
.top h1 { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 680; letter-spacing: -0.015em; }
.top .sub { color: var(--muted); font-size: var(--fs-sm); }
.top .titles { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }

.panel { min-width: 0; min-height: 0; box-sizing: border-box; border-radius: 28px; border: 1px solid var(--line); background: var(--surface);
  box-shadow: 0 30px 80px -40px var(--scrim); padding: 28px; display: flex; flex-direction: column; gap: 18px; overflow: hidden; }
.p-eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.p-h { margin: 0; font-size: 24px; line-height: 30px; font-weight: 650; letter-spacing: -0.01em; text-wrap: balance; }
.p-sub { margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 20px; }
.p-sub code { overflow-wrap: anywhere; }
.p-sec { display: flex; flex-direction: column; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.newcard { border-radius: 18px; padding: 18px; background: linear-gradient(160deg, var(--kelpie-soft), var(--surface)); border: 1px solid color-mix(in srgb, var(--kelpie) 30%, var(--line)); display: flex; flex-direction: column; gap: 10px; }

.why { font-size: var(--fs-sm); color: var(--text-2); line-height: 20px; }

.acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.acts[hidden] { display: none; }
.owner { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-2); }
.back { font-size: 13px; color: var(--kelpie); cursor: pointer; font-weight: 600; }

/* Page frame. */
html, body { background: var(--bg); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.root { --fs-2xs: 12px; --fs-xs: 13px; --fs-sm: 15px; --fs-base: 17px; --fs-lg: 19px; display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 30vw, 560px);
  grid-template-rows: auto minmax(0, 1fr); gap: 16px 24px; height: 100vh; height: 100dvh; min-height: 600px; box-sizing: border-box; overflow: hidden;
  padding: max(16px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
.root > .top { grid-column: 1 / -1; }
.panel { overflow: auto; overscroll-behavior: contain; }

/* Project switcher in the bar. */

.proj-name, .proj-cur { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-n { flex: none; font-size: var(--fs-2xs); color: var(--muted); }
.proj-n.is-on { padding: 1px 8px; border-radius: var(--radius-full); background: var(--amber-soft); color: var(--amber-ink); font-weight: 650; }

.note-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 10px 14px; border-radius: 12px; background: var(--green-soft); color: var(--green); font-size: var(--fs-sm); }
.note-line.bad { background: color-mix(in srgb, var(--rose) 12%, var(--surface)); color: var(--rose); }
/* A note line's words: at most three lines, a long one's whole behind Show all (as play.css's toast). */
.note-line .toast-t { flex: 0 1 auto; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
.note-line:has(.toast-all[open]) .toast-t { display: block; }
.note-line .toast-all > summary { list-style: none; cursor: pointer; white-space: nowrap; font-weight: 650; }
.note-line .toast-all > summary::-webkit-details-marker { display: none; }
.note-line .toast-all > summary > span + span, .note-line .toast-all[open] > summary > span:first-child { display: none; }
.note-line .toast-all[open] > summary > span + span { display: inline; }
form.inl { display: contents; }

a.back { color: var(--kelpie); text-decoration: none; }

.k-btn { text-decoration: none; }
.k-avatar { width: 24px; height: 24px; font-size: 12px; }

.p-eyebrow a { color: inherit; text-decoration: none; }
.p-eyebrow a:hover { color: var(--kelpie); }

.jump { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; font-weight: 600; }
.jump a { color: var(--kelpie); text-decoration: none; }

.panel .code { font-family: var(--font-mono); font-size: 13px; word-break: break-all; margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--bg); }

/* Answer boxes and the shown-once upload key. */
.ask-box { display: flex; gap: 8px; align-items: center; }
.ask-box .k-field { height: 36px; }
.prop { border-radius: 14px; border: 1px solid color-mix(in srgb, var(--kelpie) 35%, var(--line)); background: linear-gradient(160deg, var(--kelpie-soft), var(--surface)); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.prop .p-eyebrow { color: var(--kelpie); }

/* The inbox's items (2.12): an agent's question with its answer forms. */
.ibx-item { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 24px; }
.ibx-item .i-q { font-size: 16px; font-weight: 650; line-height: 21px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }

.ibx-item form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.ibx-item details > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--kelpie); }
.ibx-item details[open] { display: flex; flex-direction: column; gap: 8px; }

/* An item's meta line. */
.ic { flex: none; display: block; }
.c-meta { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; min-width: 0; font-size: var(--fs-xs); line-height: 18px; color: var(--muted); }

.c-meta .i-who { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--text-2); }

/* A question's details and worked examples. */

.i-details { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-sm); line-height: 20px; color: var(--text-2); }
.i-scroll { overflow-x: auto; max-width: 100%; }
.i-ex { border-collapse: collapse; font-size: var(--fs-xs); line-height: 18px; }
.i-ex th, .i-ex td { padding: 4px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.i-ex th { font-weight: 600; color: var(--muted); background: var(--bg); }
.i-ex td { font-family: var(--font-mono); color: var(--text); }

.ibx-item { gap: 8px; }

.ibx-item pre { white-space: pre-wrap; margin: 0; }

/* Area owners: one row per area, the owner beside it. */
.own-list { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.own-row { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text); }
.own-row .own-area { flex: 0 0 40%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
label.own-row { height: 36px; }
label.own-row select { cursor: pointer; }


/* Screenshots: a form's thumbnails and paperclip, the strip inside Details, the Drop form and its proposal cards. */
.shot-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.shot-thumbs:empty { display: none; }
.shot-thumb { position: relative; display: inline-flex; }
.shot { display: inline-flex; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--bg); }
.shot:hover, .shot:focus-visible { border-color: var(--kelpie); outline: none; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot.is-video { position: relative; }
.shot-len { position: absolute; left: 4px; bottom: 4px; padding: 0 5px; border-radius: var(--radius-full); font-size: var(--fs-2xs); line-height: 16px; font-weight: 650;
  font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--text) 80%, transparent); color: var(--surface); }
.shot-x { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--text-2); font-size: 15px; line-height: 1; padding: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.shot-x:hover, .shot-x:focus-visible { color: var(--rose); border-color: var(--rose); outline: none; }
.shot.is-doc { width: auto; min-width: 136px; max-width: 232px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px;
  padding: 8px 16px 8px 12px; box-sizing: border-box; background: var(--surface); }
.doc-ext { padding: 0 6px; border-radius: var(--radius-full); font-size: var(--fs-2xs); line-height: 16px; font-weight: 700; letter-spacing: .04em;
  color: var(--kelpie); background: var(--kelpie-soft); }
.doc-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 16px; font-weight: 600; color: var(--text); }
.doc-size { font-size: var(--fs-2xs); line-height: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.drop-busy { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--kelpie) 30%, var(--line)); }
.drop-busy > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.drop-busy b { font-size: var(--fs-sm); line-height: 20px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.drop-busy b + span { font-size: var(--fs-xs); line-height: 16px; color: var(--muted); }
.drop-pulse { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--kelpie); animation: dropPulse 1.6s ease-out infinite; }
@keyframes dropPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--kelpie) 45%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
@media (prefers-reduced-motion: reduce) { .drop-pulse { animation: none; } }
form[data-shots][aria-busy=true] .drop-zone, form[data-shots][aria-busy=true] .shot-thumbs, form[data-shots][aria-busy=true] .k-field { opacity: .5; pointer-events: none; }

.shot-clip .ic { color: var(--muted); }
.shot-err { margin: 0; font-size: var(--fs-xs); line-height: 18px; color: var(--muted); }
.shot-err[hidden] { display: none; }
form[data-shots].is-over { outline: 2px dashed var(--kelpie); outline-offset: 4px; border-radius: 12px; }
.ask-box[data-shots] { flex-wrap: wrap; }

.ask-box[data-shots] .shot-thumbs, .ask-box[data-shots] .shot-err { flex-basis: 100%; order: 9; }
.shotbox > summary { list-style: none; cursor: pointer; }
.shotbox > summary::-webkit-details-marker { display: none; }
.shotbox[open] > summary { margin-bottom: 10px; }
.shot-sum { display: flex; align-items: center; gap: 10px; }
.shot-sum-t { display: inline-flex; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; color: var(--text); font-weight: 600; }
.shot-sum-t .ic { color: var(--kelpie); flex: none; }
.shotbox[open] .shot-sum-t { display: none; }
.shot-chev { flex: none; margin-left: auto; color: var(--muted); display: inline-flex; transform: rotate(90deg); transition: transform .2s; }
.shotbox[open] .shot-chev { transform: rotate(-90deg); }
.shot-sum:hover .shot-chev, .shot-sum:focus-visible .shot-chev { color: var(--kelpie); }
.shotbox form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.drop-zone { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; padding: 12px; border: 1.5px dashed var(--line-strong);
  border-radius: 14px; background: var(--surface); color: var(--text-2); font: inherit; font-size: var(--fs-sm); cursor: pointer; text-align: center; }
.drop-zone:hover, .drop-zone:focus-visible, .shotbox form.is-over .drop-zone { border-color: var(--kelpie); color: var(--kelpie); outline: none; }
.shotbox form.is-over { outline: none; }
.shotbox textarea { resize: vertical; line-height: 1.45; min-height: calc(3 * 1.45em); }
.shotbox .k-field { height: auto; padding: 8px 12px; align-items: stretch; }
.shotbox .k-field:focus-within { border-color: var(--kelpie); }
.drop-hint { margin: -4px 0 0; font-size: var(--fs-xs); line-height: 18px; }
.shot-off { margin: 0; font-size: var(--fs-sm); line-height: 20px; color: var(--amber-ink); }
.chk-off summary { cursor: pointer; font-size: var(--fs-sm); color: var(--kelpie); }
.chk-off pre { white-space: pre-wrap; font-size: var(--fs-xs); color: var(--text-2); margin: 6px 0; }
.chk-sub { margin-top: 8px; font-size: var(--fs-xs); font-weight: 650; color: var(--muted); }

.shot-clip span { font-weight: 600; }

/* Tasks and Tidy rows: one row per item, with its kind and its title. */
.wk-rows { display: flex; flex-direction: column; gap: 6px; }
.wk-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); font-size: var(--fs-sm); }
.wk-row .wk-t { flex: 1; min-width: 12ch; }
.wk-row.is-dropped .wk-t { color: var(--muted); text-decoration: line-through; }
.wk-row .r-id { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.wk-kind { flex: none; padding: 2px 8px; border-radius: var(--radius-full); background: var(--kelpie-soft); color: var(--kelpie-deep);
  font-size: var(--fs-xs); font-weight: 650; }
.wk-kind--test { background: var(--green-soft); color: var(--green); }
.wk-kind--update_ticket { background: var(--amber-soft); color: var(--amber-ink); }
.wk-kind--undo { background: color-mix(in srgb, var(--rose) 14%, var(--surface)); color: var(--rose); }
.wk-kind--tell { background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.wk-row.is-dropped .wk-kind { background: var(--bg); color: var(--muted); }
.wk-row.is-dropped .wk-kind { box-shadow: none; }
.wk-row .wk-d { flex: none; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.wk-row .wk-why { flex-basis: 100%; min-width: 0; font-size: var(--fs-xs); color: var(--text-2); }
/* Tidy up: the trees waiting on you, by topic, each a checkbox row. */
.tdy .wk-rows { gap: 6px; }
.tdy-topic { margin-top: 10px; font-size: var(--fs-xs); font-weight: 650; color: var(--text-2); }
.tdy-row { cursor: pointer; }
.tdy-row input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--kelpie); }
.tdy-row .wk-t { flex: 1 1 55%; overflow-wrap: anywhere; }
.tdy-meta { font-size: var(--fs-xs); color: var(--muted); }
.tdy-sel { margin: 0 0 8px; font-size: var(--fs-sm); }
.tdy-sel a { color: var(--kelpie); font-weight: 600; text-decoration: none; }
.tdy-sel a:hover { text-decoration: underline; }
.tdy-form, .tdy-confirm { display: flex; flex-direction: column; gap: 10px; }
.tdy .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.tdy-ids { margin: 0; padding-left: 18px; font-size: var(--fs-sm); }
.tdy-ids .r-id, .tdy-row .r-id { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.tdy-link { margin: 8px 0 0; }

/* The page flows; the Tasks page's four columns of one-line cards reflow to one column on a phone. */
.root.is-flow { height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; display: flex; flex-direction: column; gap: 16px; }

.is-flow .panel { overflow: visible; padding: 20px; }
@media (min-width: 760px) { .root.is-flow { padding-top: 32px; gap: 24px; } }
.wk-fold { align-self: stretch; }
.wk-fold > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; cursor: pointer; list-style: none; font-weight: 650; color: var(--text-2); }
.wk-fold > summary::-webkit-details-marker { display: none; }
.wk-fold > summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); }
.wk-fold[open] > summary::after { transform: rotate(-135deg) translate(-1px, -1px); }
.wk-fold[open] > summary { margin-bottom: 8px; }
.wk-dropped { margin-top: 16px; }
.wk-dropped > summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--fs-sm); font-weight: 650; color: var(--text-2); }
.wk-dropped > summary b { min-width: 22px; height: 22px; padding: 0 7px; box-sizing: border-box; display: grid; place-items: center; border-radius: var(--radius-full);
  background: var(--bg); border: 1px solid var(--line); font-size: var(--fs-xs); }
.wk-dropped[open] > summary { margin-bottom: 8px; }
.wk-body ul { margin: 4px 0 0; padding-left: 18px; }
.wk-sec b { color: var(--text); }

/* The inbox page (2.12): one column, From your agents, For you to decide, then the Drop. */
.ibx-page { max-width: 920px; display: flex; flex-direction: column; gap: 20px; }
.ibx-lane { gap: 12px; }
.ibx-lane-h { display: flex; align-items: center; gap: 10px; }
.ibx-lane-h h3 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 650; }
/* Admin alerts (W5): one panel of lines, each its icon, what and who and when, then Not you? and Clear; a phone stacks them. */
.ibx-lane-h:has(.ibx-al-sub) { align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.ibx-al-sub { font-size: 12px; line-height: 16px; color: var(--muted); }
.ibx-al-list { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--bg); overflow: hidden; }
.ibx-al { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 20px 24px; border-top: 1px solid var(--line); }
.ibx-al:first-child { border-top: 0; }
.ibx-al-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.ibx-al-b { display: flex; flex-direction: column; min-width: 0; }
.ibx-al-t { font-size: 15px; line-height: 24px; font-weight: 650; }
.ibx-al-m { font-size: 13px; line-height: 20px; color: var(--text-2); overflow-wrap: anywhere; }
.ibx-al-acts { display: flex; align-items: center; gap: 16px; }
.ibx-al-acts form { margin: 0; }
.ibx-al-no { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 20px; color: var(--muted); white-space: nowrap; }
.ibx-al-out { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; line-height: 20px; font-weight: 650; color: var(--kelpie); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--kelpie) 35%, transparent); white-space: nowrap; }
.ibx-al-out:focus-visible { outline: 2px solid var(--kelpie); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 760px) {
  .ibx-al { grid-template-columns: 36px minmax(0, 1fr); gap: 8px 12px; padding: 16px; }
  .ibx-al-ic { width: 36px; height: 36px; border-radius: 10px; }
  .ibx-al-acts { grid-column: 1 / -1; justify-content: space-between; gap: 8px; }
  .ibx-al-no, .ibx-al-out { font-size: 14px; }
  .ibx-al-out, .ibx-al-acts .k-btn { min-height: 44px; }
}
.ibx-agent .c-meta .ic { color: var(--kelpie); }
.ibx-agent .mono { font-family: var(--font-mono); font-size: var(--fs-2xs); }
.i-tip { margin: 0; font-size: var(--fs-xs); color: var(--muted); }
/* The Drop as page F draws it (2.11): the column's whole width and a tall zone; the inbox's lines keep their measure. */
.ibx-page > * { max-width: 760px; }

@media (max-width: 759px) {
  .root { display: flex; flex-direction: column; gap: 12px; height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible;
    padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }

  .top { flex-direction: column; align-items: stretch; padding: 0 4px; }
  .top h1 { font-size: 24px; }

  .root > .panel { order: 1; }

  .root .k-btn--sm { min-height: 40px; }

  .panel, .is-flow .panel { overflow: visible; padding: 20px 16px; border-radius: 20px; }

  }

/* Small caps and button-like summaries. */
.cap { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 650; color: var(--muted); }

.ibx-item details > summary.k-btn { color: var(--text); font-size: 13px; list-style: none; }
.ibx-item details > summary.k-btn::-webkit-details-marker { display: none; }

/* An agent's question (R5): Answer in my own words sits under ⋯. */
.ibx-item .i-more > summary { list-style: none; align-self: flex-start; color: var(--text-2); }
.ibx-item .i-more > summary::-webkit-details-marker { display: none; }
/* The Drop zone's words (page F): its hint, "Let go to drop it" while files hang over it, "Pick files or a photo" on a phone. */
.drop-zone .dz-over, .drop-zone .dz-ph { display: none; }
form.is-over .drop-zone .dz-d { display: none; }
form.is-over .drop-zone .dz-over { display: inline; }
@media (max-width: 760px) { .drop-zone .dz-d, form.is-over .drop-zone .dz-over { display: none; } .drop-zone .dz-ph { display: inline; } }

/* Project settings (project_page): a calm column on the 8px rhythm. The title lines up with the cards; each section is
   its own card with a heading, a hint capped at 70ch, then its fields; buttons are full size, the key rotation reads as
   destructive. Scoped to .pset so the other shell pages keep their panel. */
.root.is-flow:has(> .panel > .pset) { gap: 32px; padding: 40px 40px 64px; }
.root:has(> .panel > .pset) > .top { max-width: 52rem; padding: 0; }
.root:has(> .panel > .pset) .titles { gap: 8px; }
.root:has(> .panel > .pset) .top .sub { font-size: 15px; line-height: 24px; }
.root .panel:has(> .pset) { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.pset { display: flex; flex-direction: column; gap: 24px; max-width: 52rem; }
.pset > div.p-sec { gap: 12px; }
.pset .jump { gap: 8px; font-size: 13px; font-weight: 600; }
.pset .jump a { padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-full); background: var(--bg); color: var(--text-2);
  transition: background-color .15s, border-color .15s, color .15s; }
.pset .jump a:hover { border-color: color-mix(in srgb, var(--kelpie) 40%, var(--line-strong)); background: var(--kelpie-soft); color: var(--kelpie-deep); }
.pset .jump a:focus-visible { outline: 2px solid var(--kelpie); outline-offset: 2px; }
.pset > section.p-sec { gap: 16px; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius-2xl); background: var(--surface);
  box-shadow: 0 1px 2px rgba(28, 26, 22, 0.04), 0 24px 48px -36px var(--scrim); scroll-margin-top: 24px; }
.pset > section.p-sec > .p-eyebrow { margin-bottom: -8px; font-size: 17px; line-height: 24px; letter-spacing: -0.01em; text-transform: none; font-weight: 650; color: var(--text); }
.pset .p-sub { max-width: 70ch; font-size: 15px; line-height: 24px; }
.pset .p-sub a { color: var(--kelpie); text-underline-offset: 3px; }
.pset .p-sub code { font-family: var(--font-mono); font-size: 13px; padding: 2px 6px; border-radius: var(--radius-md); background: var(--line); color: var(--text);
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.pset .chips { gap: 8px; }
.pset .chips .owner { padding: 4px 14px 4px 4px; border: 1px solid var(--line); border-radius: var(--radius-full); background: var(--bg); color: var(--text); }
.pset .own-list { gap: 0; border-top: 1px solid var(--line); }
.pset .own-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 260px); gap: 16px; align-items: center; height: auto; min-height: 56px;
  padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; font-size: 15px; }
.pset .own-row:focus-within { box-shadow: none; }
.pset .own-row select { appearance: none; -webkit-appearance: none; width: 100%; height: 40px; box-sizing: border-box; padding: 0 36px 0 12px; font-size: 14px; color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23716c63' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 12px;
  transition: border-color .15s, box-shadow .15s; }
.pset textarea.k-field__input { display: block; width: 100%; min-height: 112px; box-sizing: border-box; padding: 12px 14px; font: 13px/20px var(--font-mono); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--bg); resize: vertical; transition: border-color .15s, box-shadow .15s; }
.pset .own-row select:hover, .pset textarea.k-field__input:hover { border-color: var(--faint); }
.pset .own-row select:focus-visible, .pset textarea.k-field__input:focus-visible { outline: none; border-color: var(--kelpie); box-shadow: 0 0 0 3px var(--kelpie-soft); }
.pset label.k-field:not(.own-row) { display: block; height: auto; padding: 0; border: 0; background: none; box-shadow: none; }
.pset #tickets form .acts { margin-top: 16px; }
.pset .own-list .acts { margin-top: 24px; }
.pset .k-btn--sm { min-height: 40px; padding: 0 20px; font-size: 14px; border-radius: var(--radius-lg); transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
.pset .k-btn--primary { box-shadow: 0 1px 2px rgba(28, 26, 22, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.pset #upload .k-btn--ghost { color: var(--rose); background: var(--bg); border-color: color-mix(in srgb, var(--rose) 35%, var(--line-strong)); }
.pset #upload .k-btn--ghost:hover { background: color-mix(in srgb, var(--rose) 8%, var(--bg)); border-color: color-mix(in srgb, var(--rose) 60%, transparent); }
.pset #upload .k-btn--ghost:focus-visible { outline-color: var(--rose); }
/* Settings leftovers: the patterns field's visible label, example chips that break only on a phone, and the upload
   status as plain words, not a box that reads as an input. */
.pset .p-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.pset .p-sub code { white-space: nowrap; }
.pset #upload > .why { padding: 0; border: 0; background: none; color: var(--text-2); font-size: 15px; line-height: 24px; }
@media (max-width: 759px) { .pset .p-sub code { white-space: normal; overflow-wrap: anywhere; } }
.pset .why { max-width: 70ch; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); font-size: 14px; line-height: 22px; }
.pset .note-line { border-radius: var(--radius-lg); padding: 12px 16px; }
@media (max-width: 759px) {
  .root.is-flow:has(> .panel > .pset) { gap: 24px; padding: 24px max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); }
  .pset { gap: 16px; }
  .pset > section.p-sec { padding: 24px 20px; scroll-margin-top: 120px; }
  .pset .own-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .pset .k-btn--sm { min-height: 44px; }
  .pset #export .acts .k-btn { flex: 1 1 100%; justify-content: center; }
}
/* The org page and what its actions show (UX-8, UX-15), in the same calm column: the project rows, one-line forms, the
   people table with styled controls, and a code shown once with Copy. */
.pset input.k-field__input, .pset .org-line select, .pset .org-tbl select { width: 100%; height: 40px; box-sizing: border-box; padding: 0 12px; font: 14px var(--font-sans);
  color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--bg); transition: border-color .15s, box-shadow .15s; }
.pset .org-line select, .pset .org-tbl select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23716c63' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 12px; }
.pset input.k-field__input:focus-visible, .pset .org-line select:focus-visible, .pset .org-tbl select:focus-visible { outline: none; border-color: var(--kelpie); box-shadow: 0 0 0 3px var(--kelpie-soft); }
.pset .org-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pset .org-line > .k-field { flex: 1 1 200px; min-width: 0; }
.pset .org-line > .k-btn { flex: none; }
.pset .org-picks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; }
.pset input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--kelpie); cursor: pointer; }
.pset .chk { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.pset .org-rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.pset .org-rows a { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.pset .org-rows a:hover b { color: var(--kelpie-deep); }
.pset .org-rows b { font-size: 15px; font-weight: 650; }
.pset .org-rows .muted { flex: 1; font-size: 13px; color: var(--muted); }
.pset .org-scroll { overflow-x: auto; margin: 0 -8px; }
/* Day one (canvas page X): Home's checklist card, a step per row; a done one folds to what happened, its green line
   shown while dayone.js marks it data-just. */
.d1 { border: 1px solid var(--line-strong); border-radius: var(--radius-xl); background: var(--bg); overflow: hidden; box-shadow: 0 1px 2px rgba(28, 26, 22, .04); }
.d1-h { display: flex; flex-direction: column; gap: 16px; padding: 32px 32px 24px; }
.d1-t { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -.01em; }
.d1-s { margin: 4px 0 0; font-size: 14px; line-height: 22px; color: var(--text-2); }
.d1-pg { display: flex; align-items: center; gap: 12px; font-size: 12px; line-height: 16px; font-weight: 650; color: var(--text-2); }
.d1-sg { display: flex; gap: 4px; }
.d1-sg i { width: 40px; height: 6px; border-radius: 3px; background: var(--line); }
.d1-sg i.d { background: var(--green); }
.d1-st { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 24px 32px; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.d1-st.done { grid-template-columns: 28px minmax(0, 1fr); align-items: center; padding: 14px 32px; transition: background-color .4s; }
.d1-st.now { background: color-mix(in srgb, var(--kelpie-soft) 60%, var(--bg)); }
.d1-st.done[data-just] { align-items: start; padding: 24px 32px; background: color-mix(in srgb, var(--green-soft) 70%, var(--bg)); }
.d1-mk { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 12px; font-weight: 700; color: var(--text-2); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.d1-mk.d { background: var(--green-soft); color: var(--green); box-shadow: none; }
.d1-mk.n { background: var(--kelpie); color: var(--on-accent); box-shadow: none; }
.d1-c { display: flex; flex-direction: column; min-width: 0; }
.d1-st.done .d1-c { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.d1-tt { margin: 0; font-size: 15px; line-height: 24px; font-weight: 650; }
.d1-st.done .d1-tt { font-size: 14px; line-height: 20px; font-weight: 600; }
.d1-tx { margin: 4px 0 0; max-width: 560px; font-size: 14px; line-height: 22px; color: var(--text-2); text-wrap: pretty; }
.d1-det { font-size: 12px; line-height: 16px; color: var(--muted); }
.d1-ok { display: none; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--green); }
.d1-ok svg { flex: none; }
.d1-ok a, .d1-det a, .d1-tx a { font-weight: 650; color: var(--kelpie); }
.d1-st:not([data-just]) .d1-was, .d1-st[data-just] .d1-said, .d1-st[data-just] .d1-det { display: none; }
.d1-st.done[data-just] .d1-c { flex-direction: column; }
.d1-st.done[data-just] .d1-tt { font-size: 15px; line-height: 24px; font-weight: 650; }
.d1-st[data-just] .d1-ok { display: flex; }
.d1-acts { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.d1-terms { display: flex; align-items: flex-start; gap: 8px; max-width: 560px; margin: 8px 0 0; font-size: 12px; line-height: 18px; color: var(--text-2); }
.d1-terms svg { flex: none; margin-top: 2px; color: var(--muted); }
.d1-flags { display: flex; flex-wrap: wrap; gap: 8px; max-width: 560px; margin-top: 12px; }
.d1-flag::before { content: ""; flex: none; width: 12px; height: 12px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4h12l-2 4 2 4H5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4h12l-2 4 2 4H5'/%3E%3C/svg%3E") center / contain no-repeat; }
.d1-flag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-md); font-size: 12px; font-weight: 650; white-space: nowrap; background: color-mix(in srgb, var(--rose) 9%, var(--bg)); color: var(--rose); }
.d1-f { padding: 16px 32px; border-top: 1px solid var(--line); background: var(--surface); font-size: 12px; line-height: 16px; color: var(--muted); }
@media (max-width: 640px) {
  .d1-h { padding: 20px 16px 16px; }
  .d1-t { font-size: 18px; line-height: 24px; }
  .d1-sg i { width: 32px; }
  .d1-st, .d1-st.done[data-just] { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 20px 16px; }
  .d1-st.done { padding: 12px 16px; }
  .d1-st.done .d1-c { flex-direction: column; }
  .d1-acts { grid-column: 2; }
  .d1-acts .k-btn { box-sizing: border-box; width: 100%; min-height: 44px; justify-content: center; }
  .d1-f { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .d1-st.done { transition: none; } }
.pset .org-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.pset .org-tbl th { padding: 8px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.pset .org-tbl td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pset .org-tbl .r { text-align: right; white-space: nowrap; }
.pset .org-tbl select { min-width: 120px; }
.pset section form .acts { margin-top: 16px; }
.pset .code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pset .code-row .code, .code-row .code { flex: 1 1 auto; margin: 0; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--bg);
  font: 600 16px/24px var(--font-mono); letter-spacing: .04em; color: var(--text); word-break: break-all; }
@media (max-width: 759px) { .pset .org-line > .k-btn { flex: 1 1 100%; } }
/* Kelpie's model on the org page: the key in use as one row, Set your own key, Rotate and Remove as folds, today's use
   as a bar, and the daily cap. */
.pset .mdl-key { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); }
.pset .mdl-key > .ic { flex: none; color: var(--kelpie); }
.pset .mdl-t { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.pset .mdl-t b { font-size: 15px; font-weight: 650; }
.pset .mdl-t .mut { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.pset .mdl-t .mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); }
.pset .mdl-key > .k-tag { flex: none; }
.pset .mdl-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.pset .mdl-more { display: contents; }
.pset .mdl-more > summary { list-style: none; cursor: pointer; }
.pset .mdl-more > summary::-webkit-details-marker { display: none; }
.pset .mdl-more::details-content { order: 1; flex: 1 1 100%; }
.pset .mdl-more[open] > summary { border-color: var(--kelpie); color: var(--kelpie-deep); background: var(--kelpie-soft); }
.pset .mdl-more > .mdl-form { order: 1; flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); }
.pset .mdl-form .acts { margin-top: 4px; }
.pset .mdl-form input[type=password] { font-family: var(--font-mono); letter-spacing: .04em; }
.pset .k-btn.mdl-rm { color: var(--rose); }
.pset .mdl-use { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.pset .mdl-use .mut { font-size: 13px; color: var(--muted); }
.pset .mdl-use b { color: var(--text); font-weight: 650; }
.pset .mdl-bar { height: 6px; border-radius: var(--radius-full); background: var(--line); overflow: hidden; }
.pset .mdl-bar > span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: var(--kelpie); }
.pset .mdl-cap { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.pset .mdl-cap > .k-field { flex: 0 1 200px; }
@media (max-width: 759px) {
  .pset .mdl-key { align-items: flex-start; }
  .pset .mdl-key > .ic { margin-top: 3px; }
  .pset .mdl-acts > .mdl-more > summary, .pset .mdl-acts > form { flex: 1 1 0; justify-content: center; min-height: 44px; }
  .pset .mdl-acts > form > .k-btn { width: 100%; min-height: 44px; }
  .pset .mdl-cap > .k-field, .pset .mdl-cap > .k-btn { flex: 1 1 100%; }
}
/* Integrations on the org page (W1): one panel of provider rows, each its tile, name and state chip, what it reads and
   feeds, its token masked, and its actions; a stopped row rose with its fix. On a phone each row is a card. */
.pset .int-panel { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--bg); overflow: hidden; }
.pset .int-src { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 24px; border-top: 1px solid var(--line); }
.pset .int-src:first-child { border-top: 0; }
.pset .int-src.is-bad { background: color-mix(in srgb, var(--rose) 4%, var(--bg)); }
.pset .int-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.pset .int-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pset .int-hd { display: flex; align-items: center; gap: 12px; }
.pset .int-n { font-size: 15px; line-height: 24px; font-weight: 650; }
.pset .int-l { font-size: 14px; line-height: 20px; color: var(--text); overflow-wrap: anywhere; }
.pset .int-l.t2 { color: var(--text-2); }
.pset .int-m { font-size: 12px; line-height: 16px; color: var(--muted); overflow-wrap: anywhere; }
.pset .int-st { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-full); font-size: 12px; font-weight: 650; white-space: nowrap; }
.pset .int-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pset .int-st.ok { background: var(--green-soft); color: var(--green); }
.pset .int-st.pause { background: var(--line); color: var(--text-2); }
.pset .int-st.bad { background: color-mix(in srgb, var(--rose) 10%, var(--bg)); color: var(--rose); }
.pset .int-fix { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--rose); }
.pset .int-fix > .ic { flex: none; }
.pset .int-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.pset .int-acts .k-btn--sm { min-height: 36px; padding: 0 14px; }
.pset .int-acts .int-rm { color: var(--rose); }
.pset .int-foot { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; font-size: 12px; line-height: 16px; color: var(--muted); }
.pset .int-foot > .ic { flex: none; }
.pset .int .note-line { margin-bottom: 16px; }
@media (max-width: 759px) {
  .pset .int-panel { border: 0; border-radius: 0; background: none; display: flex; flex-direction: column; gap: 16px; overflow: visible; }
  .pset .int-src { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--bg); }
  .pset .int-src:first-child { border-top: 1px solid var(--line); }
  .pset .int-src.is-bad { border-color: color-mix(in srgb, var(--rose) 22%, var(--line)); }
  .pset .int-ico { width: 36px; height: 36px; border-radius: 10px; }
  .pset .int-hd { justify-content: space-between; }
  .pset .int-fix { align-items: flex-start; }
  .pset .int-fix > .ic { margin-top: 2px; }
  .pset .int-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .pset .int-acts .k-btn--sm { min-height: 44px; }
  .pset .int-foot { align-items: flex-start; }
}
/* Connect and Edit (W2), the body KDialog takes from the page: what Kelpie may do as a checked list ending in "Nothing it
   can change", the multiselect laid out in the dialog, how far back as a segmented control, and Feeds. */
.kd .int-b { display: flex; flex-direction: column; gap: 16px; }
.kd .int-may { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kd .int-may li { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 16px; font-size: 14px; line-height: 20px; border-top: 1px solid var(--line); }
.kd .int-may li:first-child { border-top: 0; }
.kd .int-may li > .ic { flex: none; color: var(--green); }
.kd .int-may li.no { background: var(--surface); font-weight: 600; }
.kd .int-may li.no > .ic { color: var(--kelpie-deep); }
.kd .int-end { margin-left: auto; font-weight: 400; color: var(--muted); }
.kd .int-b .msel { max-width: none; }
.kd .int-b .msel > summary { height: 40px; border-radius: var(--radius-lg); }
.kd .int-b .msel-pop { position: static; width: 100%; max-width: none; max-height: none; margin-top: 8px; box-shadow: none; }
.kd .int-b .msel[open]::before { content: none; }
.kd .int-b .msel-grab { display: none; }
.kd .int-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kd .int-seg { display: flex; gap: 4px; padding: 4px; border-radius: var(--radius-lg); background: var(--line); }
.kd .int-seg label { flex: 1; position: relative; }
.kd .int-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.kd .int-seg span { display: grid; place-items: center; height: 32px; border-radius: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.kd .int-seg input:checked + span { background: var(--bg); color: var(--text); font-weight: 650; box-shadow: 0 1px 2px rgba(28, 26, 22, .12); }
.kd .int-seg input:focus-visible + span { box-shadow: 0 0 0 3px var(--kelpie-soft); }
.kd .int-sel { width: 100%; height: 40px; box-sizing: border-box; padding: 0 36px 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  appearance: none; -webkit-appearance: none; font: 14px var(--font-sans); color: var(--text); cursor: pointer;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23716c63' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 12px; }
.kd .int-sel:focus-visible { outline: none; border-color: var(--kelpie); box-shadow: 0 0 0 3px var(--kelpie-soft); }
.kd .int-pause { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.kd .int-pause input { width: 18px; height: 18px; margin: 0; accent-color: var(--kelpie); }
.kd .int-b .kd-err { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--rose); }
@media (max-width: 639.98px) { .kd .int-two { grid-template-columns: minmax(0, 1fr); } .kd .int-seg span { height: 40px; } }
/* Your data (W4): keeps, never keeps and how it is kept as one table, Kelpie's model with the own-key line under it, in
   the page's one column; on a phone each row stacks its words under what it is. */
.pset .yd-row { display: flex; flex-direction: column; gap: 16px; }
.pset .yd-panel { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--bg); overflow: hidden; }
.pset .yd-t { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.pset .yd-t th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); }
.pset .yd-t th:first-child { width: 46%; }
.pset .yd-t td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.pset .yd-t td.t2 { color: var(--text-2); }
.pset .yd-w { display: block; font-weight: 600; color: var(--text); }
.pset .yd-s { display: block; margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--muted); }
.pset .yd-g td { padding: 16px 16px 8px; background: var(--surface); }
.pset .yd-gh { font-size: 11px; line-height: 16px; letter-spacing: .12em; text-transform: uppercase; font-weight: 650; }
.pset .yd-gh.keep { color: var(--green); }
.pset .yd-gh.never { color: var(--rose); }
.pset .yd-gh.how { color: var(--kelpie-deep); }
.pset .yd-side { display: flex; flex-direction: column; gap: 16px; padding: 24px; box-sizing: border-box; border: 1px solid var(--line);
  border-radius: var(--radius-xl); background: var(--bg); }
.pset .yd-km { display: flex; align-items: center; gap: 12px; }
.pset .yd-km > .ic { flex: none; color: var(--kelpie); }
.pset .yd-col { display: flex; flex-direction: column; }
.pset .yd-col b { font-size: 15px; font-weight: 650; }
.pset .yd-use { font-size: 12px; color: var(--muted); }
.pset .yd-link { align-self: flex-start; font-size: 14px; font-weight: 600; color: var(--kelpie); text-decoration: none; }
.pset .yd-link:hover { color: var(--kelpie-deep); text-decoration: underline; }
.pset .yd-sm { padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; line-height: 16px; color: var(--muted); }
@media (max-width: 759px) {
  .pset .yd-t tr:first-child { display: none; }
  .pset .yd-t tr, .pset .yd-t td { display: block; }
  .pset .yd-t td { border-top: 0; padding: 4px 16px; }
  .pset .yd-t tr:not(.yd-g) { padding: 8px 0; border-top: 1px solid var(--line); }
  .pset .yd-t td[data-h]::before { content: attr(data-h) ": "; color: var(--muted); }
}
/* Kelpie's ticket link patterns proposal (3.4): who proposed it, the lines, Was and Now, then Accept, Rethink, ⋯ Edit by hand. */
.p-prop { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.p-pre { margin: 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--bg); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.p-prop .mut.by-k { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--fs-xs); color: var(--muted); }
.p-prop .mut.by-k::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--kelpie); }
#tickets .pl-more > summary { list-style: none; cursor: pointer; }
#tickets .pl-more > summary::-webkit-details-marker { display: none; }
#tickets .pl-more[open] > summary { margin-bottom: var(--space-2); }
#tickets .pl-more form { display: flex; flex-direction: column; gap: var(--space-2); }
#tickets .rl { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 6px 10px; font-size: var(--fs-sm); }
/* Repo import (5.2) in Project settings. */
.imp-f { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.imp-repo { display: flex; flex-direction: column; gap: 8px; flex: 1 1 280px; min-width: 0; max-width: 480px; }
.pset .imp-repo .k-field { display: contents; }
.imp-f .k-btn { height: 40px; }
.imp-next { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 20px; color: var(--text-2); }
.imp-next .chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: var(--radius-full); background: var(--line); font-size: 12px; color: var(--text-2); }
.imp-next .k-dot--ink { background: var(--faint); }
.imp-next code { font-family: var(--font-mono); font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
.imp-next .k-btn { margin-top: 8px; }
@media (max-width: 760px) { .imp-f .k-btn { width: 100%; justify-content: center; } }


/* Red flags on Project settings (4.7). */
.rf-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.rf-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.rf-row .flag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 700; background: color-mix(in srgb, var(--rose) 12%, var(--bg)); color: var(--rose); white-space: nowrap; min-width: 128px; }
.rf-row .flag svg { width: 12px; height: 12px; }
.rf-globs { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; min-width: 0; }
.wk-sec { overflow-wrap: anywhere; min-width: 0; }
.mk-tag { white-space: normal; }

/* Your agents (page R) in the shell: the title's actions, one card per agent, today's jobs and the devices, in the
   settings pages' sections. */
.top > .acts { flex: none; }
.agp .mut { color: var(--muted); }
.agp .t2 { color: var(--text-2); font-size: 13px; line-height: 20px; }
.agp .mono, .agp code { font-family: var(--font-mono); }
.agp .row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.agp .col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.agp .grow { flex: 1; }
.agp .p-eyebrow .live { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--green); }
.agp .chips { gap: 6px; align-items: center; }
.agp .seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius-full); background: var(--line); flex: none; }
.agp .seg button, .agp .seg label > span { display: inline-flex; align-items: center; height: 26px; border: 0; background: none; padding: 0 12px; border-radius: var(--radius-full);
  font: inherit; font-size: 13px; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.agp .seg button.on, .agp .seg input:checked + span { background: var(--bg); color: var(--text); font-weight: 650; box-shadow: 0 1px 2px rgba(28, 26, 22, .12); }
.agp .seg button:focus-visible, .agp .seg input:focus-visible + span { outline: 2px solid var(--kelpie); outline-offset: 1px; }
.agp .seg label { display: inline-flex; }
.agp .seg input { position: absolute; opacity: 0; pointer-events: none; }
.agp .seg.off { opacity: .45; }
.agp .seg button:disabled { cursor: default; }
.ag-k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 650; color: var(--muted); }
.ag-hint { font-size: 12.5px; line-height: 18px; color: var(--muted); }
.ag-hint.ag-warn { color: var(--text-2); padding-left: 10px; border-left: 2px solid var(--amber, #c98a1b); }
.agp .agc { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--radius-full); font-size: 13px; font-weight: 550;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--text-2); }

.ag { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--bg);
  box-shadow: 0 1px 2px rgba(28, 26, 22, .04); }
.ag + .ag { margin-top: 4px; }
.ag-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ag-n { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.ag-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--kelpie-soft); color: var(--kelpie); flex: none; }
.ag-t { display: flex; flex-direction: column; min-width: 0; }
.ag-t b { font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-t .mut { font-size: 13px; }
.ag-st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.ag-st .mut { font-weight: 400; }
.ag-run { padding-left: 48px; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.ag-run .mono { font-size: 12px; letter-spacing: .02em; }
.ag-more { position: relative; flex: none; }
.ag-more > summary { list-style: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; color: var(--text-2);
  font-size: 18px; line-height: 1; }
.ag-more > summary::-webkit-details-marker { display: none; }
.ag-more > summary:hover, .ag-more[open] > summary { background: var(--surface); color: var(--text); }
.ag-more > summary:focus-visible { outline: 2px solid var(--kelpie); outline-offset: 2px; }
.ag-more .k-menu { top: calc(100% + 4px); bottom: auto; right: 0; width: 16rem; display: flex; flex-direction: column; gap: 4px; padding: 6px; }
.ag-more .k-menu form { margin: 0; }
.ag-more .k-menu__row { width: 100%; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--rose); text-align: left; cursor: pointer; }
.ag-more .ag-hint { padding: 0 10px 6px; }
.ag-c { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ag-cmd { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.ag-cmd code, .ag-cmd .code { flex: 1 1 12rem; min-width: 0; margin: 0; padding: 8px 12px; border-radius: 10px; background: #1c1a16; color: #e9f2ff; font-size: 13px;
  white-space: nowrap; overflow-x: auto; }
.agp .ag-cmd .k-btn--sm { min-height: 32px; height: 32px; padding: 0 12px; font-size: 13px; }
.agp .ag-cmd .k-btn--sm svg { width: 14px; height: 14px; }
.ag-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--radius-full); font-size: 13px; font-weight: 650; white-space: nowrap; }
.ag-pill--on { background: var(--green-soft); color: var(--green); }
.ag-pill--wait { background: var(--amber-soft); color: var(--amber-ink); }
.ag-pill--wait::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: mk-pulse 1.6s ease-in-out infinite; }
.ag-cmd code::before { content: "$ "; color: #8fa3bf; }
.ag-cmd .code { background: var(--surface); color: var(--text); border: 1px dashed var(--line-strong); font-size: 16px; font-weight: 700; letter-spacing: .04em; }
/* The one switch (canvas page AA): what it reads and makes, Let it work on its own, and Customise. */
.ag-does { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0 0 48px; font-size: 13px; line-height: 20px; color: var(--text-2); }
.ag-dk { font-size: 12px; font-weight: 600; color: var(--muted); }
.ag-dv { width: 1px; height: 16px; background: var(--line-strong); margin: 0 8px; }
.agp .agc.mk { border-color: transparent; background: var(--kelpie-soft); color: var(--kelpie-deep); }
.ag-swf, .ag-fold-f { margin: 0; }
.ag-auto { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 16px 20px 16px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.ag-auto.is-on { padding-left: 20px; background: color-mix(in srgb, var(--green-soft) 60%, var(--bg)); border-color: color-mix(in srgb, var(--green) 30%, var(--line)); }
.ag-sw { position: relative; width: 56px; height: 44px; flex: none; border: 0; background: none; padding: 0; cursor: pointer; }
.ag-sw::before { content: ""; position: absolute; left: 6px; top: 9px; width: 44px; height: 26px; border-radius: 13px; background: var(--faint, var(--line-strong)); transition: background .15s; }
.ag-sw::after { content: ""; position: absolute; left: 9px; top: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); box-shadow: 0 1px 3px rgba(28, 26, 22, .3); transition: left .15s; }
.ag-sw[aria-checked="true"]::before { background: var(--kelpie); }
.ag-sw[aria-checked="true"]::after { left: 27px; }
.ag-sw:focus-visible { outline: 2px solid var(--kelpie); outline-offset: 0; border-radius: 14px; }
.ag-sw:disabled { cursor: not-allowed; }
.ag-sw:disabled::before { background: var(--line); box-shadow: inset 0 0 0 1px var(--line-strong); }
.ag-sw:disabled::after { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.ag-at { font-size: 15px; line-height: 22px; font-weight: 650; }
.ag-at.dis { color: var(--text-2); }
.ag-at .t2 { font-size: 15px; font-weight: 400; }
.ag-al { font-size: 13px; line-height: 20px; color: var(--text-2); }
.ag-al.ag-was { color: var(--amber-ink); font-weight: 600; }
.ag-live { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); animation: mk-pulse 1.6s ease-in-out infinite; }
.ag-fold { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin-top: 12px; padding: 4px 0 0; border: 0; border-top: 1px solid var(--line); background: none;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); text-align: left; cursor: pointer; list-style: none; }
.ag-fold::-webkit-details-marker { display: none; }
.ag-fold .ic { transform: rotate(-90deg); transition: transform .15s; }
.ag-fold-d[open] > .ag-fold .ic { transform: none; }
.ag-fold .mut { font-weight: 400; font-size: 12px; }
.ag-fold:focus-visible { outline: 2px solid var(--kelpie); outline-offset: 2px; border-radius: 8px; }
.ag-kv { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 8px 16px; margin: 4px 0 12px; font-size: 14px; line-height: 20px; }
.ag-kv dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.ag-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* The switch's dialog: what it does, its scope with Change, Customise inside it, and what still waits. */
.sw-dlg { display: flex; flex-direction: column; gap: 16px; }
.kd:has(.sw-dlg) .kd-f .k-btn { flex: none; white-space: nowrap; }
.sw-does { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sw-does li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; font-size: 14px; line-height: 20px; border-top: 1px solid var(--line); }
.sw-does li:first-child { border-top: 0; }
.sw-does b, .sw-kt { font-weight: 650; }
.sw-ic { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--kelpie-soft); color: var(--kelpie-deep); }
.sw-ic svg, .sw-safe svg { width: 16px; height: 16px; }
.sw-scope, .sw-czh { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 8px 8px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.sw-scope .s, .sw-czh .s { flex: 1; min-width: 0; font-size: 14px; line-height: 20px; font-weight: 600; }
.sw-link { min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13px; font-weight: 650; color: var(--kelpie); cursor: pointer; white-space: nowrap; }
.sw-link:hover { background: var(--kelpie-soft); color: var(--kelpie-deep); }
.sw-link:focus-visible, .sw-chip:focus-visible, .sw-seg button:focus-visible, .sw-sel:focus-visible { outline: 2px solid var(--kelpie); outline-offset: 1px; }
.sw-safe { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sw-safe li { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 20px; color: var(--text-2); }
.sw-safe li svg { color: var(--green); flex: none; }
.sw-safe li.rf svg { color: var(--amber-ink); }
.sw-cz { display: flex; flex-direction: column; gap: 16px; }
.sw-cz[hidden], .sw-ap[hidden], .sw-scope[hidden], .sw-does[hidden] { display: none; }
.sw-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sw-cs { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.sw-lb { display: flex; align-items: center; gap: 4px; padding: 0; font-size: 11px; line-height: 16px; letter-spacing: .12em; text-transform: uppercase; font-weight: 650; color: var(--muted); }
.sw-lb .end { margin-left: auto; letter-spacing: 0; text-transform: none; font-weight: 500; font-size: 12px; display: inline-flex; align-items: center; gap: 2px; }
.sw-lb .end .sw-link { min-height: 32px; padding: 0 6px; }
.sw-kr { display: flex; align-items: center; gap: 8px; }
.sw-kr .ag-sw { margin-left: -6px; }
.sw-ks { font-size: 13px; line-height: 18px; color: var(--text-2); }
.sw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-chip { min-height: 40px; padding: 0 14px; border-radius: var(--radius-full); border: 1px solid var(--line-strong); background: var(--bg); font: inherit; font-size: 14px; font-weight: 600;
  color: var(--text-2); cursor: pointer; }
.sw-chip[aria-pressed="true"] { border-color: var(--kelpie); background: var(--kelpie-soft); color: var(--kelpie-deep); }
.sw-chip .n { font-weight: 400; color: var(--muted); }
.sw-help { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--text-2); }
.sw-ap { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); }
.sw-ap fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.sw-ap legend { padding: 0 0 6px; font-size: 13px; font-weight: 650; }
.sw-ap label { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 14px; }
.sw-ap input { width: 18px; height: 18px; margin: 0; accent-color: var(--kelpie); }
.sw-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; }
.sw-sel { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); font: inherit; font-size: 16px; color: var(--text); }
.sw-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius-full); background: var(--line); align-self: flex-start; }
.sw-seg button { min-height: 34px; padding: 0 12px; border: 0; border-radius: var(--radius-full); background: none; font: inherit; font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.sw-seg button[aria-pressed="true"] { background: var(--bg); color: var(--text); font-weight: 650; box-shadow: 0 1px 2px rgba(28, 26, 22, .12); }
@media (max-width: 640px) { .sw-two { grid-template-columns: minmax(0, 1fr); } .sw-scope .sw-link { min-height: 44px; } }
.ag-confirm { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 16px; border-radius: 14px; border: 1.5px solid var(--kelpie);
  box-shadow: 0 0 0 4px var(--kelpie-soft); }

.ag-why { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; }
.agp .ci-fix { color: var(--text); overflow-wrap: anywhere; }
.agp .ci-fix code { font-size: 12px; padding: 1px 5px; border-radius: 5px; background: var(--bg); border: 1px solid var(--line); }
.ag-fp { font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--text); }
.ag-fp b { font-weight: inherit; }
.ag-point { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; font-weight: 650; color: var(--kelpie-deep); }
.ag-add .ag-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ag-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); cursor: pointer; }
.ag-opt:has(input:checked) { border: 1.5px solid var(--kelpie); background: var(--kelpie-soft); }
.ag-opt input { accent-color: var(--kelpie); margin: 3px 0 0; }
.ag-opt > span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.ag-line { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ag-f { display: flex; flex-direction: column; gap: 6px; }
.ag-f input, .agp input.ag-src { flex: none; }
.agp input.ag-src { width: 12rem; height: 30px; border-radius: var(--radius-full); padding: 0 12px; font-size: 13px; }
.ag-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 16px; }
.ag-steps li { display: flex; flex-direction: column; gap: 8px; padding-left: 4px; }
.ag-pair { border-color: var(--kelpie) !important; box-shadow: 0 0 0 4px var(--kelpie-soft) !important; }

@media (max-width: 760px) {
  .top > .acts { width: 100%; }
  .ag { padding: 16px; }
  .ag-run { padding-left: 0; }
  .ag-add .ag-opts, .ag-line { grid-template-columns: minmax(0, 1fr); }
  .ag-does { padding-left: 0; }
  .ag-fold .mut { display: none; }
  .ag-auto { align-items: flex-start; padding: 12px 16px 12px 8px; flex-wrap: wrap; }
  .ag-auto.is-on { padding-left: 16px; }
  .ag-auto.is-on .k-btn { width: 100%; }
  .ag-kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ag-kv dd + dt { margin-top: 8px; }
  .ag-head { flex-wrap: wrap; }
  .ag-head .ag-n { flex-basis: calc(100% - 44px); }
  .ag-head .ag-more { order: -1; margin-left: auto; position: absolute; right: 12px; }
  .ag { position: relative; }
  .ag-fp { flex-basis: 100%; }
}
.ag-add { display: flex; flex-direction: column; gap: 20px; margin: 0; }

/* Home in the shell: what waits, each organisation's projects and the agents line. */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--radius-full); font-size: 13px; font-weight: 650; white-space: nowrap; }
.pill.big { height: 36px; padding: 0 16px; font-size: 14px; }
.pill.wait { background: var(--amber-soft); color: var(--amber-ink); }
.pill.clear { background: var(--green-soft); color: var(--green); }
.pset .org-rows .pill { flex: none; }
.pset .p-eyebrow .k-tag { vertical-align: middle; margin-left: 6px; }
.ag-lis { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.ag-li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-height: 52px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ag-li b { font-weight: 650; }

/* Signed-out pages: no nav, the Mark, one card and its footnotes, centred in one calm column. */
.out { box-sizing: border-box; min-height: 100vh; min-height: 100dvh; max-width: 28rem; margin: 0 auto; padding: 10vh 16px 48px; display: flex; flex-direction: column;
  gap: 24px; background: var(--bg); color: var(--text); font-family: var(--font-sans); }
.out > .k-mark { align-self: center; }
.out-card { display: flex; flex-direction: column; gap: 16px; padding: 32px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(28, 26, 22, .04), 0 12px 32px -16px rgba(28, 26, 22, .16); }
.out-card h1 { margin: 0; font-size: 24px; line-height: 30px; font-weight: 680; letter-spacing: -0.01em; text-wrap: balance; }
.out-sub { margin: 0; color: var(--text-2); font-size: 15px; line-height: 22px; }
.out-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.out-f { display: flex; flex-direction: column; gap: 6px; }
.out-f input.k-field__input { flex: none; width: 100%; height: 44px; box-sizing: border-box; padding: 0 14px; font: 15px var(--font-sans); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--bg); transition: border-color .15s, box-shadow .15s; }
.out-f input.k-field__input:focus-visible { outline: none; border-color: var(--kelpie); box-shadow: 0 0 0 3px var(--kelpie-soft); }
.out-form .k-btn { height: 44px; margin-top: 4px; font-size: 15px; }
.out-card .note-line { border-radius: var(--radius-lg); }
.out-foot { display: flex; flex-direction: column; gap: 6px; padding: 0 8px; color: var(--muted); font-size: 14px; line-height: 20px; text-align: center; }
.out-foot p { margin: 0; }
.out-foot a, .out-sub a { color: var(--kelpie); font-weight: 600; text-underline-offset: 3px; }
@media (max-width: 760px) { .out { padding-top: 6vh; } .out-card { padding: 24px 20px; border-radius: 20px; } }
.ag-mk > .mut { font-size: 13px; }
.ag-pill:not([class*=--]) { background: var(--surface); color: var(--text-2); }
.pset .au-pager { display: flex; align-items: center; gap: 16px; padding-top: 16px; }
.pset .au-pager .p-sub { margin: 0; flex: 1; text-align: center; }

/* The multiselect (multi_pick): a field reading what is picked, opening a popover, a bottom sheet on a phone, with Find,
   Select all and Select none, the count, a listbox of ticks (a ticked one filled with ✓) and Done. */
.msel { position: relative; width: 100%; max-width: 28rem; }
.msel > summary { list-style: none; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: var(--bg); color: var(--text); font-size: 14px; cursor: pointer; }
.msel > summary::-webkit-details-marker { display: none; }
.msel > summary:hover { border-color: color-mix(in srgb, var(--kelpie) 45%, var(--line-strong)); }
.msel > summary:focus-visible, .msel[open] > summary { outline: none; border-color: var(--kelpie); box-shadow: 0 0 0 3px var(--kelpie-soft); }
.msel-v { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msel > summary .ic { flex: none; color: var(--muted); transition: transform .12s; }
.msel[open] > summary .ic { transform: rotate(180deg); }
.msel-pop { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: max(100%, 20rem); max-width: min(28rem, calc(100vw - 32px)); box-sizing: border-box;
  display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg);
  box-shadow: var(--shadow-modal); }
.msel-grab { display: none; }
.msel-q { margin: 0; }
.msel-q input { height: 34px; }
.msel-pre { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; font-size: 12.5px; }
.msel-a { padding: 4px 8px; border: 0; border-radius: 8px; background: var(--surface); color: var(--kelpie-deep); font: inherit; font-weight: 650; cursor: pointer; }
.msel-a:hover { background: var(--kelpie-soft); }
.msel-n { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.msel-l { display: flex; flex-direction: column; gap: 2px; max-height: 15rem; overflow: auto; padding: 2px; border-radius: 10px; outline: none; overscroll-behavior: contain; }
.msel-l:focus-visible { box-shadow: 0 0 0 2px var(--kelpie-soft); }
.msel-o { position: relative; display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.msel-o[hidden] { display: none; }
.msel-o input { position: absolute; opacity: 0; pointer-events: none; }
.msel-o:hover, .msel-o.is-at { background: var(--surface); }
.msel-o.is-at { box-shadow: inset 0 0 0 2px var(--kelpie-soft); }
.msel-c { flex: none; display: grid; place-items: center; width: 18px; height: 18px; box-sizing: border-box; border: 1.5px solid var(--line-strong); border-radius: 5px;
  background: var(--bg); color: transparent; }
.msel-o:has(input:checked) .msel-c { border-color: var(--kelpie); background: var(--kelpie); color: var(--on-accent); }
.msel-o:has(input:checked) .msel-t { font-weight: 600; }
.msel-0 { margin: 4px 10px; font-size: 13px; }
.msel-ft { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.org-picks .msel { max-width: 20rem; }
@media (max-width: 760px) {
  .msel[open]::before { content: ""; position: fixed; inset: 0; z-index: 39; background: var(--scrim); }
  .msel-pop { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 80vh; max-height: 80dvh;
    padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); border: 0; border-radius: 20px 20px 0 0; }
  .msel-grab { display: block; flex: none; align-self: center; width: 36px; height: 5px; border-radius: 3px; background: var(--line-strong); }
  .msel-l { max-height: none; flex: 1; min-height: 0; }
  .msel-o { min-height: 44px; }
}

/* Compact lists (canvas page AD): one 44 px line per row that opens in place; .is-comfy is Comfortable, the roomier
   spacing. Folds hold repeated waiting rows and finished ones; filter chips are links with counts. */
.cl-head { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.cl-head .p-eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.cl-flt { display: flex; gap: 6px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.cl-flt::-webkit-scrollbar { display: none; }
.fc { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; padding: 0 12px; border-radius: var(--radius-full); border: 1px solid var(--line-strong);
  background: var(--bg); font-size: 13px; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.fc b { font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.fc:hover { border-color: var(--text-2); color: var(--text); }
.fc[aria-current=true] { background: var(--text); border-color: var(--text); color: var(--bg); }
.fc[aria-current=true] b { color: var(--bg); }
.fc:focus-visible { outline: 2px solid var(--kelpie); outline-offset: 2px; }
.lst { border: 1px solid var(--line-strong); border-radius: var(--radius-xl); background: var(--bg); overflow: hidden; }
.lst > * + * { border-top: 1px solid var(--line); }
.cr-d > summary, .wk-card > summary { list-style: none; }
.cr-d > summary::-webkit-details-marker, .wk-card > summary::-webkit-details-marker, .fold::-webkit-details-marker { display: none; }
.cr { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 44px; padding: 0 14px; font-size: 13.5px; color: var(--text); cursor: pointer; }
.cr:hover, [open] > .cr { background: var(--surface); }
.cr:focus-visible { outline: 2px solid var(--kelpie); outline-offset: -2px; }
.cr > .ic { flex: none; width: 16px; height: 16px; color: var(--text-2); }
.cr .id { flex: none; min-width: 48px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.cr .tt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cr .pj { flex: 0 1 96px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--muted); }
.cr .chev { flex: none; color: var(--faint); transition: transform .16s; }
[open] > .cr .chev { transform: rotate(90deg); color: var(--text-2); }
.is-comfy .cr { min-height: 60px; padding: 12px 18px; font-size: 14px; }
.is-comfy .cr .tt { white-space: normal; overflow-wrap: anywhere; line-height: 20px; }
.cs { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--radius-full); font-size: 11.5px; font-weight: 650;
  white-space: nowrap; max-width: 22rem; overflow: hidden; text-overflow: ellipsis; }
.cs .d { flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cs.is-wait, .cs.is-asked { background: var(--amber-soft); color: var(--amber-ink); }
.cs.is-run { background: var(--kelpie-soft); color: var(--kelpie-deep); }
.cs.is-run .d { animation: cl-beat 1.6s ease-in-out infinite; }
.cs.is-q, .cs.is-no { background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cs.is-ok { background: var(--green-soft); color: var(--green); }
.cs.is-bad { background: color-mix(in srgb, var(--rose) 8%, var(--bg)); color: var(--rose); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rose) 30%, var(--bg)); }
@keyframes cl-beat { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .cs.is-run .d, .cr .chev { animation: none; transition: none; } }
.rx { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 140px); gap: 16px 24px; padding: 14px 14px 16px 42px;
  background: var(--surface); border-top: 1px solid var(--line); font-size: 13px; line-height: 19px; color: var(--text); }
.rx .k { display: block; margin-bottom: 6px; font-size: 10.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rx .mono { font-size: 12px; }
.rx-files { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.rx-f { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.stp { display: flex; flex-direction: column; gap: 4px; }
.stp-i { display: flex; align-items: center; gap: 6px; }
.stp-i .ic { flex: none; }
.stp-i.is-done .ic { color: var(--green); }
.stp-i.is-now { font-weight: 650; }
.stp-i.is-now .ic { color: var(--kelpie); animation: cl-beat 1.6s ease-in-out infinite; }
.stp-i.is-next { color: var(--muted); }
.fold-d + .fold-d, .fold-d + .lst, .lst + .fold-d, .lst + .lst { margin-top: 12px; }
.fold { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: var(--radius-xl); font-size: 13.5px; color: var(--text);
  cursor: pointer; list-style: none; }
.fold > .ic { flex: none; width: 16px; height: 16px; }
.fold .t2 { font-size: 12.5px; }
.fold .sh { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 650; color: var(--kelpie); white-space: nowrap; }
.fold .sh-c, [open] > .fold .sh-o { display: none; }
[open] > .fold .sh-c { display: inline; }
[open] > .fold .sh .ic { transform: rotate(180deg); }
.fold:focus-visible { outline: 2px solid var(--kelpie); outline-offset: 2px; }
.fold.w { background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 30%, var(--bg)); }
.fold.w > .ic { color: var(--amber-ink); }
.fold-d.w[open] { border: 1px solid color-mix(in srgb, var(--amber) 30%, var(--bg)); border-radius: var(--radius-xl); overflow: hidden; background: var(--bg); }
.fold-d.w[open] > .fold { border: 0; border-radius: 0; }
.fold-d.w[open] > .lst { border: 0; border-radius: 0; border-top: 1px solid color-mix(in srgb, var(--amber) 30%, var(--bg)); }
.fold.d { border: 1px dashed var(--line-strong); color: var(--text-2); }
.fold.d b { color: var(--text); }
.fold.d > .ic { color: var(--green); }
.fold-d.d[open] > .fold { margin-bottom: 8px; }
.is-comfy ~ .fold, .fold-d .is-comfy .cr { font-size: 14px; }

/* Devices as a table (canvas page AD) */
.dt { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-xl); background: var(--bg); font-size: 13.5px; }
.dt th { height: 36px; padding: 0 14px; text-align: left; font-size: 10.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.dt td { height: 46px; padding: 0 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.dt.is-comfy td { height: 60px; }
.dt tbody tr:first-child td { border-top: 0; }
.dt tbody tr:hover td { background: var(--surface); }
.dt tr.is-off td { color: var(--muted); }
.dt tr.is-me td { background: color-mix(in srgb, var(--kelpie) 5%, var(--bg)); }
.dt tr.is-me td:first-child { box-shadow: inset 3px 0 0 var(--kelpie); }
.dt tr.is-me .ag-fp { font-size: 15px; color: var(--text-2); }
.dt tr.is-me .ag-fp b { margin-right: 4px; padding: 2px 6px; border-radius: 6px; background: var(--kelpie-soft); color: var(--kelpie-deep); box-shadow: 0 0 0 2px var(--kelpie); font-weight: 700; }
.dt .dfp .ag-point { margin-top: 4px; display: flex; }
.dn { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dn > .ic { flex: none; width: 16px; height: 16px; color: var(--text-2); }
.dn b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ren { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0 4px; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 650;
  color: var(--kelpie); cursor: pointer; opacity: 0; }
tr:hover .ren, .ren:focus-visible { opacity: 1; }
.fpb { position: relative; min-height: 28px; padding: 0; border: 0; background: none; font-family: var(--font-mono); font-size: 12px; color: var(--text-2); cursor: help; }
.fpb .rest { color: var(--faint); }
.tipf { display: none; position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 6px 10px; border-radius: 8px; background: var(--text);
  color: var(--bg); font-size: 12px; white-space: nowrap; z-index: 5; box-shadow: 0 8px 18px -8px rgba(28, 26, 22, .4); }
.tipf b { font-weight: inherit; }
.fpb:hover .tipf, .fpb:focus .tipf { display: block; }
.dst-in { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.dthis { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--kelpie-soft); color: var(--kelpie-deep); font-size: 11px; font-weight: 700; }
.dm { width: 48px; text-align: right; }
.dt .k-btn--sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.dm .ag-more { display: inline-block; }
.dm .k-menu__row { display: flex; align-items: center; gap: 10px; min-height: 36px; color: var(--text); }
.dm .k-menu__row:hover { background: var(--surface); }
.dm .k-menu__row.is-rose { color: var(--rose); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tasks as one list (canvas page AD) */
.wk-cols { display: flex; flex-direction: column; gap: 16px; }
.wk-col { display: flex; flex-direction: column; min-width: 0; }
.wk-gh { display: flex; align-items: baseline; gap: 8px; padding: 0 4px 8px; font-size: 11px; line-height: 16px; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 650; color: var(--muted); }
.wk-gh b { color: var(--text); font-variant-numeric: tabular-nums; }
.wk-gh .t2 { letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.wk-gh.is-blocked, .wk-gh.is-blocked .t2 { color: var(--amber-ink); }
.wk-it { display: flex; align-items: flex-start; }
.wk-it > .wk-card { flex: 1; min-width: 0; }
.wk-pick { flex: none; display: grid; place-items: center; width: 40px; min-height: 44px; padding-left: 6px; cursor: pointer; }
.is-comfy .wk-pick { min-height: 60px; }
.wk-pick input { width: 16px; height: 16px; margin: 0; accent-color: var(--kelpie); cursor: pointer; }
.wk-card, .wk-row, .ibx-item { scroll-margin: 96px; }
.wk-card.is-linked, .wk-row.is-linked, .ibx-item.is-linked {
  position: relative; z-index: 1; border-radius: 10px; background: var(--kelpie-soft); border-color: var(--kelpie);
  box-shadow: 0 0 0 2px var(--kelpie); animation: linked-pulse 1s ease-out 3;
}
.wk-card.is-linked > .cr { background: transparent; }
@keyframes linked-pulse { from { box-shadow: 0 0 0 2px var(--kelpie), 0 0 0 2px var(--kelpie); } to { box-shadow: 0 0 0 2px var(--kelpie), 0 0 0 12px transparent; } }
@media (prefers-reduced-motion: reduce) { .wk-card.is-linked, .wk-row.is-linked, .ibx-item.is-linked { animation: none; } }
.wk-card--undo > .cr > .ic { color: var(--rose); }
.wk-card .wk-d { flex: none; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.wk-card .wk-who, .wk-card .wk-from { flex: none; max-width: 10ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text-2); }
.wk-card .wk-from { max-width: none; color: var(--muted); }
.wk-card .you { flex: none; height: 18px; padding: 0 6px; border-radius: 5px; background: var(--kelpie); color: var(--on-accent); font-size: 10px; font-weight: 750;
  letter-spacing: .06em; text-transform: uppercase; line-height: 18px; }
.wk-tags { flex: none; display: inline-flex; gap: 6px; min-width: 0; }
.rx.wk-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-2); }
.wk-block { align-self: stretch; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--amber) 35%, var(--bg)); }
.wk-block .row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; color: var(--text); }
.wk-all { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; }
.wk-stages { align-self: stretch; }
.stg { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; counter-reset: stg; }
.stg li { counter-increment: stg; display: flex; flex-direction: column; gap: 2px; min-width: 96px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); font-size: 12.5px; }
.stg li b { color: var(--text); font-weight: 650; }
.stg li b::before { content: counter(stg) " "; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.stg li.stg-done { background: var(--surface); }
.stg li.stg-done b::before { content: "✓ "; color: var(--green); }
.stg li.stg-now { border-color: var(--kelpie); box-shadow: 0 0 0 3px var(--kelpie-soft); }
.stg li.stg-next { color: var(--muted); }
.wk-gate { align-self: stretch; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--kelpie) 35%, var(--bg)); }
.wk-gate .row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.wk-gate .row .k-field { min-width: 200px; }
.stg-tbl .stg-row.is-off td { color: var(--muted); }
.stg-tbl .stg-ctl { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.stg-tbl td .k-tag + .k-tag { margin-left: 4px; }

@media (max-width: 759px) {
  .cl-flt { margin-left: 0; flex-basis: 100%; }
  .cr { gap: 10px; padding: 0 12px; }
  .cr .pj, .wk-card .wk-d, .wk-card .wk-who, .wk-card .wk-from { display: none; }
  .pset .stg-tbl, .pset .stg-tbl tbody, .pset .stg-tbl tr, .pset .stg-tbl td { display: block; }
  .pset .stg-tbl tr:first-child { display: none; }
  .pset .stg-tbl tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .pset .stg-tbl td { padding: 0; border: 0; }
  .pset .stg-tbl td:first-child { flex-basis: 100%; }
  .pset .stg-tbl td:nth-child(3) { color: var(--muted); }
  .pset .stg-tbl td:last-child { flex-basis: 100%; }
  .stg-tbl .stg-ctl { justify-content: flex-start; padding-top: 4px; }
  .wk-card > .cr { flex-wrap: wrap; row-gap: 6px; padding-top: 10px; padding-bottom: 10px; }
  .wk-card > .cr .tt { flex: 1 1 0; }
  .wk-card > .cr .wk-tags { order: 9; flex-basis: 100%; padding-left: 70px; }
  .wk-card > .cr .wk-tags .cs { max-width: 100%; }
  .cr .id { min-width: 0; }
  .pset > section.p-sec#day, .pset > section.p-sec#devices { padding-left: 12px; padding-right: 12px; }
  .fold.w .t2 { display: none; }
  .fold { flex-wrap: wrap; row-gap: 2px; padding: 10px 14px; }
  .cs { max-width: 10rem; }
  .cs-more { display: none; }
  .rx { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px 14px 14px; }
  .dt thead { display: none; }
  .dt, .dt tbody, .dt tr, .dt td { display: block; }
  .dt tr { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: center; padding: 8px 4px 8px 12px; border-top: 1px solid var(--line); }
  .dt tbody tr:first-child { border-top: 0; }
  .dt td, .dt.is-comfy td { height: auto; padding: 0; border: 0; }
  .dt td:first-child { grid-column: 1; grid-row: 1; }
  .dt .dfp { grid-column: 1; grid-row: 2; padding-left: 26px; }
  .dt .dst { grid-column: 2; grid-row: 1 / span 2; }
  .dt .dm { grid-column: 3; grid-row: 1 / span 2; }
  .ren { display: none; }
}
.ci-lvl{display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:var(--radius-full);font-size:11px;font-weight:700;background:var(--line);color:var(--text-2)}.ci-lvl--none{background:none;border:1px dashed var(--line-strong);color:var(--muted)}.ci-lvl--medium{background:var(--amber-soft);color:var(--amber-ink)}.ci-lvl--high{--o:color-mix(in oklch,var(--amber-ink),var(--rose));background:color-mix(in oklch,var(--o) 14%,var(--bg));color:var(--o)}.ci-lvl--critical{background:var(--rose);color:var(--on-accent)}.ci-why{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-size:13px;font-weight:600}.ci-floor{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--rose)}.ru-tag{display:inline-flex;align-items:center;gap:5px;align-self:flex-start;max-width:100%;min-height:22px;padding:2px 8px;border-radius:var(--radius-full);font-size:12px;font-weight:650;line-height:16px;background:var(--kelpie-soft);color:var(--kelpie-deep)}.ru-tag .ic{flex:none}.run{display:flex;align-items:center;gap:8px;margin:0;padding:10px 14px;border-radius:12px;background:var(--kelpie-soft);color:var(--kelpie-deep);font-size:var(--fs-sm);font-weight:600;overflow-wrap:anywhere}.run .live.k{display:inline-flex;align-items:center;gap:8px;font-size:inherit;font-weight:inherit;color:inherit;white-space:normal}.run .live.k::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:var(--kelpie);animation:run-pulse 1.6s ease-in-out infinite}@keyframes run-pulse{50%{opacity:.35}}@media (prefers-reduced-motion:reduce){.run .live.k::before{animation:none}}.int-run{margin:8px 0 0}.pl-run{flex:none;width:min(100% - 48px,1180px);margin:16px auto 0}.pl-run .k-btn{margin-left:auto}@media (max-width:640px){.pl-run{width:auto;margin:12px 16px 0}}