/*
 * OfficePress account, sign-in, verification and error screens (stylesheet slot 13, after composer.css, before the
 * planned guest.css and admin.css). Only --op-* and the remapped --wf-* tokens appear here. The approved preview does
 * not draw these screens, so they take its tokens, type, panels and spacing: a 12px panel with a border, 20px/700
 * headings, 13px body, an accent that is used only for the one primary action, links and the leading glyph.
 *
 *   .verify-page / .verify-card   centred card for sign in, forgot/reset password, setup, email-change verification
 *                                 and the invitation and guest pages of task 00009 (same classes, same rules)
 *   .verify-brand, .verify-mark   product lockup above the card; the card's icon tile
 *   .verify-form, .verify-links   form block, help rows and link row inside the card
 *   .error-page / .error-card     the global 403/404/500 document (it loads no per-page sheet, only the theme list)
 *   [data-account-page]           the signed-in account page: three disclosure rows on one panel
 *
 * Status and validation never rely on colour: an error has its glyph, bold weight and, on a field, a heavier outline;
 * a saved or pending state has its own words and icon; an expired link says so in text.
 *
 * r005/users.css loads after this sheet and `.verify-card .error { color: gray-700 }` ties with a one-class rule here,
 * so the card rules below start from `.verify-page` to win on specificity instead of reordering the sheets.
 * Error text inside the card is the danger colour (the error glyph and weight stay); the pair is measured in
 * reports/officepress-alignment/00008/contrast.md.
 */

/* ---------- Centred card pages ---------- */

.verify-page { background: var(--op-canvas); padding: var(--op-space-6) var(--op-space-4); }

.verify-page .verify-card {
  width: min(100%, 440px);
  padding: var(--op-space-8);
  border: 1px solid var(--op-border);
  border-radius: var(--op-radius-12);
  background: var(--op-surface);
  box-shadow: var(--op-elev-card);
  color: var(--op-text);
}

.verify-page .verify-card h1 { margin: 0 0 var(--op-space-2); font: var(--op-text-heading); color: var(--op-text); overflow-wrap: anywhere; }
.verify-page .verify-card p { color: var(--op-text-2); font: var(--op-text-body); }
.verify-page .verify-card p + p { margin-top: var(--op-space-2); }

/* The brand lockup and the card read as one stack, centred on the page. */
.verify-page:has(> .verify-brand),
.error-page { align-content: center; justify-items: center; gap: var(--op-space-5); }
.verify-page > .verify-card { justify-self: center; }
.verify-brand,
.error-brand { display: inline-flex; align-items: center; gap: var(--op-space-3); text-decoration: none; }

/* A soft tile for the card's one icon, in the accent tint, not a heavy outline. */
.verify-page .verify-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto var(--op-space-4);
  border: 1px solid var(--op-tint-2);
  border-radius: var(--op-radius-12);
  background: var(--op-tint);
  color: var(--op-accent-ink);
}
.verify-page .verify-mark.icon--lg { width: 48px; height: 48px; padding: 13px; }

/* The heading takes focus from script so a state change is announced first; it is not a control, so it draws no ring. */
.verify-page .verify-card h1[tabindex="-1"]:focus { outline: 0; }

/* The small label above the title is quiet caption text, not an uppercase eyebrow. */
.verify-page .verify-card .wf-kicker { margin: 0 0 var(--op-space-1); color: var(--op-text-2); font: var(--op-text-caption); font-weight: 700; letter-spacing: 0; text-transform: none; }

/* ---------- Forms in the card ---------- */

.verify-page .verify-form { margin-top: var(--op-space-5); gap: var(--op-space-4); text-align: left; }
.verify-page .verify-form .button { margin-top: var(--op-space-1); min-height: var(--op-input-h); }
.verify-page .verify-card > .button { min-height: var(--op-input-h); }
.verify-page .verify-card > .button + .help,
.verify-page .verify-card .verify-form + .help { margin-top: var(--op-space-4); }

/* Show / Hide beside a password field: same height as the field, never squeezes it. */
.verify-page .verify-password-control { display: flex; align-items: stretch; gap: var(--op-space-2); }
.verify-page .verify-password-control .input { min-width: 0; flex: 1 1 auto; }
.verify-page .verify-password-control .button { width: auto; min-width: 64px; flex: 0 0 auto; margin-top: 0; }

.verify-page .verify-password-requirements { gap: var(--op-space-1); margin-top: var(--op-space-1); padding-left: var(--op-space-4); color: var(--op-text-2); text-align: left; }

/* Validation: the neutral r005 colour is replaced by the danger colour; the glyph and weight come from components.css. */
.verify-page .verify-card .error { margin: 0; color: var(--op-danger); font: 600 var(--wf-text-xs)/1.5 var(--op-font); text-align: left; }
.verify-page .verify-card > .error { justify-content: center; margin-top: var(--op-space-3); text-align: center; }
.verify-page .verify-form > .error { padding: var(--op-space-3); border: 1px solid var(--op-danger); border-radius: var(--op-radius-8); background: var(--op-danger-tint); }
.verify-page .verify-card .field .error { margin-top: var(--op-space-1); }

/* A sign-out or reset confirmation, and the paused-email notice: left-aligned panels with their own icon. */
.verify-page .verify-card .saved-note {
  align-items: flex-start;
  margin: var(--op-space-4) 0 0;
  padding: var(--op-space-3) var(--op-space-4);
  border: 1px solid var(--op-tint-2);
  border-radius: var(--op-radius-8);
  background: var(--op-tint);
  color: var(--op-text);
  font: 600 var(--wf-text-sm)/1.5 var(--op-font);
  text-align: left;
}
.verify-page .verify-card .verify-notice { margin: var(--op-space-4) 0; }
.verify-page .verify-card .notice p { color: var(--op-text); font: var(--op-text-body); }

.verify-page .verify-help { gap: var(--op-space-3); margin-top: var(--op-space-4); }
.verify-page .verify-help p { color: var(--op-text-2); }
.verify-page .verify-links { margin: var(--op-space-5) 0 0; font-size: var(--wf-text-sm); }
.verify-page .verify-links + .verify-links { margin-top: var(--op-space-2); }
.verify-page .verify-card .verify-links a,
.verify-page .verify-card .help a { display: inline-block; padding: var(--op-space-1) 0; }

.verify-page .verify-card .help { margin: var(--op-space-4) 0 0; color: var(--op-text-2); font: var(--op-text-small); }

/* ---------- Global error page ---------- */

.error-page .error-brand { min-height: 0; padding: 0; color: var(--op-text); font: var(--op-text-title); }
.error-page .error-card .error-mark { border-color: var(--op-border-strong); background: var(--op-sunken); color: var(--op-text-2); }
.error-page .error-card .button { min-height: var(--op-input-h); }
.error-page .error-card .error-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--op-input-h);
  margin-top: var(--op-space-2);
  padding: 0 var(--op-space-2);
  font-weight: 700;
}
@media (hover: hover) { .error-page .error-card .error-secondary:hover { color: var(--op-text); text-decoration-thickness: 2px; } }
.error-page .error-card .error-status { margin-top: var(--op-space-4); color: var(--op-text-2); font: var(--op-text-caption); font-variant-numeric: tabular-nums; }

@media (max-width: 700px) {
  .verify-page { padding: var(--op-space-4) var(--op-space-3); }
  .verify-page .verify-card { padding: var(--op-space-6) var(--op-space-5); }
  .verify-page .verify-card .button,
  .error-page .error-card .error-secondary { min-height: 44px; }
  .verify-page .verify-form .input { min-height: 44px; font-size: 16px; }
}

/* ---------- Account page ---------- */

[data-account-page] .page-header { margin-bottom: var(--op-space-5); }
[data-account-page] .page-title { margin: 0; font: var(--op-text-heading); color: var(--op-text); overflow-wrap: anywhere; }

/* The shell's account menu also names a block `.account-identity`; inside the page list it is the plain profile row. */
.account-list .account-identity { align-items: flex-start; padding: 0; border-bottom: 0; margin-bottom: 0; }

.account-list { border: 1px solid var(--op-border); border-radius: var(--op-radius-12); background: var(--op-surface); box-shadow: none; }
.account-list .account-row { padding: var(--op-space-6); }
.account-list .account-row + .account-row { border-top: 1px solid var(--op-border); }
.account-row-title { color: var(--op-text); font: var(--op-text-title); }
.account-row-main { color: var(--op-text); font: 700 14px/1.4 var(--op-font); }
.account-row-facts { color: var(--op-text-2); font: var(--op-text-body); }
.account-list .account-row-panel { border-top: 1px dashed var(--op-border-strong); }
.account-list .account-row .help { color: var(--op-text-2); font: var(--op-text-small); }

.account-actions { flex-wrap: wrap; }
.account-row .verify-password-control { display: flex; align-items: stretch; gap: var(--op-space-2); }
.account-row .verify-password-control .input { min-width: 0; flex: 1 1 auto; }
.account-row .verify-password-control .button { flex: 0 0 auto; min-width: 64px; }
.account-row .verify-password-requirements { display: grid; gap: var(--op-space-1); margin: var(--op-space-1) 0 0; padding-left: var(--op-space-4); }

/* A confirmation names what happened in words and a tick; the panel tint is only an echo of that. */
.account-list .saved-note { padding: var(--op-space-2) var(--op-space-3); border: 1px solid var(--op-tint-2); border-radius: var(--op-radius-8); background: var(--op-tint); font: 600 var(--wf-text-sm)/1.5 var(--op-font); }

/* An email change still waiting: tinted panel, address on its own line, actions underneath. */
.account-list .pending-change {
  padding: var(--op-space-3) var(--op-space-4);
  border: 1px solid var(--op-tint-2);
  border-radius: var(--op-radius-8);
  background: var(--op-tint);
  color: var(--op-text);
}
.account-list .pending-change strong { color: var(--op-text); }
.account-list .pending-address { font-weight: 700; }
.account-list .pending-change .help { color: var(--op-text-2); max-width: 68ch; }
/* A refused Resend or Cancel is read on the page surface: the danger colour passes there, but not on the tint (dark 4.0:1). */
.account-list .pending-change .error { padding: var(--op-space-2) var(--op-space-3); border: 1px solid var(--op-danger); border-radius: var(--op-radius-8); background: var(--op-surface); }
/* A link that has run out says so in its heading; the warning edge repeats it. */
.account-list .pending-change[data-expired] { border-color: var(--op-warning); background: var(--op-warning-tint); }
.account-list .account-quiet-note { border-color: var(--op-border); background: var(--op-sunken); color: var(--op-text); }
.account-list .account-quiet-note strong { color: var(--op-text); }

.account-stack > .notice { background: var(--op-tint); }

@media (max-width: 480px) {
  .account-actions .button { flex: 1 1 auto; }
  .account-list .account-row { padding: var(--op-space-5) var(--op-space-4); }
}
