/* FacePass's server-rendered pages (src/fp-pages.js): the account on facepass.dev, the sign-in link pages, the
   download page and /paid. On top of facepass-chrome.css (tokens, header, .btn, footer) and facepass-page.css (.page,
   .aurora, .confirm, .btn-lime): the account's own pieces only. */

h1, h2, h3, p { margin: 0; }
h1, h2 { font-stretch: 112%; font-weight: 800; letter-spacing: -0.035em; text-wrap: balance; }
.eyebrow { margin: 0 0 18px; font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
img { display: block; max-width: 100%; }

.fp-page { min-height: 100vh; display: flex; flex-direction: column; }
.fp-page [hidden] { display: none !important; }
.page.fp-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 56px var(--gutter) 64px; }
.fp-page a { text-underline-offset: 3px; }

/* ---------- Heads ---------- */
.fp-head { margin-bottom: 28px; }
.fp-head .eyebrow { margin-bottom: 12px; }
.fp-head h1 { font-size: clamp(36px, 6.4vw, 60px); line-height: 1; }
.fp-h1-sm { font-size: clamp(28px, 4.6vw, 40px) !important; line-height: 1.05; }
.fp-lede { margin-top: 12px; color: var(--mute); font-size: 18px; overflow-wrap: anywhere; }
.fp-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }

/* ---------- Layouts ---------- */
.fp-signin { max-width: 520px; margin: 0 auto; }
.fp-signin.fp-wide { max-width: 860px; }
.fp-center { text-align: center; display: grid; justify-items: center; gap: 18px; padding-top: 40px; }
.fp-grid { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 860px) { .fp-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; } }
.fp-account > .fp-card + .fp-grid, .fp-grid + .fp-card { margin-top: 16px; }
.fp-signin .fp-card + .fp-card, .fp-signin .fp-alert + .fp-card { margin-top: 16px; }

/* ---------- Cards ---------- */
.fp-card { min-width: 0; padding: 24px; border-radius: 24px; background: rgba(29, 25, 40, 0.72); box-shadow: inset 0 0 0 1px rgba(246, 243, 255, 0.12); }
.fp-card h2 { font-size: 24px; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 14px; }
.fp-card h3 { font-size: 18px; margin-bottom: 10px; }
.fp-card > .btn { margin-top: 16px; }
.fp-muted { color: var(--mute); }
.fp-hint { margin-top: 10px; color: var(--mute); font-size: 15px; }

/* ---------- Download ---------- */
.fp-card[id] { scroll-margin-top: 96px; }
.fp-download { display: grid; gap: 24px; padding: 28px;
  background: linear-gradient(160deg, rgba(212, 255, 78, 0.12), rgba(76, 198, 255, 0.06) 45%, rgba(29, 25, 40, 0.8));
  box-shadow: inset 0 0 0 1px rgba(212, 255, 78, 0.32); }
@media (min-width: 860px) { .fp-download { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 36px; padding: 36px; } }
.fp-download-main { display: flex; gap: 20px; align-items: flex-start; }
.fp-download-main h2 { font-size: clamp(26px, 3.6vw, 34px); }
.fp-app-icon { flex: none; width: 88px; height: 88px; border-radius: 20px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.8); }
@media (max-width: 480px) { .fp-download-main { flex-direction: column; } .fp-app-icon { width: 64px; height: 64px; border-radius: 15px; } }
.fp-btn-xl { min-height: 60px; padding: 0 32px; font-size: 18px; }
.fp-build { margin-top: 12px; color: var(--mute); font-size: 15px; }
.fp-steps { margin: 0; padding-left: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.fp-steps li { counter-increment: step; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: baseline; color: var(--mute); }
.fp-steps li::before { content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(246, 243, 255, 0.1); color: var(--paper); font-size: 14px; font-weight: 800; }
.fp-steps strong { color: var(--paper); font-weight: 700; }
.fp-install-only { margin-top: 16px; }
.fp-back { margin-top: 16px; }
.fp-back p { color: var(--mute); font-size: 15px; margin-top: 10px !important; }
.fp-page .confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- The key ---------- */
.fp-key { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fp-key-code { flex: 0 1 auto; min-width: 0; padding: 12px 16px; border-radius: 14px; background: var(--ink); box-shadow: inset 0 0 0 1px rgba(246, 243, 255, 0.2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(15px, 4.1vw, 19px); font-weight: 700; letter-spacing: 0.02em; color: var(--paper);
  white-space: nowrap; overflow-x: auto; -webkit-user-select: all; user-select: all; }

/* ---------- Facts, Macs ---------- */
.fp-facts { display: grid; gap: 12px; margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--faint); }
.fp-facts > div { display: grid; gap: 2px; }
@media (min-width: 520px) { .fp-facts > div { grid-template-columns: 90px minmax(0, 1fr); gap: 14px; } }
.fp-facts dt { color: var(--mute); font-size: 15px; font-weight: 700; }
.fp-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.fp-facts code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.fp-count { display: inline-block; margin-left: 8px; padding: 3px 10px; border-radius: 99px; background: rgba(246, 243, 255, 0.1); color: var(--paper); font-size: 14px; font-weight: 700; letter-spacing: 0; vertical-align: middle; }
.fp-macs { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.fp-macs li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: rgba(9, 7, 15, 0.55); }
.fp-mac-name { font-weight: 700; }
.fp-macs .fp-muted { font-size: 14px; }
.fp-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: rgba(255, 138, 138, 0.16); color: #ffc9c9; font-size: 12px; font-weight: 700; }
.fp-help { margin-top: 16px; }
.fp-links { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--mute); }
.fp-links a, .fp-hint a, .fp-foot-note a, .fp-muted a, .fp-facts a, .fp-alert a { color: var(--paper); }

/* ---------- Forms ---------- */
.fp-form { display: grid; gap: 16px; }
.fp-form .btn { justify-self: start; }
.fp-form-inline { margin-top: 8px; }
.fp-field { display: grid; }
.fp-field label { margin-bottom: 8px; font-weight: 700; font-size: 15px; }
.fp-input { width: 100%; min-height: 52px; padding: 12px 16px; border: 0; border-radius: 14px; background: rgba(9, 7, 15, 0.7); color: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(246, 243, 255, 0.24); font: inherit; font-size: 17px; }
.fp-input::placeholder { color: rgba(246, 243, 255, 0.62); }
.fp-input:hover { box-shadow: inset 0 0 0 1px rgba(246, 243, 255, 0.4); }
.fp-input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--lime); }
.fp-input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #ff8a8a; }
.fp-input-key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.02em; text-transform: uppercase; }
.fp-input-key::placeholder { text-transform: none; }
.fp-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--mute); font-size: 14px; }
.fp-or::before, .fp-or::after { content: ""; flex: 1; height: 1px; background: var(--faint); }
.fp-foot-note { margin-top: 22px; color: var(--mute); font-size: 15px; text-align: center; }
.fp-center .fp-hint { margin-top: 0; }

/* ---------- Alerts ---------- */
.fp-alert { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; padding: 14px 16px; border-radius: 16px; font-size: 15px; }
.fp-alert svg { flex: none; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fp-alert-error { background: rgba(255, 138, 138, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 138, 138, 0.45); color: #ffd6d6; }
.fp-alert-ok { background: rgba(52, 199, 89, 0.12); box-shadow: inset 0 0 0 1px rgba(52, 199, 89, 0.5); color: #d4f7dc; }
.fp-alert-info { background: rgba(76, 198, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(76, 198, 255, 0.4); color: #d8f1ff; }
.fp-download .fp-alert { margin: 8px 0 0; }

/* ---------- Signing in ---------- */
.fp-spinner { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 4px rgba(246, 243, 255, 0.14); border-top: 4px solid var(--lime); animation: fp-spin 0.9s linear infinite; }
@keyframes fp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fp-spinner { animation: none; } }
html.a11y-still .fp-spinner { animation: none; }

@media (max-width: 640px) {
  .page.fp-main { padding-top: 36px; }
  .fp-input-key { font-size: 15px; padding: 12px 12px; }
  .fp-card { padding: 20px; border-radius: 20px; }
  .fp-download { padding: 22px; }
  .fp-form .btn, .fp-card > .btn, .fp-btn-xl, .fp-form-inline .btn { width: 100%; justify-self: stretch; }
}
