/* Account page: sign-in, registration, recovery and Premium purchase.
   Built on the landing tokens from styles.css (--purple, --ink, --muted, --lavender, --dark). */

.account-page { background: #fff; }
/* Views and forms use display:grid/flex, which would override the hidden attribute. */
.account-page [hidden] { display: none !important; }

.account-hero { position: relative; overflow: hidden; padding-bottom: 72px; background: var(--dark); border-radius: 0 0 60px 60px; color: #f0f0f0; }
.account-hero-background { position: absolute; top: -58px; left: calc(50% - 632px); opacity: .9; }
.account-nav { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding-top: 32px; }
.account-logo { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.account-back { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border: 1px solid #ffffff40; border-radius: 14px; font-size: 16px; font-weight: 500; transition: border-color .18s, background .18s; }
.account-back::before { content: "←"; }
.account-nav-actions { display: flex; align-items: center; gap: 10px; }
.account-nav .lang-switch { min-width: 48px; min-height: 46px; border-radius: 14px; }
.account-back:hover { border-color: var(--purple); background: #834dfb26; }
.account-hero-content { position: relative; z-index: 1; padding-top: 72px; }
.account-hero h1 { font-size: 72px; line-height: 1; font-weight: 700; }
.account-hero-content p { max-width: 600px; margin-top: 28px; color: #dcdcdc; font-size: 22px; line-height: 1.3; }

.account-main { max-width: 1180px; padding-top: 56px; }

.account-notice { margin-bottom: 28px; padding: 20px 24px; border-radius: 24px; background: var(--lavender); color: var(--ink); font-size: 18px; line-height: 1.4; }
.account-notice.is-success { background: #e3f9f6; }
.account-notice.is-error { background: #fdecec; color: #8c1d18; }
.account-notice strong { font-weight: 600; }

.account-loading { padding: 40px 0; color: var(--muted); font-size: 18px; text-align: center; }

.account-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 24px; align-items: start; }
.account-layout-single { grid-template-columns: minmax(0, 640px); justify-content: center; }

.account-card { border-radius: 40px; padding: 40px; }
.account-auth, .account-code { box-shadow: inset 0 0 0 1px var(--purple); background: #fff; }
.account-about { background: var(--lavender); }
.account-card h2, .account-buy h2 { color: var(--ink); font-size: 36px; line-height: 1.05; font-weight: 600; }
.account-lead { margin-top: 16px; color: var(--muted); font-size: 18px; line-height: 1.4; }
.account-small { margin-top: 20px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.account-small a, .account-check a { color: var(--purple); text-decoration: underline; text-underline-offset: 2px; }

.account-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 18px; background: var(--lavender); }
.account-tabs button { min-height: 46px; padding: 0 22px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-size: 17px; font-weight: 500; transition: background .18s, color .18s; }
.account-tabs button[aria-selected="true"] { background: var(--purple); color: #fff; }

.account-form { display: grid; gap: 18px; margin-top: 28px; }
.account-field { display: grid; gap: 8px; }
.account-field > span:first-child { color: var(--ink); font-size: 15px; font-weight: 500; }
.account-field small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.account-field input, .account-password input { width: 100%; min-height: 54px; padding: 14px 16px; border: 1px solid #d9d4ea; border-radius: 16px; background: #fff; color: var(--ink); font: inherit; font-size: 17px; transition: border-color .18s, box-shadow .18s; }
.account-field input:focus, .account-password input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px #834dfb33; }
.account-field input[aria-invalid="true"] { border-color: #c4302b; }
.account-password { position: relative; display: block; }
.account-password input { padding-right: 112px; }
.account-reveal { position: absolute; top: 7px; right: 7px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--lavender); color: var(--purple); font-size: 14px; font-weight: 500; }

.account-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: -6px 0 0; padding: 0; list-style: none; }
.account-rules li { position: relative; padding-left: 22px; color: var(--muted); font-size: 14px; line-height: 1.3; }
.account-rules li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 10px; height: 10px; border: 1.5px solid #c9c3dc; border-radius: 50%; }
.account-rules li.is-ok { color: #1e6b35; }
.account-rules li.is-ok::before { border-color: #2f9e57; background: #2f9e57; }

.account-check { display: flex; align-items: flex-start; gap: 12px; color: var(--ink); font-size: 15px; line-height: 1.4; cursor: pointer; }
.account-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--purple); }

.account-error { min-height: 0; color: #b3261e; font-size: 15px; line-height: 1.4; }
.account-error:empty { display: none; }

.account-submit { width: 100%; min-height: 58px; font-size: 19px; }
.account-submit:disabled, .account-plan-buy:disabled { opacity: .5; cursor: default; filter: none; transform: none; }
.account-link { justify-self: center; padding: 6px; border: 0; background: none; color: var(--purple); font-size: 16px; font-weight: 500; }
.account-link:hover { text-decoration: underline; }
.account-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.account-steps { display: grid; gap: 10px; margin: 0; padding: 18px 20px 18px 40px; border-radius: 20px; background: var(--lavender); color: var(--muted); font-size: 16px; line-height: 1.4; }
.account-steps strong { color: var(--ink); font-weight: 600; }
.account-code-input { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace !important; font-size: 26px !important; font-weight: 600; letter-spacing: 4px; text-align: center; text-transform: uppercase; }
.account-code-input::placeholder { color: #c9c3dc; }

.account-points { display: grid; gap: 22px; margin: 28px 0 0; padding: 0; list-style: none; }
.account-points li { display: flex; gap: 14px; color: var(--muted); font-size: 17px; line-height: 1.4; }
.account-points img { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.account-points strong { color: var(--ink); font-weight: 600; }
.account-plan-hint { margin-top: 28px; padding: 16px 18px; border-radius: 20px; background: var(--purple); color: #fff; font-size: 16px; line-height: 1.4; }

.account-code-box { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding: 18px; border-radius: 24px; background: var(--lavender); }
.account-code-box code { flex: 1; min-width: 0; color: var(--ink); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 20px; font-weight: 600; letter-spacing: .5px; overflow-wrap: anywhere; user-select: all; }
.account-copy { flex: none; min-height: 48px; padding: 12px 18px; font-size: 16px; border-radius: 14px; }
.account-code .account-check { margin-top: 20px; }
.account-code .account-submit { margin-top: 20px; }

.account-profile { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--dark); color: #f0f0f0; }
.account-overline { color: #a2a1a1; font-size: 15px; }
.account-name { margin-top: 6px; font-size: 40px; line-height: 1.05; font-weight: 600; overflow-wrap: anywhere; }
.account-status { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 8px 12px; border-radius: 14px; background: #ffffff1a; color: #dcdcdc; font-size: 15px; font-weight: 500; line-height: 1.3; }
.account-status.is-active { background: #f0e100; color: #292929; }
.account-profile-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.account-logout { min-height: 52px; padding: 14px 26px; font-size: 17px; border-radius: 16px; }
.account-danger-link { color: #a2a1a1; font-size: 14px; text-decoration: underline; text-underline-offset: 2px; }
.account-danger-link:hover { color: #ffb4ab; }

.account-buy { margin-top: 60px; scroll-margin-top: 24px; }
.account-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.account-plan { position: relative; display: flex; flex-direction: column; min-height: 330px; padding: 34px; overflow: hidden; border-radius: 40px; box-shadow: inset 0 0 0 1px var(--purple); color: #333139; transition: box-shadow .2s, transform .2s; }
.account-plan.is-annual { background: var(--purple); box-shadow: none; color: #f5f3ff; }
.account-plan.is-chosen { box-shadow: inset 0 0 0 3px var(--purple), 0 18px 50px #834dfb33; }
.account-plan.is-annual.is-chosen { box-shadow: 0 0 0 4px #f0e100, 0 18px 50px #834dfb55; }
.account-plan > * { position: relative; z-index: 1; }
.account-plan-wave { position: absolute; z-index: 0; top: -120px; right: -160px; opacity: .5; pointer-events: none; }
.account-plan-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-plan .plan-label { color: var(--purple); }
.account-plan.is-annual .plan-label { color: #f0e100; }
.account-plan-price { margin-top: 24px; font-size: 64px; font-weight: 600; line-height: 1.05; white-space: nowrap; }
.account-plan-price span { margin-left: 6px; font-size: 20px; font-weight: 500; }
.account-plan-note { margin-top: 12px; color: var(--muted); font-size: 16px; line-height: 1.35; }
.account-plan.is-annual .account-plan-note { color: #f5f3ffcc; }
/* English page: "≈ $2.38" under the ruble price and the rate note (account.js). */
.account-plan-approx { margin-top: 4px; }
.account-plan.is-annual .account-plan-approx { color: #f5f3ffcc; }
.account-fx-note { max-width: none; margin: 12px 0 0; text-align: left; font-size: 14px; }
.account-plan-buy { width: 100%; min-height: 56px; margin-top: auto; padding: 16px 24px; font-size: 19px; }
.account-plan.is-annual .account-plan-buy { background: #f5f3ff; color: #312f37; }
.account-plan-buy-wrap { margin-top: 28px; padding-top: 0; flex: 1; display: flex; align-items: flex-end; }
.account-test { margin-top: 20px; padding: 14px 18px; border-radius: 18px; background: #fff7cc; color: #5c4a00; font-size: 15px; line-height: 1.4; }

/* The landing footer sits closer on a short page. */
.account-page .footer { margin-top: 120px; }

@media (max-width: 1000px) {
  .account-hero { border-radius: 0 0 48px 48px; }
  .account-hero h1 { font-size: 56px; }
  .account-hero-background { left: -200px; transform: rotate(12deg); }
  .account-layout { grid-template-columns: 1fr; }
  .account-layout-single { grid-template-columns: 1fr; }
  .account-profile { flex-direction: column; align-items: flex-start; }
  .account-profile-actions { flex-direction: row; align-items: center; gap: 20px; }
}

@media (max-width: 760px) {
  .account-plans { grid-template-columns: 1fr; gap: 20px; }
  .account-page .footer { margin-top: 72px; }
}

@media (max-width: 600px) {
  .account-hero { padding-bottom: 44px; border-radius: 0 0 32px 32px; }
  .account-nav { padding-top: 20px; }
  .account-logo { font-size: 22px; }
  .account-back { padding: 10px 14px; font-size: 14px; }
  .account-hero-content { padding-top: 44px; }
  .account-hero h1 { font-size: clamp(36px, 10vw, 48px); }
  .account-hero-content p { margin-top: 18px; font-size: 17px; }
  .account-main { padding-top: 32px; }
  .account-card { padding: 24px 20px; border-radius: 28px; }
  .account-card h2, .account-buy h2 { font-size: 28px; }
  .account-lead { font-size: 16px; }
  .account-tabs { display: flex; }
  .account-tabs button { flex: 1; padding: 0 8px; font-size: 15px; }
  .account-steps { padding: 14px 14px 14px 34px; font-size: 15px; }
  .account-rules { grid-template-columns: 1fr; }
  .account-code-box { flex-direction: column; align-items: stretch; }
  .account-code-box code { font-size: 17px; text-align: center; }
  .account-name { font-size: 30px; }
  .account-buy { margin-top: 44px; }
  .account-plan { min-height: 0; padding: 26px 22px; border-radius: 28px; }
  .account-plan-price { font-size: clamp(46px, 14vw, 60px); }
  .account-plan-buy-wrap { margin-top: 24px; }
  .account-notice { padding: 16px 18px; border-radius: 20px; font-size: 16px; }
}
