/* Korpora — the account pages after the round-2 review: the order number, the replaced order, the second-factor
   setup and the recovery codes. Loaded after app-pages.css and app-orders.css (views/partials/head.ejs). */

/* the order number people see (KP-2026-000123): monospaced, so the digits line up from row to row */
.order-no {
  font: 600 0.88rem/1.4 var(--f-mono);
  letter-spacing: 0.01em;
  color: var(--ink);
}

/* the plan box of the profile at 320px: one column that may shrink, and a long status chip wraps instead of pushing
   the page sideways */
.planbox {
  grid-template-columns: minmax(0, 1fr);
}
.planbox .chip {
  white-space: normal;
}

/* an error under its own field (the six-digit code of the 2FA setup): the field keeps its place and its value */
.field-error {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 2px 0 0;
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 550;
}
.field-error .i {
  flex: none;
  margin-top: 2px;
}

/* the manual 2FA key: groups of four to copy by hand, and a button that copies it without the spaces */
.secret-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 14px;
}
.secret-row .secret {
  margin: 0;
  letter-spacing: 0.08em;
  word-spacing: 0.2em;
  word-break: normal;
  overflow-wrap: anywhere;
}

/* the recovery codes: the heading for paper appears only in print */
.codes-print-head {
  display: none;
}
@media print {
  /* with the codes on the page, the print is the codes: no bar, tabs, other sections or buttons */
  body:has(#codes) .bar,
  body:has(#codes) .skip,
  body:has(#codes) .page-head,
  body:has(#codes) .subnav,
  body:has(#codes) .flash,
  body:has(#codes) .foot,
  body:has(#codes) .section:not(#codes),
  #codes .codes-actions {
    display: none !important;
  }
  #codes {
    border: 0;
    box-shadow: none;
  }
  #codes .codes-print-head {
    display: block;
    font-weight: 650;
  }
  #codes .recovery li {
    background: none;
    border-color: #000;
    color: #000;
  }
}

/* sign-in, sign-up and error pages on a wide screen: the card and, beside it, a still of the product (the exploded
   kitchen from the landing page) with one sentence — the page is the product's, not an empty form */
.auth-aside {
  display: none;
}
@media (min-width: 1024px) {
  .auth-main {
    grid-template-columns: minmax(0, 460px) minmax(0, 440px);
    justify-content: center;
    column-gap: clamp(48px, 6vw, 104px);
  }
  .auth-aside {
    display: block;
  }
}
.auth-aside figure {
  display: grid;
  gap: 20px;
  margin: 0;
}
.auth-aside img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: #f2f2ee;
  box-shadow: var(--shadow);
}
/* the still is a light studio shot: on the dark paper it is dimmed a little, so it does not glare beside the card */
@media (prefers-color-scheme: dark) {
  .auth-aside img {
    filter: brightness(0.82);
  }
}
.auth-aside figcaption {
  display: grid;
  gap: 6px;
  max-width: 40ch;
}
.auth-aside b {
  font: 650 1.55rem/1.15 var(--f-text);
  letter-spacing: -0.01em;
}
.auth-aside figcaption span {
  color: var(--ink-2);
}

/* all the sign-up errors at once: the summary takes the focus and links to each field */
.error-summary:focus {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.error-summary ul {
  margin: 6px 0 0;
  padding-left: 1.1em;
}
.error-summary a {
  color: inherit;
}
.check + .field-error {
  margin: -4px 0 12px 30px;
}
