/* Passport's pages outside the member's page (sign in, sign up, passwords, app consent, checkout,
   the front page, the docs, errors) in the shared design (ui/hc.css). The page scripts still set a
   few classes of their own (.hp-alert, .hp-spinner, .hp-pw-*, .hp-wallet-picker-btn…): they are
   drawn here in the new look. */

.pp-page .wrap.section.tight { padding-block: 24px; }
@container site (min-width: 900px) { .pp-page .wrap.section.tight { padding-block: 40px; } }

/* ---------- sign in / sign up: the words on the left, the form on the right ---------- */
.auth { align-items: start; }
@container site (min-width: 900px) { .auth { grid-template-columns: minmax(0, 1fr) 440px; gap: 56px; } }
.auth-img { border-radius: 24px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; display: none; }
.auth-img img { width: 100%; height: 100%; object-fit: cover; }
@container site (min-width: 900px) { .auth-img { display: block; } }
.auth-card { gap: 16px; }
.auth-card h2 { font-size: 22px; }
.center-card { width: 100%; max-width: 480px; margin: 0 auto; }
.fine { font-size: 12px; color: var(--muted); text-align: center; }
.fine a { color: var(--muted); text-decoration: underline; }
.or { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* messages the scripts show (.hp-alert … .show) */
.hp-alert { display: none; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.hp-alert.show { display: block; }
.hp-alert-error { background: var(--bad-bg); border: 1px solid rgba(248, 113, 113, .3); color: var(--bad); }
.hp-alert-success { background: var(--good-bg); border: 1px solid rgba(52, 211, 153, .3); color: var(--good); }
.hp-alert-warning { background: var(--wait-bg); border: 1px solid rgba(251, 191, 36, .3); color: var(--wait); }
.hp-alert a { color: inherit; font-weight: 600; }
.hp-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid transparent; border-top-color: currentColor; border-radius: 50%; animation: pp-spin .6s linear infinite; vertical-align: -3px; flex-shrink: 0; }
@keyframes pp-spin { to { transform: rotate(360deg); } }
.hp-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary:disabled { background: var(--blue); border-color: var(--blue); color: #050911; }

/* passwords: the eye, how strong, a field's own error */
.hp-pw-wrap { position: relative; display: block; }
.hp-pw-wrap .input { padding-right: 50px; }
.hp-pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hp-pw-eye:hover { color: var(--text); }
.hp-pw-eye.revealed { color: var(--link); }
.hp-pw-strength { display: flex; align-items: center; gap: 10px; }
.hp-pw-bar { flex: 1; height: 6px; border-radius: 999px; background: #1a2333; overflow: hidden; }
.hp-pw-fill { height: 100%; width: 0; border-radius: 999px; transition: width .3s, background .3s; }
.hp-pw-label { font-size: 12px; min-width: 48px; text-align: right; white-space: nowrap; }
.hp-field-error { color: var(--bad); font-size: 12px; min-height: 1em; }
.hp-field-error:empty { display: none; }
.input.hp-input-error { border-color: var(--bad); }
.field .hint { font-size: 12px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); flex-shrink: 0; }

/* signing in with the HyperPass browser extension (login.js draws the button) */
.hp-wallet-list { display: flex; flex-direction: column; gap: 8px; }
.hp-wallet-list:empty { display: none; }
.hp-wallet-picker-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font: 600 15px var(--font); cursor: pointer; }
.hp-wallet-picker-btn:hover { border-color: var(--link); }
.hp-wallet-picker-btn:disabled { opacity: .6; cursor: not-allowed; }
.hp-wallet-picker-icon { width: 22px; height: 22px; border-radius: 6px; }

/* sign-up: the recovery phrase, the wallet address, and the welcome */
.hp-recovery-words { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@container site (min-width: 480px) { .hp-recovery-words { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hp-recovery-word { font-family: var(--mono); font-size: 14px; padding: 8px 10px; border-radius: 10px; background: var(--field); border: 1px solid var(--line); }
.hp-recovery-word .num { color: var(--muted); font-size: 12px; margin-right: 4px; }
.addr-box { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; padding: 10px 14px; border-radius: 12px; background: var(--field); border: 1px solid var(--line); }
.done-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--good-bg); color: var(--good); display: inline-flex; align-items: center; justify-content: center; align-self: center; }
.done-mark svg { width: 38px; height: 38px; }
.hp-btn-cta svg { width: 18px; height: 18px; }

/* ---------- an app asks to use the Passport (consent, "continue as") ---------- */
.hp-scope-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hp-scope-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); font-size: 14px; }
.hp-scope-list .scope-icon { color: var(--link); display: inline-flex; }
.who { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); color: var(--text); text-decoration: none; }
.who:hover { border-color: var(--link); color: var(--text); }
.who .stack { min-width: 0; }
.who .name { font-weight: 600; overflow-wrap: anywhere; }
.who .email { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.who.other { border-style: dashed; color: var(--link); }
.who.other .av { background: transparent; border: 2px dashed var(--line-2); color: var(--link); }

/* ---------- the checkout ---------- */
.co-lines { display: flex; flex-direction: column; gap: 10px; }
.co-total { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.co-total .amt { font-size: 22px; font-weight: 700; text-align: right; }
.co-total .sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; text-align: right; }
.co-wallet { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.co-balance { font-size: 18px; font-weight: 700; }
.co-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.co-error { color: var(--bad); font-size: 14px; }
.co-error:empty { display: none; }
.co-short { display: flex; flex-direction: column; gap: 10px; }

/* ---------- the front page and the docs ---------- */
.dl { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; }
.dl:hover { border-color: var(--link); color: var(--text); }
.dl .grow b { display: block; }
.docs-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.docs pre { margin: 0; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: #070b13; overflow-x: auto; font: 13px/1.55 var(--mono); color: #cbd5e1; }
.docs code { font-family: var(--mono); font-size: .92em; }
.docs p code, .docs li code, .docs td code { padding: 1px 6px; border-radius: 6px; background: var(--field); border: 1px solid var(--line); }
.docs .code-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: -8px; }
.docs .endpoint { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 14px; }
.docs .method { font: 700 12px var(--mono); padding: 3px 8px; border-radius: 6px; background: var(--good-bg); color: var(--good); }
.docs .method.post { background: var(--blue-bg); color: var(--link); }
.docs ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.docs section { scroll-margin-top: 84px; }

/* ---------- an error ---------- */
.err-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--wait-bg); color: var(--wait); display: inline-flex; align-items: center; justify-content: center; align-self: center; }
.err-mark svg { width: 30px; height: 30px; }

/* sign-up: once the intro has gone (recovery phrase, welcome), the card stands in the middle */
#authIntro[hidden] + .auth-card { grid-column: 1 / -1; justify-self: center; width: 100%; max-width: 560px; }
.input.mono::placeholder { font-family: var(--font); }
