/* Hallmark · shape: app screen · scope: app · genre: modern-minimal · posture: restrained · theme: custom (ADER HABER Docs core, measured references) */
/* Hallmark · critique · P4 H4 E4 S3 R5 · one accent (Amsterdam) for action and selection, one red for near deadlines; depth by tinted shadows, lines only between regions */
/* Hallmark · waive 24b · 2px half-steps (6, 10, 14) inside cards, rows and palette · measured Linear card padding 8/10/12/12 and Raycast rows; optical centring of 16px icons in 32px rows */
/* Hallmark · waive 38iii · .h2__n holds only a digit and .agent__title .i is an svg icon · a count of sources and an icon are not an accented word in the heading */
/* Hallmark · waive 72 · aside.panel is translated off-screen with visibility hidden when closed · the closed card panel text never paints at rest */
/* Hallmark · dismissed 69 · repeated times live in hidden panel templates of the board, one template per card */
/* Hallmark · dismissed F4 · the segmented control Вхідні / Мої / Усі is one control with one pressed segment, not two filled buttons */
/* Hallmark · dismissed 73 · the clamped second line of .card__essence is clipped by overflow hidden; at 1440 the due row never overlaps it (checked on a 2x render) */
/* Hallmark · dismissed 41 · dark-theme surfaces inherit text colour from body tokens set in the same theme block */

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none;
}
html,
body {
  overflow-x: clip;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  line-height: var(--lh-14);
  letter-spacing: var(--tracking-body);
  font-optical-sizing: auto;
  color: var(--text-1);
  background: var(--surface-chrome);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  caret-color: var(--accent);
}
::selection {
  background: color-mix(in srgb, var(--brand-navy) 20%, transparent);
}
:where(a, button, summary, input, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}
p {
  text-wrap: pretty;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
.num {
  font-variant-numeric: tabular-nums;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.i {
  width: 16px;
  height: 16px;
  flex: none;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: var(--sp-2);
  top: -48px;
  z-index: 50;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-8);
  background: var(--surface-raised);
  box-shadow: var(--shadow-3);
  color: var(--text-1);
}
.skip:focus {
  top: var(--sp-2);
}
.muted {
  color: var(--text-3);
}
.urgent {
  color: var(--urgent);
  font-weight: var(--fw-medium);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--n-300) transparent;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--surface-sunken);
  color: var(--text-2);
  font: var(--fw-medium) 11px / 1 var(--font-ui);
}
.kbd-group {
  display: inline-flex;
  gap: 2px;
  margin-left: auto;
}

/* ---------- shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--w-rail) var(--w-sidebar) minmax(0, 1fr);
  height: 100vh;
}

.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-3) 0;
}
.mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: var(--sp-3);
  border-radius: var(--r-8);
  background: var(--brand-amsterdam);
  color: var(--mark-fg);
  text-decoration: none;
  box-shadow: var(--shadow-mark);
}
.mark__a {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
}
.rail__btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--r-8);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition:
    background-color var(--dur-micro) var(--ease-out),
    color var(--dur-micro) var(--ease-out);
}
.rail__btn .i {
  width: 18px;
  height: 18px;
}
.rail__btn:hover {
  background: var(--surface-hover);
  color: var(--text-1);
}
.rail__btn.is-active {
  background: var(--surface-selected);
  color: var(--text-1);
}
.rail__spacer {
  flex: 1;
}
.i--sun {
  display: none;
}
:root[data-theme="dark"] .i--sun {
  display: block;
}
:root[data-theme="dark"] .i--moon {
  display: none;
}

.side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: var(--sp-3) var(--sp-3) var(--sp-2) var(--sp-1);
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  padding: 7px var(--sp-2) var(--sp-4);
}
.brand__name {
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-title);
}
.brand__firm {
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.search {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  height: var(--h-control);
  margin-bottom: var(--sp-4);
  padding: 0 6px 0 10px;
  border: 0;
  border-radius: var(--r-8);
  background: var(--surface-raised);
  box-shadow: var(--shadow-control);
  color: var(--text-3);
  font-size: var(--fs-13);
  cursor: pointer;
  transition: box-shadow var(--dur-micro) var(--ease-out);
}
.search:hover {
  box-shadow: var(--shadow-2);
}

.side__nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--h-row-nav);
  padding: 0 var(--sp-2);
  border-radius: var(--r-8);
  color: var(--text-2);
  font-size: var(--fs-13);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition:
    background-color var(--dur-micro) var(--ease-out),
    color var(--dur-micro) var(--ease-out);
}
.nav .i {
  color: var(--text-3);
}
.nav:hover {
  background: var(--surface-hover);
  color: var(--text-1);
}
.nav.is-active {
  background: var(--surface-selected);
  color: var(--text-1);
}
.nav__label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.nav__n {
  margin-left: auto;
  color: var(--text-3);
  font-size: var(--fs-12);
  font-weight: var(--fw-regular);
  font-variant-numeric: tabular-nums;
}
.nav.is-active .nav__n,
.seg__n {
  color: var(--text-2);
}
.nav--sub {
  padding-left: 28px;
  font-weight: var(--fw-regular);
}
.nav--sub.is-active {
  font-weight: var(--fw-medium);
}

.group {
  margin-top: var(--sp-5);
}
.group__head {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 var(--sp-2);
  border-radius: var(--r-6);
  color: var(--text-3);
  font-size: var(--fs-12);
  font-weight: var(--fw-medium);
  list-style: none;
  cursor: pointer;
}
.group__head::-webkit-details-marker {
  display: none;
}
.group__head:hover {
  color: var(--text-1);
}
.group__chev {
  width: 12px;
  height: 12px;
  transition: transform var(--dur-short) var(--ease-out);
}
.group:not([open]) .group__chev {
  transform: rotate(-90deg);
}
.group__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.me {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: var(--sp-4) var(--sp-2) var(--sp-1);
}
.me__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.me__name {
  font-size: var(--fs-13);
  line-height: var(--lh-13);
  font-weight: var(--fw-medium);
}
.me__role {
  font-size: var(--fs-12);
  line-height: var(--lh-12);
  color: var(--text-3);
}

/* avatars: one neutral style, initials only */
.av {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--avatar);
  height: var(--avatar);
  border-radius: var(--r-full);
  background: var(--avatar-bg);
  color: var(--avatar-fg);
  box-shadow: 0 0 0 2px var(--surface-raised);
}
.av__t {
  font-size: 11px;
  line-height: 1;
  font-weight: var(--fw-semibold);
  letter-spacing: 0;
}
.av--md {
  width: 28px;
  height: 28px;
  box-shadow: none;
  background: var(--brand-amsterdam);
  color: var(--mark-fg);
}
.av--md .av__t {
  font-size: 11px;
}
.av--sm {
  width: 20px;
  height: 20px;
  box-shadow: none;
}
.av--sys {
  background: var(--surface-sunken);
  color: var(--text-3);
}
.av--sys .i {
  width: 12px;
  height: 12px;
}
.avs {
  display: inline-flex;
}

/* ---------- work area ---------- */
.stage {
  min-width: 0;
  height: 100vh;
  padding: var(--sp-2) var(--sp-2) var(--sp-2) 0;
}
.main {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: auto;
  border-radius: var(--r-12);
  background: var(--surface-canvas);
  box-shadow: var(--shadow-1);
}
.head {
  padding: var(--sp-5) var(--sp-6) 0;
}
.head__row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: 32px;
}
.title {
  margin: 0;
  font-size: var(--fs-24);
  line-height: var(--lh-24);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-display);
}
.head__updated {
  margin: 0 0 0 auto;
  color: var(--text-3);
  font-size: var(--fs-13);
}

.seg {
  display: inline-flex;
  gap: 2px;
  margin-left: var(--sp-2);
  padding: 2px;
  border-radius: var(--r-8);
  background: var(--surface-sunken);
}
.seg__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-6);
  background: transparent;
  color: var(--text-2);
  font-size: var(--fs-13);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition:
    background-color var(--dur-short) var(--ease-out),
    color var(--dur-short) var(--ease-out),
    box-shadow var(--dur-short) var(--ease-out);
}
.seg__btn:hover {
  color: var(--text-1);
}
.seg__btn[aria-pressed="true"] {
  background: var(--surface-raised);
  color: var(--text-1);
  box-shadow: var(--shadow-control);
}
.seg__n {
  color: var(--text-3);
  font-weight: var(--fw-regular);
  font-variant-numeric: tabular-nums;
}

.lede {
  margin: var(--sp-2) 0 0;
  color: var(--text-2);
  font-size: var(--fs-14);
  line-height: var(--lh-14);
}
.lede strong {
  color: var(--text-1);
  font-weight: var(--fw-medium);
}
.lede__urgent {
  color: var(--text-1);
  font-weight: var(--fw-medium);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.lede__urgent:hover {
  text-decoration-color: currentColor;
}

.filters {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: var(--sp-4) 0 0 calc(-1 * var(--sp-2));
}
.filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--h-control);
  padding: 0 var(--sp-2) 0 10px;
  border: 0;
  border-radius: var(--r-8);
  background: transparent;
  color: var(--text-2);
  font-size: var(--fs-13);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition:
    background-color var(--dur-micro) var(--ease-out),
    color var(--dur-micro) var(--ease-out);
}
.filter .i {
  width: 14px;
  height: 14px;
  color: var(--text-3);
}
.filter:hover,
.filter:popover-open,
.filter[aria-expanded="true"] {
  background: var(--surface-hover);
  color: var(--text-1);
}
.filter.is-set {
  background: var(--surface-selected);
  color: var(--text-1);
}
.filter__value {
  color: var(--text-1);
}
.filter__value:empty {
  display: none;
}
.filter--reset {
  color: var(--text-3);
}
.filter--reset[hidden] {
  display: none;
}
.filters__count {
  margin: 0 0 0 auto;
  color: var(--text-3);
  font-size: var(--fs-13);
  font-variant-numeric: tabular-nums;
}

/* menus (popover) */
.menu {
  position: fixed;
  inset: auto;
  margin: 0;
  min-width: 232px;
  max-height: 360px;
  overflow: auto;
  padding: var(--sp-1);
  border: 0;
  border-radius: var(--r-10);
  background: var(--surface-raised);
  color: var(--text-1);
  box-shadow: var(--shadow-3);
  opacity: 1;
  transform: none;
  transition:
    opacity var(--dur-short) var(--ease-out),
    transform var(--dur-short) var(--ease-out),
    overlay var(--dur-short) allow-discrete,
    display var(--dur-short) allow-discrete;
}
.menu:not(:popover-open) {
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
}
@starting-style {
  .menu:popover-open {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}
.menu__item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  height: var(--h-row);
  padding: 0 var(--sp-2) 0 10px;
  border: 0;
  border-radius: var(--r-6);
  background: transparent;
  font-size: var(--fs-13);
  text-align: left;
  cursor: pointer;
}
.menu__item:hover,
.menu__item:focus-visible {
  background: var(--surface-hover);
  outline: none;
}
.menu__check {
  margin-left: auto;
  visibility: hidden;
  color: var(--text-2);
}
.menu__item[aria-checked="true"] .menu__check {
  visibility: visible;
}

/* ---------- board ---------- */
.board {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(var(--w-column), 1fr)) minmax(188px, 0.8fr);
  gap: var(--sp-3);
  align-items: stretch;
  padding: var(--sp-4) var(--sp-6) var(--sp-8);
  overflow-x: auto;
}
.col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 var(--sp-2) var(--sp-2);
  border-radius: var(--r-12);
  background: var(--surface-lane);
}
.col__list {
  flex: 1;
}
.col__head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  height: 40px;
  padding: 0 2px 0 6px;
}
.col__icon {
  width: 16px;
  height: 16px;
  color: var(--text-2);
}
.col__title {
  margin: 0;
  font-size: var(--fs-13);
  line-height: var(--lh-13);
  font-weight: var(--fw-semibold);
}
.col__count {
  color: var(--text-3);
  font-size: var(--fs-13);
  font-variant-numeric: tabular-nums;
}
.col__tools {
  display: flex;
  gap: 0;
  margin-left: auto;
}
.ibtn--sm {
  width: 24px;
  height: 24px;
}
.ibtn--sm .i {
  width: 14px;
  height: 14px;
}
.col__more {
  height: 30px;
  margin-top: 6px;
  padding: 0 var(--sp-2);
  white-space: nowrap;
  border: 0;
  border-radius: var(--r-8);
  background: transparent;
  color: var(--text-3);
  font-size: var(--fs-12);
  text-align: left;
  cursor: pointer;
}
.col__more:hover {
  background: var(--surface-hover);
  color: var(--text-1);
}
.col__sub {
  margin: -4px var(--sp-1) var(--sp-1);
  color: var(--text-3);
  font-size: var(--fs-12);
  line-height: var(--lh-12);
}
.col__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-height: 96px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--r-12);
  transition:
    background-color var(--dur-short) var(--ease-out),
    box-shadow var(--dur-short) var(--ease-out);
}
.col__list.is-over {
  background: var(--surface-hover);
  box-shadow: 0 0 0 4px var(--surface-hover);
}
.col--closed .col__list {
  flex: none;
}
.col__item {
  display: block;
}
.col__item[hidden] {
  display: none;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-3) 14px;
  border-radius: var(--r-10);
  background: var(--surface-raised);
  box-shadow: var(--shadow-1);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition:
    box-shadow var(--dur-short) var(--ease-out),
    transform var(--dur-short) var(--ease-out),
    opacity var(--dur-short) var(--ease-out);
}
.card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}
.card:active {
  transform: translateY(0);
}
.card.is-selected {
  box-shadow:
    0 0 0 1.5px var(--accent),
    var(--shadow-2);
}
.card.is-dragging {
  opacity: 0.45;
  transform: none;
  box-shadow: var(--shadow-1);
}
.card.is-landed {
  animation: land var(--dur-panel) var(--ease-out);
}
@keyframes land {
  from {
    transform: translateY(-6px);
    box-shadow: var(--shadow-2);
  }
}
.card__practice {
  color: var(--text-3);
  font-size: var(--fs-12);
  line-height: var(--lh-12);
}
.card__title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--text-1);
  font-size: var(--fs-14);
  line-height: var(--lh-14);
  font-weight: var(--fw-medium);
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}
.card__essence {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--text-2);
  font-size: var(--fs-13);
  line-height: var(--lh-13);
}
.card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  min-height: 20px;
  margin-top: 10px;
}
.card__due {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-2);
  font-size: var(--fs-12);
  line-height: var(--lh-12);
  font-weight: var(--fw-medium);
  font-variant-numeric: tabular-nums;
}
.card__due .i {
  width: 14px;
  height: 14px;
  color: var(--text-3);
}
.card__due.is-urgent {
  color: var(--urgent);
  font-weight: var(--fw-semibold);
}
.card__due.is-quiet {
  color: var(--text-3);
  font-weight: var(--fw-regular);
}
.card--closed {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}
.card--closed:hover {
  background: var(--surface-raised);
}
.card--closed .card__title {
  color: var(--text-2);
  font-weight: var(--fw-medium);
}
.card--closed .card__meta {
  margin-top: var(--sp-1);
}
.card--closed .av {
  box-shadow: none;
}

.board__empty {
  margin: 0 var(--sp-8) var(--sp-8);
  padding: var(--sp-8);
  border-radius: var(--r-12);
  background: var(--surface-hover);
  color: var(--text-2);
  text-align: center;
}
.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-link);
  font-weight: var(--fw-medium);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- panel ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--surface-scrim);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--dur-panel) var(--ease-out),
    visibility 0s linear var(--dur-panel);
}
body.has-panel .scrim {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--dur-panel) var(--ease-out);
}
.panel {
  position: fixed;
  top: var(--sp-2);
  right: var(--sp-2);
  bottom: var(--sp-2);
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: var(--w-panel);
  max-width: calc(100vw - 16px);
  border-radius: var(--r-12);
  background: var(--surface-raised);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  transform: translateX(calc(100% + 24px));
  visibility: hidden;
  transition:
    transform var(--dur-panel) var(--ease-out),
    visibility 0s linear var(--dur-panel);
}
.panel.is-open {
  transform: none;
  visibility: visible;
  transition: transform var(--dur-panel) var(--ease-out);
}
.panel__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.panel__inner.is-swapping {
  animation: swap var(--dur-short) var(--ease-out);
}
@keyframes swap {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.panel__bar {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 var(--sp-3) 0 var(--sp-8);
  border-bottom: 1px solid var(--line);
}
.crumbs {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  color: var(--text-3);
  font-size: var(--fs-13);
}
.crumbs a {
  color: var(--text-2);
  text-decoration: none;
}
.crumbs .i {
  width: 12px;
  height: 12px;
}
.panel__tools {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.ibtn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--r-6);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition:
    background-color var(--dur-micro) var(--ease-out),
    color var(--dur-micro) var(--ease-out);
}
.ibtn:hover {
  background: var(--surface-hover);
  color: var(--text-1);
}

.panel__scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: var(--sp-6) var(--sp-8) var(--sp-10);
}
.panel__title {
  margin: 0;
  font-size: var(--fs-24);
  line-height: var(--lh-24);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-display);
}
.panel__event {
  max-width: 56ch;
  margin: 6px 0 0;
  color: var(--text-2);
  font-size: var(--fs-16);
  line-height: var(--lh-16);
}
.panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}
.panel__state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-13);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--h-control);
  padding: 0 var(--sp-3);
  border: 0;
  border-radius: var(--r-8);
  background: var(--surface-raised);
  box-shadow: var(--shadow-control);
  color: var(--text-1);
  font-size: var(--fs-13);
  font-weight: var(--fw-medium);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-micro) var(--ease-out),
    box-shadow var(--dur-micro) var(--ease-out),
    transform var(--dur-micro) var(--ease-out);
}
.btn:hover {
  background: var(--n-50);
}
.btn:active {
  transform: translateY(0.5px);
}
.btn .i {
  width: 15px;
  height: 15px;
}
.btn--primary {
  background: var(--accent);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-primary);
}
.btn--primary:hover {
  background: var(--accent-hover);
}
.btn--primary:active {
  background: var(--accent-press);
}
.btn--ghost {
  background: transparent;
  box-shadow: none;
  color: var(--text-2);
}
.btn--ghost:hover {
  background: var(--surface-hover);
  color: var(--text-1);
}
.btn--ghost[aria-pressed="true"] {
  background: var(--surface-selected);
  color: var(--text-1);
}
.btn--sm {
  height: var(--h-control);
  padding: 0 10px;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--surface-hover);
  box-shadow: none;
  color: var(--text-3);
  cursor: not-allowed;
  transform: none;
}
.btn--primary:disabled,
.btn--primary[aria-disabled="true"] {
  background: var(--surface-selected);
  color: var(--text-3);
}

.props {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--sp-6);
  margin: var(--sp-6) 0 0;
}
.prop {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--h-row);
}
.prop dt {
  color: var(--text-3);
  font-size: var(--fs-13);
}
.prop dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1) var(--sp-3);
  min-width: 0;
  margin: 0;
  font-size: var(--fs-13);
}
.select {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  height: var(--h-control);
  margin-left: calc(-1 * var(--sp-2));
  padding: 0 6px 0 var(--sp-2);
  border: 0;
  border-radius: var(--r-6);
  background: transparent;
  font-size: var(--fs-13);
  font-weight: var(--fw-medium);
  cursor: pointer;
}
.select .i {
  width: 14px;
  height: 14px;
  color: var(--text-3);
}
.select:hover {
  background: var(--surface-hover);
}
.person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.person .av {
  box-shadow: none;
}
.avs .av + .av {
  margin-left: -5px;
}

.sec {
  margin-top: var(--sp-8);
}
.h2 {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-16);
  line-height: var(--lh-16);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-title);
}
.h2__n {
  margin-left: 2px;
  color: var(--text-3);
  font-weight: var(--fw-regular);
}
.h3 {
  margin: 0 0 var(--sp-1);
  color: var(--text-3);
  font-size: var(--fs-13);
  line-height: var(--lh-13);
  font-weight: var(--fw-medium);
}
.prose {
  max-width: 68ch;
  margin: 0 0 10px;
  font-size: var(--fs-14);
  line-height: 22px;
}
.fn {
  font-size: 11px;
  line-height: 0;
  vertical-align: super;
}
.fn a {
  padding: 0 2px;
  color: var(--text-link);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}
.fn a:hover {
  text-decoration: underline;
}
.crumbs a:hover {
  color: var(--text-1);
}
.empty {
  margin: 0;
  color: var(--text-3);
  font-size: var(--fs-13);
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
}
.pair p {
  margin: 0;
  font-size: var(--fs-14);
  line-height: 22px;
}
.to {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-4);
  margin: var(--sp-4) 0 0;
  font-size: var(--fs-13);
}
.to__label {
  color: var(--text-3);
  min-width: 40px;
}
.to__item .muted {
  margin-left: 2px;
}

.srcs {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.src {
  scroll-margin-top: var(--sp-6);
}
.src__head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-13);
}
.src__n {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--surface-sunken);
  color: var(--text-2);
  font-size: 11px;
  font-weight: var(--fw-semibold);
}
.src__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  color: var(--text-1);
  font-weight: var(--fw-medium);
  text-decoration: none;
}
.src__link .i {
  width: 12px;
  height: 12px;
  color: var(--text-3);
}
.src__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.src__meta {
  color: var(--text-3);
}
.src__quote {
  margin: 6px 0 0 26px;
  padding: 2px 6px;
  border-radius: var(--r-6);
  color: var(--text-2);
  font-size: var(--fs-14);
  line-height: 22px;
  text-wrap: pretty;
  transition: background-color var(--dur-short) var(--ease-out);
}
.src:target .src__quote {
  background: var(--surface-selected);
}
.src__quote::before {
  content: "«";
}
.src__quote::after {
  content: "»";
}

.company {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-14);
}
.company .i {
  color: var(--text-3);
}
.rel {
  margin: 0;
  padding: 0;
  list-style: none;
}
.rel__row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--h-row);
  margin: 0 calc(-1 * var(--sp-2));
  padding: 0 var(--sp-2);
  border-radius: var(--r-6);
  color: inherit;
  font-size: var(--fs-13);
  text-decoration: none;
}
a.rel__row:hover {
  background: var(--surface-hover);
}
.rel__date,
.rel__kind {
  color: var(--text-3);
}
.rel__kind {
  font-size: var(--fs-12);
}
.rel__title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.agent {
  padding: 14px var(--sp-4) 10px;
  border-radius: var(--r-10);
  background: var(--surface-canvas);
  box-shadow: inset 0 0 0 1px var(--line);
}
.agent__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-1);
  font-size: var(--fs-13);
}
.agent__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: var(--fw-medium);
}
.agent__title .i {
  color: var(--text-2);
}
.agent__status {
  color: var(--text-3);
}
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  font-size: var(--fs-13);
}
.step__i {
  color: var(--text-3);
}
.step--done .step__i {
  color: var(--text-2);
}
.step--done .step__name {
  color: var(--text-2);
}
.step--running .step__i {
  color: var(--accent);
  animation: spin var(--dur-spin-step) linear infinite;
}
.step--running .step__name {
  font-weight: var(--fw-medium);
}
.step--queued {
  color: var(--text-3);
}
.step__at {
  color: var(--text-3);
  font-size: var(--fs-12);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.docs {
  margin: var(--sp-3) 0 0;
  padding: 0;
  list-style: none;
}
.doc {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-size: var(--fs-13);
}
.doc .i {
  color: var(--text-3);
}
.doc__name {
  font-weight: var(--fw-medium);
}
.doc__meta {
  color: var(--text-3);
  font-size: var(--fs-12);
}
.doc--pending {
  color: var(--text-3);
}
.doc--pending .doc__name {
  font-weight: var(--fw-regular);
}
.empty-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
}
.empty-block p {
  max-width: 60ch;
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-13);
  line-height: 20px;
}

.acts {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: var(--sp-1) 0 0;
  padding: 0;
  list-style: none;
}
.act {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  font-size: var(--fs-13);
  line-height: 20px;
}
.act__line {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 0;
  color: var(--text-2);
}
.act__who {
  color: var(--text-1);
  font-weight: var(--fw-medium);
}
.act__at {
  margin-left: auto;
  color: var(--text-3);
  font-size: var(--fs-12);
}
.act__comment {
  margin: 6px 0 0;
  padding: 10px var(--sp-3);
  border-radius: var(--r-10);
  background: var(--surface-canvas);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-1);
  font-size: var(--fs-14);
  line-height: 21px;
}
.composer {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  padding: 6px 6px 6px var(--sp-3);
  border-radius: var(--r-10);
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px var(--line-input);
  transition: box-shadow var(--dur-micro) var(--ease-out);
}
.composer:focus-within {
  box-shadow:
    inset 0 0 0 1px var(--focus),
    0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}
.composer textarea {
  flex: 1;
  min-height: 28px;
  padding: 4px 0;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--text-1);
  font: inherit;
  font-size: var(--fs-14);
  line-height: 20px;
  field-sizing: content;
  max-height: 160px;
}
.composer textarea::placeholder {
  color: var(--text-3);
}

.panel__foot {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px var(--sp-4) 10px var(--sp-8);
  border-top: 1px solid var(--line);
  background: var(--surface-raised);
}
.panel__foot-label {
  color: var(--text-3);
  font-size: var(--fs-13);
}
.fb {
  display: flex;
  gap: 2px;
}

/* ---------- command palette ---------- */
.pal {
  width: var(--w-palette);
  max-width: calc(100vw - 32px);
  margin: 14vh auto auto;
  padding: 0;
  border: 0;
  border-radius: var(--r-12);
  background: var(--surface-raised);
  color: var(--text-1);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  transition:
    opacity var(--dur-short) var(--ease-out),
    transform var(--dur-short) var(--ease-out),
    overlay var(--dur-short) allow-discrete,
    display var(--dur-short) allow-discrete;
}
@starting-style {
  .pal[open] {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}
.pal::backdrop {
  background: var(--surface-scrim);
  transition:
    opacity var(--dur-short) var(--ease-out),
    overlay var(--dur-short) allow-discrete,
    display var(--dur-short) allow-discrete;
}
@starting-style {
  .pal[open]::backdrop {
    opacity: 0;
  }
}
.pal__field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 var(--sp-4);
  border-bottom: 1px solid var(--line);
  color: var(--text-3);
}
.pal__field .i {
  width: 18px;
  height: 18px;
}
.pal__field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-1);
  font: inherit;
  font-size: var(--fs-16);
}
.pal__field input::placeholder {
  color: var(--text-3);
}
.pal__results {
  max-height: min(400px, 56vh);
  overflow: auto;
  padding: 6px;
}
.pal__group {
  margin: var(--sp-2) 10px var(--sp-1);
  color: var(--text-3);
  font-size: var(--fs-12);
  line-height: var(--lh-12);
}
.pal__group:first-child {
  margin-top: var(--sp-1);
}
.pal__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.pal__item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--h-row-palette);
  padding: 0 10px;
  border-radius: var(--r-8);
  font-size: var(--fs-14);
  cursor: pointer;
}
.pal__item .i {
  color: var(--text-3);
}
.pal__item[aria-selected="true"] {
  background: var(--surface-selected);
}
.pal__item[hidden] {
  display: none;
}
.pal__label {
  flex: none;
  font-weight: var(--fw-medium);
}
.pal__hint {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--text-3);
  font-size: var(--fs-13);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.pal__empty {
  margin: var(--sp-4) 10px;
  color: var(--text-3);
  font-size: var(--fs-13);
}
.pal__foot {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-4);
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: var(--fs-12);
}
.pal__foot-hint {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: var(--sp-6);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  height: 40px;
  padding: 0 6px 0 var(--sp-4);
  border-radius: var(--r-10);
  background: var(--text-1);
  color: var(--surface-raised);
  font-size: var(--fs-13);
  box-shadow: var(--shadow-3);
  transform: translateX(-50%);
  transition:
    opacity var(--dur-short) var(--ease-out),
    transform var(--dur-short) var(--ease-out),
    display var(--dur-short) allow-discrete;
}
.toast[hidden] {
  display: none;
  opacity: 0;
  transform: translate(-50%, 8px);
}
@starting-style {
  .toast:not([hidden]) {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}
.toast__undo {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-6);
  background: transparent;
  color: var(--brand-mist);
  font-weight: var(--fw-medium);
  cursor: pointer;
}
.toast__undo:hover {
  background: color-mix(in srgb, var(--surface-raised) 12%, transparent);
}
:root[data-theme="dark"] .toast__undo {
  color: var(--brand-amsterdam);
}

/* ---------- system (admin) ---------- */
.sys {
  padding: var(--sp-5) var(--sp-6) var(--sp-10);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--sp-3);
  margin: 0 0 var(--sp-4);
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px var(--sp-4);
  border-radius: var(--r-12);
  background: var(--surface-raised);
  box-shadow: var(--shadow-1);
}
.metric__label {
  color: var(--text-2);
  font-size: var(--fs-13);
  line-height: var(--lh-13);
}
.metric__value {
  margin: 0;
  color: var(--text-1);
  font-size: var(--fs-24);
  line-height: var(--lh-24);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-display);
}
.metric__sub {
  margin: 0;
  color: var(--text-3);
  font-size: var(--fs-12);
  line-height: var(--lh-12);
}
.sys__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  align-items: start;
}
.sys__grid > :nth-child(2) {
  grid-row: span 2;
}
.box {
  min-width: 0;
  padding: var(--sp-4) var(--sp-5) var(--sp-5);
  border-radius: var(--r-12);
  background: var(--surface-raised);
  box-shadow: var(--shadow-1);
}
.box--wide {
  grid-column: 1 / -1;
}
.box__head {
  margin-bottom: var(--sp-3);
}
.box__head .h2 {
  margin: 0;
}
.box__sub {
  margin: 2px 0 0;
  color: var(--text-3);
  font-size: var(--fs-13);
  line-height: var(--lh-13);
}
.box__note {
  margin: var(--sp-3) 0 0;
  color: var(--text-2);
  font-size: var(--fs-13);
  line-height: 20px;
}

.fun {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.fun__row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 64px 56px;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--h-row);
  font-size: var(--fs-13);
}
.fun__name {
  color: var(--text-2);
}
.fun__bar {
  width: 100%;
  height: 10px;
}
.fun__track {
  fill: var(--surface-lane);
}
.fun__fill {
  fill: var(--chart-2);
}
.fun__fill--end {
  fill: var(--chart-1);
}
.fun__value {
  color: var(--text-1);
  font-weight: var(--fw-medium);
  text-align: right;
}
.fun__conv {
  color: var(--text-3);
  font-size: var(--fs-12);
  text-align: right;
}

.tbl-wrap {
  overflow-x: auto;
  margin: 0 calc(-1 * var(--sp-2));
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-13);
  line-height: var(--lh-13);
}
.tbl th {
  height: var(--h-row);
  padding: 0 var(--sp-2);
  color: var(--text-3);
  font-size: var(--fs-12);
  font-weight: var(--fw-medium);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.tbl td {
  height: var(--h-row);
  padding: 6px var(--sp-2);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.tbl tbody tr {
  transition: background-color var(--dur-micro) var(--ease-out);
}
.tbl tbody tr:hover {
  background: var(--surface-hover);
}
.tbl--rows td {
  padding-top: var(--sp-2);
  padding-bottom: var(--sp-2);
}
.tbl tbody tr:last-child td {
  border-bottom: 0;
}
.tbl .r {
  text-align: right;
}
.tbl .fb {
  justify-content: flex-end;
}
.code {
  color: var(--text-2);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: var(--fs-12);
}
.tbl .tr--head th {
  height: 28px;
  padding-top: var(--sp-3);
  color: var(--text-2);
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  border-bottom: 1px solid var(--line);
}
.tbl .tr--head:first-child th {
  padding-top: var(--sp-1);
}
.tbl tbody tr.tr--head:hover {
  background: none;
}
.cell2 {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cell2__a {
  color: var(--text-1);
  font-weight: var(--fw-medium);
}
.cell2__b {
  color: var(--text-2);
}
.rate {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.rate__bar {
  width: 40px;
  height: 4px;
}
.rate__track {
  fill: var(--surface-lane);
}
.rate__fill {
  fill: var(--chart-2);
}
.rate__fill--low {
  fill: var(--urgent);
}
.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  white-space: nowrap;
}
.state .i {
  width: 14px;
  height: 14px;
}
.state.is-warn {
  color: var(--text-1);
  font-weight: var(--fw-medium);
}
.state.is-down {
  color: var(--urgent);
  font-weight: var(--fw-semibold);
}

.hm {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
}
.hm__lab,
.ch__lab {
  fill: var(--text-3);
  font-size: 10px;
  font-family: var(--font-ui);
}
.hm__c--0 {
  fill: var(--heat-0);
}
.hm__c--1 {
  fill: var(--heat-1);
}
.hm__c--2 {
  fill: var(--heat-2);
}
.hm__c--3 {
  fill: var(--heat-3);
}
.hm__c--4 {
  fill: var(--heat-4);
}
.legend {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin: var(--sp-3) 0 0;
  color: var(--text-3);
  font-size: var(--fs-12);
}
.legend__sw {
  width: 12px;
  height: 12px;
  flex: none;
}
.ch {
  display: block;
  width: 100%;
  height: auto;
}
.ch__grid {
  stroke: var(--line);
  stroke-width: 1;
}
.ch__model {
  fill: var(--chart-1);
}
.ch__tavily {
  fill: var(--chart-2);
}
.ch__bright {
  fill: var(--chart-3);
}
.keys {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin: var(--sp-3) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-13);
}
.keys li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
}
.keys__v {
  color: var(--text-1);
  font-weight: var(--fw-medium);
}
.seg__btn:disabled {
  color: var(--text-3);
  cursor: default;
}

/* ---------- system stub ---------- */
.stub {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
  max-width: 560px;
  margin: var(--sp-12) var(--sp-8);
}
.stub__title {
  margin: 0;
  font-size: var(--fs-20);
  line-height: var(--lh-20);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-title);
}
.stub__text {
  margin: 0 0 var(--sp-2);
  color: var(--text-2);
  font-size: var(--fs-14);
  line-height: 22px;
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .app {
    grid-template-columns: var(--w-rail) minmax(0, 1fr);
  }
  .side {
    display: none;
  }
}
@media (max-width: 720px) {
  .head {
    padding: var(--sp-4) var(--sp-4) 0;
  }
  .board {
    padding: var(--sp-3) var(--sp-4) var(--sp-6);
  }
  .head__updated {
    display: none;
  }
  .filters {
    overflow-x: auto;
  }
  .props,
  .pair,
  .sys__grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .panel__scroll {
    padding: var(--sp-5) var(--sp-4) var(--sp-8);
  }
}

/* ---------- icon colours that need the higher specificity: after every plain "X .i" rule ---------- */
.pal__item[aria-selected="true"] .i {
  color: var(--text-1);
}
.card__due.is-urgent .i {
  color: var(--urgent);
  font-weight: var(--fw-semibold);
}
.card__due.is-quiet .i {
  color: var(--text-3);
}
.nav.is-active .i {
  color: var(--text-1);
}

/* ---------- motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  .card:hover {
    transform: none;
  }
}
