@font-face {
  font-family: Inter;
  src: url("/fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="dark"] {
    color-scheme: dark;
  }
}

/* 2026 SaaS redesign layer. Legacy selectors above remain only as structural fallbacks. */
body {
  color: var(--color-text-primary);
  background: var(--color-bg-app);
  font-size: 14px;
  line-height: 1.5714;
}

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

h1 {
  font-size: clamp(1.75rem, 3vw, 2rem);
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.3333;
  font-weight: 650;
  letter-spacing: -0.018em;
}

h3 {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 600;
}

.tp-authenticated-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--layout-sidebarExpanded) minmax(0, 1fr);
  background: var(--color-bg-app);
}

.tp-shell-header--workspace {
  position: sticky;
  z-index: var(--tp-z-header);
  top: 0;
  display: flex;
  overflow: hidden;
  width: auto;
  height: 100vh;
  min-height: 0;
  padding: var(--space-20) var(--space-16) var(--space-16);
  border: 0;
  border-right: var(--tp-border-width) solid var(--color-border);
  background: var(--color-surface);
  box-shadow: none;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-20);
}

.tp-shell-header--workspace .tp-brand {
  display: flex;
  min-height: 2.5rem;
  align-items: center;
  padding-inline: var(--space-8);
}

.tp-shell-header--workspace .tp-brand img {
  width: 11.5rem;
  max-height: 2rem;
}

.tp-shell-header--workspace .tp-mobile-menu-button {
  display: none;
}

.tp-shell-header--workspace .tp-primary-navigation {
  display: flex;
  overflow: auto;
  min-width: 0;
  padding: 0 var(--space-4) var(--space-8);
  border: 0;
  flex: 1;
  flex-direction: column;
  gap: var(--space-16);
  scrollbar-width: thin;
}

.tp-navigation-section {
  display: grid;
  gap: var(--space-4);
}

.tp-navigation-section > summary {
  display: flex;
  min-height: 2rem;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
}

.tp-navigation-section > summary::after {
  content: "›";
  font-size: 1rem;
  transform: rotate(0deg);
  transition: transform 140ms ease;
}

.tp-navigation-section[open] > summary::after {
  transform: rotate(90deg);
}

.tp-navigation-section__items {
  display: grid;
  gap: var(--space-4);
}

.tp-navigation-section__label {
  margin: 0 0 var(--space-4);
  padding: 0 var(--space-12);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  line-height: 1.3333;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tp-navigation-link {
  display: flex;
  min-height: 2.5rem;
  padding: var(--space-8) var(--space-12);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 500;
  text-decoration: none;
  align-items: center;
  gap: var(--space-12);
  transition:
    color 140ms ease,
    background-color 140ms ease;
}

.tp-navigation-link:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-subtle);
}

.tp-navigation-link[aria-current="page"] {
  color: var(--color-primary-700);
  background: var(--color-primary-50);
  font-weight: 600;
}

.tp-navigation-link img {
  width: 1.125rem;
  height: 1.125rem;
  flex: 0 0 auto;
}

.tp-navigation-section--service {
  margin-top: auto;
  padding-top: var(--space-16);
  border-top: var(--tp-border-width) solid var(--color-border);
}

.tp-shell-header--workspace .tp-shell-header__meta {
  display: none;
}

.tp-sidebar-collapse {
  width: 100%;
  min-height: 2.5rem;
  justify-content: flex-start;
}

.tp-authenticated-shell:has(.tp-shell-header--workspace.is-collapsed) {
  grid-template-columns: var(--layout-sidebarRail) minmax(0, 1fr);
}

.tp-shell-header--workspace.is-collapsed {
  padding-inline: var(--space-12);
}

.tp-shell-header--workspace.is-collapsed .tp-brand img {
  width: 2rem;
  height: 2rem;
  object-fit: cover;
  object-position: left;
}

.tp-shell-header--workspace.is-collapsed .tp-navigation-section__label,
.tp-shell-header--workspace.is-collapsed
  .tp-navigation-link:not([aria-current="page"]):nth-child(n + 3) {
  display: none;
}

.tp-shell-header--workspace.is-collapsed .tp-navigation-link {
  overflow: hidden;
  width: 2.75rem;
  padding-inline: 0;
  font-size: 0;
  justify-content: center;
}

.tp-shell-header--workspace.is-collapsed .tp-navigation-link img {
  width: 1.25rem;
  height: 1.25rem;
}

.tp-shell-header--workspace.is-collapsed .tp-sidebar-collapse {
  overflow: hidden;
  width: 2.75rem;
  padding-inline: 0;
  font-size: 0;
}

.tp-shell-header--workspace.is-collapsed .tp-sidebar-collapse::before {
  content: "›";
  font-size: 1.25rem;
}

.tp-workspace-frame {
  display: block;
  min-width: 0;
  background: var(--color-bg-app);
}

.tp-workspace-topbar {
  position: sticky;
  z-index: calc(var(--tp-z-header) - 1);
  top: 0;
  display: grid;
  height: var(--layout-topbar);
  padding: 0 clamp(var(--space-20), 3vw, var(--space-32));
  border-bottom: var(--tp-border-width) solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
  grid-template-columns: minmax(15rem, 30rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-20);
}

.tp-workspace-search {
  display: flex;
  width: 100%;
  min-height: 2.5rem;
  padding: 0 var(--space-12);
  border-color: var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-bg-subtle);
  font-weight: 400;
  justify-content: flex-start;
  gap: var(--space-8);
}

.tp-workspace-search img {
  width: 1rem;
  height: 1rem;
}

.tp-workspace-search kbd {
  margin-left: auto;
  padding: 0 var(--space-8);
  border: var(--tp-border-width) solid var(--color-border);
  border-radius: var(--radius-xs);
  color: var(--color-text-muted);
  background: var(--color-surface);
  font-size: 0.75rem;
  line-height: 1.5rem;
  box-shadow: var(--shadow-xs);
}

.tp-workspace-context {
  overflow: hidden;
  color: var(--color-text-secondary);
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.tp-workspace-switcher,
.tp-topbar-icon {
  display: inline-flex;
  min-height: 2.5rem;
  padding: 0 var(--space-12);
  border: var(--tp-border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  background: var(--color-surface);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  align-items: center;
}

.tp-topbar-icon {
  overflow: hidden;
  width: 2.5rem;
  padding: 0;
  font-size: 0;
  justify-content: center;
}

.tp-topbar-icon::before {
  content: "•";
  color: var(--color-primary-600);
  font-size: 1.25rem;
}

.tp-workspace-frame > main {
  width: min(100%, calc(var(--layout-contentMax) + var(--space-64)));
  min-height: calc(100vh - var(--layout-topbar));
  margin: 0 auto;
  padding: var(--space-24) clamp(var(--space-20), 3vw, var(--space-32))
    var(--space-48);
}

.tp-breadcrumbs {
  margin-bottom: var(--space-12);
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.tp-page-actions-row {
  margin-bottom: var(--space-24);
  padding: 0;
}

.tp-page-heading .tp-eyebrow {
  display: none;
}

.tp-page-heading h1 {
  margin-bottom: var(--space-4);
}

.tp-page-heading .tp-lead {
  max-width: 52rem;
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.tp-protected-boundary,
.tp-protected-boundary[data-state="allowed"] {
  display: block;
  min-width: 0;
}

.tp-identity-zone,
.tp-auth-panel,
.tp-dashboard-widget,
.tp-program-card,
.tp-record-card,
.tp-overview-panel,
.tp-chart-card,
.tp-metric-card {
  border: var(--tp-border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
}

.tp-identity-zone {
  padding: var(--space-24);
}

.tp-button,
.tp-input,
button,
input,
select,
textarea {
  border-radius: var(--radius-sm);
}

.tp-button {
  min-height: 2.5rem;
  padding: 0 var(--space-16);
  font-size: 0.875rem;
  font-weight: 600;
  transition:
    color 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.tp-button--primary {
  border-color: var(--color-primary-600);
  color: var(--color-text-inverse);
  background: var(--color-primary-600);
  box-shadow: var(--shadow-xs);
}

.tp-button--primary:hover {
  border-color: var(--color-primary-700);
  background: var(--color-primary-700);
}

.tp-button--secondary {
  border-color: var(--color-border-strong);
  color: var(--color-text-primary);
  background: var(--color-surface);
}

.tp-input,
input,
select,
textarea {
  min-height: 2.5rem;
  border-color: var(--color-border-strong);
  color: var(--color-text-primary);
  background: var(--color-surface);
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--color-primary-200);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px var(--color-primary-600);
}

.tp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  font-size: 0.8125rem;
}

.tp-table thead {
  position: sticky;
  z-index: 1;
  top: var(--layout-topbar);
}

.tp-table th {
  height: 2.75rem;
  padding: var(--space-8) var(--space-12);
  border-bottom: var(--tp-border-width) solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-bg-subtle);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: left;
}

.tp-table td {
  height: 3.25rem;
  padding: var(--space-8) var(--space-12);
  border-bottom: var(--tp-border-width) solid var(--color-border);
}

.tp-table tr:hover td {
  background: var(--color-primary-50);
}

.tp-table-toolbar {
  display: flex;
  margin-bottom: var(--space-16);
  padding: var(--space-12) var(--space-16);
  border: var(--tp-border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.tp-table-toolbar h2 {
  margin: 0 auto 0 0;
  font-size: 0.875rem;
}

.tp-table-toolbar form {
  display: contents;
}

.tp-command-palette {
  width: min(36rem, calc(100vw - var(--space-32)));
  max-height: min(42rem, calc(100vh - var(--space-64)));
  padding: var(--space-20);
  border: var(--tp-border-width) solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface-elevated);
  box-shadow: var(--shadow-lg);
}

.tp-command-palette::backdrop {
  background: color-mix(in srgb, var(--color-text-primary) 38%, transparent);
}

.tp-command-palette h2 {
  margin-bottom: var(--space-16);
}

.tp-command-palette__list {
  display: grid;
  max-height: 25rem;
  margin-top: var(--space-12);
  overflow: auto;
  gap: var(--space-4);
}

.tp-command-palette__list .tp-navigation-link {
  font-size: 0.875rem;
}

.tp-mobile-bottom-navigation {
  display: none;
}

.tp-overview {
  display: grid;
  gap: var(--space-24);
}

.tp-overview-welcome {
  display: flex;
  padding: var(--space-4) 0 var(--space-8);
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-24);
}

.tp-overview-welcome h2 {
  margin-bottom: var(--space-4);
}

.tp-overview-welcome p {
  margin: 0;
  color: var(--color-text-secondary);
}

.tp-overview-actions {
  display: flex;
  flex: 0 0 auto;
  gap: var(--space-8);
}

.tp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-16);
}

.tp-kpi-grid > .tp-skeleton {
  min-height: 10rem;
  border-radius: var(--radius-md);
}

.tp-metric-card {
  min-width: 0;
  padding: var(--space-20);
}

.tp-metric-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: var(--space-8);
}

.tp-metric-card h3 {
  margin-bottom: var(--space-16);
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
}

.tp-metric-card__value {
  margin-bottom: var(--space-4);
  font-size: 2rem;
  line-height: 1.1875;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.tp-metric-card__label {
  min-height: 2.5rem;
  margin-bottom: var(--space-16);
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.tp-metric-card > div:last-child {
  display: flex;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.tp-overview-grid {
  display: grid;
  gap: var(--space-16);
}

.tp-overview-grid--analytics,
.tp-overview-grid--performance {
  grid-template-columns: minmax(0, 1.45fr) minmax(20rem, 1fr);
}

.tp-overview-grid--operations {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tp-chart-card,
.tp-overview-panel {
  min-width: 0;
  padding: var(--space-20);
}

.tp-chart-card > div:first-child {
  display: grid;
  margin-bottom: var(--space-16);
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-16);
}

.tp-chart-card > div:first-child h3,
.tp-chart-card > div:first-child p {
  grid-column: 1;
}

.tp-chart-card > div:first-child p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.tp-chart-card > div:first-child .tp-button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.tp-chart-card .tp-state,
.tp-overview-panel .tp-state {
  min-height: 11rem;
  padding: var(--space-24);
  border: 0;
  background: var(--color-bg-subtle);
  box-shadow: none;
}

.tp-overview-panel h3 {
  margin-bottom: var(--space-16);
}

.tp-attention-list,
.tp-activity-list,
.tp-upcoming-list,
.tp-record-list,
.tp-analytics-metrics {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: var(--space-8);
}

.tp-attention-list li {
  display: grid;
  padding: var(--space-12) 0;
  border-bottom: var(--tp-border-width) solid var(--color-border);
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-12);
}

.tp-attention-list li > div {
  display: grid;
}

.tp-attention-list li span,
.tp-upcoming-list time {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.tp-activity-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-12);
}

.tp-activity-list li > span {
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.4rem;
  border-radius: var(--radius-round);
  background: var(--color-primary-500);
}

.tp-activity-list p {
  margin: 0;
  color: var(--color-text-secondary);
}

.tp-upcoming-list li {
  display: grid;
  padding: var(--space-8) 0;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: var(--space-12);
}

.tp-data-freshness {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  text-align: right;
}

.tp-inline-notice {
  padding: var(--space-12) var(--space-16);
  border-left: 3px solid var(--color-warning-500);
  border-radius: var(--radius-sm);
  color: var(--color-warning-700);
  background: var(--color-warning-50);
}

.tp-finance-page {
  display: grid;
  gap: var(--space-16);
}

.tp-finance-page > h2 {
  margin-bottom: 0;
}

.tp-finance-page > p {
  margin-top: calc(var(--space-16) * -1);
  color: var(--color-text-secondary);
}

.tp-finance-page > section:last-child {
  overflow: hidden;
  padding: var(--space-20);
  border: var(--tp-border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
}

.tp-record-list {
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
}

.tp-record-list > li,
.tp-analytics-metrics > li {
  display: grid;
  align-content: start;
  gap: var(--space-8);
}

.tp-record-card,
.tp-analytics-metric-card {
  height: 100%;
  padding: var(--space-16);
}

.tp-record-card dl,
.tp-analytics-metric-card dl {
  display: grid;
  margin: 0;
  grid-template-columns: minmax(7rem, 0.7fr) minmax(0, 1fr);
  gap: var(--space-8) var(--space-12);
}

.tp-record-card dt,
.tp-analytics-metric-card dt {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.tp-record-card dd,
.tp-analytics-metric-card dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
}

.tp-analytics-metrics {
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
}

.tp-authenticated-shell--gated {
  min-height: 100vh;
  overflow: hidden;
  background: var(--color-bg-app);
}

.tp-gate-header {
  min-height: var(--layout-topbar);
  padding: var(--space-12) clamp(var(--space-16), 4vw, var(--space-40));
  border-bottom: var(--tp-border-width) solid var(--color-border);
  background: var(--color-surface);
}

.tp-first-organization-overlay {
  display: grid;
  overflow: auto;
  padding: calc(var(--layout-topbar) + var(--space-24)) var(--space-16)
    var(--space-32);
  background: color-mix(in srgb, var(--color-primary-900) 18%, transparent);
  place-items: start center;
}

.tp-first-organization-dialog {
  width: min(54rem, 100%);
  max-height: none;
  padding: var(--space-32);
  border: var(--tp-border-width) solid var(--color-border);
  border-radius: 18px;
  background: var(--color-surface-elevated);
  box-shadow: var(--shadow-lg);
}

.tp-first-organization-dialog__identity {
  margin-bottom: var(--space-16);
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.tp-first-organization h2 {
  margin-bottom: var(--space-8);
}

.tp-first-organization > .tp-lead {
  max-width: 42rem;
  margin-bottom: var(--space-20);
  color: var(--color-text-secondary);
}

.tp-setup-stepper {
  display: grid;
  margin: 0 0 var(--space-24);
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-8);
}

.tp-setup-stepper li {
  display: flex;
  min-width: 0;
  padding-bottom: var(--space-12);
  border-bottom: 2px solid var(--color-border);
  color: var(--color-text-muted);
  align-items: center;
  gap: var(--space-8);
}

.tp-setup-stepper li > span {
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--radius-round);
  background: var(--color-bg-subtle);
  font-size: 0.75rem;
  place-items: center;
}

.tp-setup-stepper li[data-state="active"] {
  border-color: var(--color-primary-600);
  color: var(--color-primary-700);
}

.tp-setup-stepper li[data-state="active"] > span {
  color: var(--color-text-inverse);
  background: var(--color-primary-600);
}

.tp-first-organization__feedback:empty {
  display: none;
}

.tp-first-organization__form {
  display: grid;
  margin-top: var(--space-20);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-16) var(--space-20);
}

.tp-first-organization__form > .tp-field:first-child,
.tp-first-organization__submit {
  grid-column: 1 / -1;
}

.tp-first-organization__submit {
  min-height: 3rem;
  margin-top: var(--space-4);
}

.tp-setup-next-steps {
  display: grid;
  margin: var(--space-20) 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-12);
}

.tp-setup-next-steps article {
  padding: var(--space-16);
  border: var(--tp-border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
}

.tp-setup-next-steps p {
  min-height: 2.75rem;
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
}

.tp-public-shell--auth {
  background: var(--color-bg-app);
}

.tp-public-shell--auth::before,
.tp-public-shell--auth::after {
  display: none;
}

@media (max-width: 75rem) {
  .tp-authenticated-shell {
    grid-template-columns: var(--layout-sidebarRail) minmax(0, 1fr);
  }

  .tp-shell-header--workspace {
    padding-inline: var(--space-12);
  }

  .tp-shell-header--workspace .tp-brand img {
    width: 2rem;
    height: 2rem;
    object-fit: cover;
    object-position: left;
  }

  .tp-shell-header--workspace .tp-navigation-section__label,
  .tp-shell-header--workspace
    .tp-navigation-link:not([aria-current="page"]):nth-child(n + 3) {
    display: none;
  }

  .tp-shell-header--workspace .tp-navigation-link {
    overflow: hidden;
    width: 2.75rem;
    padding-inline: 0;
    font-size: 0;
    justify-content: center;
  }

  .tp-sidebar-collapse {
    display: none;
  }

  .tp-workspace-context,
  .tp-workspace-switcher {
    display: none;
  }

  .tp-workspace-topbar {
    grid-template-columns: minmax(14rem, 1fr) auto;
  }

  .tp-topbar-actions {
    grid-column: 2;
  }

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

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

@media (max-width: 48rem) {
  .tp-authenticated-shell,
  .tp-authenticated-shell:has(.tp-shell-header--workspace.is-collapsed) {
    display: block;
  }

  .tp-shell-header--workspace {
    display: none;
  }

  .tp-workspace-topbar {
    height: 3.5rem;
    padding-inline: var(--space-16);
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-8);
  }

  .tp-workspace-search kbd,
  .tp-topbar-actions > .tp-menu,
  .tp-topbar-actions > .tp-workspace-switcher {
    display: none;
  }

  .tp-topbar-actions {
    gap: var(--space-4);
  }

  .tp-workspace-frame > main {
    min-height: calc(100vh - 7.5rem);
    padding: var(--space-20) var(--space-16) 6rem;
  }

  .tp-breadcrumbs {
    display: none;
  }

  .tp-mobile-bottom-navigation {
    position: fixed;
    z-index: var(--tp-z-header);
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    min-height: 4.25rem;
    padding: var(--space-8) max(var(--space-8), env(safe-area-inset-right))
      max(var(--space-8), env(safe-area-inset-bottom))
      max(var(--space-8), env(safe-area-inset-left));
    border-top: var(--tp-border-width) solid var(--color-border);
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .tp-mobile-bottom-navigation .tp-navigation-link {
    min-width: 0;
    min-height: 3rem;
    padding: var(--space-4);
    font-size: 0.6875rem;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }

  .tp-mobile-bottom-navigation .tp-navigation-link img {
    width: 1.125rem;
    height: 1.125rem;
  }

  .tp-page-actions-row {
    margin-bottom: var(--space-20);
  }

  .tp-overview-welcome {
    display: grid;
  }

  .tp-overview-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tp-overview-actions .tp-button {
    padding-inline: var(--space-8);
  }

  .tp-kpi-grid,
  .tp-overview-grid--analytics,
  .tp-overview-grid--operations,
  .tp-overview-grid--performance,
  .tp-record-list,
  .tp-analytics-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .tp-first-organization-overlay {
    padding: var(--layout-topbar) 0 0;
    place-items: stretch;
  }

  .tp-first-organization-dialog {
    width: 100%;
    min-height: calc(100vh - var(--layout-topbar));
    padding: var(--space-24) var(--space-16) var(--space-40);
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .tp-first-organization__form,
  .tp-setup-next-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .tp-setup-stepper strong {
    display: none;
  }

  .tp-setup-stepper li {
    justify-content: center;
  }

  .tp-command-palette {
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
}

@media (max-width: 30rem) {
  .tp-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .tp-mobile-bottom-navigation .tp-navigation-link {
    font-size: 0.625rem;
  }

  .tp-first-organization-dialog {
    padding-inline: var(--space-12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tp-navigation-link,
  .tp-button {
    transition: none;
  }
}

@layer legacy {
  @font-face {
    font-family: Inter;
    src: url("/fonts/InterVariable-Italic.woff2") format("woff2");
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
  }

  :root {
    color-scheme: light;
    --tp-font-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    --tp-text-xs: 0.75rem;
    --tp-text-sm: 0.875rem;
    --tp-text-md: 1rem;
    --tp-text-lg: clamp(1.0625rem, 1.3vw, 1.25rem);
    --tp-text-xl: clamp(2rem, 4vw, 3.5rem);
    --tp-leading-tight: 1.12;
    --tp-leading-normal: 1.55;
    --tp-space-1: var(--space-4);
    --tp-space-2: var(--space-8);
    --tp-space-3: var(--space-12);
    --tp-space-4: var(--space-16);
    --tp-space-5: var(--space-24);
    --tp-space-6: var(--space-32);
    --tp-space-7: var(--space-48);
    --tp-size-control: 2.75rem;
    --tp-size-content: var(--layout-contentMax);
    --tp-radius-sm: var(--radius-sm);
    --tp-radius-md: var(--radius-md);
    --tp-radius-lg: var(--radius-lg);
    --tp-border-width: 1px;
    --tp-shadow-1: var(--shadow-sm);
    --tp-shadow-2: var(--shadow-lg);
    --tp-duration-fast: 120ms;
    --tp-duration-normal: 220ms;
    --tp-easing: cubic-bezier(0.2, 0, 0, 1);
    --tp-z-header: 20;
    --tp-z-overlay: 100;
    --tp-z-toast: 120;
    --tp-color-canvas: var(--color-neutral-50);
    --tp-color-surface: var(--color-neutral-0);
    --tp-color-surface-subtle: var(--color-neutral-100);
    --tp-color-text: var(--color-neutral-900);
    --tp-color-text-muted: var(--color-neutral-600);
    --tp-color-border: var(--color-neutral-300);
    --tp-color-brand: var(--color-primary-600);
    --tp-color-brand-strong: var(--color-primary-800);
    --tp-color-action: var(--color-primary-600);
    --tp-color-action-hover: var(--color-primary-700);
    --tp-color-focus: var(--color-sky-400);
    --tp-color-info: var(--color-semantic-info);
    --tp-color-success: var(--color-semantic-success);
    --tp-color-warning: var(--color-semantic-warning);
    --tp-color-danger: var(--color-semantic-danger);
    --tp-color-ai: var(--color-semantic-ai);
    --tp-color-on-strong: var(--color-neutral-0);
  }

  :root[data-theme="dark"] {
    color-scheme: dark;
    --tp-color-canvas: var(--color-neutral-900);
    --tp-color-surface: var(--color-neutral-800);
    --tp-color-surface-subtle: var(--color-neutral-700);
    --tp-color-text: var(--color-neutral-50);
    --tp-color-text-muted: var(--color-neutral-400);
    --tp-color-border: var(--color-neutral-600);
    --tp-color-brand: var(--color-primary-300);
    --tp-color-brand-strong: var(--color-primary-200);
    --tp-color-action: var(--color-primary-400);
    --tp-color-action-hover: var(--color-primary-300);
    --tp-color-on-strong: var(--color-neutral-900);
  }

  :root[data-density="compact"] {
    --tp-size-control: 2.25rem;
    --tp-space-5: var(--space-16);
    --tp-space-6: var(--space-24);
    --tp-space-7: var(--space-32);
  }

  :root[data-high-contrast="true"] {
    --tp-color-border: currentColor;
    --tp-border-width: 2px;
  }

  :root[data-reduced-motion="true"] *,
  :root[data-reduced-motion="true"] *::before,
  :root[data-reduced-motion="true"] *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  * {
    box-sizing: border-box;
  }

  html {
    min-width: 20rem;
    background: var(--tp-color-canvas);
  }

  body {
    min-height: 100vh;
    margin: 0;
    color: var(--tp-color-text);
    background: var(--tp-color-canvas);
    font-family: var(--tp-font-sans);
    font-size: var(--tp-text-md);
    line-height: var(--tp-leading-normal);
    text-rendering: optimizeLegibility;
  }

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

  button,
  a,
  input,
  select,
  textarea,
  dialog {
    transition:
      color var(--tp-duration-fast) var(--tp-easing),
      background var(--tp-duration-fast) var(--tp-easing),
      border-color var(--tp-duration-fast) var(--tp-easing),
      box-shadow var(--tp-duration-fast) var(--tp-easing),
      transform var(--tp-duration-fast) var(--tp-easing);
  }

  :focus-visible {
    outline: 3px solid var(--tp-color-focus);
    outline-offset: 3px;
  }

  [hidden] {
    display: none !important;
  }

  img {
    max-width: 100%;
  }

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

  h1,
  h2,
  h3 {
    line-height: var(--tp-leading-tight);
    text-wrap: balance;
  }

  h1 {
    max-width: 24ch;
    margin-block-end: var(--tp-space-4);
    font-size: var(--tp-text-xl);
    letter-spacing: -0.045em;
  }

  h2 {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
  }

  h3 {
    font-size: 1.0625rem;
  }

  p {
    max-width: 72ch;
  }

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

  .tp-skip-link {
    position: fixed;
    z-index: var(--tp-z-toast);
    inset-block-start: var(--tp-space-2);
    inset-inline-start: var(--tp-space-2);
    padding: var(--tp-space-3) var(--tp-space-4);
    color: var(--tp-color-on-strong);
    background: var(--tp-color-brand-strong);
    border-radius: var(--tp-radius-sm);
    transform: translateY(-160%);
  }

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

  .tp-live-region {
    position: fixed;
    z-index: var(--tp-z-toast);
    inset-block-start: var(--tp-space-4);
    inset-inline-end: var(--tp-space-4);
    width: min(26rem, calc(100% - var(--space-32)));
  }

  .tp-public-shell {
    min-height: 100vh;
  }

  .tp-shell-header {
    position: sticky;
    z-index: var(--tp-z-header);
    top: 0;
    display: flex;
    align-items: center;
    gap: var(--tp-space-5);
    min-height: var(--layout-topbar);
    padding-inline: max(
      var(--layout-pagePadding),
      calc((100vw - var(--layout-contentMax)) / 2)
    );
    border-bottom: var(--tp-border-width) solid var(--tp-color-border);
    background: color-mix(in srgb, var(--tp-color-surface) 94%, transparent);
    backdrop-filter: blur(var(--space-16));
  }

  .tp-brand {
    display: inline-flex;
    align-items: center;
    width: 11.5rem;
    min-height: 2.75rem;
    flex: 0 0 auto;
  }

  .tp-brand img {
    display: block;
    width: 100%;
    height: auto;
  }

  .tp-primary-navigation {
    display: flex;
    gap: var(--tp-space-1);
  }

  .tp-primary-navigation > .tp-link {
    padding: var(--tp-space-2) var(--tp-space-3);
    color: var(--tp-color-text);
    border-radius: var(--tp-radius-sm);
    text-decoration: none;
  }

  .tp-primary-navigation > .tp-link:hover {
    color: var(--tp-color-action);
    background: var(--tp-color-surface-subtle);
  }

  .tp-shell-header__meta {
    display: flex;
    align-items: center;
    gap: var(--tp-space-3);
    margin-inline-start: auto;
  }

  .tp-mobile-menu-button {
    display: none;
  }

  .tp-public-shell > main,
  .tp-public-shell > footer {
    width: min(100%, var(--layout-contentMax));
    margin-inline: auto;
    padding-inline: var(--layout-pagePadding);
  }

  .tp-public-shell > main {
    padding-block: var(--space-64);
  }

  .tp-public-shell--auth > main {
    padding-block: var(--space-16) var(--space-32);
  }

  .tp-public-shell > footer {
    padding-block: var(--space-24);
    color: var(--tp-color-text-muted);
    border-top: var(--tp-border-width) solid var(--tp-color-border);
  }

  .tp-page-heading {
    max-width: 60rem;
  }

  .tp-eyebrow {
    margin-block-end: var(--tp-space-2);
    color: var(--tp-color-brand);
    font-size: var(--tp-text-xs);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .tp-lead {
    color: var(--tp-color-text-muted);
    font-size: var(--tp-text-lg);
  }

  .tp-public-hero {
    position: relative;
    overflow: hidden;
    min-height: 22rem;
    padding: var(--space-64);
    background:
      radial-gradient(
        circle at 88% 18%,
        var(--color-primary-100),
        transparent 28%
      ),
      linear-gradient(135deg, var(--tp-color-surface), var(--color-sky-50));
  }

  .tp-public-hero::after {
    position: absolute;
    right: calc(var(--space-80) * -1);
    bottom: calc(var(--space-96) * -1);
    width: 22rem;
    height: 22rem;
    border: var(--space-24) solid var(--color-primary-100);
    border-radius: var(--radius-round);
    content: "";
  }

  .tp-auth-brand-bar {
    width: min(100%, 76rem);
    margin-inline: auto;
    padding: var(--space-24) var(--layout-pagePadding) 0;
  }

  .tp-auth-layout {
    display: grid;
    grid-template-columns: minmax(20rem, 0.9fr) minmax(22rem, 1.1fr);
    gap: var(--space-32);
    align-items: stretch;
    width: min(100%, 76rem);
    margin-inline: auto;
    padding: var(--space-16) var(--layout-pagePadding) var(--space-32);
  }

  .tp-auth-layout__form,
  .tp-auth-lifecycle {
    position: relative;
    overflow: hidden;
    padding: var(--space-32);
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-xl);
    background: var(--tp-color-surface);
    box-shadow: var(--shadow-sm);
  }

  .tp-auth-layout__form::after {
    position: absolute;
    right: calc(var(--space-48) * -1);
    bottom: calc(var(--space-48) * -1);
    width: 13rem;
    height: 13rem;
    background: linear-gradient(
      135deg,
      var(--color-primary-100),
      var(--color-sky-100)
    );
    border-radius: 58% 42% 0 55%;
    content: "";
    opacity: 0.9;
    pointer-events: none;
  }

  .tp-auth-layout__form > * {
    position: relative;
    z-index: 1;
  }

  .tp-auth-layout .tp-auth-panel {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .tp-auth-layout .tp-auth-form .tp-button {
    width: 100%;
  }

  .tp-auth-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    padding: var(--space-4);
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-md);
    background: var(--tp-color-surface-subtle);
  }

  .tp-auth-switcher .tp-link {
    padding: var(--space-8) var(--space-12);
    color: var(--tp-color-text-muted);
    border-radius: var(--radius-sm);
    font-size: var(--tp-text-sm);
    font-weight: 750;
    text-align: center;
    text-decoration: none;
  }

  .tp-auth-switcher .tp-link[aria-current="page"] {
    color: var(--tp-color-text);
    background: var(--tp-color-surface);
    box-shadow: var(--shadow-xs);
  }

  .tp-auth-lifecycle {
    background:
      radial-gradient(circle at 90% 6%, var(--color-sky-100), transparent 24%),
      var(--tp-color-surface);
  }

  .tp-auth-lifecycle h2 {
    font-size: clamp(2rem, 3vw, 3rem);
  }

  .tp-lifecycle-list {
    display: grid;
    gap: var(--space-12);
    margin: var(--space-32) 0 0;
    padding: 0;
    list-style: none;
    counter-reset: lifecycle;
  }

  .tp-lifecycle-list li {
    position: relative;
    display: grid;
    grid-template-columns: var(--space-32) 1fr;
    gap: var(--space-4) var(--space-12);
    align-items: center;
    padding: var(--space-16);
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-md);
    background: color-mix(
      in srgb,
      var(--tp-color-surface) 84%,
      var(--color-primary-50)
    );
    counter-increment: lifecycle;
  }

  .tp-lifecycle-list li::before {
    display: grid;
    width: var(--space-32);
    height: var(--space-32);
    place-items: center;
    color: var(--tp-color-brand);
    background: var(--color-primary-50);
    border: var(--tp-border-width) solid var(--color-primary-200);
    border-radius: var(--radius-round);
    content: counter(lifecycle);
    font-size: var(--tp-text-sm);
    font-weight: 800;
  }

  .tp-lifecycle-list strong,
  .tp-lifecycle-list span {
    grid-column: 2;
  }

  .tp-lifecycle-list span {
    color: var(--tp-color-text-muted);
    font-size: var(--tp-text-sm);
  }

  .tp-secure-note {
    width: min(100%, 76rem);
    margin: 0 auto var(--space-24);
    padding-inline: var(--layout-pagePadding);
    color: var(--tp-color-text-muted);
    font-size: var(--tp-text-sm);
  }

  .tp-secure-note::before {
    margin-inline-end: var(--space-8);
    color: var(--tp-color-success);
    content: "●";
  }

  .tp-public-shell--auth > footer {
    width: min(100%, 76rem);
    border-top: 0;
  }

  .tp-trust-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-8);
    padding: var(--space-16);
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-lg);
    background: var(--tp-color-surface);
  }

  .tp-trust-bar > div {
    display: flex;
    gap: var(--space-12);
    align-items: center;
    min-width: 0;
    padding: var(--space-8);
  }

  .tp-trust-bar img {
    width: var(--space-24);
    height: var(--space-24);
  }

  .tp-trust-bar span {
    display: grid;
  }

  .tp-trust-bar strong {
    color: var(--tp-color-text);
    font-size: var(--tp-text-sm);
  }

  .tp-trust-bar small {
    color: var(--tp-color-text-muted);
    font-size: var(--tp-text-xs);
  }

  .tp-authenticated-shell {
    display: grid;
    grid-template-columns: var(--layout-sidebarExpanded) minmax(0, 1fr);
    min-height: 100vh;
  }

  .tp-shell-header--workspace {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-20);
    width: var(--layout-sidebarExpanded);
    height: 100vh;
    padding: var(--space-20) var(--space-16);
    overflow-y: auto;
    border-right: var(--tp-border-width) solid var(--tp-color-border);
    border-bottom: 0;
    background: var(--tp-color-surface);
    backdrop-filter: none;
  }

  .tp-shell-header--workspace .tp-primary-navigation {
    display: grid;
    gap: var(--space-16);
  }

  .tp-navigation-section {
    display: grid;
    gap: var(--space-4);
  }

  .tp-navigation-section__label {
    margin: 0;
    padding: 0 var(--space-12);
    color: var(--tp-color-text-muted);
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .tp-navigation-link {
    display: flex;
    gap: var(--space-12);
    align-items: center;
    min-height: var(--space-40);
    padding: var(--space-8) var(--space-12);
    color: var(--tp-color-text-muted);
    border-radius: var(--radius-sm);
    font-size: var(--tp-text-sm);
    font-weight: 650;
    text-decoration: none;
  }

  .tp-navigation-link img {
    width: var(--space-20);
    height: var(--space-20);
    opacity: 0.78;
  }

  .tp-navigation-link:hover,
  .tp-navigation-link[aria-current="page"] {
    color: var(--tp-color-action);
    background: var(--color-primary-50);
  }

  .tp-navigation-link[aria-current="page"] {
    box-shadow: inset 3px 0 var(--tp-color-action);
  }

  .tp-shell-header--workspace .tp-shell-header__meta {
    display: grid;
    gap: var(--space-12);
    width: 100%;
    margin: auto 0 0;
    padding-top: var(--space-16);
    border-top: var(--tp-border-width) solid var(--tp-color-border);
  }

  .tp-shell-header--workspace .tp-menu > .tp-button {
    width: 100%;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
  }

  .tp-workspace-frame {
    min-width: 0;
  }

  .tp-workspace-topbar {
    position: sticky;
    z-index: calc(var(--tp-z-header) - 1);
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--layout-topbar);
    padding: var(--space-12) var(--layout-pagePadding);
    border-bottom: var(--tp-border-width) solid var(--tp-color-border);
    background: color-mix(in srgb, var(--tp-color-surface) 94%, transparent);
    backdrop-filter: blur(var(--space-16));
  }

  .tp-workspace-search {
    display: flex;
    gap: var(--space-8);
    align-items: center;
    width: min(26rem, 50vw);
    min-height: var(--space-40);
    padding: var(--space-8) var(--space-12);
    color: var(--tp-color-text-muted);
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-round);
    background: var(--tp-color-surface-subtle);
    text-decoration: none;
  }

  .tp-workspace-search img {
    width: var(--space-20);
    height: var(--space-20);
  }

  .tp-workspace-context {
    max-width: 40%;
    overflow: hidden;
    color: var(--tp-color-text-muted);
    font-size: var(--tp-text-sm);
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tp-workspace-frame > main {
    width: min(100%, var(--layout-contentMax));
    margin-inline: auto;
    padding: var(--space-24) var(--layout-pagePadding) var(--space-64);
  }

  .tp-page-actions-row {
    display: flex;
    gap: var(--space-24);
    align-items: start;
    justify-content: space-between;
  }

  .tp-page-actions {
    min-width: 8rem;
  }

  .tp-identity-zone,
  .tp-system-state,
  .tp-protected-boundary,
  .tp-component-card,
  .tp-card,
  .tp-program-card,
  .tp-dashboard-widget,
  .tp-work-item,
  .tp-verification-card {
    padding: var(--space-24);
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-lg);
    background: var(--tp-color-surface);
    box-shadow: var(--shadow-xs);
  }

  .tp-identity-zone {
    margin-block-start: var(--space-24);
  }

  .tp-auth-panel {
    display: grid;
    gap: var(--space-20);
    width: 100%;
    max-width: 42rem;
    margin-block-start: var(--space-24);
    padding: var(--space-24);
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-lg);
    background: var(--tp-color-surface);
    box-shadow: var(--shadow-xs);
  }

  .tp-auth-panel h2,
  .tp-auth-panel h3,
  .tp-auth-panel p {
    margin-block-end: 0;
  }

  .tp-auth-form,
  .tp-form-stack {
    display: grid;
    gap: var(--space-16);
  }

  .tp-auth-status:empty {
    display: none;
  }

  .tp-auth-actions,
  .tp-actions,
  .tp-onboarding-actions,
  .tp-dashboard-widget__actions,
  .tp-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-12);
    align-items: center;
  }

  .tp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tp-size-control);
    padding: var(--space-8) var(--space-16);
    color: var(--tp-color-text);
    border: var(--tp-border-width) solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
  }

  .tp-button.tp-mobile-menu-button {
    display: none;
  }

  .tp-button--primary {
    color: var(--tp-color-on-strong);
    background: linear-gradient(
      135deg,
      var(--color-primary-600),
      var(--color-primary-500)
    );
    box-shadow: 0 var(--space-8) var(--space-20)
      color-mix(in srgb, var(--color-primary-600) 22%, transparent);
  }

  .tp-button--primary:hover {
    background: var(--tp-color-action-hover);
    transform: translateY(-1px);
  }

  .tp-button--secondary {
    color: var(--tp-color-text);
    border-color: var(--tp-color-border);
    background: var(--tp-color-surface);
  }

  .tp-button--secondary:hover,
  .tp-button--ghost:hover {
    color: var(--tp-color-action);
    background: var(--color-primary-50);
  }

  .tp-button--danger {
    color: var(--tp-color-on-strong);
    background: color-mix(
      in srgb,
      var(--tp-color-danger) 70%,
      var(--color-neutral-900)
    );
  }

  .tp-button--ghost {
    color: var(--tp-color-text);
  }

  .tp-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
  }

  .tp-icon-button {
    min-width: var(--tp-size-control);
    padding-inline: var(--space-12);
    border-radius: var(--radius-round);
  }

  .tp-link {
    color: var(--tp-color-action);
    text-underline-offset: var(--space-4);
  }

  .tp-field {
    display: grid;
    gap: var(--space-4);
    min-width: min(100%, 16rem);
  }

  .tp-field label {
    color: var(--tp-color-text);
    font-size: var(--tp-text-sm);
    font-weight: 700;
  }

  .tp-input {
    width: 100%;
    min-height: var(--tp-size-control);
    padding: var(--space-8) var(--space-12);
    color: var(--tp-color-text);
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-sm);
    background: var(--tp-color-surface);
  }

  .tp-input:hover {
    border-color: var(--color-neutral-400);
  }

  .tp-input:focus {
    border-color: var(--tp-color-action);
    box-shadow: 0 0 0 var(--space-4) var(--color-primary-100);
  }

  .tp-input[aria-invalid="true"] {
    border-color: var(--tp-color-danger);
  }

  .tp-textarea {
    min-height: 8rem;
    resize: vertical;
  }

  .tp-hint,
  .tp-component-meta {
    margin: 0;
    color: var(--tp-color-text-muted);
    font-size: var(--tp-text-sm);
  }

  .tp-error-message,
  .tp-required {
    color: color-mix(
      in srgb,
      var(--tp-color-danger) 68%,
      var(--color-neutral-900)
    );
  }

  .tp-error-message {
    margin: 0;
    font-size: var(--tp-text-sm);
    font-weight: 650;
  }

  .tp-choice,
  .tp-checkbox-row {
    display: inline-flex;
    gap: var(--space-8);
    align-items: center;
    min-height: var(--tp-size-control);
    margin-inline-end: var(--space-16);
  }

  .tp-choice input,
  .tp-checkbox-row input {
    width: var(--space-20);
    height: var(--space-20);
    accent-color: var(--tp-color-action);
  }

  .tp-alert {
    padding: var(--space-12) var(--space-16);
    color: var(--tp-color-text);
    border: var(--tp-border-width) solid
      color-mix(in srgb, var(--tp-color-info) 42%, var(--tp-color-border));
    border-left-width: var(--space-4);
    border-radius: var(--radius-sm);
    background: color-mix(
      in srgb,
      var(--tp-color-info) 8%,
      var(--tp-color-surface)
    );
  }

  .tp-alert--success {
    border-color: color-mix(
      in srgb,
      var(--tp-color-success) 48%,
      var(--tp-color-border)
    );
    background: color-mix(
      in srgb,
      var(--tp-color-success) 8%,
      var(--tp-color-surface)
    );
  }

  .tp-alert--warning {
    border-color: color-mix(
      in srgb,
      var(--tp-color-warning) 52%,
      var(--tp-color-border)
    );
    background: color-mix(
      in srgb,
      var(--tp-color-warning) 8%,
      var(--tp-color-surface)
    );
  }

  .tp-alert--danger {
    border-color: color-mix(
      in srgb,
      var(--tp-color-danger) 52%,
      var(--tp-color-border)
    );
    background: color-mix(
      in srgb,
      var(--tp-color-danger) 8%,
      var(--tp-color-surface)
    );
  }

  .tp-banner {
    width: 100%;
  }

  .tp-toast {
    box-shadow: var(--tp-shadow-2);
  }

  .tp-badge {
    display: inline-flex;
    gap: var(--space-4);
    align-items: center;
    width: fit-content;
    min-height: var(--space-24);
    padding: var(--space-4) var(--space-8);
    color: var(--tp-color-text-muted);
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-round);
    background: var(--tp-color-surface);
    font-size: var(--tp-text-xs);
    font-weight: 750;
  }

  .tp-badge--success {
    color: var(--tp-color-text);
    border-color: color-mix(
      in srgb,
      var(--tp-color-success) 45%,
      var(--tp-color-border)
    );
    background: color-mix(
      in srgb,
      var(--tp-color-success) 8%,
      var(--tp-color-surface)
    );
  }

  .tp-badge--warning {
    color: var(--tp-color-text);
    border-color: color-mix(
      in srgb,
      var(--tp-color-warning) 45%,
      var(--tp-color-border)
    );
  }

  .tp-badge--danger {
    color: var(--tp-color-text);
    border-color: color-mix(
      in srgb,
      var(--tp-color-danger) 45%,
      var(--tp-color-border)
    );
  }

  .tp-dialog {
    width: min(36rem, calc(100% - var(--space-32)));
    padding: var(--space-32);
    color: var(--tp-color-text);
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-xl);
    background: var(--tp-color-surface);
    box-shadow: var(--tp-shadow-2);
  }

  .tp-dialog::backdrop {
    background: color-mix(in srgb, var(--color-neutral-900) 55%, transparent);
    backdrop-filter: blur(var(--space-4));
  }

  .tp-dialog__actions {
    justify-content: flex-end;
    margin-block-start: var(--space-24);
  }

  .tp-drawer {
    width: min(var(--layout-rightInspector), 92vw);
    height: 100vh;
    max-height: 100vh;
    margin: 0 0 0 auto;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
  }

  .tp-tabs [role="tablist"] {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    border-bottom: var(--tp-border-width) solid var(--tp-color-border);
  }

  .tp-tabs [role="tab"] {
    padding: var(--space-12) var(--space-16);
    color: var(--tp-color-text-muted);
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    white-space: nowrap;
  }

  .tp-tabs [role="tab"][aria-selected="true"] {
    color: var(--tp-color-action);
    border-color: var(--tp-color-action);
    font-weight: 750;
  }

  .tp-tabs [role="tabpanel"] {
    padding-block: var(--space-20);
  }

  .tp-table {
    width: 100%;
    overflow: hidden;
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-md);
    border-collapse: separate;
    border-spacing: 0;
    background: var(--tp-color-surface);
  }

  .tp-table caption {
    padding: var(--space-12);
    font-weight: 750;
    text-align: left;
  }

  .tp-table th,
  .tp-table td {
    padding: var(--space-12) var(--space-16);
    border-bottom: var(--tp-border-width) solid var(--tp-color-border);
    text-align: left;
    vertical-align: top;
  }

  .tp-table th {
    color: var(--tp-color-text-muted);
    background: var(--tp-color-surface-subtle);
    font-size: var(--tp-text-xs);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

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

  .tp-pagination,
  .tp-search,
  .tp-component-sample,
  .tp-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-12);
    align-items: center;
  }

  .tp-search {
    margin-block: var(--space-20);
  }

  .tp-skeleton {
    min-width: 8rem;
    min-height: var(--space-24);
    border-radius: var(--radius-sm);
    background: linear-gradient(
      90deg,
      var(--tp-color-surface-subtle),
      var(--tp-color-border),
      var(--tp-color-surface-subtle)
    );
    background-size: 200% 100%;
    animation: tp-shimmer 1.4s infinite;
  }

  .tp-spinner {
    display: inline-block;
    width: var(--space-24);
    height: var(--space-24);
    border: 3px solid var(--tp-color-border);
    border-top-color: var(--tp-color-action);
    border-radius: var(--radius-round);
    animation: tp-spin 0.8s linear infinite;
  }

  .tp-progress {
    width: 100%;
    height: var(--space-8);
    accent-color: var(--tp-color-action);
  }

  .tp-state {
    display: grid;
    gap: var(--space-12);
  }

  .tp-state--error {
    border-color: var(--tp-color-danger);
  }

  .tp-initial-loading {
    display: grid;
    min-height: 70vh;
    place-items: center;
  }

  .tp-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8);
    margin: 0 0 var(--space-20);
    padding: 0;
    color: var(--tp-color-text-muted);
    list-style: none;
    font-size: var(--tp-text-sm);
  }

  .tp-breadcrumbs li:not(:last-child)::after {
    margin-inline-start: var(--space-8);
    color: var(--color-neutral-500);
    content: "/";
  }

  .tp-menu {
    position: relative;
  }

  .tp-menu [role="menu"] {
    position: absolute;
    z-index: var(--tp-z-overlay);
    inset-block-start: calc(100% + var(--space-4));
    inset-inline-end: 0;
    min-width: 14rem;
    padding: var(--space-8);
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-md);
    background: var(--tp-color-surface);
    box-shadow: var(--shadow-lg);
  }

  .tp-menu [role="menuitem"] {
    width: 100%;
    text-align: left;
  }

  .tp-tooltip {
    position: relative;
    display: inline-flex;
  }

  .tp-tooltip [role="tooltip"] {
    position: absolute;
    inset-block-end: calc(100% + var(--space-8));
    inset-inline-start: 0;
    width: max-content;
    max-width: 18rem;
    padding: var(--space-8);
    color: var(--tp-color-on-strong);
    border-radius: var(--radius-sm);
    background: var(--tp-color-brand-strong);
    opacity: 0;
    pointer-events: none;
  }

  .tp-tooltip:focus-within [role="tooltip"],
  .tp-tooltip:hover [role="tooltip"] {
    opacity: 1;
  }

  .tp-avatar {
    display: inline-grid;
    width: var(--tp-size-control);
    height: var(--tp-size-control);
    place-items: center;
    color: var(--tp-color-on-strong);
    border-radius: var(--radius-round);
    background: linear-gradient(
      135deg,
      var(--color-primary-600),
      var(--color-sky-400)
    );
    font-weight: 800;
  }

  .tp-catalogue-grid,
  .tp-card-grid,
  .tp-program-grid,
  .tp-dashboard-grid,
  .tp-membership-list,
  .tp-work-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: var(--space-16);
    align-items: start;
    margin-block: var(--space-20);
  }

  .tp-component-card,
  .tp-card,
  .tp-program-card,
  .tp-dashboard-widget,
  .tp-work-item,
  .tp-verification-card,
  .tp-membership-card {
    display: grid;
    gap: var(--space-12);
    align-content: start;
    min-width: 0;
  }

  .tp-component-card h2,
  .tp-card h2,
  .tp-card h3,
  .tp-program-card h3,
  .tp-dashboard-widget h3,
  .tp-dashboard-widget p,
  .tp-work-item h3,
  .tp-work-item p,
  .tp-membership-card h3,
  .tp-membership-card p {
    margin: 0;
  }

  .tp-component-sample {
    padding-block-start: var(--space-12);
    overflow-x: auto;
    border-top: var(--tp-border-width) solid var(--tp-color-border);
  }

  .tp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-16);
  }

  .tp-membership-workspace,
  .tp-document-workspace,
  .tp-legal-center,
  .tp-activation,
  .tp-program-catalog,
  .tp-program-registry,
  .tp-program-enrollment,
  .tp-program-enrollment-review,
  .tp-program-participation,
  .tp-verification-queue,
  .tp-support-workspace,
  .tp-task-workspace,
  .tp-task-calendar,
  .tp-dashboard,
  .tp-onboarding-workspace {
    display: grid;
    gap: var(--space-24);
  }

  .tp-membership-workspace > .tp-auth-panel,
  .tp-document-workspace > .tp-auth-panel,
  .tp-support-workspace > .tp-auth-panel {
    max-width: none;
    margin-block-start: 0;
  }

  .tp-membership-card {
    padding: var(--space-16);
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-md);
    background: var(--tp-color-surface-subtle);
  }

  .tp-dashboard__header {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-16);
    align-items: start;
    justify-content: space-between;
  }

  .tp-dashboard-widget,
  .tp-work-item {
    background: var(--tp-color-surface);
  }

  .tp-dashboard-widget[data-state="degraded"] {
    border-color: var(--tp-color-danger);
  }

  .tp-dashboard-widget__metric {
    color: var(--tp-color-text);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.035em;
  }

  .tp-work-queue,
  .tp-work-queue__list {
    display: grid;
    gap: var(--space-12);
  }

  .tp-work-queue__list,
  .tp-onboarding-requirements {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .tp-onboarding-requirements {
    display: grid;
    gap: var(--space-12);
  }

  .tp-onboarding-requirement {
    display: grid;
    gap: var(--space-8);
    padding: var(--space-16);
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-md);
    background: var(--tp-color-surface);
  }

  .tp-onboarding-requirement h2,
  .tp-onboarding-requirement h3,
  .tp-onboarding-requirement p {
    margin: 0;
  }

  .tp-onboarding-requirement--complete {
    border-left: var(--space-4) solid var(--tp-color-success);
  }

  .tp-onboarding-requirement--blocked {
    border-left: var(--space-4) solid var(--tp-color-danger);
  }

  .tp-onboarding-stepper ol {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .tp-onboarding-stepper a {
    display: block;
    padding: var(--space-12);
    border-bottom: 3px solid var(--tp-color-border);
    text-decoration: none;
  }

  .tp-onboarding-stepper a[aria-current="step"] {
    border-color: var(--tp-color-action);
    font-weight: 750;
  }

  .tp-program-form,
  .tp-membership-mutation {
    margin-block: var(--space-20);
    padding: var(--space-20);
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-md);
    background: var(--tp-color-surface-subtle);
  }

  .tp-program-history,
  .tp-legal-content {
    display: grid;
    gap: var(--space-8);
  }

  @keyframes tp-shimmer {
    to {
      background-position-x: -200%;
    }
  }

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

  @media (max-width: 75rem) {
    .tp-authenticated-shell {
      grid-template-columns: var(--layout-sidebarRail) minmax(0, 1fr);
    }

    .tp-shell-header--workspace {
      width: var(--layout-sidebarRail);
      padding-inline: var(--space-12);
      overflow-x: hidden;
    }

    .tp-shell-header--workspace .tp-brand {
      width: var(--space-48);
      overflow: hidden;
    }

    .tp-shell-header--workspace .tp-brand img {
      width: 11.5rem;
      max-width: none;
    }

    .tp-navigation-section__label,
    .tp-navigation-link {
      font-size: 0;
    }

    .tp-navigation-link {
      justify-content: center;
      padding-inline: var(--space-8);
    }

    .tp-navigation-link img {
      width: var(--space-24);
      height: var(--space-24);
    }

    .tp-shell-header--workspace .tp-shell-header__meta .tp-badge,
    .tp-shell-header--workspace .tp-menu {
      display: none;
    }
  }

  @media (max-width: 64rem) {
    .tp-auth-layout {
      grid-template-columns: 1fr 1fr;
    }

    .tp-trust-bar {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  @media (max-width: 48rem) {
    .tp-shell-header:not(.tp-shell-header--workspace) {
      flex-wrap: wrap;
      gap: var(--space-12);
      padding-block: var(--space-8);
    }

    .tp-button.tp-mobile-menu-button {
      display: inline-flex;
    }

    .tp-shell-header:not(.tp-shell-header--workspace) .tp-primary-navigation {
      display: none;
      width: 100%;
      flex-direction: column;
      order: 4;
    }

    .tp-shell-header:not(.tp-shell-header--workspace)
      .tp-primary-navigation.is-open {
      display: flex;
    }

    .tp-authenticated-shell {
      display: block;
    }

    .tp-shell-header--workspace {
      position: sticky;
      width: 100%;
      height: auto;
      padding: var(--space-8) var(--space-16);
      overflow: visible;
      flex-flow: row wrap;
      align-items: center;
      border-right: 0;
      border-bottom: var(--tp-border-width) solid var(--tp-color-border);
    }

    .tp-shell-header--workspace .tp-brand {
      width: 10rem;
    }

    .tp-shell-header--workspace .tp-brand img {
      width: 100%;
    }

    .tp-shell-header--workspace .tp-mobile-menu-button {
      display: inline-flex;
      margin-inline-start: auto;
    }

    .tp-shell-header--workspace .tp-primary-navigation {
      display: none;
      width: 100%;
      max-height: calc(100vh - var(--layout-topbar));
      padding: var(--space-12) 0;
      overflow-y: auto;
      order: 4;
    }

    .tp-shell-header--workspace .tp-primary-navigation.is-open {
      display: grid;
    }

    .tp-navigation-section__label {
      font-size: 0.6875rem;
    }

    .tp-navigation-link {
      justify-content: flex-start;
      font-size: var(--tp-text-sm);
    }

    .tp-shell-header--workspace .tp-shell-header__meta {
      display: none;
    }

    .tp-workspace-topbar {
      position: static;
    }

    .tp-workspace-context {
      display: none;
    }

    .tp-workspace-search {
      width: 100%;
    }

    .tp-auth-layout {
      grid-template-columns: 1fr;
      padding-top: var(--space-8);
    }

    .tp-lifecycle-list {
      grid-template-columns: 1fr 1fr;
    }

    .tp-trust-bar {
      grid-template-columns: 1fr 1fr;
    }

    .tp-page-actions-row,
    .tp-dashboard__header {
      flex-direction: column;
    }

    .tp-form-grid {
      grid-template-columns: 1fr;
    }

    .tp-table {
      display: block;
      overflow-x: auto;
    }

    .tp-dialog__actions {
      flex-direction: column-reverse;
    }

    .tp-dialog__actions .tp-button {
      width: 100%;
    }
  }

  @media (max-width: 30rem) {
    .tp-public-shell > main,
    .tp-public-shell > footer,
    .tp-auth-brand-bar,
    .tp-auth-layout,
    .tp-secure-note,
    .tp-workspace-frame > main {
      padding-inline: var(--space-16);
    }

    .tp-auth-layout__form,
    .tp-auth-lifecycle,
    .tp-identity-zone,
    .tp-system-state,
    .tp-protected-boundary,
    .tp-component-card,
    .tp-card {
      padding: var(--space-16);
    }

    .tp-auth-lifecycle h2 {
      overflow-wrap: anywhere;
      font-size: 1.75rem;
    }

    .tp-lifecycle-list,
    .tp-trust-bar,
    .tp-onboarding-stepper ol {
      grid-template-columns: 1fr;
    }

    .tp-auth-actions,
    .tp-actions,
    .tp-onboarding-actions {
      align-items: stretch;
      flex-direction: column;
    }

    .tp-auth-actions .tp-button,
    .tp-actions .tp-button,
    .tp-onboarding-actions .tp-button {
      width: 100%;
    }
  }

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

  @media (prefers-contrast: more) {
    :root {
      --tp-border-width: 2px;
      --tp-color-border: currentColor;
    }

    .tp-button,
    .tp-input,
    .tp-component-card {
      box-shadow: none;
    }
  }

  @media (forced-colors: active) {
    :focus-visible {
      outline-color: Highlight;
    }

    .tp-button,
    .tp-badge,
    .tp-alert,
    .tp-component-card {
      border-color: CanvasText;
      forced-color-adjust: auto;
    }
  }

  .tp-session-loading {
    display: grid;
    min-height: 100vh;
    place-items: center;
    color: var(--tp-color-text-muted);
    background: var(--tp-color-canvas);
    font-weight: 600;
  }

  .tp-authenticated-shell--gated {
    min-height: 100vh;
    overflow: hidden;
    background: var(--tp-color-canvas);
  }

  .tp-gate-header {
    position: fixed;
    z-index: 70;
    top: 0;
    right: 0;
    left: 0;
    display: grid;
    align-items: center;
    min-height: 4.5rem;
    padding: var(--space-12) clamp(var(--space-16), 4vw, var(--space-48));
    border-bottom: var(--tp-border-width) solid var(--tp-color-border);
    background: var(--tp-color-surface);
    grid-template-columns: 1fr auto auto;
    gap: var(--space-16);
  }

  .tp-gate-header > span {
    color: var(--tp-color-text-muted);
    font-size: var(--tp-text-sm);
    font-weight: 600;
  }

  .tp-gated-preview {
    display: grid;
    min-height: 100vh;
    padding-top: 4.5rem;
    opacity: 0.45;
    filter: blur(0.125rem);
    grid-template-columns: 15.5rem 1fr;
    pointer-events: none;
    user-select: none;
  }

  .tp-gated-preview__sidebar {
    padding: var(--space-24);
    background: var(--tp-color-brand);
  }

  .tp-gated-preview__content {
    display: grid;
    align-content: start;
    padding: clamp(var(--space-24), 5vw, var(--space-64));
    gap: var(--space-32);
  }

  .tp-gated-preview__title {
    display: grid;
    max-width: 48rem;
    gap: var(--space-12);
  }

  .tp-gated-preview__title span,
  .tp-gated-preview__cards span {
    display: block;
    min-height: 1rem;
    border-radius: var(--tp-radius-md);
    background: var(--tp-color-border);
  }

  .tp-gated-preview__title span:first-child {
    min-height: 2.5rem;
    background: var(--color-primary-50);
  }

  .tp-gated-preview__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-20);
  }

  .tp-gated-preview__cards span {
    min-height: 10rem;
    background: var(--tp-color-surface);
    box-shadow: var(--tp-shadow-1);
  }

  .tp-first-organization-overlay {
    position: fixed;
    z-index: 60;
    inset: 4.5rem 0 0;
    display: grid;
    overflow: auto;
    padding: clamp(var(--space-16), 4vw, var(--space-48));
    background: color-mix(in srgb, var(--tp-color-text) 36%, transparent);
    place-items: center;
  }

  .tp-first-organization-dialog {
    width: min(100%, 52rem);
    max-height: calc(100vh - 7.5rem);
    overflow: auto;
    padding: clamp(var(--space-24), 4vw, var(--space-40));
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--radius-xl);
    background: var(--tp-color-surface);
    box-shadow: var(--tp-shadow-2);
    outline: none;
  }

  .tp-first-organization-dialog__identity {
    margin: 0 0 var(--space-12);
    color: var(--tp-color-text-muted);
    font-size: var(--tp-text-sm);
  }

  .tp-first-organization {
    display: grid;
    gap: var(--space-16);
  }

  .tp-first-organization h2,
  .tp-first-organization p {
    margin-block: 0;
  }

  .tp-setup-progress {
    width: fit-content;
    padding: var(--space-8) var(--space-12);
    border-radius: var(--radius-round);
    color: var(--tp-color-brand);
    background: var(--color-primary-50);
    font-size: var(--tp-text-sm);
    font-weight: 600;
  }

  .tp-first-organization__feedback:empty {
    display: none;
  }

  .tp-first-organization__form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16) var(--space-20);
  }

  .tp-first-organization__form > .tp-field:nth-child(2),
  .tp-first-organization__form > .tp-field:nth-child(5),
  .tp-first-organization__submit {
    grid-column: 1 / -1;
  }

  .tp-first-organization__submit {
    width: 100%;
    margin-top: var(--space-8);
  }

  .tp-technical-details {
    margin-block: var(--space-12);
    padding: var(--space-12) var(--space-16);
    border: var(--tp-border-width) solid var(--tp-color-border);
    border-radius: var(--tp-radius-md);
    background: var(--tp-color-surface-subtle);
    color: var(--tp-color-text-muted);
    font-size: var(--tp-text-sm);
  }

  .tp-technical-details > summary {
    cursor: pointer;
    color: var(--tp-color-text);
    font-weight: 600;
  }

  .tp-technical-details dl {
    display: grid;
    grid-template-columns: minmax(9rem, auto) minmax(0, 1fr);
    gap: var(--space-8) var(--space-16);
    margin: var(--space-12) 0 0;
  }

  .tp-technical-details dt,
  .tp-technical-details dd {
    margin: 0;
  }

  .tp-technical-details code {
    overflow-wrap: anywhere;
  }

  @media (max-width: 48rem) {
    .tp-gate-header {
      grid-template-columns: 1fr auto;
    }

    .tp-gate-header > span {
      display: none;
    }

    .tp-gated-preview {
      grid-template-columns: 5rem 1fr;
    }

    .tp-first-organization-dialog {
      max-height: calc(100vh - 6rem);
      border-radius: var(--tp-radius-lg);
    }
  }

  @media (max-width: 40rem) {
    .tp-first-organization-overlay {
      padding: var(--space-12);
      place-items: start center;
    }

    .tp-first-organization__form {
      grid-template-columns: 1fr;
    }

    .tp-first-organization__form > .tp-field:nth-child(2),
    .tp-first-organization__form > .tp-field:nth-child(5),
    .tp-first-organization__submit {
      grid-column: auto;
    }
  }
}
