:root {
  --bg: #f7f7f6;
  --surface: #ffffff;
  --surface-subtle: #fafaf9;
  --surface-hover: #f3f3f1;
  --ink: #20211f;
  --muted: #6d6e69;
  --faint: #91928d;
  --border: #e2e2df;
  --border-strong: #cecfca;
  --accent: #256d5b;
  --accent-strong: #1d594a;
  --accent-soft: #e8f1ee;
  --danger: #a13d38;
  --danger-soft: #f7ecea;
  --warning: #9a671d;
  --warning-soft: #f8f0df;
  --positive: #2b6a4f;
  --positive-soft: #e7f1ec;
  color: var(--ink);
  background: var(--bg);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
strong {
  font-weight: 650;
}

h1 {
  margin-bottom: 0.55rem;
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

h2 {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

h3 {
  margin-bottom: 0.25rem;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

small {
  color: var(--muted);
  font-size: 0.75rem;
}

kbd {
  min-width: 1.35rem;
  padding: 0.15rem 0.35rem;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 0.3rem;
  color: var(--muted);
  background: var(--surface);
  font:
    600 0.68rem/1 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.prototype {
  min-height: 100vh;
}

.workspace {
  min-width: 0;
  min-height: 100vh;
}

.page {
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  border-radius: 0.5rem;
}

.brand-mark,
.rail-brand {
  display: grid;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.45rem;
  color: #fff;
  background: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 0.08rem;
  line-height: 1.2;
}

.avatar {
  display: inline-grid;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid #cfdad6;
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 0.67rem;
  font-style: normal;
  font-weight: 750;
}

.sidebar-spacer,
.rail-spacer {
  flex: 1;
}

.sidebar nav,
.rail nav {
  display: grid;
  gap: 0.16rem;
}

.nav-link {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.25rem;
  padding: 0.42rem 0.55rem;
  border-radius: 0.45rem;
  color: #555651;
  font-size: 0.84rem;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink);
  background: #e9e9e6;
}

.nav-link.is-active {
  font-weight: 650;
}

.nav-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 1.15rem;
  place-items: center;
  color: #72736e;
  font-size: 0.95rem;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-badge {
  min-width: 1.25rem;
  margin-left: auto;
  padding: 0.1rem 0.28rem;
  border-radius: 999px;
  color: var(--muted);
  background: rgb(0 0 0 / 6%);
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 3.8rem;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(14px);
}

.search {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.48rem;
  min-height: 2.25rem;
  padding: 0 0.65rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--muted);
  background: var(--surface);
}

.search:focus-within {
  border-color: #95afa7;
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.82rem;
}

.search input::placeholder {
  color: #8d8e89;
}

.button {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.48rem 0.78rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.46rem;
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}

.button:hover {
  border-color: #b5b6b1;
  background: var(--surface-hover);
}

.button--primary {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.button--primary:hover {
  border-color: var(--accent-strong);
  color: #fff;
  background: var(--accent-strong);
}

.button--ghost {
  border-color: transparent;
  background: transparent;
}

.icon-button,
.quiet-button,
.inline-action {
  border: 0;
  color: var(--muted);
  background: transparent;
}

.icon-button {
  position: relative;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.45rem;
}

.icon-button:hover,
.quiet-button:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.dot {
  position: absolute;
  top: 0.45rem;
  right: 0.42rem;
  width: 0.42rem;
  height: 0.42rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--danger);
}

.quiet-button {
  padding: 0.3rem 0.45rem;
  border-radius: 0.35rem;
  font-size: 0.76rem;
}

.inline-action {
  margin: -0.2rem 0 0 -0.35rem;
  padding: 0.25rem 0.35rem;
  border-radius: 0.3rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 650;
}

.eyebrow,
.row-label,
.panel-label {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.lede {
  max-width: 64ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.7rem;
}

.page-heading > div:first-child {
  min-width: 0;
}

.heading-actions,
.top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.surface {
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.section-heading > a {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 650;
}

.section-heading--spaced {
  margin-top: 2rem;
}

.filter-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 0.48rem;
  background: var(--surface-subtle);
}

.filter {
  min-height: 1.8rem;
  padding: 0.27rem 0.55rem;
  border: 0;
  border-radius: 0.34rem;
  color: var(--muted);
  background: transparent;
  font-size: 0.72rem;
  white-space: nowrap;
}

.filter:hover,
.filter.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 8%);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.16rem 0.46rem;
  border-radius: 999px;
  color: #555650;
  background: #eeeeeb;
  font-size: 0.68rem;
  font-weight: 650;
  white-space: nowrap;
}

.tag--danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.tag--warning {
  color: #7f5517;
  background: var(--warning-soft);
}

.tag--positive {
  color: var(--positive);
  background: var(--positive-soft);
}

.tag--neutral {
  color: #4f5552;
  background: #eceeed;
}

.text-danger {
  color: var(--danger) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-positive {
  color: var(--positive) !important;
}

.muted {
  color: var(--muted);
}

.record-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d7dcda;
  border-radius: 0.42rem;
  color: #47645b;
  background: #f2f6f4;
  font-size: 0.72rem;
  font-weight: 750;
}

.record-icon--large {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 0.6rem;
  font-size: 1rem;
}

.row-menu {
  color: var(--faint);
  opacity: 0;
  text-align: right;
}

.data-row:hover .row-menu,
.contact-row:hover .row-menu {
  opacity: 1;
}

.settings-nav {
  display: flex;
  gap: 1.6rem;
  margin-bottom: 1.3rem;
  border-bottom: 1px solid var(--border);
}

.settings-nav a {
  position: relative;
  padding: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.settings-nav a[aria-current='page'] {
  color: var(--ink);
}

.settings-nav a[aria-current='page']::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--ink);
  content: '';
}

.settings-form {
  display: grid;
  gap: 1rem;
}

.settings-group,
.settings-boundary {
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface);
}

.settings-group {
  overflow: hidden;
}

.settings-group-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.settings-group-heading h2,
.settings-group-heading p {
  margin-bottom: 0;
}

.settings-group-heading p {
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(10rem, 14rem);
  gap: 2rem;
  align-items: center;
  min-height: 4.5rem;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-row > span:first-child {
  display: grid;
  gap: 0.22rem;
}

.setting-row small {
  line-height: 1.4;
}

.setting-row input,
.setting-row select,
.compact-grid input {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.4rem;
  background: #fff;
  font-size: 0.78rem;
}

.input-with-unit {
  display: flex;
  align-items: center;
}

.input-with-unit input {
  border-radius: 0.4rem 0 0 0.4rem;
}

.input-with-unit > span {
  display: grid;
  min-height: 2.35rem;
  place-items: center;
  padding: 0 0.65rem;
  border: 1px solid var(--border-strong);
  border-left: 0;
  border-radius: 0 0.4rem 0.4rem 0;
  color: var(--muted);
  background: var(--surface-subtle);
  font-size: 0.75rem;
}

.switch-control {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.switch-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  margin: 0;
  clip: rect(0 0 0 0);
  opacity: 0;
}

.switch-control > span {
  position: relative;
  width: 2.15rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #b7bab6;
}

.switch-control > span::after {
  position: absolute;
  top: 0.17rem;
  left: 0.17rem;
  width: 0.91rem;
  height: 0.91rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 20%);
  content: '';
  transition: transform 150ms ease;
}

.switch-control input:checked + span {
  background: var(--accent);
}

.switch-control input:checked + span::after {
  transform: translateX(0.9rem);
}

.switch-control em {
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
}

.settings-boundary {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  color: #4e5b56;
  background: #f5f7f6;
}

.settings-boundary > span {
  color: var(--accent);
}

.settings-boundary p {
  max-width: 78ch;
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.taxonomy-table,
.user-table {
  display: grid;
}

.taxonomy-line,
.user-line {
  display: grid;
  align-items: center;
  min-height: 3.65rem;
  padding: 0.65rem 1.2rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
}

.taxonomy-line:last-child,
.user-line:last-child {
  border-bottom: 0;
}

.taxonomy-line {
  grid-template-columns: auto minmax(10rem, 1fr) 8rem 7rem auto;
  gap: 0.7rem;
}

.taxonomy-line button,
.user-line button {
  justify-self: end;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 650;
}

.color-swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--swatch);
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 1.1rem 1.2rem;
}

.compact-grid label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.user-line {
  grid-template-columns: auto minmax(12rem, 1fr) 8rem 9rem auto;
  gap: 0.75rem;
}

.user-line > span:nth-child(2) {
  display: grid;
  gap: 0.14rem;
}

.state {
  font-size: 0.72rem;
}

.state::before {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: var(--faint);
  content: '';
}

.state--active::before {
  background: var(--positive);
}

.state--pending::before {
  background: var(--warning);
}

.prototype-switcher {
  position: fixed;
  z-index: 100;
  bottom: 1rem;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 20rem;
  padding: 0.5rem;
  border: 1px solid #050505;
  border-radius: 999px;
  color: #fff;
  background: #171817;
  box-shadow: 0 0.65rem 2.5rem rgb(0 0 0 / 22%);
  transform: translateX(-50%);
}

.prototype-switcher button {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #343634;
}

.prototype-switcher button:hover {
  background: #4c4e4c;
}

.prototype-switcher > span {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 0.1rem;
  text-align: center;
}

.prototype-switcher strong {
  font-size: 0.73rem;
}

.prototype-switcher small {
  overflow: hidden;
  color: #c7c9c6;
  font-size: 0.61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prototype-flag {
  position: fixed;
  z-index: 99;
  right: 0.8rem;
  bottom: 0.8rem;
  padding: 0.34rem 0.48rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.35rem;
  color: var(--muted);
  background: rgb(255 255 255 / 92%);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.06em;
}

.command-dialog {
  width: min(92vw, 35rem);
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 0.7rem;
  background: var(--surface);
  box-shadow: 0 1.25rem 4rem rgb(0 0 0 / 18%);
}

.command-dialog::backdrop {
  background: rgb(32 33 31 / 24%);
  backdrop-filter: blur(2px);
}

.command-dialog form {
  padding: 1rem;
}

.command-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.command-dialog-head h2 {
  font-size: 1.2rem;
}

.command-dialog-head button {
  padding: 0.28rem 0.38rem;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  color: var(--muted);
  background: var(--surface-subtle);
  font-size: 0.68rem;
}

.command-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.45rem;
}

.command-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.command-items {
  display: grid;
  gap: 0.15rem;
}

.command-items > button {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.6rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  text-align: left;
}

.command-items > button:hover {
  background: var(--surface-hover);
}

.command-items > button > span:nth-child(2) {
  display: grid;
  gap: 0.15rem;
}

.toast {
  position: fixed;
  z-index: 120;
  right: 1rem;
  top: 1rem;
  max-width: min(25rem, calc(100vw - 2rem));
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.5rem;
  color: #fff;
  background: #282a28;
  box-shadow: 0 0.6rem 2rem rgb(0 0 0 / 16%);
  font-size: 0.76rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.5rem);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Variant A — action queue */

.variant-a {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
}

.sidebar-a {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 15.5rem;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.85rem 0.7rem;
  border-right: 1px solid var(--border);
  background: #f0f0ed;
}

.sidebar-a .brand {
  margin: 0.1rem 0.35rem 1.1rem;
}

.workspace-label {
  margin: 0.8rem 0.55rem 0.25rem;
  color: #8c8d88;
  font-size: 0.63rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.3rem;
  padding: 0.5rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  text-align: left;
}

.profile:hover {
  background: #e5e5e1;
}

.profile > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 0.08rem;
}

.profile strong,
.profile small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile strong {
  font-size: 0.75rem;
}

.profile > span:last-child {
  color: var(--faint);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
}

.workspace-a {
  grid-column: 2;
}

.topbar-a {
  justify-content: flex-end;
  padding: 0.7rem 2rem;
}

.topbar-a .search {
  width: min(30rem, 45vw);
  margin-right: auto;
}

.page-a {
  max-width: 96rem;
  margin: 0 auto;
  padding: 2.25rem clamp(1.4rem, 3vw, 3rem) 6rem;
}

.a-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: 1rem;
  align-items: start;
}

.queue-surface {
  overflow: hidden;
}

.queue-surface > .section-heading,
.compact-surface {
  padding: 1rem;
}

.queue-surface > .section-heading {
  border-bottom: 1px solid var(--border);
}

.queue-surface > .section-heading p {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.action-list {
  display: grid;
}

.action-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 6.4rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.action-row:last-child {
  border-bottom: 0;
}

.action-row:hover {
  background: #fbfbfa;
}

.action-time {
  align-self: start;
  padding-top: 0.15rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
}

.action-body p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.action-body h3 {
  margin-bottom: 0.3rem;
}

.hover-actions {
  opacity: 0;
  transform: translateX(0.25rem);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.action-row:hover .hover-actions,
.action-row:focus-within .hover-actions {
  opacity: 1;
  transform: translateX(0);
}

.context-rail {
  display: grid;
  gap: 1rem;
}

.compact-surface {
  display: grid;
  gap: 0.65rem;
}

.compact-surface > .button {
  width: 100%;
}

.day-item {
  display: grid;
  grid-template-columns: 2.8rem 1fr;
  gap: 0.7rem;
  padding: 0.62rem 0;
  border-top: 1px solid var(--border);
}

.day-item time {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
}

.day-item > div,
.recent-link > span:last-child,
.case-mini {
  display: grid;
  gap: 0.15rem;
}

.day-item strong,
.recent-link strong,
.case-mini strong {
  font-size: 0.76rem;
}

.recent-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem;
  border-radius: 0.42rem;
}

.recent-link:hover {
  background: var(--surface-hover);
}

.list-surface {
  overflow: hidden;
}

.list-toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.list-toolbar .search {
  width: min(24rem, 40%);
  margin-right: auto;
}

.data-list {
  display: grid;
}

.data-row {
  display: grid;
  grid-template-columns:
    minmax(14rem, 1.5fr) minmax(10rem, 1fr) minmax(8rem, 0.8fr) minmax(10rem, 1fr)
    2rem;
  gap: 1rem;
  align-items: center;
  min-height: 4.2rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
}

.data-row:hover:not(.data-row--head) {
  color: inherit;
  background: var(--surface-hover);
}

.data-row > span {
  min-width: 0;
}

.data-row > span:first-child {
  display: grid;
  gap: 0.2rem;
}

.data-row--head {
  min-height: 2.55rem;
  color: var(--muted);
  background: var(--surface-subtle);
  font-size: 0.68rem;
  font-weight: 650;
}

.data-row:last-child {
  border-bottom: 0;
}

.list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.68rem;
}

.record-tabs {
  display: flex;
  gap: 1.4rem;
  margin: -0.3rem 0 1rem;
  border-bottom: 1px solid var(--border);
}

.record-tabs button {
  position: relative;
  padding: 0.65rem 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.76rem;
}

.record-tabs button.is-active {
  color: var(--ink);
  font-weight: 650;
}

.record-tabs button.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--ink);
  content: '';
}

.record-tabs span {
  margin-left: 0.2rem;
  color: var(--faint);
  font-size: 0.65rem;
}

.record-grid > div {
  display: grid;
  gap: 1rem;
}

.record-summary {
  padding: 1.2rem;
}

.health-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 650;
}

.health-indicator::before {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: currentColor;
  content: '';
}

.health-indicator--warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
  margin: 1.35rem 0;
  padding: 1.15rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.facts div {
  display: grid;
  gap: 0.25rem;
}

.facts dt {
  color: var(--muted);
  font-size: 0.68rem;
}

.facts dd {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
}

.note-block {
  position: relative;
  padding: 0.8rem;
  border-left: 2px solid #9bb4ad;
  background: #f7f9f8;
}

.note-block p {
  max-width: 70ch;
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
  line-height: 1.6;
}

.record-grid > div > .surface:last-child {
  padding: 1.2rem;
}

.timeline {
  display: grid;
  gap: 0;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.7rem;
  min-height: 5rem;
}

.timeline li:not(:last-child)::before {
  position: absolute;
  top: 1.7rem;
  bottom: 0;
  left: 0.87rem;
  width: 1px;
  background: var(--border);
  content: '';
}

.timeline-mark {
  z-index: 1;
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  background: #fff;
  font-size: 0.68rem;
}

.timeline p {
  margin: 0.2rem 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.case-mini {
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
}

.case-mini > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.contact-data {
  padding: 0.25rem 0;
}

.contact-row {
  display: grid;
  grid-template-columns:
    auto minmax(12rem, 1.2fr) minmax(12rem, 1fr) minmax(9rem, 0.8fr) minmax(8rem, 0.6fr)
    2rem;
  gap: 0.9rem;
  align-items: center;
  min-height: 4.4rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.76rem;
}

.contact-row:last-child {
  border-bottom: 0;
}

.contact-row:hover {
  color: inherit;
  background: var(--surface-hover);
}

.contact-row > span:nth-child(2),
.contact-row > span:nth-child(5) {
  display: grid;
  gap: 0.15rem;
}

/* Variant B — organization dossier */

.variant-b {
  display: grid;
  grid-template-columns: 4.7rem 15.5rem minmax(0, 1fr);
  background: #fbfbfa;
}

.rail-b {
  position: fixed;
  z-index: 35;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 4.7rem;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 0.5rem;
  border-right: 1px solid var(--border);
  background: #ededeb;
}

.rail-brand {
  margin: 0.05rem 0 0.65rem;
}

.rail-b nav {
  width: 100%;
}

.rail-b .nav-link {
  display: grid;
  justify-items: center;
  gap: 0.18rem;
  min-height: 3.25rem;
  padding: 0.38rem 0.15rem;
}

.rail-b .nav-label {
  max-width: 100%;
  font-size: 0.57rem;
}

.rail-b .nav-badge {
  position: absolute;
  top: 0.2rem;
  right: 0.35rem;
  min-width: 1rem;
  padding: 0.05rem 0.2rem;
  color: #fff;
  background: var(--danger);
  font-size: 0.55rem;
}

.rail-b > .nav-link {
  width: 100%;
}

.tree-b {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 4.7rem;
  width: 15.5rem;
  padding: 1rem 0.8rem;
  border-right: 1px solid var(--border);
  background: #f5f5f3;
  transition: transform 160ms ease;
}

.tree-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2rem;
  margin: 0 0.2rem 0.7rem;
  font-size: 0.82rem;
}

.tree-b .search {
  margin-bottom: 1rem;
}

.tree-b .search kbd {
  display: none;
}

.tree-section {
  display: grid;
  gap: 0.13rem;
  margin-bottom: 1rem;
}

.tree-section > p {
  margin: 0 0.35rem 0.35rem;
  color: var(--faint);
  font-size: 0.62rem;
  font-weight: 700;
}

.tree-section > a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.35rem 0.45rem;
  border-radius: 0.38rem;
  color: #5d5e5a;
  font-size: 0.73rem;
}

.tree-section > a:hover,
.tree-section > a.is-active {
  color: var(--ink);
  background: #e9e9e6;
}

.tree-section > a > span:last-child:not(.tree-dot) {
  margin-left: auto;
  color: var(--faint);
  font-size: 0.64rem;
}

.tree-dot,
.status-dot,
.priority-dot {
  width: 0.48rem;
  height: 0.48rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8d9a95;
}

.tree-dot--client,
.status-dot--positive,
.priority-dot--positive {
  background: var(--positive);
}

.status-dot--warning,
.priority-dot--warning {
  background: var(--warning);
}

.priority-dot--danger {
  background: var(--danger);
}

.priority-dot--normal {
  background: #8c918e;
}

.workspace-b {
  grid-column: 3;
}

.topbar-b {
  justify-content: space-between;
  padding: 0.65rem 1.4rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.breadcrumbs strong {
  color: var(--ink);
}

.page-b {
  padding: 2.4rem clamp(1.5rem, 5vw, 5rem) 7rem;
}

.document-page,
.dossier-page {
  max-width: 67rem;
  margin: 0 auto;
}

.document-title {
  max-width: 48rem;
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
}

.document-title h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.document-title > p,
.document-title > div > p:last-child {
  max-width: 60ch;
  margin-bottom: 0;
  color: var(--muted);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  line-height: 1.6;
}

.document-title--with-action {
  display: flex;
  max-width: none;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.document-section {
  max-width: 57rem;
  padding: 2rem 0 0;
}

.document-section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.document-section-title h2 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.25rem;
  font-weight: 500;
}

.document-section-title > span {
  display: grid;
  min-width: 1.3rem;
  min-height: 1.3rem;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: #ecece9;
  font-size: 0.63rem;
}

.dossier-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.dossier-callout:hover {
  color: inherit;
  background: #f8f8f6;
}

.dossier-callout--urgent {
  border-left: 2px solid var(--danger);
  padding-left: 0.8rem;
}

.dossier-callout p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.dossier-callout > span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 650;
}

.agenda-line {
  display: grid;
  grid-template-columns: 3.2rem 2.5rem minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  min-height: 4rem;
}

.agenda-line time {
  color: var(--muted);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.82rem;
}

.line-rule {
  height: 1px;
  background: var(--border-strong);
}

.agenda-line > div {
  display: grid;
  gap: 0.15rem;
}

.agenda-line strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.document-add {
  margin-top: 1.6rem;
  padding: 0.45rem 0;
  border: 0;
  color: var(--faint);
  background: transparent;
  font-size: 0.76rem;
}

.document-add:hover {
  color: var(--accent);
}

.document-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
}

.document-toolbar .search {
  width: min(24rem, 45%);
  margin-right: auto;
}

.alphabet-rule {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: center;
  margin: 0.5rem 0;
  color: var(--faint);
  font:
    italic 0.76rem Georgia,
    serif;
}

.alphabet-rule div {
  height: 1px;
  background: var(--border);
}

.directory-entry {
  display: grid;
  grid-template-columns: auto minmax(13rem, 1.5fr) minmax(9rem, 0.8fr) minmax(10rem, 0.8fr) auto;
  gap: 0.8rem;
  align-items: center;
  min-height: 4.6rem;
  padding: 0.7rem 0.35rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.76rem;
}

.directory-entry:hover {
  color: inherit;
  background: #f7f7f5;
}

.directory-entry > span:nth-child(2),
.directory-entry > span:nth-child(3) {
  display: grid;
  gap: 0.15rem;
}

.document-end {
  padding: 1.5rem 0;
  color: var(--faint);
  font:
    italic 0.76rem Georgia,
    serif;
  text-align: center;
}

.dossier-page {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 2.5rem;
}

.page-toc {
  position: sticky;
  top: 6.5rem;
  display: grid;
  align-self: start;
  gap: 0.18rem;
  padding-top: 7.8rem;
}

.page-toc a {
  padding: 0.3rem 0.45rem;
  border-left: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.68rem;
}

.page-toc a.is-active {
  border-left-color: var(--ink);
  color: var(--ink);
}

.dossier-title {
  position: relative;
  padding: 2.4rem 0 1.7rem;
  border-bottom: 1px solid var(--border);
}

.dossier-title h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 500;
}

.dossier-title > p:last-of-type {
  color: var(--muted);
  font-family: Georgia, 'Times New Roman', serif;
}

.dossier-title .heading-actions {
  position: absolute;
  right: 0;
  bottom: 1.4rem;
}

.dossier-properties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 2rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.dossier-properties > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: baseline;
  font-size: 0.76rem;
}

.dossier-properties > div > span {
  color: var(--muted);
}

.dossier-section {
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--border);
}

.dossier-section h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.25rem;
  font-weight: 500;
}

.dossier-section > p {
  max-width: 68ch;
  color: #4f504c;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.96rem;
  line-height: 1.75;
}

.embedded-list {
  display: grid;
  margin-top: 0.7rem;
}

.embedded-list > a {
  display: grid;
  grid-template-columns: auto minmax(12rem, 1fr) minmax(9rem, auto);
  gap: 0.65rem;
  align-items: center;
  min-height: 3.7rem;
  border-top: 1px solid var(--border);
  font-size: 0.74rem;
}

.embedded-list > a > span:nth-child(2) {
  display: grid;
  gap: 0.15rem;
}

.ledger {
  display: grid;
  margin-top: 0.4rem;
  border-top: 1px solid var(--border);
}

.ledger-entry {
  display: grid;
  grid-template-columns: 2rem minmax(14rem, 1.4fr) minmax(8rem, 0.7fr) minmax(8rem, 0.7fr) minmax(
      8rem,
      0.7fr
    );
  gap: 0.9rem;
  align-items: center;
  min-height: 4.7rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.76rem;
}

.ledger-entry:hover {
  color: inherit;
  background: #f7f7f5;
}

.ledger-entry > span:not(.ledger-index) {
  display: grid;
  gap: 0.15rem;
}

.ledger-index {
  color: var(--faint);
  font:
    italic 0.72rem Georgia,
    serif;
}

.people-directory {
  display: grid;
  border-top: 1px solid var(--border);
}

.person-line {
  display: grid;
  grid-template-columns: auto minmax(12rem, 1.1fr) minmax(11rem, 1fr) minmax(9rem, 0.7fr) minmax(
      7rem,
      0.6fr
    );
  gap: 0.8rem;
  align-items: center;
  min-height: 4.6rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
}

.person-line:hover {
  color: inherit;
  background: #f7f7f5;
}

.person-line > span:not(.avatar) {
  display: grid;
  gap: 0.12rem;
}

.settings-document .settings-nav {
  margin-top: 1.2rem;
}

.settings-form--B .settings-group {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.variant-b.is-collapsed {
  grid-template-columns: 4.7rem 0 minmax(0, 1fr);
}

.variant-b.is-collapsed .tree-b {
  transform: translateX(-100%);
}

/* Variant C — keyboard-first focus console */

.variant-c {
  display: grid;
  grid-template-columns: 12.2rem minmax(0, 1fr);
  background: #f8f8f7;
}

.sidebar-c {
  position: fixed;
  z-index: 35;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 12.2rem;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.6rem;
  border-right: 1px solid #252725;
  color: #d7d9d6;
  background: #202220;
  transition: width 160ms ease;
}

.sidebar-c-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0.1rem 1rem;
}

.sidebar-c .brand-mark {
  color: #1c2c27;
  background: #d9e9e4;
}

.sidebar-c .quiet-button {
  color: #adb0ac;
}

.sidebar-c .nav-link {
  color: #bfc2be;
}

.sidebar-c .nav-link:hover,
.sidebar-c .nav-link.is-active {
  color: #fff;
  background: #313431;
}

.sidebar-c .nav-icon {
  color: #aeb1ad;
}

.sidebar-c .nav-badge {
  color: #d7d9d6;
  background: #414541;
}

.sidebar-c-rule {
  height: 1px;
  margin: 0.65rem 0.4rem;
  background: #383b38;
}

.workspace-c {
  grid-column: 2;
}

.commandbar {
  position: sticky;
  z-index: 25;
  top: 0;
  display: grid;
  grid-template-columns: minmax(11rem, 0.6fr) minmax(16rem, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
  min-height: 3.8rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(14px);
}

.command-context {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
}

.command-context span {
  color: var(--muted);
}

.command-context strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commandbar .search {
  width: min(100%, 35rem);
  justify-self: center;
  background: #f8f8f7;
}

.command-key {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 0.38rem;
  color: var(--muted);
  background: #fff;
  font:
    700 0.72rem ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}

.focus-layout {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  min-height: calc(100vh - 3.8rem);
}

.views-panel {
  position: sticky;
  top: 3.8rem;
  display: flex;
  height: calc(100vh - 3.8rem);
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.25rem 0.75rem;
  border-right: 1px solid var(--border);
  background: #f4f4f2;
}

.views-panel .panel-label {
  margin: 0 0.45rem 0.45rem;
  color: var(--faint);
}

.views-panel > button,
.views-panel > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.1rem;
  padding: 0.35rem 0.5rem;
  border: 0;
  border-radius: 0.38rem;
  color: var(--muted);
  background: transparent;
  font-size: 0.72rem;
  text-align: left;
}

.views-panel > button:hover,
.views-panel > button.is-active,
.views-panel > a:hover,
.views-panel > a[aria-current='page'] {
  color: var(--ink);
  background: #e7e7e4;
}

.views-panel > button small {
  color: var(--faint);
}

.views-panel > .add-view {
  margin-top: 0.5rem;
  color: var(--faint);
}

.views-note {
  display: grid;
  gap: 0.25rem;
  margin-top: auto;
  padding: 0.7rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.page-c {
  min-width: 0;
  padding: 2rem clamp(1rem, 2.4vw, 2.5rem) 6rem;
}

.page-c .page-heading {
  align-items: center;
  margin-bottom: 1.2rem;
}

.page-c h1 {
  font-size: clamp(1.8rem, 2.7vw, 2.5rem);
}

.focus-toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.7rem;
}

.focus-toolbar > .search {
  width: min(22rem, 45%);
  margin-left: auto;
}

.compact-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.7rem;
}

.compact-select select {
  min-height: 2rem;
  padding: 0.3rem 1.8rem 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.38rem;
  background: #fff;
  font-size: 0.72rem;
}

.work-table {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.48rem;
  background: #fff;
}

.work-row {
  display: grid;
  grid-template-columns: 6rem minmax(13rem, 1.25fr) minmax(13rem, 1fr) 6rem minmax(8rem, auto);
  gap: 0.8rem;
  align-items: center;
  min-height: 4.6rem;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.74rem;
}

.work-row:last-child {
  border-bottom: 0;
}

.work-row:not(.work-row--head):hover {
  color: inherit;
  background: #fafaf9;
}

.work-row > span {
  min-width: 0;
}

.work-row > span:first-child {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.work-row > span:nth-child(2),
.work-row > span:nth-child(3) {
  display: grid;
  gap: 0.15rem;
}

.work-row--head {
  min-height: 2.5rem;
  color: var(--muted);
  background: #f4f4f2;
  font-size: 0.64rem;
  font-weight: 700;
}

.work-row--danger {
  border-left: 2px solid var(--danger);
}

.work-row--warning {
  border-left: 2px solid var(--warning);
}

.keyboard-hint {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 0.7rem 0;
  color: var(--faint);
  font-size: 0.65rem;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(14rem, 1fr));
  gap: 0.7rem;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.board--cases {
  grid-template-columns: repeat(4, minmax(13rem, 1fr));
}

.board-column {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-height: 30rem;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: #f1f1ef;
}

.board-column > header {
  display: flex;
  min-height: 2rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.15rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.board-column > header > span:first-child {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.board-column > header small {
  display: grid;
  min-width: 1.2rem;
  min-height: 1.2rem;
  place-items: center;
  border-radius: 50%;
  background: #dededa;
  font-size: 0.58rem;
}

.board-card {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.42rem;
  background: #fff;
  box-shadow: 0 1px 1px rgb(0 0 0 / 4%);
}

.board-card:hover {
  border-color: var(--border-strong);
  color: inherit;
  box-shadow: 0 3px 10px rgb(0 0 0 / 7%);
}

.board-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.board-card > div:first-child > span:last-child {
  display: grid;
  gap: 0.12rem;
}

.board-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.board-card > small {
  margin-top: -0.45rem;
}

.board-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.64rem;
}

.empty-column {
  padding: 2rem 0.5rem;
  color: var(--faint);
  font-size: 0.7rem;
  text-align: center;
}

.clients-table .work-row {
  grid-template-columns:
    minmax(15rem, 1.2fr) minmax(10rem, 0.8fr) minmax(9rem, 0.7fr) minmax(8rem, 0.6fr)
    minmax(11rem, 0.9fr);
}

.clients-table .work-row > span:first-child,
.contact-work-table .work-row > span:first-child {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.clients-table .work-row > span:first-child > span:last-child {
  display: grid;
  gap: 0.12rem;
}

.contact-work-table .work-row {
  grid-template-columns:
    minmax(12rem, 1fr) minmax(13rem, 1.1fr) minmax(13rem, 1fr) minmax(9rem, 0.75fr)
    minmax(7rem, 0.55fr);
}

.record-command-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.record-command-head > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.record-focus {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: #fff;
}

.record-focus > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.record-focus > header h1 {
  margin-bottom: 0.25rem;
  font-size: 2rem;
}

.record-focus > header p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.record-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
  background: #fafaf9;
}

.record-metrics > div {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem 1rem;
  border-right: 1px solid var(--border);
}

.record-metrics > div:last-child {
  border-right: 0;
}

.record-metrics strong {
  font-size: 0.9rem;
}

.focus-split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(17rem, 0.65fr);
}

.focus-split > section,
.focus-split > aside {
  padding: 1rem;
}

.focus-split > aside {
  border-left: 1px solid var(--border);
  background: #fbfbfa;
}

.next-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  margin: 0.8rem 0 1.2rem;
  padding: 0.8rem;
  border: 1px solid #e5d6b8;
  border-radius: 0.45rem;
  background: #fcf8ef;
}

.next-action p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.case-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 0.7rem;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  background: #fff;
  font-size: 0.72rem;
}

.case-strip + .case-strip {
  margin-top: 0.45rem;
}

.case-strip--danger {
  border-left: 2px solid var(--danger);
}

.case-strip small {
  grid-column: 1 / -1;
}

.settings-command .settings-nav {
  margin-bottom: 0.8rem;
}

.settings-form--C {
  gap: 0.7rem;
}

.settings-form--C .settings-group,
.settings-form--C .settings-boundary {
  border-radius: 0.45rem;
}

.variant-c.is-collapsed {
  grid-template-columns: 4.2rem minmax(0, 1fr);
}

.variant-c.is-collapsed .sidebar-c {
  width: 4.2rem;
}

.variant-c.is-collapsed .sidebar-c .nav-label,
.variant-c.is-collapsed .sidebar-c .nav-badge {
  display: none;
}

.variant-c.is-collapsed .sidebar-c .nav-link {
  justify-content: center;
}

@media (max-width: 1180px) {
  .a-grid {
    grid-template-columns: 1fr;
  }

  .a-grid > .context-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-grid > .context-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .focus-layout {
    grid-template-columns: 11rem minmax(0, 1fr);
  }

  .work-row {
    grid-template-columns: 5rem minmax(12rem, 1.2fr) minmax(11rem, 1fr) 5rem;
  }

  .work-row > span:last-child {
    display: none;
  }

  .clients-table .work-row,
  .contact-work-table .work-row {
    grid-template-columns: repeat(4, minmax(9rem, 1fr));
  }

  .clients-table .work-row > span:last-child,
  .contact-work-table .work-row > span:nth-child(4) {
    display: none;
  }
}

@media (max-width: 920px) {
  .variant-a {
    grid-template-columns: 4.2rem minmax(0, 1fr);
  }

  .sidebar-a {
    width: 4.2rem;
    align-items: center;
  }

  .sidebar-a .brand > span:last-child,
  .sidebar-a .workspace-label,
  .sidebar-a .nav-label,
  .sidebar-a .nav-badge,
  .sidebar-a .profile > span:not(.avatar) {
    display: none;
  }

  .sidebar-a .nav-link,
  .sidebar-a nav {
    width: 100%;
  }

  .sidebar-a .nav-link {
    justify-content: center;
  }

  .workspace-a {
    grid-column: 2;
  }

  .variant-b {
    grid-template-columns: 4.2rem minmax(0, 1fr);
  }

  .rail-b {
    width: 4.2rem;
  }

  .tree-b {
    display: none;
  }

  .workspace-b {
    grid-column: 2;
  }

  .focus-layout {
    grid-template-columns: 1fr;
  }

  .views-panel {
    position: static;
    z-index: 10;
    top: auto;
    display: flex;
    height: auto;
    flex-direction: row;
    gap: 0.3rem;
    overflow-x: auto;
    padding: 0.6rem 0.8rem;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .views-panel .panel-label,
  .views-panel .views-note,
  .views-panel .add-view {
    display: none;
  }

  .views-panel > button,
  .views-panel > a {
    flex: 0 0 auto;
  }

  .dossier-page {
    grid-template-columns: 1fr;
  }

  .page-toc {
    display: none;
  }

  .dossier-title .heading-actions {
    position: static;
    margin-top: 1rem;
  }

  .focus-split {
    grid-template-columns: 1fr;
  }

  .focus-split > aside {
    border-top: 1px solid var(--border);
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .variant-a,
  .variant-b,
  .variant-c {
    display: block;
  }

  .sidebar-a,
  .rail-b,
  .sidebar-c {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    width: 100%;
    height: 4rem;
    grid-template-columns: repeat(4, 1fr);
    padding: 0.35rem;
    border-top: 1px solid var(--border-strong);
    border-right: 0;
  }

  .sidebar-a {
    background: rgb(245 245 243 / 97%);
  }

  .sidebar-c {
    background: rgb(32 34 32 / 97%);
  }

  .sidebar-a .brand,
  .sidebar-a .workspace-label,
  .sidebar-a > nav:nth-of-type(2),
  .sidebar-a > .nav-link,
  .sidebar-a .profile,
  .sidebar-c-head,
  .sidebar-c-rule,
  .sidebar-c > nav:nth-of-type(2),
  .sidebar-c > .nav-link,
  .rail-b .rail-brand,
  .rail-b .rail-spacer,
  .rail-b > .nav-link,
  .rail-b > .avatar {
    display: none;
  }

  .sidebar-a nav:first-of-type,
  .sidebar-c nav:first-of-type,
  .rail-b nav {
    display: contents;
  }

  .sidebar-a .nav-link,
  .sidebar-c .nav-link,
  .rail-b .nav-link {
    display: grid;
    justify-items: center;
    gap: 0.15rem;
    min-height: 3.2rem;
    padding: 0.28rem;
  }

  .sidebar-a .nav-label,
  .sidebar-c .nav-label,
  .rail-b .nav-label {
    display: block;
    font-size: 0.56rem;
  }

  .nav-badge {
    display: none;
  }

  .workspace-a,
  .workspace-b,
  .workspace-c {
    min-height: auto;
  }

  .topbar-a,
  .topbar-b,
  .commandbar {
    position: static;
  }

  .topbar-a,
  .topbar-b {
    padding: 0.55rem 0.75rem;
  }

  .topbar-a .search {
    width: 100%;
  }

  .topbar-a > .icon-button,
  .topbar-a > .button,
  .topbar-b .breadcrumbs {
    display: none;
  }

  .topbar-b {
    justify-content: flex-end;
  }

  .commandbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 0.55rem 0.75rem;
  }

  .command-context {
    display: none;
  }

  .commandbar .search {
    width: 100%;
  }

  .page-a,
  .page-b,
  .page-c {
    padding: 1.2rem 0.8rem 9rem;
  }

  .page-heading,
  .document-title--with-action {
    display: grid;
    align-items: start;
    gap: 1rem;
  }

  .page-heading .heading-actions,
  .document-title--with-action > .button {
    justify-self: start;
  }

  h1 {
    font-size: 2rem;
  }

  .document-title h1 {
    font-size: 2.7rem;
  }

  .a-grid > .context-rail,
  .record-grid > .context-rail {
    grid-template-columns: 1fr;
  }

  .queue-surface > .section-heading {
    display: grid;
  }

  .action-row {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .hover-actions {
    grid-column: 2;
    opacity: 1;
    transform: none;
  }

  .list-toolbar,
  .document-toolbar,
  .focus-toolbar {
    flex-wrap: wrap;
  }

  .list-toolbar .search,
  .document-toolbar .search,
  .focus-toolbar > .search {
    width: 100%;
    order: -1;
  }

  .data-list,
  .work-table,
  .people-directory,
  .ledger {
    overflow-x: auto;
  }

  .data-row {
    min-width: 55rem;
  }

  .contact-row {
    min-width: 58rem;
  }

  .directory-entry,
  .person-line,
  .ledger-entry {
    min-width: 48rem;
  }

  .dossier-callout {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dossier-callout > span:last-child {
    grid-column: 2;
  }

  .agenda-line {
    grid-template-columns: 2.8rem minmax(0, 1fr);
  }

  .agenda-line .line-rule,
  .agenda-line .button {
    display: none;
  }

  .dossier-properties,
  .facts,
  .record-metrics {
    grid-template-columns: 1fr;
  }

  .record-metrics > div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .record-metrics > div:last-child {
    border-bottom: 0;
  }

  .dossier-properties > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .setting-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .settings-nav {
    gap: 1rem;
    overflow-x: auto;
  }

  .settings-nav a {
    flex: 0 0 auto;
  }

  .settings-group-heading {
    display: grid;
  }

  .taxonomy-line,
  .user-line {
    min-width: 40rem;
  }

  .taxonomy-table,
  .user-table {
    overflow-x: auto;
  }

  .compact-grid {
    grid-template-columns: 1fr;
  }

  .record-focus > header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .record-focus > header .health-indicator {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .work-row {
    min-width: 43rem;
  }

  .clients-table .work-row,
  .contact-work-table .work-row {
    min-width: 50rem;
  }

  .prototype-switcher {
    bottom: 4.5rem;
    width: calc(100vw - 1rem);
    min-width: 0;
  }

  .prototype-flag {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
