/* Keep state-driven visibility stronger than grid/flex/button display rules. */
.account-wrap [hidden] { display: none !important; }
.account-wrap { padding-block: 40px 72px; }
.account-wrap.is-signed-in { max-width: 920px; }
.account-wrap h1 { font-size: 36px; line-height: 1.15; letter-spacing: -.03em; }
.account-wrap .lede { font-size: 16px; margin-bottom: 28px; }
.account-wrap .form-status:empty { display: none; }
/* The global status colors are pastels tuned for the dark signup band; on the
   white account surface they fall below readable contrast. Use the accessible
   palette values here (Evergreen ~5.5:1, error red ~6.4:1 on white). */
.account-wrap .form-status.success { color: var(--green-dark); }
.account-wrap .form-status.error { color: #b42318; }
.account-card { box-shadow: none; border-radius: 16px; }
#auth-section { max-width: 600px; }
#auth-section .google-hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; text-align: center; }
#auth-section .google-hint a { color: var(--green-dark); text-underline-offset: 3px; }
.google-auth-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: #fff; border: 1px solid #dadce0; color: #3c4043; font-weight: 600; }
.google-auth-button:hover { background: #f8f9fa; border-color: #c8ccd0; color: #202124; }
.google-auth-button:active { background: #f1f3f4; }
.google-auth-button .google-icon { flex: 0 0 auto; display: block; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 18px 0 12px; color: var(--muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
#dashboard-section h2 { font-family: inherit; font-size: 20px; line-height: 1.3; letter-spacing: -.02em; }
.plan-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.plan-heading h2 { margin: 0 !important; }
#dashboard-section #account-plan { margin: 18px 0 0; font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.access-badge { padding: 6px 12px; border-radius: 8px; background: #e9f7ef; color: #084329; font-size: 14px; font-weight: 700; }
.plan-description { color: var(--muted); margin: 18px 0 24px; max-width: 68ch; }
.plan-facts { display: flex; flex-wrap: wrap; gap: 20px 64px; margin: 0; padding-top: 20px; border-top: 1px solid var(--line); }
.plan-facts dt { font-size: 13px; color: var(--muted); }
.plan-facts dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
#checkout-actions { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); gap: 12px; justify-items: start; }
.checkout-note { margin: 0; color: var(--muted); font-size: 14px; max-width: 68ch; }
.upgrade-row { display: flex; flex-wrap: wrap; gap: 12px; }
.subscription-settings { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.subscription-settings summary { cursor: pointer; color: var(--green-dark); font-weight: 600; padding-block: 10px; min-height: 44px; text-underline-offset: 3px; }
.subscription-settings summary:hover { text-decoration: underline; }
.subscription-facts { border-top: 0; padding-top: 12px; gap: 20px 32px; }
#dashboard-section .subscription-settings .button { margin-top: 20px; }
.account-detail-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; }
.account-detail-grid .account-card { margin-bottom: 0; padding: 28px; }
.account-details .account-facts { border: 0; border-radius: 0; margin: 20px 0; overflow: visible; gap: 16px; }
.account-details .account-facts > div { display: block; border: 0; padding: 0; }
.account-details .account-facts dt { font-weight: 500; }
.account-details .account-facts dd { margin-top: 4px; }
.account-help { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.device-count { margin: 20px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.account-devices-card .button { margin-top: 20px !important; }
.account-footer-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; }
.account-footer-actions > a { color: var(--green-dark); font-size: 14px; text-underline-offset: 3px; }
.account-wrap .button { font-family: inherit; }
.account-wrap .button:disabled { opacity: .6; cursor: wait; transform: none; }
@media (max-width: 620px) {
  .account-wrap { padding-block: 28px 48px; }
  .account-wrap h1 { font-size: 30px; }
  .account-card, .account-detail-grid .account-card { padding: 22px; }
  .account-detail-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .plan-heading { align-items: flex-start; flex-wrap: wrap; }
  #dashboard-section #account-plan { font-size: 26px; }
  .plan-facts { gap: 16px 32px; }
  #checkout-actions, .upgrade-row { width: 100%; }
  #checkout-actions .button { width: 100%; padding: 12px 16px; text-align: center; }
  .account-footer-actions { align-items: flex-start; flex-direction: column; gap: 16px; }
}
