/* Page-level glue for the SSO pages. Everything visual comes from Anidev Dock;
   the rules here only fill gaps the system does not ship, and every value that
   is not structural is a design token so a theme change reaches it. */

/* The account navigation renders anchors, not the scripted buttons the Dock
   frame uses. */
.nav-links a.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-control);
  color: var(--color-muted);
  text-decoration: none;
  font-size: 14px;
}

.nav-links a.nav-link svg {
  flex: 0 0 auto;
}

.nav-links a.nav-link:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.nav-links a.nav-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.nav-links a.nav-link[aria-current="page"] {
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 600;
}

/* The wordmark is a plain block inside the Dock frame; here it also links. */
a.dock-brand {
  text-decoration: none;
  color: inherit;
}

/* Who is signed in, at the foot of the navigation. */
.dock-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.dock-identity strong {
  display: block;
  font-size: 14px;
}

.dock-identity small {
  display: block;
  font-size: 12px;
  color: var(--color-muted);
}

/* Long user-agent strings must wrap instead of widening the row. */
.identity-session h3 {
  overflow-wrap: anywhere;
}

.identity-session form {
  display: contents;
}

.identity-session time {
  white-space: nowrap;
}

/* The second step shows who is about to be signed in. */
.mfa-identity {
  padding-top: 0;
}

.mfa-identity h2 {
  font-size: 20px;
}

.mfa-identity p {
  margin: 0;
}

/* Read-only facts on the profile page. */
.identity-readonly strong {
  overflow-wrap: anywhere;
}

.identity-footnote code {
  overflow-wrap: anywhere;
}

/* Stacked label + input groups inside a section. */
.stack {
  display: grid;
  gap: 14px;
  max-width: 420px;
}

.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-form .field {
  flex: 1 1 240px;
}

/* The list of fresh recovery codes: monospace, one per line, wrapping. */
.recovery-codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  padding: 16px;
  margin: 16px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
}

.recovery-codes code {
  font: 14px Consolas, monospace;
  letter-spacing: 0.04em;
}

/* The sign-in form's own footer row and the "start over" line below it. */
.auth-foot {
  flex-wrap: wrap;
}

.restart {
  margin-top: 10px;
  text-align: center;
}

/* The live region of a form holds its error between the fields and the
   button. An empty one takes no space, so the form does not jump when the
   first refusal appears in it. */
.live-region {
  min-height: 0;
}

.live-region .error-text:empty {
  display: none;
}

.live-region .error-text {
  margin: 0 0 14px;
}

.muted {
  color: var(--color-muted);
}

/* The auth layout stacks vertically in Dock mode. Keep the brand compact so
   the form stays above the fold on a laptop. */
.auth-layout .auth-brand {
  padding-bottom: 8px;
}

/* A gate page inside the account shell does not need the shell's own heading
   above it twice. */
.identity-body .identity-gate {
  margin-top: 0;
  text-align: left;
  padding-left: 0;
}

.identity-body .identity-gate .component-row {
  justify-content: flex-start;
}
