/* /account: subscription, sign-in methods, signed-in devices and deletion.
   Built from the existing tokens and the privacy page's reading layout. The
   subscribed card reuses the paid offer's green plan treatment; the
   subscription-required notice reuses the policy status rule. */

.account-page { padding-block: 64px 112px; }

.account-intro .section-index { font-size: 11px; }
.account-intro h1 { font-size: clamp(54px, 6.4vw, 92px); line-height: 1.04; letter-spacing: -.055em; margin-top: 24px; text-wrap: balance; }
.account-intro > p { font-size: 20px; line-height: 1.7; color: var(--muted); max-width: 56ch; margin-top: 28px; }

.account-fallback { margin-top: 45px; max-width: 620px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.account-loading { display: flex; align-items: center; gap: 12px; margin-top: 45px; font-size: 14px; color: var(--muted); }
.account-loading svg { color: var(--accent-text); }

/* Kept rendered while empty so it stays a live region; it takes no space then. */
.account-status:not(:empty) {
  margin-top: 35px;
  padding: 16px 20px;
  border-left: 2px solid var(--accent-text);
  background: var(--surface);
  font-size: 13px;
  line-height: 1.7;
  max-width: 760px;
}

:is(.account-fallback, .account-panel, .account-section, .account-fine-print, .account-confirm) a:not(.button, .text-link) {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 30px; }

/* ---------------------------------------------------------------- whole-page states */

.account-panel { margin-top: 48px; padding: 40px; background: var(--surface); border-radius: 24px; max-width: 840px; }
.account-panel h2 { font-size: clamp(34px, 3.4vw, 48px); line-height: 1.1; letter-spacing: -.045em; }
.account-panel > p { color: var(--muted); font-size: 16px; line-height: 1.75; margin-top: 18px; max-width: 580px; }
.account-panel h2:focus { outline: none; }

/* ---------------------------------------------------------------- signed in */

.account-layout { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2.3fr); gap: 80px; margin-top: 72px; align-items: start; }

.account-identity { position: sticky; top: 104px; min-width: 0; border-top: 1px solid var(--line); padding-top: 24px; }
.account-identity h2 { font-size: 32px; line-height: 1.15; letter-spacing: -1.1px; margin-top: 18px; overflow-wrap: anywhere; }
.account-email { font-size: 15px; margin-top: 10px; overflow-wrap: anywhere; }
.account-email:empty { display: none; }
.account-note { font-size: 13px; line-height: 1.7; color: var(--muted); margin-top: 12px; max-width: 320px; }
.account-meta { font-size: 13px; line-height: 1.7; color: var(--muted); margin-top: 12px; }
.account-meta:empty { display: none; }
.account-identity > .button { margin-top: 26px; min-height: 46px; padding: 10px 22px; font-size: 14px; }

.account-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.account-nav a { padding-block: 10px; font-size: 15px; transition: color .2s; }
@media (hover: hover) {
  .account-nav a:hover { color: var(--accent-text); }
}

.account-sections { min-width: 0; }
.account-section { padding-bottom: 48px; margin-bottom: 48px; border-bottom: 1px solid var(--line); scroll-margin-top: 112px; }
.account-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.account-section h2 { font-size: clamp(30px, 3vw, 40px); line-height: 1.13; letter-spacing: -.035em; }
.account-section > p { font-size: 17px; line-height: 1.8; color: var(--muted); margin-top: 18px; max-width: 640px; }
.account-section > .button { margin-top: 28px; }
.account-retry { margin-top: 12px; }

/* Subscribed: the paid offer's green card. */
.account-plan { margin-top: 28px; padding: 36px; border-radius: 24px; background: var(--lime); color: #0a0813; }
.account-plan-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; }
.account-plan-heading h3 { font-size: 28px; letter-spacing: -.9px; }
.account-plan-heading > span { color: #4d591b; font-size: 12px; }
.account-plan-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin-top: 26px; font-variant-numeric: tabular-nums; }
.account-plan-name strong { font-size: clamp(48px, 4.6vw, 72px); line-height: 1.1; font-weight: 450; letter-spacing: -.06em; }
.account-plan-name span { font-size: 16px; color: #4d591b; }
.account-plan-status { font-size: 14px; line-height: 1.6; margin-top: 10px; max-width: 520px; }
.account-plan-status:empty { display: none; }
.account-plan-sandbox { font-size: 12px; color: #414c14; margin-top: 8px; }
.account-plan > .button { margin-top: 26px; background: #0a0813; color: #f4f1e7; }
@media (hover: hover) {
  .account-plan > .button:hover { background: #24212e; }
}
.account-plan :focus-visible { outline-color: #0a0813; }
.account-plan-note { font-size: 13px; line-height: 1.75; color: #414c14; margin-top: 18px; max-width: 520px; }

/* Subscription required: guidance, not a dashboard. */
.account-required { margin-top: 26px; padding: 28px 30px; border-left: 2px solid var(--accent-text); background: var(--surface); }
.account-required h3 { font-size: 24px; letter-spacing: -.8px; }
.account-required p { font-size: 15px; line-height: 1.75; color: var(--muted); margin-top: 14px; max-width: 600px; }

.account-fine-print { font-size: 13px; line-height: 1.75; color: var(--muted); margin-top: 22px; }

/* Sign-in methods and devices. */
.account-list { list-style: none; padding: 0; margin: 24px 0 0; border-top: 1px solid var(--line); }
.account-list:empty { display: none; }
.account-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.account-row > div { min-width: 0; }
.account-row strong { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.account-row-detail { display: block; margin-top: 4px; font-size: 13px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.account-row .button { flex-shrink: 0; }
/* A list that ends its section already has the section rule beneath it. */
.account-list:last-child > .account-row:last-child { border-bottom: 0; padding-bottom: 0; }
.account-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--lime);
  color: #0a0813;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  vertical-align: 2px;
}

/* Deletion. */
.account-danger { margin-top: 26px; background: transparent; border-color: var(--error); color: var(--error); }
@media (hover: hover) {
  .account-danger:hover { background: var(--surface); }
}
.account-danger-solid { background: var(--error); color: var(--paper); }
@media (hover: hover) {
  .account-danger-solid:hover { background: var(--error); }
}
.account-danger:focus-visible, .account-danger-solid:focus-visible { outline-color: var(--error); }

.account-confirm { margin-top: 28px; padding: 32px; border: 1px solid var(--error); border-radius: 16px; }
.account-confirm h3 { font-size: 24px; letter-spacing: -.8px; }
.account-confirm h3:focus { outline: none; }
.account-confirm ul { margin: 16px 0 0; padding-left: 20px; }
.account-confirm li { font-size: 15px; line-height: 1.7; color: var(--muted); margin-block: 8px; }
.account-status-line:not(:empty) { font-size: 13px; line-height: 1.6; margin-top: 14px; }

/* Errors: the plain-language message, then the support reference. */
.account-error:not(:empty) { margin-top: 14px; font-size: 13px; line-height: 1.6; color: var(--error); max-width: 620px; }
.account-panel > .account-error:not(:empty) { font-size: 16px; margin-top: 18px; }
.account-reference { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.account-reference code { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .account-layout { gap: 50px; }
}

@media (max-width: 700px) {
  .account-page { padding-block: 40px 64px; }
  .account-intro h1 { font-size: clamp(46px, 11.5vw, 68px); }
  .account-intro > p { font-size: 18px; }
  .account-panel { margin-top: 36px; padding: 28px 22px; border-radius: 20px; }
  .account-panel h2 { font-size: 34px; }
  .account-panel > p { font-size: 15px; }
  .account-layout { grid-template-columns: 1fr; gap: 40px; margin-top: 40px; }
  .account-identity { position: static; }
  .account-nav { flex-direction: row; flex-wrap: wrap; gap: 5px 19px; }
  .account-nav a { font-size: 14px; }
  .account-section { padding-bottom: 40px; margin-bottom: 40px; scroll-margin-top: 32px; }
  .account-section h2 { font-size: 29px; }
  .account-section > p { font-size: 16px; }
  .account-plan { padding: 26px 22px; border-radius: 20px; }
  .account-plan-heading h3 { font-size: 24px; }
  .account-plan-name strong { font-size: 56px; }
  .account-required, .account-confirm { padding: 24px 20px; }
  .account-row { flex-wrap: wrap; }
  .account-row > div { flex: 1 1 100%; }
}
