:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', 'Segoe UI', sans-serif;
  background: #000;
  color: #f5f5f7;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: #000; color: #f5f5f7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

.auth-layout {
  width: min(420px, calc(100% - 40px));
  min-height: calc(100vh - 52px);
  margin: 0 auto;
  padding: 64px 0 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-panel {
  width: 100%;
  padding: 44px 0;
  animation: auth-reveal 520ms cubic-bezier(.22, 1, .36, 1) both;
}

.eyebrow { margin: 0 0 10px; color: #86868b; font-size: 12px; font-weight: 620; letter-spacing: .02em; text-transform: none; }
h1 { margin: 0; color: #f5f5f7; font-size: clamp(34px, 5vw, 46px); font-weight: 640; line-height: 1.05; letter-spacing: -.04em; }
.intro { margin: 16px 0 34px; color: #a1a1a6; font-size: 15px; line-height: 1.55; }

.auth-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
label { color: #d2d2d7; font-size: 13px; font-weight: 540; }

input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  outline: none;
  background: #111113;
  color: #f5f5f7;
  font: inherit;
  caret-color: #fff;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

input::placeholder { color: #6e6e73; }
input:hover { border-color: rgba(255, 255, 255, .26); }
input:focus { border-color: rgba(255, 255, 255, .72); background: #161617; box-shadow: 0 0 0 4px rgba(255, 255, 255, .08); }

.plan-picker { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.plan-picker legend { margin-bottom: 9px; color: #d2d2d7; font-size: 13px; font-weight: 540; }
.plan-choice { position: relative; display: block; cursor: pointer; }
.plan-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.plan-choice > span {
  min-height: 72px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: #111113;
  display: grid;
  gap: 5px;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}
.plan-choice strong { color: #f5f5f7; font-size: 14px; }
.plan-choice small { color: #86868b; font-size: 12px; font-weight: 480; }
.plan-choice:hover > span { transform: translateY(-1px); border-color: rgba(255, 255, 255, .28); }
.plan-choice input:focus-visible + span { box-shadow: 0 0 0 4px rgba(255, 255, 255, .08); }
.plan-choice input:checked + span { border-color: rgba(255, 255, 255, .7); background: #1c1c1e; }
.plan-disclaimer { margin: 3px 0 0; color: #86868b; font-size: 12px; line-height: 1.45; }

.submit-button,
.secondary-button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 980px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 14px;
  font-weight: 590;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.submit-button { margin-top: 6px; background: #f5f5f7; color: #000; }
.submit-button:hover:not(:disabled) { transform: translateY(-1px); background: #fff; }
.submit-button:disabled { cursor: not-allowed; opacity: .46; }
.secondary-button { padding: 0 17px; border-color: rgba(255, 255, 255, .18); background: transparent; color: #f5f5f7; }
.secondary-button:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(255, 255, 255, .42); background: rgba(255, 255, 255, .06); }

.form-message { min-height: 20px; margin: 0; color: #ff9f9a; font-size: 13px; line-height: 1.45; }
.auth-switch { margin: 26px 0 0; color: #86868b; font-size: 13px; }
.auth-switch a { color: #f5f5f7; text-decoration: underline; text-decoration-color: #6e6e73; text-underline-offset: 3px; }
.muted { color: #86868b; }

.registration-layout { width: min(1080px, calc(100% - 48px)); align-items: flex-start; padding-top: 80px; }
.registration-panel { padding: 0; }
.registration-heading { max-width: 760px; margin-bottom: 50px; }
.registration-heading .intro { max-width: 650px; margin-bottom: 0; font-size: 17px; }
.registration-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr); gap: 48px; align-items: start; }
.registration-form { gap: 0; padding-right: 48px; border-right: 1px solid rgba(255, 255, 255, .12); }
.checkout-summary { position: sticky; top: 80px; }

.registration-section-heading { display: flex; align-items: flex-start; gap: 12px; }
.registration-section-heading > span { width: 22px; padding-top: 2px; color: #6e6e73; font-size: 11px; font-weight: 650; letter-spacing: .04em; }
.registration-section-heading > div { display: grid; gap: 4px; }
.registration-section-heading strong { color: #f5f5f7; font-size: 15px; font-weight: 610; }
.registration-section-heading small { color: #86868b; font-size: 12px; line-height: 1.45; }
.registration-fields { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plan-section-heading { margin-top: 34px; }
.registration-plan-picker { margin-top: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.registration-plan-picker b { color: #f5f5f7; font-weight: 620; }
.registration-message { min-height: 0; margin-top: 20px; color: #86868b; }
.registration-submit { width: 100%; margin-top: 14px; cursor: not-allowed !important; opacity: .46 !important; }

.checkout-product { margin-top: 26px; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .12); border-bottom: 1px solid rgba(255, 255, 255, .12); display: flex; justify-content: space-between; gap: 16px; }
.checkout-product > div { display: grid; gap: 5px; }
.checkout-product strong, .checkout-total strong { color: #f5f5f7; font-size: 14px; }
.checkout-product span { color: #86868b; font-size: 12px; }
.checkout-total { padding: 19px 0 22px; display: flex; align-items: center; justify-content: space-between; color: #a1a1a6; font-size: 13px; }
.checkout-total strong { font-size: 20px; letter-spacing: -.02em; }
.checkout-disabled-notice { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); display: grid; gap: 5px; }
.checkout-disabled-notice strong { color: #d2d2d7; font-size: 12px; }
.checkout-disabled-notice span { color: #86868b; font-size: 11px; line-height: 1.45; }

.account-layout { width: min(1040px, calc(100% - 48px)); margin: 76px auto 100px; animation: auth-reveal 520ms cubic-bezier(.22, 1, .36, 1) both; }
.account-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 46px; }
.account-actions { display: flex; align-items: center; gap: 10px; }
.account-actions [hidden] { display: none !important; }
.account-top h1 { font-size: clamp(34px, 5vw, 52px); }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.account-item { min-height: 138px; padding: 24px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; background: #101010; }
.account-item-wide { grid-column: 1 / -1; }
.account-label { margin: 0 0 12px; color: #86868b; font-size: 11px; font-weight: 620; letter-spacing: .04em; }
.account-value { margin: 0; color: #f5f5f7; font-size: 19px; font-weight: 570; overflow-wrap: anywhere; }
.subscription-list { display: grid; gap: 10px; }
.subscription { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .1); color: #d2d2d7; font-size: 14px; }
.subscription:first-child { padding-top: 0; border-top: 0; }
.subscription span:last-child { color: #86868b; text-align: right; }
.payment-options { min-height: 0; }
.payment-options-heading { margin-bottom: 20px; }
.account-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.account-plan { min-width: 0; padding: 18px; border-top: 1px solid rgba(255, 255, 255, .12); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.account-plan > div { min-width: 0; display: grid; gap: 5px; }
.account-plan > div strong { color: #f5f5f7; font-size: 14px; }
.account-plan > div span { color: #86868b; font-size: 12px; line-height: 1.4; }
.account-plan-price { color: #f5f5f7; font-size: 16px; white-space: nowrap; }
.account-plan .secondary-button { grid-column: 1 / -1; width: 100%; min-height: 40px; cursor: not-allowed; opacity: .46; }
.payment-message { min-height: 0; margin: 14px 0 0; color: #86868b; }
.download-item { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.download-note { margin: 0; color: #a1a1a6; font-size: 14px; line-height: 1.5; }
.download-button { flex: 0 0 auto; min-width: 140px; cursor: not-allowed; opacity: .46; }
.password-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 12px; }
.password-button { white-space: nowrap; }
.password-message { margin-bottom: 0; }
.password-message.success { color: #7ddc9d; }
.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; }

@keyframes auth-reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .auth-layout { min-height: calc(100vh - 48px); padding: 40px 0 64px; }
  .registration-layout { width: min(100% - 32px, 1080px); padding-top: 48px; }
  .registration-heading { margin-bottom: 36px; }
  .registration-grid { grid-template-columns: 1fr; gap: 40px; }
  .registration-form { padding-right: 0; padding-bottom: 40px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .checkout-summary { position: static; }
  .account-layout { width: min(100% - 32px, 1040px); margin-top: 52px; }
  .account-top { align-items: stretch; flex-direction: column; }
  .account-actions { width: 100%; flex-wrap: wrap; }
  .account-actions .secondary-button { flex: 1; }
  .password-form { grid-template-columns: 1fr; }
  .password-button { width: 100%; }
}

@media (max-width: 560px) {
  .auth-panel { padding: 28px 0; }
  .registration-fields, .registration-plan-picker, .account-grid, .account-plan-grid { grid-template-columns: 1fr; }
  .download-item { align-items: stretch; flex-direction: column; }
  .download-button { width: 100%; }
}
