:root {
  --mist: #f0f2ee;
  --paper: #fbfcfa;
  --white: #ffffff;
  --ink: #16222b;
  --deep: #0e1814;
  --gray: #69756e;
  --smoke: #d8ddd9;
  --smoke-dark: #bcc5bf;
  --red: #d6402f;
  --red-soft: #f7e6e1;
  --green: #237a57;
  --green-soft: #e4f2ea;
  --amber: #9b6817;
  --amber-soft: #f7eedb;
  --blue: #315d76;
  --blue-soft: #e3edf2;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --topbar: 70px;
  --sidebar: 228px;
  --content: 1440px;
  --shadow: 0 24px 70px rgba(14, 24, 20, 0.14);
}

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

html {
  min-width: 280px;
  color-scheme: light;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.dialog-open,
body.menu-open {
  overflow: hidden;
}

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

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

svg {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

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

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 500;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.admin-app {
  min-height: 100vh;
}

.topbar {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: var(--topbar);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--smoke);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter: blur(14px);
}

.topbar-brand,
.operator {
  display: flex;
  align-items: center;
}

.topbar-brand {
  gap: 14px;
}

.wordmark {
  flex: 0 0 auto;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
}

.wordmark span {
  color: var(--red);
}

.console-label {
  min-height: 24px;
  border-left: 1px solid var(--smoke-dark);
  padding: 4px 0 0 14px;
  color: var(--gray);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.operator {
  gap: 12px;
}

.operator-copy {
  display: grid;
  justify-items: end;
  line-height: 1.25;
}

.operator-copy strong {
  max-width: 260px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator-copy span {
  color: var(--gray);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.operator-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 19px;
  place-items: center;
}

.sidebar {
  position: fixed;
  z-index: 80;
  top: var(--topbar);
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  justify-content: space-between;
  padding: 27px 16px max(24px, env(safe-area-inset-bottom));
  border-right: 1px solid var(--smoke);
  background: var(--paper);
}

.nav-label,
.proof,
.eyebrow {
  color: var(--gray);
  font-family: var(--mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: 0.13em;
  line-height: 1.5;
  text-transform: uppercase;
}

.nav-label {
  margin: 0 10px 11px;
}

.nav-item {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  padding: 10px 12px;
  color: var(--gray);
  font-size: 13px;
  text-align: left;
}

.nav-item > span:first-child {
  width: 18px;
  color: var(--gray);
  font-family: var(--mono);
  font-size: 15px;
  text-align: center;
}

.nav-item:hover {
  background: var(--mist);
  color: var(--ink);
}

.nav-item.is-active {
  border-left-color: var(--red);
  background: var(--mist);
  color: var(--ink);
  font-weight: 600;
}

.sidebar-foot {
  border-top: 1px solid var(--smoke);
  padding: 20px 11px 0;
}

.sidebar-foot p {
  margin: 0 0 7px;
}

.sidebar-foot a {
  font-size: 12px;
}

.sidebar-scrim {
  display: none;
}

.main {
  min-height: 100vh;
  margin-left: var(--sidebar);
  padding: calc(var(--topbar) + clamp(38px, 5vw, 68px)) clamp(24px, 4vw, 64px) 80px;
}

#console-content,
.access-state {
  width: min(100%, var(--content));
  min-width: 0;
  max-width: 100%;
  margin-inline: auto;
}

.access-state {
  display: grid;
  min-height: calc(100vh - var(--topbar) - 150px);
  align-content: center;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.access-card {
  width: min(100%, 560px);
  border: 1px solid var(--smoke);
  background: var(--paper);
  padding: clamp(28px, 6vw, 52px);
}

.access-card h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 7vw, 52px);
}

.access-card p {
  color: var(--gray);
}

.icon-button.mobile-only {
  display: none;
}

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

h1,
h2 {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.035em;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(42px, 5.4vw, 70px);
  line-height: 0.98;
}

h1 em {
  font-weight: 300;
}

h2 {
  margin-bottom: 6px;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.08;
}

h3 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
}

.eyebrow {
  margin-bottom: 11px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: clamp(34px, 5vw, 58px);
}

.page-heading > div:first-child {
  max-width: 760px;
}

.page-lede {
  max-width: 62ch;
  margin: 0;
  color: var(--gray);
  font-size: 16px;
}

.button,
.icon-button,
.text-button,
select,
input,
textarea {
  min-height: 44px;
  border-radius: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 17px;
  border: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.button:disabled,
.icon-button:disabled,
.text-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.button-primary {
  background: var(--ink);
  color: var(--paper);
}

.button-primary:hover:not(:disabled) {
  background: var(--deep);
}

.button-secondary {
  background: transparent;
  color: var(--ink);
}

.button-secondary:hover:not(:disabled) {
  background: var(--ink);
  color: var(--paper);
}

.button-danger {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}

.button-danger:hover:not(:disabled) {
  background: #b93024;
}

.text-button,
.icon-button {
  border: 0;
  background: transparent;
  padding: 0;
}

.text-button {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
}

.text-button:hover {
  text-decoration-color: currentColor;
}

.icon-button {
  display: inline-grid;
  min-width: 44px;
  font-size: 26px;
  line-height: 1;
  place-items: center;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--smoke-dark);
  background: var(--white);
  padding: 9px 12px;
  font-size: 14px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ink);
}

.compact-select {
  display: grid;
  min-width: 164px;
  gap: 5px;
}

.compact-select span,
.filter-label,
.field > span {
  font-size: 11px;
  font-weight: 700;
}

.panel {
  border: 1px solid var(--smoke);
  background: var(--paper);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 24px;
  border: 1px solid var(--smoke);
  background: var(--smoke);
}

.metric-card {
  min-height: 160px;
  background: var(--paper);
  padding: clamp(20px, 2.5vw, 30px);
}

.metric-label {
  min-height: 33px;
  margin-bottom: 16px;
  color: var(--gray);
  font-size: 12px;
}

.metric-value {
  display: block;
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 42px);
  font-variant-numeric: tabular-nums;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
}

.metric-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 13px;
  color: var(--gray);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.metric-change.is-positive {
  color: var(--green);
}

.metric-change.is-negative {
  color: var(--red);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(330px, 0.8fr);
  gap: 24px;
}

.overview-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.trend-panel,
.activity-panel {
  padding: clamp(22px, 3vw, 34px);
}

.panel-heading,
.table-topline,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.panel-heading {
  margin-bottom: 26px;
}

.panel-heading h2,
.table-topline h2 {
  font-size: 26px;
}

.chart-legend {
  display: flex;
  flex: 0 0 auto;
  gap: 16px;
  color: var(--gray);
  font-size: 10px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-members {
  background: var(--red);
}

.legend-claims {
  background: var(--blue);
}

.growth-chart {
  margin: 0;
}

.growth-chart svg {
  width: 100%;
  min-height: 220px;
  overflow: visible;
}

.trend-grid-line {
  stroke: var(--smoke);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.trend-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.trend-line.members {
  stroke: var(--red);
}

.trend-line.claims {
  stroke: var(--blue);
}

.growth-chart figcaption {
  margin: 13px 0 0;
}

.activity-list {
  display: grid;
}

.activity-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--smoke);
}

.activity-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.activity-mark {
  display: grid;
  width: 32px;
  height: 32px;
  border: 1px solid var(--smoke-dark);
  background: var(--mist);
  color: var(--gray);
  font-family: var(--mono);
  font-size: 11px;
  place-items: center;
}

.activity-copy p {
  margin: 0 0 3px;
  font-size: 12px;
  line-height: 1.42;
}

.activity-copy time {
  color: var(--gray);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.filter-bar {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 20px;
}

.filter-bar > label {
  display: grid;
  gap: 5px;
}

.filter-bar select,
.filter-bar input {
  min-width: 160px;
}

.search-field {
  position: relative;
  flex: 1 1 340px;
  min-width: 200px;
}

.search-field > span {
  position: absolute;
  top: 50%;
  left: 13px;
  color: var(--gray);
  font-size: 18px;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-field input {
  padding-left: 38px;
}

.table-panel {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.table-topline {
  align-items: center;
  padding: 22px 25px;
  border-bottom: 1px solid var(--smoke);
}

.table-topline h2,
.table-topline p {
  margin: 0;
}

.table-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  font-size: 12px;
}

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

th {
  color: var(--gray);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

tbody tr:hover td {
  background: color-mix(in srgb, var(--mist) 64%, var(--paper));
}

.identity-cell {
  display: flex;
  min-width: 210px;
  align-items: center;
  gap: 11px;
}

.identity-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--smoke-dark);
  background: var(--mist);
  font-family: var(--serif);
  font-size: 16px;
  place-items: center;
}

.identity-copy {
  min-width: 0;
}

.identity-copy strong,
.identity-copy span {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-copy strong {
  font-size: 12px;
}

.identity-copy span {
  color: var(--gray);
  font-size: 11px;
}

.method-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid var(--smoke-dark);
  background: var(--mist);
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill.status-active,
.pill.status-operational,
.pill.result-success {
  border-color: #a8cfbb;
  background: var(--green-soft);
  color: var(--green);
}

.pill.status-pending,
.pill.status-degraded,
.pill.result-denied {
  border-color: #dac28e;
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.status-reported {
  border-color: #acc6d5;
  background: var(--blue-soft);
  color: var(--blue);
}

.pill.status-disabled,
.pill.status-outage,
.pill.result-failed {
  border-color: #ddb0a7;
  background: var(--red-soft);
  color: var(--red);
}

.pill.status-unknown {
  color: var(--gray);
}

.row-action {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 18px;
}

.row-action:hover {
  background: var(--mist);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding: 18px 22px;
  border-top: 1px solid var(--smoke);
}

.role-guide {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-bottom: 24px;
  border: 1px solid var(--smoke);
  background: var(--smoke);
}

.role-guide article {
  min-height: 175px;
  background: var(--paper);
  padding: 23px;
}

.role-guide h2 {
  font-size: 24px;
}

.role-guide p:last-child {
  margin: 13px 0 0;
  color: var(--gray);
  font-size: 12px;
}

#pending-invites-panel {
  margin-top: 24px;
}

.role-select {
  min-width: 120px;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.row-actions .text-button {
  min-width: 44px;
  padding: 0 8px;
}

.state-panel {
  display: grid;
  min-height: 190px;
  align-content: center;
  justify-items: center;
  gap: 13px;
  padding: 28px;
  color: var(--gray);
  text-align: center;
}

.state-panel.compact {
  min-height: 220px;
  padding: 10px;
}

.state-panel p {
  max-width: 48ch;
  margin: 0;
}

.state-panel h3 {
  margin: 0;
  color: var(--ink);
}

.state-panel .button {
  margin-top: 5px;
}

.loader {
  width: 28px;
  height: 28px;
  border: 2px solid var(--smoke-dark);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.system-card {
  min-height: 210px;
  border: 1px solid var(--smoke);
  background: var(--paper);
  padding: 25px;
}

.system-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.system-card h2 {
  font-size: 27px;
}

.system-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 18px;
  margin: 0;
  font-size: 11px;
}

.system-card dt {
  color: var(--gray);
}

.system-card dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  text-align: right;
}

.toast-region {
  position: fixed;
  z-index: 400;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: grid;
  width: min(390px, calc(100% - 40px));
  gap: 10px;
  pointer-events: none;
}

.toast {
  border: 1px solid var(--ink);
  border-left: 4px solid var(--green);
  background: var(--paper);
  padding: 13px 15px;
  box-shadow: var(--shadow);
  font-size: 12px;
}

.toast.is-error {
  border-left-color: var(--red);
}

dialog {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
}

dialog::backdrop {
  background: rgba(14, 24, 20, 0.48);
  backdrop-filter: blur(3px);
}

.drawer {
  width: min(100%, 630px);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
}

.drawer-shell {
  min-height: 100%;
  overflow-y: auto;
  border-left: 1px solid var(--smoke);
  background: var(--paper);
  padding: clamp(24px, 5vw, 42px);
  box-shadow: var(--shadow);
}

.drawer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--smoke);
}

.drawer-heading h2 {
  margin: 0;
  font-size: clamp(30px, 6vw, 42px);
}

.facts {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 11px 20px;
  margin: 27px 0;
  font-size: 12px;
}

.facts dt {
  color: var(--gray);
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.drawer-section {
  margin-top: 30px;
  border-top: 1px solid var(--smoke);
  padding-top: 27px;
}

.drawer-section .section-heading {
  margin-bottom: 22px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.form-error {
  margin: 0 0 16px;
  border-left: 3px solid var(--red);
  padding-left: 10px;
  font-size: 12px;
}

.stacked-actions {
  display: grid;
}

.stacked-actions > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0;
  border-top: 1px solid var(--smoke);
}

.stacked-actions > div:first-child {
  border-top: 0;
}

.stacked-actions p {
  max-width: 45ch;
  margin: 3px 0 0;
  color: var(--gray);
  font-size: 11px;
}

.modal {
  width: min(570px, calc(100% - 30px));
  max-height: calc(100dvh - 30px);
}

.modal-shell {
  overflow-y: auto;
  max-height: calc(100dvh - 30px);
  border: 1px solid var(--smoke);
  background: var(--paper);
  padding: clamp(24px, 5vw, 38px);
  box-shadow: var(--shadow);
}

.modal-shell > p {
  margin: 23px 0;
  color: var(--gray);
}

.manual-invite {
  margin-top: 24px;
  border-top: 1px solid var(--smoke);
  padding-top: 24px;
}

.manual-invite > p:not(.eyebrow) {
  color: var(--gray);
  font-size: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .activity-panel {
    order: 2;
  }

  .role-guide {
    grid-template-columns: repeat(2, 1fr);
  }

  .system-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  :root {
    --topbar: 64px;
  }

  .icon-button.mobile-only {
    display: inline-grid;
  }

  .topbar {
    padding-inline: 12px 16px;
  }

  .console-label,
  .operator-copy {
    display: none;
  }

  .sidebar {
    width: min(288px, calc(100% - 52px));
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: none;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 70;
    inset: var(--topbar) 0 0;
    display: block;
    width: 100%;
    height: auto;
    border: 0;
    background: rgba(14, 24, 20, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  body.menu-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    margin-left: 0;
    padding-inline: 20px;
  }

  .filter-bar {
    flex-wrap: wrap;
  }

  .search-field {
    flex-basis: 100%;
  }

  .filter-bar > label {
    flex: 1 1 180px;
  }

  .filter-bar select,
  .filter-bar input {
    min-width: 0;
  }
}

@media (max-width: 660px) {
  .main {
    padding: calc(var(--topbar) + 34px) 15px 60px;
  }

  .wordmark {
    font-size: 26px;
  }

  .operator-avatar {
    width: 34px;
    height: 34px;
  }

  .page-heading {
    display: grid;
    gap: 24px;
    margin-bottom: 35px;
  }

  .split-heading .button,
  .compact-select {
    width: 100%;
  }

  h1 {
    font-size: clamp(40px, 13vw, 58px);
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card {
    min-height: 145px;
    padding: 20px 17px;
  }

  .panel-heading {
    display: grid;
  }

  .chart-legend {
    justify-content: flex-start;
  }

  .filter-bar > *,
  .filter-bar .button {
    width: 100%;
  }

  .table-topline {
    padding-inline: 17px;
  }

  th,
  td {
    padding-inline: 14px;
  }

  .role-guide,
  .system-grid {
    grid-template-columns: 1fr;
  }

  .role-guide article {
    min-height: 0;
  }

  .pagination {
    justify-content: space-between;
    gap: 8px;
    padding-inline: 13px;
  }

  .drawer {
    width: 100%;
  }

  .drawer-shell {
    border-left: 0;
    padding: 24px 17px;
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .facts dd + dt {
    margin-top: 8px;
  }

  .stacked-actions > div {
    display: grid;
  }

  .stacked-actions .button {
    width: 100%;
  }

  .modal {
    width: calc(100% - 14px);
    max-height: calc(100dvh - 14px);
  }

  .modal-shell {
    max-height: calc(100dvh - 14px);
    padding: 22px 17px;
  }

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

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

  .metric-card {
    min-height: 120px;
  }
}

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

@media (forced-colors: active) {
  .wordmark span,
  .form-error {
    color: CanvasText;
  }

  .panel,
  .metric-grid,
  .metric-card,
  .role-guide,
  .role-guide article,
  .system-card,
  .drawer-shell,
  .modal-shell,
  .button,
  .pill {
    border: 1px solid CanvasText;
  }

  .loader {
    border-top-color: Highlight;
  }
}

@media print {
  .topbar,
  .sidebar,
  .sidebar-scrim,
  .filter-bar,
  .button,
  .text-button,
  .row-action {
    display: none !important;
  }

  .main {
    margin: 0;
    padding: 20px;
  }

  .panel,
  .system-card {
    break-inside: avoid;
  }
}
