/* Redesign: accounts, 404 and best-of pages. */

/* ---- Auth (login / signup) --------------------------------------------- */
.ffx-auth { max-width: 460px; margin-inline: auto; padding-top: clamp(16px, 5vw, 40px); }
.ffx-auth-card { background: var(--ff-card); border: 1px solid var(--ff-border); border-radius: 14px; padding: clamp(22px, 5vw, 32px); display: grid; gap: 16px; }
.ffx-auth-title { font-family: var(--ff-font-head); font-size: 30px; font-weight: 700; margin: 0 0 6px; }
.ffx-auth-sub { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ff-ink-2); }
.ffx-auth-form { display: grid; gap: 16px; }
.ffx-auth-submit { width: 100%; padding: 14px; font-size: 16.5px; }
.ffx-auth-terms { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ff-ink-2); }
.ffx-auth-terms a, .ffx-auth-alt a { color: var(--ff-primary); text-decoration: underline; text-underline-offset: 3px; }
.ffx-auth-alt { margin: 0; border-top: 1px solid var(--ff-divider); padding-top: 14px; font-size: 15px; color: var(--ff-ink-2); text-align: center; }
.ffx-hint { font-size: 13.5px; color: var(--ff-muted); }
/* Form errors: ink text on a neutral box with a teal edge (red is reserved for red-label/allergens). */
.ffx-error-box { background: var(--ff-surface); border-inline-start: 4px solid var(--ff-primary); border-radius: var(--ff-radius); padding: 10px 14px; font-size: 15px; font-weight: 600; color: var(--ff-ink); }
.ffx-error-box p, .ffx-error { margin: 0; }
.ffx-error { font-size: 14px; font-weight: 600; color: var(--ff-ink); }
.ffx-error::before { content: "⚠ "; color: var(--ff-primary); }
.ff-input.is-invalid { border-color: var(--ff-ink); border-width: 2px; }

/* ---- Profile ----------------------------------------------------------- */
.ffx-profile-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.ffx-profile-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ffx-avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--ff-tint); color: var(--ff-tint-text); display: flex; align-items: center; justify-content: center; font-family: var(--ff-font-head); font-size: 20px; font-weight: 700; }
.ffx-profile-text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.ffx-profile-name { font-family: var(--ff-font-head); font-size: 22px; font-weight: 700; margin: 0; }
.ffx-profile-note { margin: 20px 0 0; font-size: 16px; color: var(--ff-ink-2); }
.ffx-profile-links { margin-top: 32px; }
.ffx-profile-links .ff-h2 { margin-bottom: 12px; }

/* ---- 404 --------------------------------------------------------------- */
.ffx-404 { text-align: center; display: grid; justify-items: center; gap: 14px; padding-top: clamp(32px, 9vw, 80px); }
.ffx-404-code { font-family: var(--ff-font-head); font-size: clamp(88px, 22vw, 140px); font-weight: 900; line-height: 1; color: var(--ff-primary); letter-spacing: -0.03em; }
.ffx-404-title { font-family: var(--ff-font-head); font-size: clamp(28px, 6vw, 38px); font-weight: 700; margin: 0; }
.ffx-404-text { margin: 0 0 8px; font-size: 17.5px; line-height: 1.6; color: var(--ff-ink-2); max-width: 48ch; }
.ffx-404-search { width: 100%; max-width: 640px; }
.ffx-404-pills { justify-content: center; margin-top: 14px; }

/* ---- Best-of ranking --------------------------------------------------- */
.ffx-best-meta { margin: 0 0 18px; }
.ffx-best-intro { margin: 0 0 24px; font-size: 18px; line-height: 1.65; text-wrap: pretty; }
.ffx-rank { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 10px; }
.ffx-rank-row {
    display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center;
    background: var(--ff-card); border: 1px solid var(--ff-border); border-radius: 10px;
    padding: 14px 16px; color: var(--ff-ink); text-decoration: none;
}
.ffx-rank-row:hover { border-color: var(--ff-border-hover); color: var(--ff-ink); }
.ffx-rank-num { font-family: var(--ff-font-head); font-size: 24px; font-weight: 800; color: var(--ff-primary); }
.ffx-rank-main { display: grid; gap: 2px; min-width: 0; }
.ffx-rank-name { font-family: var(--ff-font-head); font-size: 18px; font-weight: 700; line-height: 1.3; }
.ffx-rank + .ff-ad, .ffx-rank ~ .ff-ad { margin: 4px 0 14px; }
.ffx-best-section { margin-top: 32px; }
.ffx-best-method { margin: 0; font-size: 16.5px; line-height: 1.7; color: var(--ff-ink-2); }
.ff-faq.ffx-best-section .ff-h2 { margin-top: 4px; }
@media (max-width: 359.98px) {
    .ffx-rank-row { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
}
