/* The sign-in, account and checkout pages (src/account/, PUBLIC_WEB_ACCOUNT only): no design of
   their own, so they follow the system in global.css: the simple pages' hero proportions, with
   the page's form or panel in a soft card on the right. Light only (build brief §3). Imported
   only by src/account/Shell.astro, so a build without the account pages ships none of it. */

.ac-hero {
  --error: #b42318;
}
/* The states are toggled with `hidden`, which the display rules below would otherwise beat. */
.ac-hero [hidden] {
  display: none !important;
}
/* Empty live regions stay exposed to screen readers (so what's written later is announced) but
   take no room. */
.ac-hero :is([role="alert"], [role="status"]):empty {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
}

.hero.ac-hero {
  position: relative;
  padding: 56px 0 88px;
}
.ac-preview {
  margin: 0 0 28px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--soft);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}
.ac-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
  gap: 64px;
  align-items: start;
}
.ac-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 8px;
}
.ac-copy .h1 {
  font-size: 64px;
}
.ac-copy .h1:focus {
  outline: none;
}
.ac-copy .lede {
  max-width: 520px;
}
.ac-note-wrap {
  margin-top: 4px;
  min-height: 36px;
}

/* the card */
.ac-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px 34px;
  border-radius: 28px;
  background: var(--card);
  box-shadow:
    inset 0 0 0 1.5px var(--line),
    0 16px 40px rgba(29, 26, 23, 0.06);
}
.ac-card noscript {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ac-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ac-form .h3:focus {
  outline: none;
}
.ac-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ac-label {
  font-size: 15px;
  font-weight: 600;
}
.ac-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--card);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}
.ac-input::placeholder {
  color: #8a837b;
}
.ac-input:hover {
  box-shadow: inset 0 0 0 1.5px var(--muted);
}
.ac-input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.ac-input[aria-invalid="true"] {
  box-shadow: inset 0 0 0 2px var(--error);
}
.ac-code {
  max-width: 240px;
  padding: 0 18px;
  font-size: 28px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3em;
}
.ac-error {
  margin: 0;
  color: var(--error);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}
.ac-error[data-tone="info"] {
  color: var(--ink);
  font-weight: 500;
}
.ac-status {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--band);
  font-size: 15px;
  line-height: 1.45;
}

/* buttons: the site's .btn on a <button>, and a text button that reads as a link */
.ac-hero button.btn {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.ac-hero .btn[aria-disabled="true"] {
  opacity: 0.72;
  cursor: progress;
  transform: none;
}
.ac-form > .btn {
  align-self: flex-start;
}
.ac-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  cursor: pointer;
}
.ac-link[aria-disabled="true"] {
  color: var(--muted);
  cursor: progress;
}
.ac-more,
.ac-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin: 0;
}
.ac-actions {
  gap: 12px 16px;
}
.ac-foot {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* account */
.ac-rows {
  display: flex;
  flex-direction: column;
  margin: 0;
}
.ac-rows > div {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.ac-rows > div:first-child {
  padding-top: 0;
}
.ac-rows dt {
  padding-top: 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.ac-rows dd {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ac-sub {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}
.ac-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* loading */
.ac-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  color: var(--muted);
  font-size: 16px;
}
.ac-spinner {
  flex: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .ac-spinner {
    animation: ac-spin 0.8s linear infinite;
  }
}
@keyframes ac-spin {
  to {
    transform: rotate(1turn);
  }
}

/* checkout done: numbered steps */
.ac-steps {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.ac-steps li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 6px;
  counter-increment: step;
}
.ac-steps li::before {
  content: counter(step);
  grid-row: 1 / span 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: 15px;
  font-weight: 700;
}
.ac-steps li > * {
  grid-column: 2;
}
.ac-steps .ac-actions {
  margin-top: 6px;
}
.ac-step-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

@container sw (max-width: 900px) {
  .hero.ac-hero {
    padding: 26px 0 48px;
  }
  .ac-preview {
    margin-bottom: 20px;
  }
  .ac-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .ac-copy {
    gap: 12px;
    padding-top: 0;
  }
  .ac-copy .h1 {
    font-size: 42px;
  }
  .ac-card {
    padding: 24px 20px;
    border-radius: 22px;
  }
  .ac-form > .btn {
    align-self: stretch;
    justify-content: center;
  }
}

/* a full-width button whose label can be long ("Sign in as …") */
.ac-hero .ac-wide {
  align-self: stretch;
  justify-content: center;
  white-space: normal;
  text-align: center;
  padding-block: 10px;
}
