:root {
  color-scheme: dark;
  font-family: "Segoe UI Variable Text", "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  --web-bg: #090d13;
  --web-surface: #121924;
  --web-border: #29384b;
  --web-text: #edf4ff;
  --web-muted: #91a0b4;
  --web-blue: #69a9ff;
  --web-blue-soft: #142b47;
  --web-green: #6bd394;
  --web-green-soft: #142b20;
  --web-orange: #f2a35c;
  --web-orange-soft: #312116;
}

* { box-sizing: border-box; }

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--web-bg);
  color: var(--web-text);
}

body {
  background:
    radial-gradient(circle at 78% -12%, rgb(105 169 255 / 16%), transparent 35%),
    radial-gradient(circle at 12% 95%, rgb(165 140 255 / 9%), transparent 30%),
    var(--web-bg);
}

.web-layout {
  min-height: 100vh;
  padding: clamp(20px, 4vw, 58px);
}

@media (max-width: 720px) {
  .web-layout:has(> .login-shell) {
    display: grid;
    min-height: 100dvh;
    align-items: center;
  }
}

.web-foundation {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.web-hero {
  position: relative;
  min-height: 390px;
  padding: clamp(24px, 5vw, 58px);
  overflow: hidden;
  border: 1px solid var(--web-border);
  border-radius: 28px;
  background: linear-gradient(135deg, rgb(24 34 49 / 96%), rgb(12 18 27 / 92%));
  box-shadow: 0 30px 90px rgb(0 0 0 / 42%);
}

.web-hero::before,
.web-hero::after {
  position: absolute;
  border: 1px solid rgb(105 169 255 / 11%);
  border-radius: 50%;
  content: "";
}

.web-hero::before { top: -190px; right: -130px; width: 460px; height: 460px; }
.web-hero::after { top: -68px; right: 48px; width: 260px; height: 260px; }

.web-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
}

.web-brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgb(105 169 255 / 58%);
  border-radius: 15px;
  background: linear-gradient(145deg, #254c78, #201d3f);
  box-shadow: 0 12px 28px rgb(105 169 255 / 18%), inset 0 1px rgb(255 255 255 / 18%);
  font: 1.35rem Georgia, Cambria, serif;
}

.web-brand strong,
.web-brand small { display: block; }
.web-brand strong { letter-spacing: .02em; }
.web-brand small {
  margin-top: 3px;
  color: var(--web-muted);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.web-state-pill {
  position: absolute;
  z-index: 1;
  top: clamp(24px, 5vw, 58px);
  right: clamp(24px, 5vw, 58px);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid var(--web-border);
  border-radius: 999px;
  background: rgb(9 13 19 / 50%);
  color: var(--web-muted);
  font-size: .73rem;
}

.web-state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--web-green);
  box-shadow: 0 0 0 4px rgb(107 211 148 / 11%);
}

.web-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 730px;
  margin-top: clamp(72px, 11vw, 128px);
}

.web-eyebrow {
  color: var(--web-blue);
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .13em;
}

h1 {
  max-width: 720px;
  margin: 13px 0 0;
  font-size: clamp(2.35rem, 6vw, 4.9rem);
  font-weight: 690;
  letter-spacing: -.055em;
  line-height: .98;
}

.web-hero-copy p {
  max-width: 66ch;
  margin: 22px 0 0;
  color: var(--web-muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.66;
}

.web-truth-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.web-truth-card {
  display: flex;
  min-height: 174px;
  gap: 14px;
  padding: 21px;
  border: 1px solid var(--web-border);
  border-radius: 20px;
  background: rgb(18 25 36 / 88%);
}

.web-card-icon,
.web-integrity-symbol {
  display: grid;
  flex: none;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
}

.web-card-icon .p-icon,
.web-integrity-symbol .p-icon { width: 20px; height: 20px; }
.web-truth-card.is-running .web-card-icon { background: var(--web-green-soft); color: var(--web-green); }
.web-truth-card.is-locked .web-card-icon { background: var(--web-orange-soft); color: var(--web-orange); }
.web-truth-card small,
.web-truth-card strong { display: block; }
.web-truth-card small { color: var(--web-muted); font-size: .63rem; font-weight: 750; letter-spacing: .1em; }
.web-truth-card strong { margin-top: 7px; font-size: 1rem; }
.web-truth-card p { margin: 10px 0 0; color: var(--web-muted); font-size: .8rem; line-height: 1.5; }

.web-integrity-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  margin-top: 16px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgb(105 169 255 / 28%);
  border-radius: 22px;
  background: linear-gradient(135deg, rgb(20 43 71 / 72%), rgb(18 25 36 / 86%));
}

.web-integrity-symbol { width: 48px; height: 48px; background: var(--web-blue-soft); color: var(--web-blue); }
.web-integrity-note h2 { margin: 8px 0 0; font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
.web-integrity-note p { max-width: 76ch; margin: 10px 0 0; color: var(--web-muted); line-height: 1.62; }

footer {
  padding: 22px 4px 4px;
  color: var(--web-muted);
  font-size: .72rem;
  text-align: center;
}

.hands-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.hands-heading {
  padding: clamp(26px, 5vw, 56px);
  border: 1px solid var(--web-border);
  border-radius: 28px;
  background: linear-gradient(135deg, rgb(24 34 49 / 96%), rgb(12 18 27 / 92%));
  box-shadow: 0 30px 90px rgb(0 0 0 / 36%);
}

.hands-heading > a {
  color: var(--web-blue);
  font-size: .82rem;
  text-decoration: none;
}

.hands-heading .web-eyebrow { margin-top: 42px; }
.hands-heading h1 { max-width: 880px; }
.hands-heading > p:last-child {
  max-width: 76ch;
  margin: 20px 0 0;
  color: var(--web-muted);
  line-height: 1.65;
}

.hands-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.identity-card {
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--web-border);
  border-radius: 22px;
  background: rgb(18 25 36 / 90%);
}

.identity-card.warning {
  margin-top: 16px;
  border-color: rgb(242 163 92 / 38%);
  background: var(--web-orange-soft);
}

.identity-card .step {
  color: var(--web-blue);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .12em;
}

.identity-card h2 { margin: 10px 0 18px; }
.identity-card p { color: var(--web-muted); line-height: 1.55; }
.identity-card label { display: grid; gap: 8px; color: var(--web-muted); font-size: .82rem; }
.identity-card input,
.identity-card select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--web-border);
  border-radius: 10px;
  background: #0c121b;
  color: var(--web-text);
}

.identity-card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.identity-card button { margin-top: 14px; }
.identity-card button:disabled { cursor: not-allowed; opacity: .48; }
.identity-card dl {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
  gap: 8px 16px;
  margin: 20px 0 0;
}

.identity-card dt { color: var(--web-muted); }
.identity-card dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.identity-card code { color: #b8d6ff; overflow-wrap: anywhere; }
.identity-card pre {
  max-height: 360px;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--web-border);
  border-radius: 12px;
  background: #080c12;
  white-space: pre-wrap;
}

.hands-message {
  position: sticky;
  bottom: 18px;
  margin: 16px auto 0;
  padding: 13px 16px;
  border: 1px solid rgb(105 169 255 / 35%);
  border-radius: 12px;
  background: rgb(20 43 71 / 96%);
  box-shadow: 0 14px 42px rgb(0 0 0 / 42%);
}

@media (max-width: 760px) {
  .hands-grid { grid-template-columns: 1fr; }
  .identity-card dl { grid-template-columns: 1fr; }
}

a { color: inherit; }

.web-primary-action,
.web-secondary-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.web-primary-action {
  background: linear-gradient(135deg, #6cb1ff, #8c7cff);
  color: #07101c;
  box-shadow: 0 12px 30px rgb(105 169 255 / 22%);
}

.web-secondary-action {
  border-color: var(--web-border);
  background: #171f2c;
  color: var(--web-text);
}

.hero-action { margin-top: 26px; }

.identity-shell {
  width: min(820px, 100%);
  margin: 3vh auto 0;
}
/* One small card in the middle: sign-out and similar one-step pages. */
.identity-shell-narrow {
  display: grid;
  width: min(420px, 100%);
  min-height: calc(100vh - clamp(40px, 8vw, 116px));
  margin: 0 auto;
  place-items: center;
}
.logout-card form { display: grid; }
.logout-card .login-recovery-link { justify-self: center; }

.identity-heading { margin-bottom: 28px; }
.identity-heading h1 {
  max-width: 800px;
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1.04;
}
.identity-heading p {
  max-width: 68ch;
  color: var(--web-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}
h1[tabindex="-1"]:focus { outline: none; }

.identity-card {
  display: grid;
  gap: 12px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--web-border);
  border-radius: 24px;
  background: rgb(18 25 36 / 94%);
  box-shadow: 0 28px 80px rgb(0 0 0 / 32%);
}

.identity-card label { margin-top: 7px; font-size: .82rem; font-weight: 700; }
.identity-card input[type="text"],
.identity-card input[type="password"] {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #36485f;
  border-radius: 12px;
  outline: none;
  background: #0b111a;
  color: var(--web-text);
  font: inherit;
}
.identity-card input:focus { border-color: var(--web-blue); box-shadow: 0 0 0 3px rgb(105 169 255 / 14%); }
.identity-password-field { position: relative; }
.identity-password-field input { padding-right: 52px; }
.identity-card .identity-password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--web-muted);
  cursor: pointer;
}
.identity-card .identity-password-toggle:hover {
  border-color: #36485f;
  background: rgb(105 169 255 / 8%);
  color: var(--web-text);
}
.identity-card .identity-password-toggle:focus-visible {
  border-color: var(--web-blue);
  outline: 3px solid rgb(105 169 255 / 18%);
  outline-offset: 1px;
  color: var(--web-text);
}
.identity-password-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.identity-password-icon-hide { display: none; }
.identity-password-toggle[aria-pressed="true"] .identity-password-icon-show { display: none; }
.identity-password-toggle[aria-pressed="true"] .identity-password-icon-hide { display: block; }
.identity-card small { color: var(--web-muted); line-height: 1.45; }
.identity-card button { margin-top: 14px; }
.identity-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 0 0 8px;
  padding: 14px 16px;
  border: 1px solid;
  border-radius: 14px;
  line-height: 1.5;
}
.identity-alert-error {
  border-color: rgb(255 111 111 / 62%);
  background: rgb(91 23 31 / 76%);
  color: #ffe8e8;
  box-shadow: 0 12px 30px rgb(46 5 12 / 22%);
}
.identity-alert-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #ff7373;
  color: #25060a;
  font-weight: 850;
}
.identity-alert strong { display: block; font-size: .96rem; }
.identity-alert-symbol {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.identity-alert p { margin: 3px 0 0; color: inherit; }
.identity-alert-action {
  display: inline-block;
  margin-top: 9px;
  color: #fff;
  font-weight: 750;
  text-underline-offset: 3px;
}
.identity-validation-summary:empty { display: none; }
.identity-validation-summary ul { margin: 0; padding-left: 20px; }
.identity-error { margin: 0; color: #ff9d9d; line-height: 1.5; }
.identity-card .validation-message { color: #ff9d9d; }
.inline-label { display: inline; margin-left: 8px; }

.login-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(360px, .84fr);
  width: min(1180px, 100%);
  min-height: calc(100vh - clamp(40px, 8vw, 116px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgb(67 87 112 / 58%);
  border-radius: 30px;
  background: #0d131c;
  box-shadow: 0 34px 100px rgb(0 0 0 / 42%);
}

.login-intro {
  position: relative;
  z-index: 0;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(38px, 5.5vw, 72px);
  overflow: hidden;
  background:
    radial-gradient(circle at 77% 22%, rgb(105 169 255 / 10%), transparent 31%),
    linear-gradient(145deg, #141e2b 0%, #101722 56%, #0c121b 100%);
}

.login-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgb(113 175 255 / 55%);
  border-radius: 15px;
  background: linear-gradient(145deg, rgb(105 169 255 / 21%), rgb(140 124 255 / 10%));
  color: #eaf4ff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 9%);
  font-size: 1.08rem;
  font-weight: 780;
}

.login-brand-copy strong,
.login-brand-copy small { display: block; }
.login-brand-copy strong { color: #f3f7fd; font-size: 1rem; letter-spacing: .015em; }
.login-brand-copy small {
  margin-top: 4px;
  color: #8190a5;
  font-size: .61rem;
  font-weight: 760;
  letter-spacing: .16em;
}

.login-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
  margin: clamp(72px, 15vh, 168px) 0 clamp(42px, 8vh, 92px);
}


.login-copy h1 {
  margin: 0;
  color: #bfcbd9;
  font-size: clamp(2.55rem, 3.65vw, 3.65rem);
  font-weight: 480;
  letter-spacing: -.045em;
  line-height: 1.04;
  white-space: nowrap;
}

.login-copy h1 span { color: #f2f7fd; font-weight: 720; }
.login-copy p {
  max-width: 48ch;
  margin: 24px 0 0;
  color: #94a3b7;
  font-size: clamp(.96rem, 1.25vw, 1.06rem);
  line-height: 1.65;
}

.login-orbit {
  position: absolute;
  right: -170px;
  bottom: -205px;
  z-index: 1;
  width: 620px;
  height: 620px;
  opacity: .7;
  pointer-events: none;
}

.login-orbit span {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgb(116 173 244 / 10%);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-18deg) scaleY(.48);
}

.login-orbit span:nth-child(1) { width: 570px; height: 570px; }
.login-orbit span:nth-child(2) { width: 410px; height: 410px; border-color: rgb(139 124 255 / 9%); }
.login-orbit span:nth-child(3) { width: 245px; height: 245px; border-color: rgb(116 173 244 / 13%); }
.login-orbit::after {
  position: absolute;
  top: 249px;
  left: 70px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(134 184 248 / 47%);
  box-shadow: 0 0 18px rgb(105 169 255 / 38%);
  content: "";
}

.login-panel {
  position: relative;
  z-index: 2;
  display: grid;
  min-width: 0;
  place-items: center;
  padding: clamp(30px, 4vw, 56px);
  border-left: 1px solid rgb(67 87 112 / 35%);
  background: linear-gradient(155deg, rgb(15 22 32 / 98%), rgb(9 14 21 / 99%));
}

.login-card.identity-card {
  width: min(390px, 100%);
  gap: 11px;
  padding: clamp(26px, 3vw, 34px);
  border-color: rgb(61 80 103 / 76%);
  border-radius: 19px;
  background: rgb(17 24 35 / 91%);
  box-shadow: 0 22px 58px rgb(0 0 0 / 28%);
}

.login-card .web-primary-action { width: 100%; margin-top: 20px; }
.login-submit-state {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  color: var(--web-muted);
  font-size: .78rem;
  font-weight: 650;
}
.login-submit-state[hidden] { display: none; }
.login-progress {
  position: relative;
  display: block;
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(105 169 255 / 14%);
}
.login-progress::after {
  position: absolute;
  inset: 0;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--web-blue), #8c7cff);
  animation: login-progress 1.05s ease-in-out infinite;
  content: "";
}
.login-card[aria-busy="true"] input { cursor: wait; opacity: .76; }
.login-recovery-link[aria-disabled="true"] {
  opacity: .48;
  pointer-events: none;
}
.login-recovery-link {
  justify-self: center;
  margin-top: 5px;
  color: #9cacbf;
  font-size: .83rem;
  font-weight: 620;
  text-underline-offset: 4px;
}
.login-recovery-link:hover { color: #d9e7f8; }
.login-recovery-link:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgb(105 169 255 / 30%);
  outline-offset: 4px;
}

.login-panel { align-content: center; gap: 14px; }
.login-passkey-card .web-primary-action { margin-top: 4px; }
.login-passkey-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.login-passkey-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.login-passkey-hint,
.login-bootstrap-copy,
.passkey-setup-tip {
  margin: 0;
  color: var(--web-muted);
  font-size: .82rem;
}
.login-passkey-status {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgb(105 169 255 / 10%);
  color: #d9e7f8;
  font-size: .85rem;
}
.login-passkey-status[data-tone="error"] {
  background: rgb(255 107 107 / 12%);
  color: #ffc9c9;
}
.login-passkey-status[data-tone="success"] {
  background: rgb(80 200 140 / 12%);
  color: #b9f0d2;
}
.login-passkey-status[hidden] { display: none; }
.login-panel-title,
.identity-card .login-panel-title {
  margin: 0 0 6px;
  color: #eef4fb;
  font-size: 1.35rem;
  font-weight: 720;
}
/* "or" between the two ways in. */
.login-or {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(390px, 100%);
  margin: 2px 0;
  color: #7f8fa3;
  font-size: .8rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.login-or::before,
.login-or::after {
  flex: 1;
  height: 1px;
  background: rgb(67 87 112 / 45%);
  content: "";
}
.login-bootstrap { width: min(390px, 100%); }
/* The second way in is a real button, not a small disclosure line. */
.login-bootstrap > summary.login-bootstrap-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid rgb(97 122 152 / 55%);
  border-radius: 12px;
  background: rgb(22 31 45 / 88%);
  color: #dce8f6;
  font-size: .92rem;
  font-weight: 650;
  text-align: center;
  cursor: pointer;
  list-style: none;
}
.login-bootstrap > summary.login-bootstrap-toggle::-webkit-details-marker { display: none; }
.login-bootstrap > summary.login-bootstrap-toggle:hover {
  border-color: rgb(125 160 200 / 70%);
  background: rgb(28 39 56 / 92%);
}
.login-bootstrap[open] > summary.login-bootstrap-toggle {
  border-color: rgb(105 169 255 / 45%);
  color: #fff;
}
.login-bootstrap > summary:focus-visible {
  outline: 3px solid rgb(105 169 255 / 30%);
  outline-offset: 2px;
}
.login-bootstrap .login-card { margin-top: 10px; }
.login-bootstrap .web-primary-action { width: 100%; margin-top: 14px; }

/* Passkey as the second way in, under the password card. */
.login-passkey-alt {
  display: grid;
  gap: 10px;
  width: min(390px, 100%);
}
.login-passkey-alt .web-secondary-action { width: 100%; }
/* Six digits, big enough to read against the app. */
.login-code-input {
  font-size: 1.4rem !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: .25em;
  text-align: center;
}

/* Authenticator setup: two numbered steps, the QR code on white. */
.authenticator-setup-card { gap: 14px; margin-bottom: 4px; }
.authenticator-recommended {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgb(80 200 140 / 14%);
  color: #b9f0d2;
  font-size: .72rem;
  font-weight: 650;
  vertical-align: middle;
}
.authenticator-steps {
  display: grid;
  gap: 18px;
  margin: 0;
  padding-left: 20px;
}
.authenticator-steps li { display: grid; gap: 8px; }
.authenticator-steps li > span { color: var(--web-muted); font-size: .85rem; }
.authenticator-qr-frame {
  justify-self: start;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  line-height: 0;
}
.authenticator-qr-frame svg { width: 200px; height: 200px; }
.authenticator-open { justify-self: stretch; justify-content: center; text-align: center; }
.authenticator-manual summary {
  color: #9cacbf;
  font-size: .83rem;
  cursor: pointer;
}
.authenticator-manual code {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
  letter-spacing: .06em;
}
.authenticator-or { width: 100%; margin: 18px 0; }

/* "Confirm it's you" dialog before a sensitive change. */
.stepup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  /* A fixed column: the code field's natural width must not widen the
     dialog past a phone screen. */
  grid-template-columns: minmax(0, 1fr);
  padding: 16px;
  place-items: center;
  background: rgb(4 7 12 / 72%);
  backdrop-filter: blur(4px);
}
.stepup-dialog,
.stepup-dialog * { box-sizing: border-box; }
.stepup-dialog {
  display: grid;
  gap: 12px;
  width: min(380px, 100%);
  padding: 26px;
  border: 1px solid rgb(61 80 103 / 76%);
  border-radius: 18px;
  background: #111823;
  color: var(--web-text, #e8eef6);
  box-shadow: 0 30px 80px rgb(0 0 0 / 50%);
  font-family: inherit;
}
.stepup-dialog h2 { margin: 0; font-size: 1.25rem; }
.stepup-copy { margin: 0; color: #9cacbf; font-size: .9rem; line-height: 1.5; }
.stepup-code { display: grid; gap: 8px; }
.stepup-code[hidden], .stepup-passkey[hidden], .stepup-error[hidden] { display: none; }
.stepup-code label { color: #9cacbf; font-size: .8rem; font-weight: 650; }
.stepup-code input {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgb(61 80 103 / 76%);
  border-radius: 10px;
  background: #0b1119;
  color: #fff;
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .25em;
  text-align: center;
}
.stepup-code .web-primary-action,
.stepup-dialog .web-secondary-action { width: 100%; }
.stepup-error {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgb(255 107 107 / 12%);
  color: #ffc9c9;
  font-size: .85rem;
}
.stepup-cancel {
  justify-self: center;
  border: 0;
  background: none;
  color: #9cacbf;
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
}

/* The workspace keeps html/body from scrolling (its own panes scroll); the
   sign-in pages must scroll, or an opened form runs off the screen. */
html:has(main.web-layout),
body:has(main.web-layout) {
  height: auto;
  overflow: auto;
}
.passkey-setup-card { gap: 11px; }
.passkey-setup-done { display: grid; gap: 12px; }
.passkey-setup-done[hidden],
.passkey-setup-recovery[hidden] { display: none; }
.passkey-setup-success {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgb(80 200 140 / 12%);
  color: #b9f0d2;
}
.passkey-setup-recovery {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgb(255 196 90 / 35%);
  border-radius: 10px;
}
.passkey-setup-recovery p { margin: 0; color: var(--web-muted); font-size: .85rem; }
.passkey-setup-recovery code {
  font-size: 1rem;
  letter-spacing: .04em;
  user-select: all;
}

/* Account · Passkeys (workspace account page, passkey-capable web host only) */
.account-editor .account-step-up,
.account-editor .account-passkey-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.account-editor .account-step-up .account-note { margin-top: 0; flex: 1 1 260px; }
.account-editor [data-passkey-step-up],
.account-editor [data-passkey-register],
.account-editor [data-passkey-rotate-code],
.account-editor [data-passkey-login],
.account-editor .account-passkey-remove {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid #4b5e77;
  border-radius: 8px;
  background: #2a3749;
  color: #d6e2f1;
  font: 600 13px/20px 'IBM Plex Sans', sans-serif;
  cursor: pointer;
}
.account-editor [data-passkey-step-up],
.account-editor [data-passkey-register] {
  border-color: #7897bc;
  background: #34506f;
  color: #f1f6fc;
}
.account-editor button[data-passkey-step-up]:hover,
.account-editor button[data-passkey-register]:hover,
.account-editor button[data-passkey-rotate-code]:hover,
.account-editor .account-passkey-remove:hover:not(:disabled) { border-color: #9fbde3; }
/* Sign-in section: one block per factor; the confirm and connect buttons
   look like the passkey buttons they sit next to. */
.account-editor .account-factor {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid #313e50;
  border-radius: 12px;
  background: #121925;
}
.account-editor .account-factor h3 { margin: 0; font-size: 15px; color: #e4ebf4; }
.account-editor .account-factor .account-note { margin: 0; }
.account-editor .account-factor .account-passkeys { margin-top: 4px; }
.account-editor .account-factor > button,
.account-editor .account-factor .account-passkey-actions > button,
.account-editor .account-step-up > button {
  justify-self: start;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid #7897bc;
  border-radius: 8px;
  background: #34506f;
  color: #f1f6fc;
  font: 600 13px/20px 'IBM Plex Sans', sans-serif;
  cursor: pointer;
}
.account-editor .account-factor .account-passkey-actions { margin-top: 4px; }
.account-editor .account-qr {
  justify-self: start;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  line-height: 0;
}
.account-editor .account-qr svg { width: 180px; height: 180px; }
.account-editor .account-link { color: #9fbde3; font-size: 13px; }
.account-editor .account-factor code { color: #b8d6ff; letter-spacing: .05em; }
.account-editor button:disabled { opacity: .5; cursor: not-allowed; }
.account-editor button:focus-visible { outline: 2px solid #9fbde3; outline-offset: 3px; }
.account-passkeys {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.account-passkeys li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #313e50;
  border-radius: 10px;
  background: #131a24;
}
.account-passkeys li svg { width: 20px; color: #a4bce1; }
.account-passkeys strong { display: block; font-size: 14px; color: #dce5f0; }
.account-passkeys small { display: block; margin-top: 3px; font-size: 12px; color: #98a9bf; }
.account-editor .account-success[hidden],
.account-recovery-code[hidden],
.account-passkey-status[hidden] { display: none; }
.account-editor .account-success { display: grid; gap: 10px; margin-top: 18px; }
.account-recovery-code {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgb(255 196 90 / 35%);
  border-radius: 10px;
}
.account-recovery-code code { font-size: 1rem; letter-spacing: .04em; user-select: all; }
.account-passkey-status {
  margin-top: 16px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgb(105 169 255 / 10%);
  color: #d9e7f8;
}
.account-passkey-status[data-tone="error"] { background: rgb(255 107 107 / 12%); color: #ffc9c9; }

@keyframes login-progress {
  from { transform: translateX(-120%); }
  to { transform: translateX(330%); }
}

@media (prefers-reduced-motion: reduce) {
  .login-progress::after {
    width: 100%;
    animation: none;
    opacity: .72;
  }
}

.recovery-card h2,
.workspace-preview h2 { margin: 2px 0 0; font-size: 1.7rem; }
.recovery-card p,
.workspace-preview p { color: var(--web-muted); line-height: 1.6; }
.recovery-code {
  overflow-wrap: anywhere;
  padding: 18px;
  border: 1px dashed var(--web-blue);
  border-radius: 14px;
  background: #09111d;
  color: #bcd8ff;
  font: 700 clamp(.9rem, 2vw, 1.15rem) ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .04em;
  text-align: center;
}

.account-shell { width: min(1040px, 100%); }
.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.account-fact {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--web-border);
  border-radius: 17px;
  background: rgb(18 25 36 / 88%);
}
.account-fact small { display: block; color: var(--web-muted); font-size: .68rem; font-weight: 750; letter-spacing: .1em; }
.account-fact strong { display: block; overflow-wrap: anywhere; margin-top: 9px; font-size: .9rem; }

.session-card { margin-top: 16px; }
.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--web-border);
}
.session-row span:first-child { display: grid; gap: 4px; }
.session-row small,
.session-state { color: var(--web-muted); }

.dashboard-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.dashboard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 2px 24px;
}

.dashboard-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.dashboard-brand strong,
.dashboard-brand small { display: block; }
.dashboard-brand small { margin-top: 2px; color: var(--web-muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-links { display: flex; align-items: center; gap: 8px; }
.dashboard-links a,
.dashboard-links button {
  padding: 9px 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--web-muted);
  font: inherit;
  font-size: .84rem;
  text-decoration: none;
  cursor: pointer;
}
.dashboard-links a:hover,
.dashboard-links button:hover,
.dashboard-links .is-current { background: #171f2c; color: var(--web-text); }
.dashboard-links form { margin: 0; }

.dashboard-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid var(--web-border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 12%, rgb(105 169 255 / 13%), transparent 32%),
    linear-gradient(135deg, #151f2d, #101722 72%);
}
.dashboard-hero h1 { max-width: 780px; font-size: clamp(2.3rem, 5vw, 4.25rem); }
.dashboard-hero p { max-width: 68ch; margin: 18px 0 0; color: var(--web-muted); line-height: 1.65; }
.dashboard-actor-pill {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--web-border);
  border-radius: 15px;
  background: rgb(8 13 20 / 60%);
}
.dashboard-actor-pill small,
.dashboard-actor-pill strong { display: block; }
.dashboard-actor-pill small { color: var(--web-muted); font-size: .62rem; letter-spacing: .1em; }
.dashboard-actor-pill strong { margin-top: 4px; font-size: .85rem; }

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.dashboard-metric {
  min-width: 0;
  padding: 21px;
  border: 1px solid var(--web-border);
  border-radius: 18px;
  background: rgb(18 25 36 / 88%);
}
.dashboard-metric small,
.dashboard-metric strong,
.dashboard-metric span { display: block; }
.dashboard-metric small { color: var(--web-muted); font-size: .63rem; font-weight: 750; letter-spacing: .1em; }
.dashboard-metric strong { margin-top: 10px; font-size: 1.8rem; }
.dashboard-metric .metric-time { font-size: 1.05rem; line-height: 1.7; }
.dashboard-metric span { margin-top: 6px; color: var(--web-muted); font-size: .74rem; }

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr);
  gap: 16px;
  margin-top: 16px;
}
.dashboard-panel {
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--web-border);
  border-radius: 22px;
  background: rgb(18 25 36 / 91%);
}
.dashboard-panel h2 { margin: 7px 0 0; font-size: 1.55rem; }
.dashboard-panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.truth-badge {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
}
.truth-badge.is-ready { background: var(--web-green-soft); color: var(--web-green); }
.company-row {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 17px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--web-border);
}
.company-monogram {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #294d7c, #293563);
  color: #dbeaff;
  font-weight: 800;
}
.company-copy { min-width: 0; }
.company-copy strong,
.company-copy small { display: block; }
.company-copy small { overflow-wrap: anywhere; margin-top: 5px; color: var(--web-muted); font-size: .68rem; }
.company-facts { display: grid; gap: 5px; color: var(--web-muted); font-size: .76rem; }
.company-facts strong { color: var(--web-text); }
.company-revision { text-align: right; }
.company-revision small,
.company-revision strong { display: block; }
.company-revision small { color: var(--web-muted); font-size: .6rem; letter-spacing: .1em; }
.company-revision strong { margin-top: 5px; font-size: 1.25rem; }
.dashboard-empty { margin: 24px 0 0; color: var(--web-muted); line-height: 1.6; }

.readiness-panel { background: linear-gradient(155deg, rgb(19 28 41 / 97%), rgb(15 21 30 / 97%)); }
.readiness-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--web-border);
  font-size: .82rem;
}
.readiness-row span { display: flex; align-items: center; gap: 9px; color: var(--web-muted); }
.readiness-row strong { font-size: .75rem; }
.readiness-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.readiness-dot.is-ready { background: var(--web-green); box-shadow: 0 0 0 4px rgb(107 211 148 / 10%); }
.readiness-dot.is-locked { background: var(--web-orange); box-shadow: 0 0 0 4px rgb(255 174 91 / 10%); }
.readiness-note { margin: 20px 0 0; color: var(--web-muted); font-size: .78rem; line-height: 1.6; }

.dashboard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 16px;
}
.dashboard-actions p { max-width: 68ch; margin: 10px 0 0; color: var(--web-muted); line-height: 1.55; }
.dashboard-actions .web-secondary-action { flex: none; }

@media (max-width: 880px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .login-intro { min-height: 360px; padding: 36px; }
  .login-copy { margin: 74px 0 28px; }
  .login-copy h1 { font-size: clamp(2.65rem, 8vw, 4rem); }
  .login-orbit { right: -210px; bottom: -265px; }
  .login-panel {
    padding: 34px;
    border-top: 1px solid rgb(67 87 112 / 35%);
    border-left: 0;
  }
  .web-truth-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-columns { grid-template-columns: 1fr; }
  .company-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .company-facts { grid-column: 2 / -1; }
}

@media (max-width: 620px) {
  .web-layout { padding: 12px; }
  .login-shell { border-radius: 22px; }
  .login-intro { min-height: 300px; padding: 26px 22px 32px; }
  .login-brand { gap: 11px; }
  .login-brand-mark { width: 40px; height: 40px; border-radius: 13px; }
  .login-copy { margin: 58px 0 14px; }
  .login-copy h1 {
    font-size: clamp(2.25rem, 11vw, 3.2rem);
    line-height: 1.08;
    white-space: normal;
  }
  .login-copy p { margin-top: 18px; font-size: .94rem; }
  .login-orbit { right: -285px; bottom: -340px; opacity: .48; }
  .login-panel { padding: 20px 16px; }
  .login-card.identity-card { padding: 24px 20px; border-radius: 17px; }
  .web-hero { min-height: 500px; padding: 24px; border-radius: 22px; }
  .web-state-pill { top: 92px; right: auto; left: 24px; }
  .web-hero-copy { margin-top: 130px; }
  .web-truth-grid { grid-template-columns: 1fr; }
  .web-truth-card { min-height: 140px; }
  .web-integrity-note { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .dashboard-nav,
  .dashboard-hero,
  .dashboard-actions { align-items: stretch; flex-direction: column; }
  .dashboard-links { flex-wrap: wrap; }
  .dashboard-metrics { grid-template-columns: 1fr; }
  .dashboard-actor-pill { flex: initial; }
  .company-row { grid-template-columns: auto minmax(0, 1fr); }
  .company-facts,
  .company-revision { grid-column: 1 / -1; text-align: left; }
}
