/*
 * focus.css: the focus pages' own patterns (sign-up to consent), on vibekit tokens only, per vibe
 * with :where([data-vibe="…"]). Loaded after accounts.css by the pages that use it (focus-ui.tsx).
 */

/* CodeField on a phone: six boxes of 56px do not fit 328px, so they shrink with the column. */
@media (max-width: 480px) {
  .ac-shell .vk-codefield__box {
    width: min(48px, calc((100vw - 32px - 5 * 8px - 16px) / 6));
    height: 56px;
  }
  .ac-shell .vk-codefield {
    --_gap: 6px;
  }
}

/* The backup-code grid: ten codes, two columns, per vibe. */
:where([data-vibe="paper"]) .ac-codes {
  border-radius: 0;
  background: none;
  border-top: 1px solid var(--vk-color-text);
  border-bottom: 1px solid var(--vk-color-text);
  padding-left: 0;
  padding-right: 0;
}
:where([data-vibe="studio"]) .ac-codes {
  border-radius: 0;
  box-shadow: inset 0 0 0 1.5px var(--vk-color-rule);
}
:where([data-vibe="quiet"]) .ac-codes {
  border-radius: var(--vk-radius-sm);
  background: none;
  box-shadow: inset 0 0 0 2px var(--vk-color-text);
}
@media (max-width: 380px) {
  .ac-codes {
    font-size: 0.9375rem;
    gap: 8px 10px;
    padding: var(--vk-space-3);
  }
}

/* The recovery progress line: four stages, the current one marked; wraps on a phone. */
.ac-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 var(--vk-space-5);
  padding: 0;
  list-style: none;
  counter-reset: ac-progress;
  font-size: var(--vk-text-sm);
  color: var(--vk-color-muted);
}
.ac-progress li {
  counter-increment: ac-progress;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.ac-progress li::before {
  content: counter(ac-progress);
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: var(--vk-radius-pill);
  box-shadow: inset 0 0 0 1.5px var(--vk-color-line);
  font: 700 12px/1 var(--vk-font-mono);
}
.ac-progress li[aria-current="step"] {
  color: var(--vk-color-text);
  font-weight: 700;
}
.ac-progress li[aria-current="step"]::before {
  background: var(--vk-color-text);
  color: var(--vk-color-surface);
  box-shadow: none;
}
:where([data-vibe="paper"]) .ac-progress li::before {
  border-radius: 0;
  box-shadow: none;
  font-family: var(--vk-font-display);
  font-style: italic;
}
:where([data-vibe="studio"]) .ac-progress li::before {
  border-radius: 0;
}

/* A recovery stage: a section under a ruled top. */
.ac-stage + .ac-stage {
  margin-top: var(--vk-space-6);
  padding-top: var(--vk-space-5);
  border-top: 1px solid var(--vk-color-line);
}
.ac-stage h2 {
  margin-bottom: var(--vk-space-2);
}

/* The product card on Enable, the inviter line on sign-up and invitation. */
.ac-product {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 var(--vk-space-5);
  padding: var(--vk-space-4);
  border-radius: var(--vk-radius-md);
  background: var(--vk-color-raised);
}
.ac-product__name {
  margin: 0;
  font: 700 var(--vk-text-md) / 1.3 var(--vk-font-display);
}
:where([data-vibe="paper"]) .ac-product,
:where([data-vibe="quiet"]) .ac-product {
  border-radius: 0;
  background: none;
  padding-left: 0;
  padding-right: 0;
  border-top: 1px solid var(--vk-color-line);
  border-bottom: 1px solid var(--vk-color-line);
}
:where([data-vibe="studio"]) .ac-product {
  border-radius: 0;
  box-shadow: inset 0 0 0 1.5px var(--vk-color-rule);
}
.ac-from {
  margin: 0 0 var(--vk-space-4);
  font-weight: 600;
}

/* The setup key on enrol: mono in groups of four, wraps rather than widening the page. */
.ac-secret {
  margin: 4px 0 var(--vk-space-3);
  font: 600 1.0625rem/1.5 var(--vk-font-mono);
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}
.ac-qr {
  width: 200px;
  max-width: 100%;
  margin: var(--vk-space-3) 0;
  /* The QR's SVG draws its own light ground, so it scans in a dark theme too. */
}
.ac-qr:empty {
  display: none;
}
.ac-qr svg {
  display: block;
  width: 100%;
  height: auto;
}

/* A button that names a workspace or an app ("Turn on Superlibrary for …") wraps, never widens a phone. */
.ac-actions .vk-button,
.ac-form .vk-button {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
}
