:root {
  --brand: #2563eb;
  --brand-deep: #0b5ee8;
  --brand-soft: #eaf2ff;
  --navy: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --canvas: #fafafb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #e5e7eb;
  --border-blue: #d9e7fb;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --purple: #9333ea;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font: Inter, "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 12px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 1;
}

svg {
  display: block;
  width: 18px;
  height: 18px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.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;
}

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(650px, 1fr) 448px;
  grid-template-rows: 72px minmax(calc(100vh - 72px), auto);
  min-height: 100vh;
  background:
    radial-gradient(circle at 74% 0%, rgba(37, 99, 235, 0.035), transparent 30rem),
    var(--surface);
}

.sidebar {
  z-index: 2;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 72px;
  padding: 0 25px;
  border-bottom: 1px solid var(--border);
  color: var(--navy);
}

.ductile-mark {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  color: var(--brand);
}

.brand strong,
.brand small,
.signed-user strong,
.signed-user small,
.person strong,
.person small,
.module-legend strong,
.module-legend small,
.access-card strong,
.access-card small,
.mini-brand strong,
.mini-brand small {
  display: block;
}

.brand strong {
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.nav-list {
  display: grid;
  gap: 4px;
  padding: 28px 10px;
}

.nav-list button {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 0 13px;
  border-radius: 9px;
  background: transparent;
  color: #1f365e;
  text-align: left;
}

.nav-list button svg {
  width: 22px;
  height: 22px;
}

.nav-list button span {
  font-size: 13px;
  font-weight: 500;
}

.nav-list .is-active {
  background: #e4efff;
  color: #005ee8;
}

.nav-list .is-active svg {
  fill: currentColor;
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 14px 22px 26px;
}

.signed-user {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
}

.signed-user > svg {
  width: 15px;
  transform: rotate(90deg);
}

.signed-user strong {
  color: var(--navy);
  font-size: 12px;
}

.signed-user small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.logout {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 23px;
  padding: 8px 3px;
  background: transparent;
  color: #1f365e;
  text-align: left;
}

.logout svg {
  width: 21px;
  height: 21px;
}

.tagline {
  display: block;
  margin-top: 25px;
  color: #a3b4d1;
  font-size: 9px;
  white-space: nowrap;
}

.topbar {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
  padding: 0 18px 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
}

.global-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(470px, 48%);
  height: 38px;
  padding: 0 14px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  color: #29446e;
  box-shadow: 0 2px 9px rgba(15, 23, 42, 0.025);
}

.global-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--muted);
}

.global-search input::placeholder {
  color: #7185a4;
  opacity: 1;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--navy);
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--navy);
}

.notification i {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border: 1px solid white;
  border-radius: 50%;
  background: #ef2b2d;
}

.mini-brand {
  min-width: 104px;
  border-right: 1px solid #b9c6da;
  padding-right: 20px;
}

.mini-brand strong {
  font-size: 18px;
  letter-spacing: -0.04em;
}

.mini-brand small {
  margin-top: 2px;
  color: #184ba5;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.motto {
  color: #5f7191;
  font-size: 10px;
  line-height: 1.55;
}

.workspace {
  grid-column: 2;
  min-width: 0;
  padding: 21px 18px 35px 26px;
  background: linear-gradient(135deg, #fff 0%, #fff 75%, #fafcff 100%);
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 0 2px 17px 7px;
  border-bottom: 1px solid var(--border);
}

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

.page-heading h1 {
  margin: 0;
  color: var(--navy);
  font-size: 29px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-heading p {
  margin: 4px 0 0;
  color: #5c7194;
  font-size: 12px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 17px;
  border: 1px solid #1462d7;
  border-radius: 7px;
  background: linear-gradient(180deg, #1472ff, #005ce5);
  color: white;
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.16);
  font-weight: 600;
}

.primary-button svg {
  width: 17px;
  height: 17px;
}

.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 11px 4px 11px 11px;
}

.filters button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 164px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #d8e1ed;
  border-radius: 7px;
  background: #fff;
  color: #1f365e;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
  text-align: left;
}

.filters button:nth-child(2) {
  width: 158px;
}

.filters button svg {
  width: 13px;
  height: 13px;
  transform: rotate(90deg);
}

.filters > span {
  margin-left: auto;
  padding-right: 8px;
  color: #40567b;
}

.users-card {
  overflow: hidden;
  border: 1px solid #dce5f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.018);
}

.table-scroll {
  overflow-x: auto;
  outline: none;
}

.table-scroll:focus-visible {
  box-shadow: inset 0 0 0 2px var(--brand);
}

table {
  width: 100%;
  min-width: 790px;
  border-collapse: collapse;
  color: #314464;
  table-layout: fixed;
}

th,
td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

th {
  height: 50px;
  color: var(--navy);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

td {
  height: 77px;
  font-size: 10px;
}

th:nth-child(1),
td:nth-child(1) { width: 42px; text-align: center; }
th:nth-child(2),
td:nth-child(2) { width: 174px; }
th:nth-child(3),
td:nth-child(3) { width: 92px; }
th:nth-child(4),
td:nth-child(4) { width: 100px; }
th:nth-child(5),
td:nth-child(5) { width: 120px; }
th:nth-child(6),
td:nth-child(6) { width: 108px; }
th:nth-child(7),
td:nth-child(7) { width: 82px; }
th:nth-child(8),
td:nth-child(8) { width: 85px; }
th:nth-child(9),
td:nth-child(9) { width: 36px; }

tbody tr:last-child td {
  border-bottom: 0;
}

tbody .is-selected td {
  background: linear-gradient(90deg, #f1f7ff 0%, #eef6ff 100%);
}

.fake-check {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid #9aaac1;
  border-radius: 3px;
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.person strong {
  color: var(--navy);
  font-size: 11px;
  line-height: 1.2;
}

.person small {
  max-width: 126px;
  margin-top: 3px;
  overflow: hidden;
  color: #657896;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 650;
}

.avatar-blue { background: #d9e8ff; color: #075fe7; }
.avatar-pink { background: #fde2f4; color: #d62983; }
.avatar-amber { background: #fff0d6; color: #c46a00; }
.avatar-teal { background: #d9f4f2; color: #00888b; }
.avatar-indigo { background: #dfe8ff; color: #164ba7; }
.avatar-purple { background: #f3ddff; color: #9324cf; }
.avatar-slate { background: #e7edf6; color: #19345d; }

.role {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}

.role-blue { background: #dceaff; color: #075cca; }
.role-green { background: #daf2e5; color: #16754d; }
.role-amber { background: #fff0cf; color: #a65b02; }
.role-violet { background: #eee4ff; color: #6631ce; }
.role-slate { background: #dfe7f1; color: #213652; }

.module-icons {
  display: flex;
  gap: 5px;
}

.module-icons i,
.module-legend i,
.access-card li > i {
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: #cdd5e1;
  color: white;
  font-style: normal;
}

.module-icons svg {
  width: 13px;
  height: 13px;
}

.module-icons .app,
.module-legend .app,
.access-card .app { background: #0b6bf2; }
.module-icons .work,
.module-legend .work,
.access-card .work { background: #a237ea; }
.module-icons .bot,
.module-legend .bot,
.access-card .bot { background: #11a56a; }
.module-icons .admin,
.module-legend .admin,
.access-card .admin { background: #fa7108; }

.spend {
  display: grid;
  width: 80px;
}

.spend strong {
  color: var(--navy);
  font-size: 11px;
}

.spend small {
  margin-top: 1px;
  color: #304462;
  font-size: 9px;
}

.spend > i,
.budget dd > i {
  display: block;
  overflow: hidden;
  height: 6px;
  margin-top: 5px;
  border-radius: 999px;
  background: #e2e7ee;
}

.spend > i b,
.budget dd > i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0aaf62, #24b873);
}

.status,
.active-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1f365e;
  white-space: nowrap;
}

.status i,
.active-label i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.info {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  border: 1px solid #8798b1;
  border-radius: 50%;
  color: #526783;
  font-size: 9px;
  font-style: normal;
}

.more {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: transparent;
  color: #132b50;
}

.more svg {
  width: 17px;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 61px;
  padding: 0 7px 0 0;
  border-top: 1px solid var(--border);
  color: #526786;
}

.table-footer > span:first-child {
  padding-left: 0;
}

.pagination {
  display: flex;
  gap: 8px;
}

.pagination button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  background: white;
  color: #355075;
}

.pagination .current {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}

.pagination svg {
  width: 14px;
  height: 14px;
}

.pagination .back {
  transform: rotate(180deg);
}

.module-legend {
  display: grid;
  grid-template-columns: 154px repeat(4, minmax(100px, 1fr)) 110px;
  align-items: center;
  min-height: 83px;
  margin-top: 14px;
  border: 1px solid #e0e7f0;
  border-radius: 8px;
  background: white;
  color: #253c60;
}

.legend-title {
  padding-left: 36px;
}

.module-legend article {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 45px;
  padding: 0 18px;
  border-left: 1px solid var(--border);
}

.module-legend article > i {
  flex-basis: 28px;
  width: 28px;
  height: 28px;
}

.module-legend article svg {
  width: 16px;
  height: 16px;
}

.module-legend strong {
  color: var(--navy);
  font-size: 10px;
}

.module-legend small {
  margin-top: 2px;
  color: #586e90;
  font-size: 8px;
  white-space: nowrap;
}

.module-legend p {
  margin: 0;
  padding-left: 18px;
  border-left: 1px solid var(--border);
  color: #6980a4;
  font-size: 9px;
  line-height: 1.55;
}

.detail-panel {
  grid-column: 3;
  min-width: 0;
  padding: 0 18px 22px;
  border-left: 1px solid var(--border);
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.04), transparent 18rem),
    #fff;
}

.person-header {
  position: relative;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  min-height: 146px;
  padding: 10px 8px 0;
}

.avatar-large {
  width: 80px;
  height: 80px;
  font-size: 28px;
}

.person-header h2 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.person-header p {
  margin: 4px 0 6px;
  color: #526889;
  font-size: 11px;
}

.person-header em {
  display: table;
  margin-top: 7px;
  padding: 3px 8px;
  border-radius: 5px;
  background: #deebff;
  color: #075cca;
  font-size: 10px;
  font-style: normal;
}

.active-label {
  color: #078a47;
  font-size: 11px;
}

.close-button {
  align-self: start;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 9px;
  background: transparent;
  color: #28466f;
}

.detail-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 37px;
  border-bottom: 1px solid var(--border);
  color: #31476a;
}

.detail-tabs span {
  position: relative;
  display: grid;
  place-items: center;
}

.detail-tabs .is-active {
  color: #005fe8;
}

.detail-tabs .is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--brand);
  content: "";
}

.detail-card {
  margin-top: 16px;
  padding: 11px 16px 13px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #fff;
}

.detail-card h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 11px;
  color: var(--navy);
  font-size: 12px;
}

.detail-card h3 svg {
  width: 17px;
  height: 17px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.info-grid div {
  min-height: 45px;
  padding: 2px 12px 4px 0;
}

.info-grid div:nth-child(even) {
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.info-grid dt,
.info-grid dd,
.ai-card dt,
.ai-card dd {
  margin: 0;
}

.info-grid dt {
  color: #607391;
  font-size: 10px;
}

.info-grid dd {
  margin-top: 3px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
}

.access-card {
  padding-bottom: 8px;
}

.access-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.access-card li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 42px;
  align-items: center;
  min-height: 43px;
  border-top: 1px solid var(--border);
}

.access-card li:first-child {
  border-top: 0;
}

.access-card li > i {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #eef2f7;
  color: #153253;
}

.access-card li > i.app { background: #e4efff; color: #0b6bf2; }
.access-card li > i.work { background: #f2e5ff; color: #9f2fe5; }
.access-card li > i.bot { background: #ddf4ea; color: #0d7252; }
.access-card li > i.admin { background: #eef2f7; color: #173657; }

.access-card li > i svg {
  width: 21px;
  height: 21px;
}

.access-card strong {
  color: var(--navy);
  font-size: 10px;
}

.access-card small {
  margin-top: 2px;
  color: #536a8d;
  font-size: 9px;
}

.switch {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #cfd7e4;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
  content: "";
}

.switch.is-on {
  background: #0974ef;
}

.switch.is-on::after {
  left: 21px;
}

.ai-card {
  padding-top: 9px;
  padding-bottom: 8px;
}

.ai-card dl {
  margin: 0;
}

.ai-card dl > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  min-height: 27px;
  border-top: 1px solid var(--border);
}

.ai-card dl > div:first-child {
  border-top: 0;
}

.ai-card dt {
  color: #29405f;
  font-size: 10px;
}

.ai-card dd {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--navy);
  font-size: 10px;
}

.ai-card code {
  overflow: hidden;
  color: var(--navy);
  font-family: var(--font);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-card dd button {
  margin-left: auto;
  min-height: 26px;
  padding: 0 12px;
  border: 1px solid #89baff;
  border-radius: 6px;
  background: white;
  color: #0061e8;
}

.ai-card .budget {
  align-items: start;
  min-height: 49px;
  padding-top: 8px;
}

.budget dd {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 5px;
  color: #536883;
}

.budget dd strong {
  color: var(--navy);
}

.budget dd > span {
  margin-left: auto;
  color: #27436a;
}

.budget dd > i {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0;
}

.budget dd > i b {
  width: 49%;
}

.detail-actions {
  display: grid;
  grid-template-columns: 78px 1fr 176px;
  gap: 12px;
  margin-top: 16px;
}

.detail-actions button {
  min-height: 36px;
  border-radius: 7px;
}

.detail-actions .secondary {
  border: 1px solid #d5deea;
  background: #fff;
  color: #183457;
}

.detail-actions .danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid var(--danger);
  background: #fff;
  color: #e01824;
}

.pause-bars {
  position: relative;
  width: 14px;
  height: 14px;
  border-right: 4px solid currentColor;
  border-left: 4px solid currentColor;
}

.prototype-note {
  margin: 12px 0 0;
  color: #7e8da5;
  font-size: 9px;
  text-align: center;
}

@media (max-width: 1320px) {
  .app-shell {
    grid-template-columns: 82px minmax(620px, 1fr) 390px;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand > span,
  .nav-list button span,
  .signed-user > span,
  .signed-user > svg,
  .logout span,
  .tagline {
    display: none;
  }

  .nav-list button {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
  }

  .sidebar-foot {
    padding: 14px 19px 26px;
  }

  .signed-user {
    display: block;
  }

  .logout {
    justify-content: center;
    padding: 8px 0;
  }

  .module-legend {
    grid-template-columns: 130px repeat(4, minmax(85px, 1fr));
  }

  .module-legend p {
    display: none;
  }
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 74px minmax(0, 1fr);
    grid-template-rows: 72px auto auto;
  }

  .topbar {
    grid-column: 2;
  }

  .workspace {
    grid-column: 2;
  }

  .detail-panel {
    grid-column: 2;
    padding: 24px 30px 30px;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .person-header {
    min-height: 112px;
  }

  .module-legend {
    grid-template-columns: 130px repeat(4, minmax(90px, 1fr)) 110px;
  }

  .module-legend p {
    display: block;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    min-height: auto;
    border-right: 0;
  }

  .brand {
    justify-content: flex-start;
    height: 64px;
    padding: 0 16px;
  }

  .brand > span {
    display: block;
  }

  .brand strong {
    font-size: 18px;
  }

  .nav-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 12px 10px;
    border-bottom: 1px solid var(--border);
  }

  .nav-list button {
    display: flex;
    flex: 0 0 auto;
    gap: 7px;
    min-height: 38px;
    padding: 0 11px;
  }

  .nav-list button span {
    display: block;
    font-size: 11px;
  }

  .nav-list button svg {
    width: 18px;
    height: 18px;
  }

  .sidebar-foot {
    display: none;
  }

  .topbar {
    height: auto;
    min-height: 62px;
    padding: 10px 14px;
  }

  .global-search {
    width: 100%;
  }

  .topbar-brand {
    gap: 4px;
  }

  .mini-brand,
  .motto {
    display: none;
  }

  .icon-button {
    border-right: 0;
  }

  .workspace {
    padding: 17px 12px 26px;
  }

  .page-heading {
    align-items: flex-start;
    min-height: 116px;
    padding: 4px 3px 16px;
  }

  .page-heading h1 {
    font-size: 25px;
  }

  .page-heading p {
    max-width: 42ch;
    font-size: 11px;
  }

  .page-heading > .primary-button {
    flex: 0 0 44px;
    min-width: 44px;
    padding: 0 12px;
    font-size: 0;
  }

  .primary-button svg {
    width: 18px;
    height: 18px;
  }

  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 12px 0;
  }

  .filters button,
  .filters button:nth-child(2) {
    width: 100%;
  }

  .filters button:nth-child(3) {
    grid-column: 1 / -1;
  }

  .filters > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  .table-footer {
    padding: 10px 8px;
  }

  .module-legend {
    grid-template-columns: 1fr 1fr;
    padding: 12px;
  }

  .legend-title {
    grid-column: 1 / -1;
    padding: 0 6px 10px;
  }

  .module-legend article {
    border: 0;
    padding: 5px 6px;
  }

  .module-legend p {
    display: none;
  }

  .detail-panel {
    padding: 14px 12px 24px;
  }

  .person-header {
    grid-template-columns: 64px minmax(0, 1fr) 24px;
    min-height: 116px;
    padding: 5px 4px 0;
  }

  .avatar-large {
    width: 62px;
    height: 62px;
    font-size: 22px;
  }

  .detail-card {
    padding-right: 12px;
    padding-left: 12px;
  }

  .ai-card dl > div {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .detail-actions {
    grid-template-columns: 1fr 1fr;
  }

  .detail-actions .danger {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .topbar {
    padding-right: 8px;
  }

  .page-heading {
    gap: 10px;
  }

  .page-heading p {
    max-width: 30ch;
  }

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

  .info-grid div:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

  .ai-card dl > div {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 7px 0;
  }

  .ai-card dd button {
    padding: 0 8px;
  }
}

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