/* LeadRadar_web: the application's own pieces on top of r3-fluent (app.css stays the design's file).
   Same tokens, same rules: one accent, red and amber only with an icon and a word, depth by shadows, no inline
   styles (dynamic sizes are SVG attributes). Owner changes of 25.11: richer board cards, a wide card panel with a
   sticky documents column, progress bars, the agent stepper of amsterdam-bold in this language, the archive. */

/* ---------- base ---------- */
body {
  font-size: var(--fs-13);
  line-height: var(--lh-13);
}
.prop {
  grid-template-columns: 112px minmax(0, 1fr);
}
.prose,
.pair p {
  font-size: var(--fs-14);
  line-height: 24px;
}
.src__quote {
  font-size: var(--fs-14);
  line-height: 24px;
}
.side__section {
  margin: 0;
  padding: 0 var(--sp-2) 2px;
  color: var(--text-3);
  font-size: var(--fs-12);
  font-weight: var(--fw-medium);
}
.side__empty {
  padding: 4px var(--sp-2) 4px 28px;
  color: var(--text-3);
  font-size: var(--fs-12);
  list-style: none;
}

/* ---------- progress bar: thin, rounded, visible at once ---------- */
.pbar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}
.pbar__svg {
  flex: 1;
  min-width: 40px;
  height: 4px;
  overflow: visible;
}
.pbar__track {
  fill: var(--surface-sunken);
}
.pbar__fill {
  fill: var(--due-calm-solid);
  transform-box: fill-box;
  transform-origin: left center;
  animation: pbar-grow var(--dur-fill) var(--ease-out) both;
}
.pbar--soon .pbar__fill {
  fill: var(--due-soon-solid);
}
.pbar--urgent .pbar__fill {
  fill: var(--due-urgent-solid);
}
.pbar--agent .pbar__fill {
  fill: var(--agent-solid);
}
.pbar--accent .pbar__fill {
  fill: var(--accent);
}
.pbar__label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-2);
  font-size: var(--fs-12);
  line-height: var(--lh-12);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.pbar__label .i {
  width: 13px;
  height: 13px;
  color: var(--text-3);
}
.pbar--soon .pbar__label {
  color: var(--due-soon-text);
}
.pbar--urgent .pbar__label {
  color: var(--due-urgent-text);
  font-weight: var(--fw-semibold);
}
@keyframes pbar-grow {
  from {
    transform: scaleX(0);
  }
}

/* ---------- board card: richer, still quiet ---------- */
.board {
  grid-template-columns: repeat(4, minmax(232px, 1fr)) minmax(200px, 0.85fr);
}
.card {
  position: relative;
  gap: 4px;
  padding: 14px var(--sp-4);
}
.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--r-6);
  background: var(--surface-sunken);
  color: var(--text-2);
  font-size: var(--fs-12);
  line-height: 1;
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.badge .i {
  width: 13px;
  height: 13px;
  color: var(--text-3);
}
.badge--soft {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.badge--more {
  padding: 0 6px;
  background: transparent;
  color: var(--text-3);
}
a.card__title {
  color: var(--text-1);
  font-size: var(--fs-14);
  line-height: 21px;
  font-weight: var(--fw-semibold);
  letter-spacing: -0.012em;
  text-decoration: none;
}
.card__essence {
  margin: 0;
  font-size: var(--fs-13);
  line-height: var(--lh-13);
}
.badge--soft {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card__bar {
  margin-top: 10px;
}
.card__agent .pbar__label {
  color: var(--text-1);
}
.card__meta {
  flex-wrap: wrap;
  row-gap: 6px;
  min-height: 26px;
  margin-top: 10px;
}
.card__facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px var(--sp-3);
  min-width: 0;
}
.card__due {
  font-size: var(--fs-12);
}
.card__due.is-urgent {
  color: var(--due-urgent-text);
  font-weight: var(--fw-semibold);
}
.card__due.is-soon {
  color: var(--due-soon-text);
  font-weight: var(--fw-medium);
}
.card__due.is-calm {
  color: var(--text-1);
}
.card__due.is-quiet {
  color: var(--text-3);
  font-weight: var(--fw-regular);
}
.card__sum {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-1);
  font-size: var(--fs-13);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
}
.card__sum .i {
  width: 14px;
  height: 14px;
  color: var(--text-3);
}
.card__who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--text-2);
  font-size: var(--fs-12);
  white-space: nowrap;
}
.card__who .av {
  box-shadow: none;
}
.btn--xs {
  height: 26px;
  padding: 0 var(--sp-2);
  font-size: var(--fs-12);
}
.card__take {
  margin-left: auto;
  opacity: 0;
  transition:
    opacity var(--dur-micro) var(--ease-out),
    background-color var(--dur-micro) var(--ease-out);
}
@media (hover: none) {
  .card__take {
    opacity: 1;
  }
}
.card__take:focus-visible {
  opacity: 1;
}
.card:hover .card__take,
.card:focus-within .card__take {
  opacity: 1;
}
.card.is-urgent::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--due-urgent-solid);
}
.card.is-related {
  box-shadow:
    0 0 0 1.5px var(--brand-slate),
    var(--shadow-2);
}
.board.is-relating .card:not(.is-related) {
  opacity: 0.38;
}
.card--closed {
  padding: var(--sp-3) 14px;
}
.card--closed .card__head {
  display: none;
}
.col__sub {
  display: flex;
  flex-wrap: wrap;
  gap: 2px var(--sp-2);
  margin: -6px 6px var(--sp-2);
}
.col__sum {
  color: var(--text-2);
  font-size: var(--fs-12);
  font-variant-numeric: tabular-nums;
}
a.col__more {
  display: block;
  line-height: 30px;
  text-decoration: none;
}
a.col__more[hidden] {
  display: none;
}

/* ---------- card panel: wide, two columns, documents always in sight ---------- */
.panel__bar {
  padding-left: var(--sp-8);
}
.stagebar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--sp-1);
  margin: 0;
  padding: 10px var(--sp-8) 10px;
  border-bottom: 1px solid var(--line);
  list-style: none;
}
.stagebar__seg {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.stagebar__line {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--surface-sunken);
  transform-origin: left center;
}
.stagebar__seg.is-done .stagebar__line {
  background: color-mix(in srgb, var(--accent) 38%, transparent);
  animation: pbar-grow var(--dur-bar) var(--ease-out) both;
}
.stagebar__seg.is-current .stagebar__line {
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
  animation: pbar-grow var(--dur-bar) var(--ease-out) both;
}
.stagebar[data-outcome] .stagebar__seg:last-child .stagebar__line {
  background: var(--st-solid);
}
.stagebar__label {
  overflow: hidden;
  color: var(--text-3);
  font-size: var(--fs-12);
  line-height: var(--lh-12);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.stagebar__seg.is-done .stagebar__label {
  color: var(--text-2);
}
.stagebar__seg.is-current .stagebar__label {
  color: var(--text-1);
  font-weight: var(--fw-semibold);
}
.panel__scroll {
  padding-top: var(--sp-5);
}
.panel__event {
  max-width: 72ch;
}
.panel__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--w-aside);
  gap: var(--sp-8);
  align-items: start;
  margin-top: var(--sp-6);
}
.panel__main > .props {
  margin-top: 0;
}
.panel__aside {
  position: sticky;
  top: 0;
  min-width: 0;
}
.sec--aside {
  margin-top: 0;
}
.props--one {
  grid-template-columns: 1fr;
  margin: 0;
}
.company--note {
  color: var(--text-2);
  font-size: var(--fs-13);
}
.h2--tools {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.h2--tools .btn {
  margin-left: auto;
}
.company--note .link {
  margin-left: var(--sp-2);
  font-size: var(--fs-13);
}
.cands {
  max-height: 280px;
  overflow: auto;
}
.cands__list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cands__item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-8);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.cands__item:hover,
.cands__item:focus-visible {
  background: var(--surface-hover);
  outline: none;
}
.cands__item .i {
  grid-row: span 2;
  color: var(--text-3);
}
.cands__name {
  font-size: var(--fs-13);
  font-weight: var(--fw-medium);
}
.cands__meta {
  color: var(--text-3);
  font-size: var(--fs-12);
}
.bodies {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-13);
}
.rel__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--sp-4);
}
.rel__graph {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: var(--text-link);
  font-weight: var(--fw-medium);
  text-decoration: none;
}
.rel__graph .i {
  width: 14px;
  height: 14px;
}
.src__link--none {
  color: var(--text-2);
}
.notice {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  max-width: 72ch;
  margin: var(--sp-4) 0 0;
  padding: 10px var(--sp-3);
  border-radius: var(--r-10);
  background: var(--urgent-soft);
  color: var(--text-1);
  font-size: var(--fs-13);
}
.notice .i {
  margin-top: 2px;
  color: var(--urgent);
}
.panel__state .i {
  width: 16px;
  height: 16px;
  color: var(--text-3);
}
.urgent {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.urgent .i {
  width: 14px;
  height: 14px;
}
.menu__group {
  margin: var(--sp-2) 10px var(--sp-1);
  color: var(--text-3);
  font-size: var(--fs-12);
}
.menu__sep {
  height: 1px;
  margin: var(--sp-1) 6px;
  border: 0;
  background: var(--line);
}
.menu__hint {
  margin-left: auto;
  color: var(--text-3);
  font-size: var(--fs-12);
}
.menu__empty {
  margin: var(--sp-2) 10px;
  color: var(--text-3);
  font-size: var(--fs-13);
}
.menu__item .av {
  box-shadow: none;
}
.menu form {
  margin: 0;
}
@media (max-width: 1320px) {
  .panel__cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .panel__aside {
    position: static;
  }
}

/* ---------- documents and the agent (stepper after amsterdam-bold, in r3-fluent) ---------- */
.agent {
  padding: var(--sp-4);
  border-radius: var(--r-12);
  background: var(--surface-canvas);
  box-shadow: inset 0 0 0 1px var(--line);
}
.agent__head {
  margin-bottom: 0;
  font-size: var(--fs-13);
}
.agent__title {
  font-weight: var(--fw-semibold);
}
.agent__status {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.agent__bar {
  margin: 10px 0 2px;
}
.agent__bar .pbar__label {
  display: none;
}
.agent__text {
  margin: var(--sp-3) 0 0;
  color: var(--text-2);
  font-size: var(--fs-13);
  line-height: 20px;
}
.agent__sub {
  margin: var(--sp-4) 0 var(--sp-1);
  color: var(--text-3);
  font-size: var(--fs-12);
  line-height: var(--lh-12);
  font-weight: var(--fw-medium);
}
.btn--block {
  width: 100%;
  margin-top: var(--sp-3);
}
.vsteps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.vstep {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 6px 0;
}
.vstep + .vstep::before {
  content: "";
  position: absolute;
  left: 10.5px;
  top: -6px;
  width: 1px;
  height: 12px;
  background: var(--line-strong);
}
.vstep__mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-sunken);
  color: var(--text-3);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
}
.vstep__mark .i {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}
.vstep__name {
  padding-top: 1px;
  color: var(--text-2);
  font-size: var(--fs-13);
  line-height: 20px;
}
.vstep__note {
  padding-top: 2px;
  color: var(--text-3);
  font-size: var(--fs-12);
  white-space: nowrap;
}
.vstep--done .vstep__mark {
  background: var(--surface-selected);
  color: var(--text-1);
}
.vstep--done .vstep__name {
  color: var(--text-1);
}
.vstep--running .vstep__mark {
  background: var(--surface-raised);
  color: var(--accent);
  box-shadow: inset 0 0 0 1.5px var(--accent);
  animation: step-pulse var(--dur-pulse) var(--ease-in-out) infinite;
}
.vstep--running .vstep__name {
  color: var(--text-1);
  font-weight: var(--fw-semibold);
}
.vstep--running .vstep__note {
  color: var(--text-1);
  font-weight: var(--fw-medium);
}
.vstep__spin {
  animation: spin var(--dur-spin-vstep) linear infinite;
}
@keyframes step-pulse {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 1.5px var(--accent),
      0 0 0 0 color-mix(in srgb, var(--accent) 22%, transparent);
  }
  50% {
    box-shadow:
      inset 0 0 0 1.5px var(--accent),
      0 0 0 5px color-mix(in srgb, var(--accent) 0%, transparent);
  }
}
@keyframes step-pop {
  from {
    transform: scale(0.6);
    opacity: 0.4;
  }
}
@keyframes step-tick {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
}
.drafts {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.draft {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  padding: 10px var(--sp-3);
  border-radius: var(--r-10);
  background: var(--surface-raised);
  box-shadow: var(--shadow-1);
}
.draft > .i {
  color: var(--text-3);
}
.draft__name {
  display: grid;
  min-width: 0;
  font-size: var(--fs-13);
  line-height: 19px;
  font-weight: var(--fw-medium);
}
.draft__name small {
  color: var(--text-3);
  font-size: var(--fs-12);
  line-height: var(--lh-12);
  font-weight: var(--fw-regular);
}
.draft--pending {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}
.draft--pending .draft__name {
  color: var(--text-2);
}
.draft .btn--xs {
  grid-column: 2 / -1;
  justify-self: start;
  margin-left: -8px;
}
.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-6);
  background: var(--surface-sunken);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: var(--fw-medium);
}
.agent__note {
  display: flex;
  gap: var(--sp-2);
  align-items: flex-start;
  margin: var(--sp-3) 0 0;
  color: var(--text-2);
  font-size: var(--fs-12);
  line-height: var(--lh-12);
}
.agent__note .i {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--text-3);
}
.agent--locked {
  background: transparent;
}
.agent__locked {
  display: flex;
  gap: var(--sp-2);
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-13);
  line-height: 20px;
}
.agent__locked .i {
  margin-top: 2px;
  color: var(--text-3);
}

/* ---------- dialogs: closing outcome, reopening, a draft ---------- */
.ask,
.docview {
  padding: 0;
  border: 0;
  border-radius: var(--r-12);
  background: var(--surface-raised);
  color: var(--text-1);
  box-shadow: var(--shadow-3);
  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;
}
.ask {
  width: 460px;
  max-width: calc(100vw - 32px);
}
@starting-style {
  .ask[open],
  .docview[open] {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}
.ask::backdrop,
.docview::backdrop {
  background: var(--surface-scrim);
}
.ask__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: 0;
  padding: var(--sp-5) var(--sp-6);
}
.ask__title {
  margin: 0;
  font-size: var(--fs-16);
  line-height: var(--lh-16);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-title);
}
.ask__text {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-13);
  line-height: 20px;
}
.ask__choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.ask__foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field__label {
  color: var(--text-2);
  font-size: var(--fs-12);
  font-weight: var(--fw-medium);
}
.field__input {
  width: 100%;
  min-height: var(--h-control);
  padding: 6px 10px;
  border: 0;
  border-radius: var(--r-6);
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px var(--line-input);
  color: var(--text-1);
  font: inherit;
  font-size: var(--fs-13);
  resize: vertical;
}
.field__input:focus-visible {
  outline: none;
  box-shadow:
    inset 0 0 0 1px var(--focus),
    0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}
.seg--block {
  margin-left: 0;
  align-self: flex-start;
}
.seg__radio {
  cursor: pointer;
}
.seg__radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.seg__radio:has(input:checked) {
  background: var(--surface-raised);
  color: var(--text-1);
  box-shadow: var(--shadow-control);
}
.seg__radio:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.docview {
  width: min(760px, calc(100vw - 32px));
  max-height: 84vh;
}
.docview[open] {
  display: flex;
  flex-direction: column;
}
.docview__bar {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 var(--sp-3) 0 var(--sp-6);
  border-bottom: 1px solid var(--line);
}
.docview__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: var(--fs-13);
}
.docview__bar .ibtn {
  margin-left: auto;
}
.docview__body {
  overflow: auto;
  padding: var(--sp-6);
}
.doc-text__title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-16);
  line-height: var(--lh-16);
  font-weight: var(--fw-semibold);
}
.doc-text__sim {
  display: inline-flex;
  margin: 0 0 var(--sp-4);
  padding: 2px 8px;
  border-radius: var(--r-6);
  background: var(--surface-sunken);
  color: var(--text-2);
  font-size: var(--fs-12);
}
.doc-text__body {
  max-width: 68ch;
  font-size: var(--fs-14);
  line-height: 24px;
  white-space: pre-wrap;
}

/* ---------- sidebar profile switch ---------- */
.me-wrap {
  margin-top: auto;
}
.me {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: var(--r-8);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out);
}
.me:hover {
  background: var(--surface-hover);
}
.me__chev {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--text-3);
}

/* ---------- sign-in ---------- */
.login-page {
  min-height: 100vh;
}
.login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-5);
  min-height: 100vh;
  padding: var(--sp-8) var(--sp-4);
}
.login__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.mark--static {
  margin: 0 var(--sp-1) 0 0;
}
.login__card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  width: 420px;
  max-width: 100%;
  margin: 0;
  padding: var(--sp-6) var(--sp-8) var(--sp-6);
  border-radius: var(--r-12);
  background: var(--surface-raised);
  box-shadow: var(--shadow-3);
}
.login__title {
  margin: 0;
  font-size: var(--fs-20);
  line-height: var(--lh-20);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-title);
}
.login__lede {
  margin: -8px 0 0;
  color: var(--text-2);
  font-size: var(--fs-13);
  line-height: 20px;
}
.login__note {
  margin: 0;
  color: var(--text-3);
  font-size: var(--fs-12);
  line-height: var(--lh-12);
}
.profiles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  border: 0;
}
.profiles legend {
  margin-bottom: 6px;
  padding: 0;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--r-8);
  cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out);
}
.profile:hover {
  background: var(--surface-hover);
}
.profile input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.profile:has(input:checked) {
  background: var(--surface-selected);
}
.profile:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.profile .av {
  box-shadow: none;
}
.profile__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.profile__name {
  font-size: var(--fs-13);
  font-weight: var(--fw-medium);
  line-height: 18px;
}
.profile__role {
  color: var(--text-3);
  font-size: var(--fs-12);
  line-height: var(--lh-12);
}
.profile__check {
  margin-left: auto;
  color: var(--text-1);
  visibility: hidden;
}
.profile:has(input:checked) .profile__check {
  visibility: visible;
}

/* ---------- palette ---------- */
.pal__tag {
  flex: none;
  margin-left: auto;
  padding: 1px 6px;
  border-radius: var(--r-6);
  background: var(--surface-sunken);
  color: var(--text-2);
  font-size: var(--fs-12);
}

/* ---------- «Система» extras ---------- */
.sys__grid > :nth-child(2) {
  grid-row: auto;
}
.sys__stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-5);
  border-radius: var(--r-10);
  background: var(--surface-canvas);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-2);
  font-size: var(--fs-13);
  line-height: 20px;
}
.empty-state p {
  max-width: 62ch;
  margin: 0;
}
.empty-state > .i {
  width: 20px;
  height: 20px;
  color: var(--text-3);
}
.empty-state--page {
  align-items: center;
  margin: var(--sp-8) auto;
  max-width: 560px;
  text-align: center;
}
a.cell2--link {
  color: inherit;
  text-decoration: none;
}
a.cell2--link:hover .cell2__a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tbl__link {
  color: inherit;
  text-decoration: none;
}
.tbl__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.seg a.seg__btn {
  text-decoration: none;
}

/* ---------- archive ---------- */
.afilters {
  display: grid;
  gap: var(--sp-2);
  margin: var(--sp-4) 0 0;
}
.afilters__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}
.afilters .seg {
  margin-left: 0;
}
.afield--range input {
  width: 100px;
  font-variant-numeric: tabular-nums;
}
.afield--range input[type="number"] {
  width: 104px;
}
.afield {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--h-control);
  padding: 0 var(--sp-2);
  border-radius: var(--r-8);
  background: var(--surface-raised);
  box-shadow: var(--shadow-control);
  color: var(--text-3);
  font-size: var(--fs-13);
}
.afield .i {
  width: 15px;
  height: 15px;
}
.afield input,
.afield select {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-1);
  font: inherit;
  font-size: var(--fs-13);
}
.afield--grow {
  flex: 1 1 260px;
}
.ask .afield--grow {
  flex: none;
}
.afield--grow input {
  flex: 1;
}
.afield__label {
  color: var(--text-3);
  font-size: var(--fs-12);
  white-space: nowrap;
}
.archive {
  padding: var(--sp-4) var(--sp-6) var(--sp-10);
}
.arow {
  cursor: pointer;
}
.arow.is-selected,
.arow:focus-visible {
  background: var(--surface-selected);
  outline: none;
}
.cell2__a--quiet {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-1);
  font-weight: var(--fw-regular);
}
.cell2__a--quiet .i {
  width: 14px;
  height: 14px;
  color: var(--text-3);
}
.badge--outcome .i {
  width: 13px;
  height: 13px;
}
.badge--outcome.is-won {
  color: var(--text-1);
}
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}
.pager__info {
  color: var(--text-3);
  font-size: var(--fs-13);
}
.tbl--archive td {
  vertical-align: middle;
}

/* ---------- form controls in the design's language (owner 26.11: no raw native selects or spinners) ----------
   A select fills its whole pill (the pill is the click target), draws no native box or arrow, and shows the design's
   chevron (the sprite's chevronDown path as a mask, so it takes the text colour in either theme). Number fields
   drop the native spinner. */
.afield:has(> select) {
  position: relative;
  padding: 0;
  cursor: pointer;
}
.afield:focus-within {
  box-shadow:
    inset 0 0 0 1px var(--focus),
    0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}
.afield:has(> select):hover {
  background: var(--n-50);
}
.afield:has(> select)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 9px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background: var(--text-3);
  pointer-events: none;
  -webkit-mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%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='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.afield:has(> select:focus-visible)::after,
.afield:has(> select):hover::after {
  background: var(--text-1);
}
.afield > select {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  padding: 0 30px 0 var(--sp-3);
  border-radius: inherit;
  box-shadow: none;
  background-image: none;
  font-weight: var(--fw-medium);
  cursor: pointer;
  text-overflow: ellipsis;
}
.afield > select::-ms-expand {
  display: none;
}
.afield select option,
.afield select optgroup {
  background-color: var(--surface-raised);
  color: var(--text-1);
  font-weight: var(--fw-regular);
}
.afield input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.afield input[type="number"]::-webkit-inner-spin-button,
.afield input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
.afield input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}
.afield input::placeholder,
.field__input::placeholder {
  color: var(--text-3);
  opacity: 1;
}
.afield--range input {
  padding: 0 2px;
}

/* ---------- «Відсіяне» ---------- */
.afield--wide > select {
  max-width: 340px;
}
.cell2__c {
  color: var(--text-3);
  font-size: var(--fs-12);
  line-height: 1.4;
}
.tbl--kept td {
  vertical-align: top;
}
.tbl--kept td:first-child {
  max-width: 520px;
}
.kept__practices {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.kept__src {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.kept__src .i {
  width: 13px;
  height: 13px;
}
.kwho {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kwho__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--r-6);
  background: var(--surface-hover);
  color: var(--text-1);
  font-size: var(--fs-12);
  white-space: nowrap;
}
.kwho__item .i {
  width: 13px;
  height: 13px;
}
.kwho__item[data-verdict="missed"] {
  background: var(--c-amber-tint);
  color: var(--c-amber-text);
}
.kwho__item[data-verdict="rightly_kept"] {
  background: var(--c-green-tint);
  color: var(--c-green-text);
}
.kwho__who {
  color: inherit;
  opacity: 0.75;
}
.panel__state--kept {
  align-items: flex-start;
}
.panel__state--kept .i {
  flex: none;
  margin-top: 3px;
}
.panel__foot--kept {
  display: block;
  padding: 10px var(--sp-4) 12px var(--sp-8);
}
.kfb {
  display: grid;
  gap: var(--sp-2);
}
.kfb__who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1) var(--sp-3);
  margin: 0;
  font-size: var(--fs-13);
}
.kfb__others {
  color: var(--text-2);
}
.kfb__row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.kfb__comment {
  flex: 1;
  min-width: 0;
}
.pick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px var(--sp-3);
  margin: 0;
  padding: 0;
  border: 0;
}
.pick__item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 34px;
  padding: 0 var(--sp-2);
  border-radius: var(--r-6);
  color: var(--text-1);
  font-size: var(--fs-13);
  cursor: pointer;
}
.pick__item:hover {
  background: var(--surface-hover);
}
.pick__item:has(input:checked) {
  background: var(--surface-selected);
}
.pick__item input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}
.pick__item input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- graph of relations ---------- */
.graph__search {
  margin-left: auto;
}
.graph {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: var(--sp-6);
  align-items: start;
  padding: var(--sp-4) var(--sp-6) var(--sp-10);
}
.graph__svg {
  display: block;
  width: 100%;
  max-height: calc(100vh - 220px);
  border-radius: var(--r-12);
  background: var(--surface-raised);
  box-shadow: var(--shadow-1);
}
.graph__edge {
  stroke: var(--line-strong);
  stroke-width: 1;
}
.graph__edge--story {
  stroke: var(--chart-2);
  stroke-dasharray: 4 3;
}
.graph__edge--body {
  stroke: var(--chart-3);
}
.graph__node circle {
  fill: var(--surface-raised);
  stroke: var(--chart-2);
  stroke-width: 1.5;
  transition: stroke-width var(--dur-micro) var(--ease-out);
}
.graph__node--company circle {
  fill: var(--accent);
  stroke: var(--accent);
}
.graph__node--body circle {
  fill: var(--surface-sunken);
  stroke: var(--text-3);
}
.graph__node text {
  fill: var(--text-2);
  font-family: var(--font-ui);
  font-size: 11px;
}
.graph__node--ring0 text {
  fill: var(--text-1);
  font-size: 13px;
  font-weight: var(--fw-semibold);
}
a:hover > .graph__node text {
  fill: var(--text-1);
}
.graph__side {
  position: sticky;
  top: var(--sp-4);
}
.graph__keys {
  margin-top: var(--sp-4);
}
.graph__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--chart-2);
}
.graph__dot--company {
  background: var(--accent);
  box-shadow: none;
}
.graph__dot--body {
  background: var(--surface-sunken);
  box-shadow: inset 0 0 0 1.5px var(--text-3);
}
.graph__line {
  display: inline-block;
  width: 16px;
  height: 0;
  border-top: 1.5px dashed var(--chart-2);
}
@media (max-width: 1180px) {
  .graph {
    grid-template-columns: 1fr;
  }
}

/* ---------- colour (r3-fluent-color: the template writes data-practice / data-stage / data-outcome / data-due /
   data-hue / data-agent, color-tokens.css maps them to scales; colour is never the only carrier of meaning) ---------- */
.dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pc-solid, var(--text-3));
}
.badge[data-practice] {
  gap: 5px;
}
.nav--practice {
  gap: var(--sp-2);
}
.menu__item .dot {
  margin-right: 2px;
}
.col__glyph {
  display: inline-flex;
  color: var(--st-solid, var(--text-2));
}
.col__glyph .col__icon {
  color: inherit;
}
.col__sum {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.col__sum .i {
  width: 13px;
  height: 13px;
  color: var(--st-solid);
}
.flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--r-6);
  background: var(--c-red-tint);
  box-shadow: inset 0 0 0 1px var(--c-red-line);
  color: var(--due-urgent-text);
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}
.flag .i {
  width: 13px;
  height: 13px;
  color: var(--due-urgent-solid);
}
.av[data-hue] {
  background: var(--av-bg);
  color: var(--av-fg);
}
.select__glyph {
  width: 14px;
  height: 14px;
  color: var(--st-solid);
}
.select--stage {
  gap: 6px;
}
.btn--block .i {
  color: var(--agent-solid);
}
.vstep--done .vstep__mark {
  background: var(--agent-tint);
  color: var(--agent-text);
  box-shadow: inset 0 0 0 1px var(--agent-line);
}
.vstep--running .vstep__mark {
  color: var(--agent-solid);
  box-shadow: inset 0 0 0 1.5px var(--agent-solid);
  animation-name: step-pulse-agent;
}
@keyframes step-pulse-agent {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 1.5px var(--agent-solid),
      0 0 0 0 color-mix(in srgb, var(--agent-solid) 30%, transparent);
  }
  50% {
    box-shadow:
      inset 0 0 0 1.5px var(--agent-solid),
      0 0 0 5px color-mix(in srgb, var(--agent-solid) 0%, transparent);
  }
}
.draft .tag {
  background: var(--agent-tint);
  color: var(--agent-text);
  box-shadow: inset 0 0 0 1px var(--agent-line);
}
.fb .btn[aria-pressed="true"][data-verdict="useful"],
.fb .btn[aria-pressed="true"][data-verdict="rightly_kept"] {
  background: var(--c-green-tint);
  color: var(--c-green-text);
}
.fb .btn[aria-pressed="true"][data-verdict="weak"],
.fb .btn[aria-pressed="true"][data-verdict="missed"] {
  background: var(--c-amber-tint);
  color: var(--c-amber-text);
}
.state.is-ok {
  color: var(--text-2);
}
.state.is-ok .i {
  color: var(--ok-solid);
}
.state.is-warn {
  color: var(--warn-text);
}
.state.is-warn .i {
  color: var(--warn-solid);
}
.state.is-down,
.state.is-down .i {
  color: var(--bad-text);
}
.rate__fill--ok {
  fill: var(--ok-solid);
}
.rate__fill--warn {
  fill: var(--warn-solid);
}
.rate__fill--bad {
  fill: var(--bad-solid);
}
.fun__fill {
  fill: var(--chart-muted);
}
.fun__fill--end {
  fill: var(--accent);
}
.graph__edge--story {
  stroke: var(--c-blue-solid);
}
.graph__edge--body {
  stroke: var(--c-coolgray-line);
}
.graph__node circle {
  stroke: var(--c-blue-solid);
}
.graph__dot {
  box-shadow: inset 0 0 0 1.5px var(--c-blue-solid);
}
.graph__line {
  border-top-color: var(--c-blue-solid);
}

/* ---------- higher-specificity rules: after every plain rule for the same elements ---------- */
a:hover > .graph__node circle,
a:focus-visible > .graph__node circle {
  stroke-width: 3;
}
.pbar--agent .pbar__label .i {
  color: var(--agent-solid);
}
.card__due.is-urgent .i {
  color: var(--due-urgent-text);
  font-weight: var(--fw-semibold);
}
.card__due.is-soon .i {
  color: var(--due-soon-text);
  font-weight: var(--fw-medium);
}
.card__due[data-outcome] .i {
  color: var(--st-solid);
}
.menu__item > .i:first-child {
  color: var(--text-3);
}
.vstep.is-fresh .vstep__mark {
  animation: step-pop var(--dur-pop) var(--ease-out) both;
}
.badge--outcome[data-outcome] .i {
  color: var(--st-solid);
}
.vstep.is-fresh .vstep__mark .i {
  animation: step-tick var(--dur-tick) var(--ease-out) var(--dur-tick-delay) both;
}
.agent[data-agent] .agent__title .i {
  color: var(--agent-solid);
}

/* ---------- «Люди»: the admin's page of the shared core ---------- */
.people {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--sp-5);
}
.people__head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.people__head .h1 {
  flex: 1;
}
.people__back {
  color: var(--text-3);
  text-decoration: none;
}
.people__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-14);
}
.people__cell {
  padding: var(--sp-2);
  border-bottom: 1px solid var(--border-1);
  text-align: left;
  vertical-align: top;
}
.people__table tr.is-off {
  color: var(--text-3);
}
.people__name {
  display: block;
  font-weight: var(--fw-medium);
}
.people__meta {
  display: block;
  color: var(--text-3);
  font-size: var(--fs-12);
}
.people__form {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
}
.people__dirs {
  margin: 0 0 var(--sp-2);
  padding: 0;
  list-style: none;
}
.people__dirs form {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
}
.people__journal,
.people__refusals {
  font-size: var(--fs-14);
  line-height: 24px;
}
