/* Mythox - Two-factor (MFA) styles · Brand OS skin */
/* Settings is a compact identity band plus two-level section navigation. */
/* 2026-06-11: retokenized off the fixed dark palette so the 2FA card + login
   challenge follow light mode (tokens resolve dark/light automatically). The
   QR quiet-zone stays #fff (scanner requirement). */
.mfa-wrap { width: 100%; max-width: none; padding: 18px 0 56px; }
.set-levels { overflow-x: clip; }
.set-levels,
.set-levels * { box-sizing: border-box; }
.set-identity,
.set-identity-rule,
.set-list,
.set-level-detail { width: min(760px, calc(100% - 48px)); margin-left: auto; margin-right: auto; }
.set-level[hidden],
.set-detail[hidden] { display: none !important; }
.set-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 8px 26px;
}
.set-photo { flex: 0 0 auto; }
.set-photo-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  display: grid;
  grid-template-columns: 58px;
  gap: 7px;
  justify-items: center;
  padding: 0;
  cursor: pointer;
  text-align: center;
}
.set-avatar {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 800;
  background-size: cover;
  background-position: center;
}
.set-photo-action {
  font-size: 11.5px;
  line-height: 1.15;
  color: var(--muted);
}
.set-photo-btn:hover .set-photo-action,
.set-photo-btn:focus-visible .set-photo-action { color: var(--text, var(--ivory)); }
.set-photo-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 16px;
}
.set-identity-copy {
  flex: 1;
  min-width: 0;
}
.set-identity-name {
  color: var(--text, var(--ivory));
  font-size: 18px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.set-identity-email {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.set-plan-pill { flex: 0 0 auto; }
.set-identity-rule { border-top: 1px solid var(--border, var(--line)); }
.set-list { margin-top: 28px; }
.set-group-label {
  margin: 30px 12px 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.set-group-label:first-child { margin-top: 0; }
.set-item {
  border-bottom: 1px solid var(--border, var(--line));
}
.set-row-nav {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 12px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .18s var(--ease), color .18s var(--ease);
}
.set-row-nav:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}
.set-row-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.set-row-title {
  color: var(--text, var(--ivory));
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}
.set-row-desc {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.set-chevron {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  transition: transform .18s var(--ease), color .18s var(--ease);
}
.set-row-nav:hover,
.set-row-nav:focus-visible { transform: translateY(-1px); }
.set-row-nav:hover .set-row-title,
.set-row-nav:focus-visible .set-row-title { color: var(--accent); }
.set-row-nav:hover .set-chevron,
.set-row-nav:focus-visible .set-chevron { color: var(--accent); transform: translateX(2px); }
.set-detail-top {
  padding: 4px 0 22px;
}
.set-back {
  appearance: none;
  border: 1px solid var(--border, var(--line));
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 750;
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.set-back:hover,
.set-back:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--surface-2);
  outline: none;
  transform: translateY(-1px);
}
.set-back-chevron {
  font-size: 20px;
  line-height: 1;
}
.set-detail-title {
  margin: 0;
  color: var(--text, var(--ivory));
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 650;
  line-height: 1.12;
}
.set-detail-title:focus {
  outline: none;
}
.set-detail-title:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
}
.set-detail-intro {
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 62ch;
}
.set-detail-body {
  display: grid;
  gap: 20px;
  padding: 0 0 30px;
}
.set-detail-body .card.mfa-card {
  margin: 0;
  padding: 22px 24px 24px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}
.set-detail-body .set-feature + .set-feature {
  margin-top: 0;
  padding-top: 24px;
  border-top: 1px solid var(--border, var(--line));
}
.set-detail-body #bill-card .bill-byo { display: none; }
.set-detail-body .mfa-rowhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.set-detail-body .mfa-rowhead + .muted,
.set-detail-body .mfa-rowhead + .mfa-explain {
  margin-top: 0 !important;
}
.set-detail-body .mfa-actions { margin-top: 18px; }
.set-detail-body #bill-body {
  margin-top: 0 !important;
}
.set-detail-body #bill-card .bill-meter {
  margin: 2px 0 24px;
}
.set-detail-body #bill-card .bill-cycle {
  margin: 0 0 18px;
}
.set-detail-body #bill-card .bill-grid {
  margin-top: 0;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.set-detail-body #bill-card .bill-card {
  min-width: 0;
}
.set-detail-body #bill-card #bill-credits-table,
.set-detail-body #bill-card #bill-transparency,
.set-detail-body #bill-card .bill-activity,
.set-detail-body #bill-card .bill-limits,
.set-detail-body #bill-card #bill-note-wrap,
.set-detail-body .bill-buy-body {
  margin-top: 24px;
}
.set-detail-body #bill-card .bill-note {
  margin: 0;
}
.set-detail-body #bill-card .bill-credits-buy {
  padding: 24px;
  border: 1px solid var(--border, var(--line));
  border-radius: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface, #0e1112) 94%, var(--accent, #C6FF3F) 6%), var(--surface, #0e1112));
}
.set-detail-body #bill-card .bill-credit-head {
  margin-bottom: 16px;
}
.set-detail-body #bill-card .bill-credit-head h3 {
  margin: 0 0 6px;
  font-size: 15px;
  letter-spacing: 0;
}
.set-detail-body #bill-card .bill-credit-head p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
}
.set-detail-body #bill-card .bill-credit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.set-detail-body #bill-card .bill-credit-box {
  min-width: 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2, #141819) 82%, transparent);
}
.set-detail-body #bill-card .bill-credit-box-title {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.set-detail-body #bill-card .bill-credit-table {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
}
.set-detail-body #bill-card .bill-credit-table table {
  margin: 0;
}
.set-detail-body #bill-card .bill-credit-num,
.set-detail-body #bill-card .bill-credit-table td:last-child {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.set-detail-body #conn-hosts {
  display: grid;
  gap: 18px;
  margin-top: 14px;
}
.set-detail-body #typed-memory-card {
  margin-top: 22px !important;
  padding-top: 22px !important;
}
.set-item-danger { border-bottom-color: color-mix(in srgb, var(--red, #ef4444) 34%, var(--border, var(--line))); }
.set-item-danger .set-row-title { color: var(--red, #ef4444); }
.set-item-danger .set-chevron { color: var(--red, #ef4444); }
.set-item-danger .set-row-nav:hover .set-row-title,
.set-item-danger .set-row-nav:focus-visible .set-row-title,
.set-item-danger .set-row-nav:hover .set-chevron,
.set-item-danger .set-row-nav:focus-visible .set-chevron,
.set-detail-danger .set-detail-title { color: var(--red, #ef4444); }
.set-anim { will-change: transform, opacity; }
.set-enter-right { transform: translateX(24px); opacity: 0; }
.set-enter-left { transform: translateX(-24px); opacity: 0; }
.set-enter-active {
  transform: translateX(0);
  opacity: 1;
  transition: transform 220ms cubic-bezier(.2,.7,.2,1), opacity 220ms cubic-bezier(.2,.7,.2,1);
}
@media (prefers-reduced-motion: reduce) {
  .set-anim,
  .set-enter-active { transition: none; }
}
.mfa-h1 { font-family: var(--font-display); font-weight: 600; font-size: 30px; margin: 0 0 18px; }
.mfa-card { margin-bottom: 18px; }
.mfa-loading { padding: 6px 0; }

.mfa-status-head,
.mfa-enroll-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.mfa-enroll-head { display: block; }
.mfa-kicker {
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.mfa-title {
  margin: 0;
  color: var(--text, var(--ivory));
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.2;
}
.mfa-explain {
  margin: 12px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.mfa-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }

.mfa-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.mfa-pill-lg { min-height: 30px; padding: 6px 13px; }
.mfa-pill.on  { color: var(--green); background: color-mix(in srgb, var(--green) 13%, transparent); border: 1px solid color-mix(in srgb, var(--green) 34%, transparent); }
.mfa-pill.off { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line-2); }

.mfa-method-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.mfa-method-tile {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: linear-gradient(180deg, var(--surface), var(--surface-grad-2));
  border: 1px solid var(--line);
  border-radius: 18px;
}
.mfa-method-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  border-radius: 14px;
}
.mfa-method-icon svg { width: 23px; height: 23px; }
.mfa-method-copy { min-width: 0; }
.mfa-method-label {
  color: var(--text, var(--ivory));
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
}
.mfa-method-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12.8px;
  line-height: 1.45;
}
.mfa-method-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.mfa-method-status {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.mfa-method-status.on { color: var(--green); }

.mfa-step-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.mfa-step-final { border-bottom: 0; padding-bottom: 0; }
.mfa-step-num {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: var(--gold-soft);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}
.mfa-step-body h4 {
  margin: 2px 0 6px;
  color: var(--text, var(--ivory));
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
}
.mfa-step-body p {
  margin: 0;
  color: var(--muted);
  font-size: 12.8px;
  line-height: 1.5;
}
.mfa-scan-grid {
  display: grid;
  grid-template-columns: minmax(174px, 218px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}
.mfa-guided-setup .mfa-scan-grid {
  grid-template-columns: 1fr;
  align-items: start;
}
.mfa-guided-setup .mfa-qr-frame {
  margin: 0 auto;
}
.mfa-guided-setup .mfa-codeBoxes {
  width: min(100%, 348px);
}
.mfa-qr-frame {
  width: max-content;
  max-width: 100%;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.mfa-qrbox {
  display: inline-block;
  background: #fff;
  padding: 14px;
  border-radius: 14px;
  line-height: 0;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 7%, transparent);
}
.mfa-qr { width: 188px; height: 188px; display: block; }
.mfa-manual { min-width: 0; }
.mfa-manual-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.mfa-secret-chip {
  display: flex;
  align-items: stretch;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.mfa-secret-chip code {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  color: var(--text, var(--ivory));
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.mfa-copy-btn {
  appearance: none;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 0 12px;
  text-transform: uppercase;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.mfa-copy-btn:hover,
.mfa-copy-btn:focus-visible {
  color: var(--accent);
  background: var(--gold-soft);
  outline: none;
}

.mfa-codeBoxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 348px);
  margin-top: 14px;
}
.mfa-code-digit {
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0;
  text-align: center;
  color: var(--text, var(--ivory)) !important;
  background: var(--surface) !important;
  border: 1px solid var(--line-2) !important;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 54px;
  caret-color: var(--accent);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.mfa-code-digit:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--gold-soft);
  background: var(--surface-2) !important;
}
.mfa-codeRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}
.mfa-msg { margin-top: 12px; font-size: 13.5px; line-height: 1.45; min-height: 1px; color: var(--muted); }
.mfa-msg.err { color: var(--red); }

/* full-screen login challenge */
.mfa-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(14px);
}
.mfa-challenge {
  width: min(100%, 430px);
  background: linear-gradient(180deg, var(--surface), var(--surface-grad-2));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 24px 70px color-mix(in srgb, var(--ink) 72%, transparent);
}
.mfa-challenge-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  color: var(--accent);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}
.mfa-challenge h2 {
  margin: 0 0 8px;
  color: var(--text, var(--ivory));
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 24px;
  line-height: 1.15;
}
.mfa-challenge .muted {
  max-width: 34ch;
  margin: 0 auto;
  font-size: 13.5px;
  line-height: 1.55;
}
.mfa-challenge-code { margin: 20px auto 16px; }
.mfa-challenge #mfa-ch-verify { width: 100%; }
.mfa-signout {
  display: inline-block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
}
.mfa-signout:hover,
.mfa-signout:focus-visible {
  color: var(--ivory);
  outline: none;
  border-bottom-color: var(--accent);
}

.trust-panel {
  display: grid;
  gap: 18px;
}
.trust-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border, var(--line));
}
.trust-kicker {
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.trust-head h3,
.trust-controls h4,
.trust-session h4,
.trust-claim h4 {
  margin: 0;
  color: var(--text, var(--ivory));
}
.trust-head h3 {
  font-size: 19px;
  line-height: 1.2;
}
.trust-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.trust-claims {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border, var(--line));
}
.trust-claim {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border, var(--line));
}
.trust-num {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border, var(--line));
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}
.trust-claim h4,
.trust-controls h4,
.trust-session h4 {
  font-size: 13.5px;
  line-height: 1.25;
}
.trust-claim p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.trust-controls {
  display: grid;
  gap: 10px;
}
.trust-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.trust-control-row .btn {
  font-size: 12.5px;
  padding: 8px 11px;
}
.trust-session {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--border, var(--line));
  border-bottom: 1px solid var(--border, var(--line));
  flex-wrap: wrap;
}
.trust-session-main {
  flex: 1 1 250px;
  min-width: 0;
}
.trust-session dl {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
}
.trust-session dl div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
}
.trust-session dt {
  color: var(--muted);
  font-size: 12px;
}
.trust-session dd {
  margin: 0;
  color: var(--text, var(--ivory));
  font-size: 12.5px;
  overflow-wrap: anywhere;
}
.trust-signout {
  flex: 0 0 auto;
  font-size: 12.5px;
}
.trust-error {
  margin: 10px 0 0;
  color: var(--red, #ef4444);
  font-size: 12.5px;
}
.trust-contact {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.trust-contact strong {
  color: var(--text, var(--ivory));
  font-size: 13px;
}
.trust-contact a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.trust-contact a:hover { color: var(--text, var(--ivory)); }

/* Light-mode pass: these selectors beat the broad late redesign overlay while
   keeping the dark default token rendering untouched. */
html[data-mode="light"] .set-avatar,
html[data-mode="light"] .mfa-method-icon,
html[data-mode="light"] .mfa-step-num,
html[data-mode="light"] .mfa-challenge-mark,
html[data-mode="light"] .trust-num {
  background: var(--gold-soft) !important;
  border-color: var(--gold-line) !important;
  color: var(--accent) !important;
}
html[data-mode="light"] .set-identity-rule,
html[data-mode="light"] .set-item,
html[data-mode="light"] .set-detail-body .set-feature + .set-feature,
html[data-mode="light"] .mfa-status-head,
html[data-mode="light"] .mfa-enroll-head,
html[data-mode="light"] .mfa-step-card,
html[data-mode="light"] .trust-head,
html[data-mode="light"] .trust-claims,
html[data-mode="light"] .trust-claim,
html[data-mode="light"] .trust-session {
  border-color: var(--border, var(--line)) !important;
}
html[data-mode="light"] .set-detail-body .card.mfa-card {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-mode="light"] .mfa-method-tile,
html[data-mode="light"] .mfa-qr-frame,
html[data-mode="light"] .mfa-secret-chip {
  background: var(--surface) !important;
  background-image: none !important;
  border-color: var(--border, var(--line)) !important;
  box-shadow: none !important;
}
html[data-mode="light"] .mfa-copy-btn {
  background: var(--surface-2) !important;
  color: var(--muted) !important;
  border-color: var(--border, var(--line)) !important;
}
html[data-mode="light"] .mfa-copy-btn:hover,
html[data-mode="light"] .mfa-copy-btn:focus-visible {
  background: var(--gold-soft) !important;
  color: var(--accent) !important;
}
html[data-mode="light"] .mfa-code-digit {
  background: var(--surface) !important;
  border-color: var(--border, var(--line)) !important;
  color: var(--text, var(--ivory)) !important;
}
html[data-mode="light"] .mfa-code-digit:focus {
  background: var(--surface-2) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--gold-soft) !important;
}
html[data-mode="light"] .mfa-overlay {
  background: color-mix(in srgb, var(--bg) 72%, transparent) !important;
}
html[data-mode="light"] .mfa-challenge {
  background: var(--surface) !important;
  background-image: none !important;
  border-color: var(--border, var(--line)) !important;
  box-shadow: 0 24px 70px color-mix(in srgb, var(--text) 10%, transparent) !important;
}
html[data-mode="light"] .mfa-pill.off {
  background: var(--surface-2) !important;
  border-color: var(--border, var(--line)) !important;
  color: var(--muted) !important;
}
html[data-mode="light"] .mfa-pill.on {
  background: color-mix(in srgb, var(--green) 12%, transparent) !important;
  border-color: color-mix(in srgb, var(--green) 30%, transparent) !important;
  color: var(--green) !important;
}
html[data-mode="light"] .set-group-label,
html[data-mode="light"] .set-photo-action,
html[data-mode="light"] .set-identity-email,
html[data-mode="light"] .set-row-desc,
html[data-mode="light"] .set-chevron,
html[data-mode="light"] .set-back,
html[data-mode="light"] .set-detail-intro,
html[data-mode="light"] .mfa-kicker,
html[data-mode="light"] .mfa-explain,
html[data-mode="light"] .mfa-method-copy p,
html[data-mode="light"] .mfa-method-status,
html[data-mode="light"] .mfa-step-body p,
html[data-mode="light"] .mfa-manual-label,
html[data-mode="light"] .mfa-msg,
html[data-mode="light"] .mfa-signout,
html[data-mode="light"] .trust-kicker,
html[data-mode="light"] .trust-head p,
html[data-mode="light"] .trust-claim p,
html[data-mode="light"] .trust-session dt,
html[data-mode="light"] .trust-contact {
  color: var(--muted) !important;
}
html[data-mode="light"] .set-identity-name,
html[data-mode="light"] .set-row-title,
html[data-mode="light"] .set-detail-title,
html[data-mode="light"] .mfa-title,
html[data-mode="light"] .mfa-method-label,
html[data-mode="light"] .mfa-step-body h4,
html[data-mode="light"] .mfa-secret-chip code,
html[data-mode="light"] .mfa-challenge h2,
html[data-mode="light"] .trust-head h3,
html[data-mode="light"] .trust-controls h4,
html[data-mode="light"] .trust-session h4,
html[data-mode="light"] .trust-session dd,
html[data-mode="light"] .trust-contact strong {
  color: var(--text, var(--ivory)) !important;
}
html[data-mode="light"] .set-row-nav:hover .set-row-title,
html[data-mode="light"] .set-row-nav:focus-visible .set-row-title,
html[data-mode="light"] .set-row-nav:hover .set-chevron,
html[data-mode="light"] .set-row-nav:focus-visible .set-chevron,
html[data-mode="light"] .set-back:hover,
html[data-mode="light"] .set-back:focus-visible,
html[data-mode="light"] .mfa-signout:hover,
html[data-mode="light"] .mfa-signout:focus-visible,
html[data-mode="light"] .trust-contact a:hover {
  color: var(--accent) !important;
}

@media (max-width: 700px) {
  .set-detail-body #bill-card .bill-grid,
  .set-detail-body #bill-card .bill-credit-grid {
    grid-template-columns: 1fr;
  }
  .set-detail-body #bill-card .bill-credits-buy {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .mfa-wrap { padding-top: 12px; padding-bottom: 44px; }
  .set-identity,
  .set-identity-rule,
  .set-list,
  .set-level-detail { width: min(100%, calc(100% - 36px)); }
  .set-identity { padding: 4px 2px 22px; gap: 14px; }
  .set-group-label { margin-left: 8px; margin-right: 8px; }
  .set-row-nav { padding: 17px 8px; }
  .set-detail-body { gap: 18px; }
  .set-detail-body .card.mfa-card { padding: 20px 18px 22px; }
  .set-detail-body #bill-card .bill-grid { gap: 14px; }
  .set-detail-body #bill-card .bill-credits-buy { padding: 18px; }
  .set-detail-body #bill-card .bill-credit-box { padding: 14px; }
  .mfa-status-head { display: grid; gap: 10px; }
  .mfa-method-tile {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
  }
  .mfa-method-action {
    grid-column: 1 / -1;
    justify-content: stretch;
  }
  .mfa-method-action .btn,
  .mfa-method-action .btn-gold { flex: 1 1 130px; }
  .mfa-step-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .mfa-scan-grid { grid-template-columns: 1fr; }
  .mfa-qr-frame { width: 100%; }
  .mfa-qrbox { display: block; width: max-content; max-width: 100%; margin: 0 auto; }
  .mfa-qr { width: min(188px, 100%); height: auto; }
  .mfa-secret-chip { display: grid; }
  .mfa-copy-btn {
    min-height: 38px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .mfa-codeBoxes {
    gap: 6px;
    width: 100%;
  }
  .mfa-code-digit {
    height: 46px;
    font-size: 21px;
    line-height: 46px;
    border-radius: 10px;
  }
  .mfa-codeRow .btn, .mfa-codeRow .btn-gold { flex: 1 1 140px; }
  .mfa-overlay { padding: 16px; }
  .mfa-challenge { padding: 24px 20px; border-radius: 18px; }
  .trust-head {
    display: grid;
    gap: 10px;
  }
  .trust-claim {
    grid-template-columns: 24px minmax(0, 1fr);
  }
  .trust-session dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .trust-signout {
    width: 100%;
  }
}
