.profile-dashboard-shell,
.profile-page {
  width: 100%;
  min-width: 0;
}

.profile-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  min-width: 0;
}

.profile-page-head h1 {
  margin: 0;
}

.profile-page-lead {
  max-width: 680px;
  margin: 6px 0 0;
  color: var(--muted);
}

.profile-route-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 999px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--accent) 13%, var(--panel));
  color: color-mix(in srgb, var(--accent) 36%, var(--text));
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.profile-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.profile-tabs a.is-active {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
  background: color-mix(in srgb, var(--accent) 18%, var(--panel));
  box-shadow: inset 3px 0 0 var(--accent);
}

.profile-panel {
  padding: clamp(16px, 2vw, 22px);
}

.profile-section-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.profile-overview-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.profile-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.profile-overview-card {
  --profile-card-accent: color-mix(in srgb, var(--accent) 84%, var(--muted));
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--profile-card-accent) 9%, var(--line));
  padding: 14px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--profile-card-accent) 2%, var(--panel)), var(--panel));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--canvas) 20%, transparent);
}

.profile-overview-card--span-2 {
  grid-column: span 2;
}

.profile-overview-card-head {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}

.profile-overview-card-head > div {
  min-width: 0;
}

.profile-overview-card-head-action {
  flex: 0 0 auto;
  min-height: 32px;
  margin-left: auto;
  padding: 6px 10px;
  font-size: 11px;
}

.profile-overview-card-head h2,
.profile-overview-card-head p {
  margin: 0;
}

.profile-overview-card-head h2 {
  font-size: 17px;
}

.profile-overview-card-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.profile-overview-card-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--profile-card-accent) 10%, transparent);
  color: var(--profile-card-accent);
}

.profile-overview-card-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.profile-overview-account {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.profile-overview-account .profile-avatar {
  width: 58px;
  height: 58px;
}

.profile-overview-account .profile-identity h3,
.profile-overview-account .profile-identity p {
  margin: 0;
}

.profile-overview-account .profile-identity h3 {
  overflow-wrap: anywhere;
  font-size: 20px;
}

.profile-overview-account .profile-identity > p:last-child {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.profile-overview-account-meta {
  grid-column: 2;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-overview-account-meta span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.profile-overview-account-meta strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.profile-overview-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.profile-overview-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-overview-card--status .profile-overview-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-overview-metrics .profile-metric {
  gap: 2px;
  border-radius: var(--radius-sm, 8px);
  padding: 9px 10px;
  background: color-mix(in srgb, var(--soft-panel) 88%, transparent);
}

.profile-overview-metrics .profile-metric span,
.profile-overview-metrics .profile-metric small {
  font-size: 10px;
}

.profile-overview-metrics .profile-metric strong {
  font-size: 17px;
}

.profile-overview-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
}

.profile-overview-fact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 0;
  padding: 7px 2px;
  background: transparent;
}

.profile-overview-fact.is-wide {
  grid-column: 1 / -1;
}

.profile-overview-fact span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.profile-overview-fact strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  text-align: right;
}

.profile-overview-card .profile-subsection {
  gap: 5px;
}

.profile-overview-card .profile-chip-list {
  gap: 4px;
}

.profile-overview-card .profile-chip-list span {
  border-color: var(--line);
  padding: 3px 7px;
  background: color-mix(in srgb, var(--soft-panel) 82%, transparent);
  color: color-mix(in srgb, var(--text) 84%, var(--muted));
  font-size: 10px;
}

.profile-overview-module-disclosure {
  min-width: 0;
}

.profile-overview-module-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 8px);
  padding: 7px 10px;
  background: color-mix(in srgb, var(--soft-panel) 78%, transparent);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.profile-overview-module-disclosure summary::-webkit-details-marker {
  display: none;
}

.profile-overview-module-disclosure summary span:last-child {
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  transition: transform .16s ease;
}

.profile-overview-module-disclosure[open] summary span:last-child {
  transform: rotate(90deg);
}

.profile-overview-module-disclosure > div {
  padding-top: 7px;
}

.profile-overview-access-action {
  align-self: end;
  width: fit-content;
  min-height: 32px;
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  padding-block: 6px;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
  color: var(--text);
}

.profile-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  padding: clamp(18px, 3vw, 28px);
  background:
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 94%, var(--accent)), var(--panel));
}

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

.profile-eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.profile-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line));
  border-radius: var(--radius);
  padding: 8px 12px;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
}

.profile-action-link:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 19%, var(--panel));
}

.profile-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, var(--muted));
  border-radius: 999px;
  padding: 5px 10px;
  background: color-mix(in srgb, var(--line) 20%, var(--panel));
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.profile-status.is-active {
  border-color: color-mix(in srgb, var(--green) 55%, var(--line));
  background: color-mix(in srgb, var(--green) 12%, var(--panel));
  color: color-mix(in srgb, var(--green) 72%, var(--text));
}

.profile-overview-card--account .profile-status.is-active {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
  color: color-mix(in srgb, var(--accent) 52%, var(--text));
}

.profile-status.is-password_change_required,
.profile-status.is-pending_email_verification {
  border-color: color-mix(in srgb, var(--yellow) 58%, var(--line));
  background: color-mix(in srgb, var(--yellow) 12%, var(--panel));
  color: color-mix(in srgb, var(--yellow) 72%, var(--text));
}

.profile-status.is-blocked,
.profile-status.is-deleted {
  border-color: color-mix(in srgb, var(--red) 58%, var(--line));
  background: color-mix(in srgb, var(--red) 12%, var(--panel));
  color: color-mix(in srgb, var(--red) 72%, var(--text));
}

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  min-width: 0;
}

.profile-metric {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 14px);
  padding: 14px;
  background: var(--panel);
}

.profile-metric span,
.profile-metric small {
  color: var(--muted);
}

.profile-metric span {
  font-size: 12px;
  font-weight: 850;
}

.profile-metric strong {
  overflow-wrap: anywhere;
  font-size: clamp(17px, 2vw, 22px);
}

.profile-metric small {
  font-size: 11px;
}

.profile-metric.is-success {
  border-color: color-mix(in srgb, var(--green) 48%, var(--line));
  background: color-mix(in srgb, var(--green) 7%, var(--panel));
}

.profile-overview-card--status .profile-metric.is-success {
  border-color: var(--line);
  background: color-mix(in srgb, var(--soft-panel) 88%, transparent);
}

.profile-overview-card--status .profile-metric.is-success strong {
  color: color-mix(in srgb, var(--green) 54%, var(--text));
}

.profile-metric.is-warning {
  border-color: color-mix(in srgb, var(--yellow) 48%, var(--line));
  background: color-mix(in srgb, var(--yellow) 7%, var(--panel));
}

.profile-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.profile-security-overview {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.profile-security-row-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-inline: 2px;
}

.profile-security-row-head h2,
.profile-security-row-head p {
  margin: 0;
}

.profile-security-row-head h2 {
  font-size: 18px;
}

.profile-security-row-head > p {
  color: var(--muted);
  font-size: 11px;
}

.profile-security-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 8px;
  min-width: 0;
}

.profile-security-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: color-mix(in srgb, var(--soft-panel) 28%, var(--panel));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--canvas) 16%, transparent);
  color: var(--text);
  text-align: left;
}

.profile-security-card:hover,
.profile-security-card:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

.profile-security-menu-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: color-mix(in srgb, var(--accent) 78%, var(--muted));
}

.profile-security-menu-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.profile-security-menu-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-security-menu-copy strong,
.profile-security-menu-copy small {
  overflow-wrap: anywhere;
}

.profile-security-menu-copy strong {
  color: var(--text);
  font-size: 14px;
}

.profile-security-menu-copy small {
  color: var(--muted);
  font-size: 12px;
}

.profile-security-menu-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.profile-security-menu-status.is-success {
  border-color: color-mix(in srgb, var(--green) 52%, var(--line));
  background: color-mix(in srgb, var(--green) 6%, var(--panel));
  color: color-mix(in srgb, var(--green) 58%, var(--text));
}

.profile-security-menu-status.is-warning {
  border-color: color-mix(in srgb, var(--yellow) 38%, var(--line));
  background: color-mix(in srgb, var(--yellow) 5%, var(--panel));
  color: color-mix(in srgb, var(--yellow) 58%, var(--text));
}

.profile-security-menu-chevron {
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.profile-security-modal-form {
  min-width: 0;
}

.profile-security-modal {
  display: grid;
  gap: 16px;
  width: min(620px, 100%);
  min-width: 0;
}

.profile-personal-edit-modal {
  display: grid;
  gap: 16px;
  width: min(520px, 100%);
  min-width: 0;
}

.profile-personal-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.profile-personal-edit-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.profile-personal-edit-grid label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.profile-personal-edit-actions {
  justify-content: flex-end;
}

.profile-security-modal--wide {
  width: min(1120px, 100%);
}

#siteModalHost #modal:has(.profile-security-modal--wide) {
  width: min(1120px, calc(100dvw - 48px));
}

.profile-security-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.profile-security-modal-head h2,
.profile-security-modal-head p {
  margin: 0;
}

.profile-security-modal-head p {
  margin-top: 4px;
  color: var(--muted);
}

.profile-security-modal-close {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.profile-security-modal-body,
.profile-security-action-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.profile-security-modal-toolbar {
  min-height: 0;
}

.profile-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.profile-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 22%, var(--panel));
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
}

.profile-panel-title h2,
.profile-panel-head h2 {
  margin: 0;
}

.profile-panel-title p,
.profile-panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.profile-panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-panel-title-row button {
  flex: 0 0 auto;
}

.profile-subsection {
  display: grid;
  gap: 8px;
}

.profile-subsection h3 {
  margin: 0;
  font-size: 13px;
}

.profile-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-chip-list span {
  display: inline-flex;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 999px;
  padding: 5px 9px;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.profile-empty-inline {
  margin: 0;
  color: var(--muted);
}

.profile-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  min-width: 0;
}

.profile-setting-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.profile-setting-field select {
  width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: var(--control-bg);
  color: var(--text);
  font: inherit;
}

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

.profile-theme-choice {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 14px);
  padding: 12px;
  background: var(--soft-panel);
  cursor: pointer;
}

.profile-theme-choice:has(input:focus-visible) {
  outline: none;
  box-shadow: var(--focus-ring);
}

.profile-theme-choice.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

.profile-theme-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.profile-theme-choice small {
  color: var(--muted);
}

.profile-theme-preview {
  --profile-theme-preview-canvas: var(--theme-preview-dark-canvas);
  --profile-theme-preview-line: var(--theme-preview-dark-line);
  --profile-theme-preview-sidebar: var(--theme-preview-dark-sidebar);
  --profile-theme-preview-accent: var(--theme-preview-dark-accent);
  --profile-theme-preview-muted: var(--theme-preview-dark-muted);
  display: grid;
  grid-template-columns: 28% 1fr;
  grid-template-rows: 22px 22px;
  gap: 6px;
  min-height: 66px;
  border: 1px solid var(--profile-theme-preview-line);
  border-radius: 8px;
  padding: 8px;
  background: var(--profile-theme-preview-canvas);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--profile-theme-preview-line) 24%, transparent);
}

.profile-theme-preview.is-light {
  --profile-theme-preview-canvas: var(--theme-preview-light-canvas);
  --profile-theme-preview-line: var(--theme-preview-light-line);
  --profile-theme-preview-sidebar: var(--theme-preview-light-sidebar);
  --profile-theme-preview-accent: var(--theme-preview-light-accent);
  --profile-theme-preview-muted: var(--theme-preview-light-muted);
}

.profile-theme-preview.is-auto {
  background: linear-gradient(
    110deg,
    var(--theme-preview-light-canvas) 0 50%,
    var(--theme-preview-dark-canvas) 50% 100%
  );
}

.profile-theme-preview i {
  display: block;
  border-radius: 4px;
  background: var(--profile-theme-preview-accent);
}

.profile-theme-preview i:first-child {
  grid-row: 1 / 3;
  background: var(--profile-theme-preview-sidebar);
}

.profile-theme-preview i:last-child {
  background: var(--profile-theme-preview-muted);
}

.profile-theme-preview.is-auto i:first-child {
  background: linear-gradient(
    110deg,
    var(--theme-preview-light-sidebar) 0 50%,
    var(--theme-preview-dark-sidebar) 50% 100%
  );
}

.profile-theme-preview.is-auto i:nth-child(2) {
  background: linear-gradient(
    110deg,
    var(--theme-preview-light-accent) 0 50%,
    var(--theme-preview-dark-accent) 50% 100%
  );
}

.profile-theme-preview.is-auto i:last-child {
  background: linear-gradient(
    110deg,
    var(--theme-preview-light-muted) 0 50%,
    var(--theme-preview-dark-muted) 50% 100%
  );
}

.profile-setting-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
}

.profile-setting-summary strong {
  color: var(--text);
}

.profile-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.profile-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.profile-switch i {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft-panel);
  transition: border-color .18s ease, background .18s ease;
}

.profile-switch i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  content: "";
  transition: transform .18s ease, background .18s ease;
}

.profile-switch input:focus-visible + i {
  box-shadow: var(--focus-ring);
}

.profile-switch input:checked + i {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 24%, var(--panel));
}

.profile-switch input:checked + i::after {
  background: var(--accent);
  transform: translateX(18px);
}

.profile-notification-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  transition: opacity .18s ease;
}

.profile-notification-grid.is-disabled {
  opacity: .55;
}

.profile-notification-choice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--soft-panel);
  cursor: pointer;
}

.profile-notification-choice:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
}

.profile-notification-choice input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.profile-notification-choice span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profile-notification-choice strong,
.profile-notification-choice small {
  overflow-wrap: anywhere;
}

.profile-notification-choice small,
.profile-settings-hint {
  color: var(--muted);
  font-size: 11px;
}

.profile-settings-hint {
  margin: 0;
}

.profile-note-panel {
  background: color-mix(in srgb, var(--accent) 4%, var(--panel));
}

.profile-kv {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 8px 12px;
  min-width: 0;
}

.profile-kv span {
  color: var(--muted);
}

.profile-kv strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-inline-alert {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--panel);
}

.profile-inline-alert.is-warning {
  border-color: color-mix(in srgb, var(--yellow) 52%, var(--line));
  background: color-mix(in srgb, var(--yellow) 9%, var(--panel));
}

.profile-inline-alert.is-success {
  border-color: color-mix(in srgb, var(--green) 52%, var(--line));
  background: color-mix(in srgb, var(--green) 9%, var(--panel));
}

.profile-inline-alert.is-error {
  border-color: color-mix(in srgb, var(--red) 52%, var(--line));
  background: color-mix(in srgb, var(--red) 9%, var(--panel));
}

.profile-password-form {
  display: grid;
  gap: 12px;
}

.profile-password-form > label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.profile-password-label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.profile-required-mark {
  color: var(--red);
}

.profile-password-info {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

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

.profile-password-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 26px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.profile-password-rules li.is-valid {
  color: var(--green);
}

@media (max-width: 340px) {
  .profile-password-rules {
    grid-template-columns: minmax(0, 1fr);
  }
}

.profile-form-message {
  min-height: 20px;
  color: var(--green);
  font-size: 13px;
}

.profile-form-message.is-error {
  color: var(--red);
}

.profile-session-list {
  display: grid;
  min-width: 0;
  border-block: 1px solid var(--line);
}

.profile-session-overview,
.profile-session-group {
  display: grid;
  min-width: 0;
}

.profile-session-overview {
  gap: 12px;
  max-height: calc(100dvh - 300px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.profile-session-group {
  gap: 8px;
}

.profile-session-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-session-group-title h3 {
  margin: 0;
  font-size: 15px;
}

.profile-session-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.profile-device-list {
  display: grid;
  min-width: 0;
  border-block: 1px solid var(--line);
}

.profile-device-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(250px, 0.9fr) auto minmax(150px, auto);
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 12px 10px;
}

.profile-device-row + .profile-device-row {
  border-top: 1px solid var(--line);
}

.profile-device-row.is-current {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.profile-device-main,
.profile-device-meta div {
  min-width: 0;
}

.profile-device-main p {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
}

.profile-device-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.profile-device-meta dt {
  color: var(--muted);
  font-size: 10px;
}

.profile-device-meta dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 750;
}

.profile-device-action {
  min-width: 0;
  justify-self: end;
}

.profile-device-action button {
  white-space: nowrap;
}

.profile-session-row {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.5fr) 76px 192px;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 12px 10px;
}

.profile-session-row.is-history {
  grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.8fr) auto;
}

.profile-session-row + .profile-session-row {
  border-top: 1px solid var(--line);
}

.profile-session-row.is-current {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.profile-session-main,
.profile-session-meta div {
  min-width: 0;
}

.profile-session-main p {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
}

.profile-session-status {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.profile-session-status.is-active {
  border-color: color-mix(in srgb, var(--green) 52%, var(--line));
  color: var(--green);
}

.profile-session-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.profile-session-row.is-history .profile-session-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-session-meta dt {
  color: var(--muted);
  font-size: 10px;
}

.profile-session-meta dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 750;
}

.profile-session-action {
  width: 192px;
  min-width: 0;
  justify-self: end;
}

.profile-session-action button {
  white-space: nowrap;
}

.profile-session-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.profile-mfa-setup,
.profile-mfa-backup {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-subtle, var(--panel));
}

.profile-mfa-setup p,
.profile-mfa-backup strong {
  margin: 0;
}

.profile-mfa-enrollment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.profile-mfa-qr {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin: 0;
}

.profile-mfa-qr svg {
  display: block;
  width: 184px;
  height: 184px;
  max-width: 100%;
  border: 8px solid var(--on-accent);
  border-radius: 10px;
  background: var(--on-accent);
}

.profile-mfa-qr figcaption,
.profile-mfa-secret > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.profile-mfa-secret {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.profile-mfa-setup code,
.profile-mfa-backup code {
  display: block;
  padding: 10px;
  border-radius: var(--radius-sm, 8px);
  background: var(--control-bg);
  color: var(--text);
  font: 700 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (max-width: 1000px) {
  .profile-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-overview-card--account,
  .profile-overview-card--status {
    grid-column: 1 / -1;
  }

  .profile-overview-card--status .profile-overview-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .profile-content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

}

@media (max-width: 720px) {
  .profile-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-overview-card--span-2 {
    grid-column: auto;
  }

  .profile-overview-card--status .profile-overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-overview-account {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-overview-account .profile-overview-actions {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .profile-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-tabs a {
    flex: 1 1 140px;
  }

  .profile-hero,
  .profile-hero-actions,
  .profile-overview-actions,
  .profile-panel-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-hero-actions,
  .profile-overview-actions {
    justify-content: flex-start;
  }

  .profile-action-link,
  .profile-panel-title-row button {
    width: 100%;
  }

  .profile-theme-grid,
  .profile-notification-grid,
  .profile-mfa-enrollment {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-security-row-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .profile-security-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .profile-security-menu-status {
    grid-column: 2;
    justify-self: start;
  }

  .profile-security-menu-chevron {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .profile-security-modal-head {
    gap: 10px;
  }

  .profile-personal-edit-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-personal-edit-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-personal-edit-actions button {
    width: 100%;
  }

  .profile-device-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .profile-session-row,
  .profile-session-row.is-history {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .profile-session-meta,
  .profile-session-row.is-history .profile-session-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-session-meta,
  .profile-session-action {
    grid-column: 1 / -1;
  }

  .profile-session-action {
    justify-self: start;
  }

  .profile-session-row > .profile-session-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .profile-session-overview {
    max-height: calc(100dvh - 360px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .profile-device-meta,
  .profile-device-action {
    grid-column: 1 / -1;
  }

  .profile-device-list {
    max-height: calc(100dvh - 200px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .profile-device-action {
    justify-self: start;
  }

  .profile-kv {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .profile-overview-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-overview-fact.is-wide {
    grid-column: auto;
  }

  .profile-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

}
