.account-skip-link {
  position: fixed;
  top: 0;
  left: 18px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 0 0 10px 10px;
  color: #fff;
  background: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-120%);
  transition: transform .16s ease;
}
.account-skip-link:focus { transform: translateY(0); outline: 3px solid var(--brass); outline-offset: 2px; }

.account-shell { min-width: 320px; }
.account-layout { width: min(1260px, 100%); margin: 0 auto; display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
.account-sidebar {
  position: sticky;
  top: 72px;
  min-height: calc(100vh - 72px);
  padding: 38px 24px 30px;
  border-right: 1px solid var(--line);
}
.account-sidebar .eyebrow { margin: 0 0 14px; }
.account-sidebar nav { display: grid; gap: 5px; }
.account-sidebar nav a { padding: 10px 12px; border-radius: 10px; color: var(--ink-soft); font-size: 13px; font-weight: 600; text-decoration: none; }
.account-sidebar nav a:hover,
.account-sidebar nav a:focus-visible { color: var(--ink); background: var(--paper-deep); }
.account-back-link { display: inline-block; margin: 25px 12px 0; color: var(--green); font-size: 12px; font-weight: 700; text-decoration: none; }

.account-main { min-width: 0; padding: 54px clamp(24px, 5vw, 72px) 80px; }
.account-page-heading { max-width: 720px; margin-bottom: 34px; }
.account-page-heading .eyebrow { margin: 0 0 10px; }
.account-page-heading h1 { margin: 0; font-family: var(--serif); font-size: clamp(42px, 6vw, 66px); font-weight: 400; line-height: 1; }
.account-page-heading > p:last-child { margin: 15px 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.7; }

.account-section {
  scroll-margin-top: 96px;
  margin-top: 20px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 248, .9);
  box-shadow: 0 16px 44px rgba(24, 32, 36, .06);
}
.account-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.account-section-heading .eyebrow { margin: 0 0 6px; }
.account-section h2 { margin: 0; font-family: var(--serif); font-size: 29px; font-weight: 400; }
.account-section > p { color: var(--ink-soft); font-size: 14px; line-height: 1.75; }
.account-plan-badge { flex: 0 0 auto; padding: 7px 11px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }

.account-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.account-overview-grid > div { min-width: 0; padding: 18px; background: var(--white); }
.account-overview-grid span,
.account-trial-panel span,
.judgment-stat span { display: block; margin-bottom: 5px; color: #6a716f; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.account-overview-grid strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.account-trial-panel { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; margin-top: 16px; padding: 17px 18px; border-radius: 14px; color: var(--ink); background: var(--green-soft); }
.account-trial-panel strong { font-size: 13px; }
.account-inline-link { display: inline-block; margin-top: 18px; }

.account-profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.account-profile-form .field { min-width: 0; }
.account-profile-form .field:nth-child(3) { grid-column: 1 / -1; }
.account-profile-form input[readonly] { color: #606967; background: var(--paper-deep); cursor: default; }
.account-profile-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.account-profile-actions p { min-height: 20px; margin: 0; color: var(--green); font-size: 12px; }
.account-deferred-list { margin-top: 24px; border-top: 1px solid var(--line); }
.account-deferred-list p { display: flex; justify-content: space-between; gap: 16px; margin: 0; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.account-deferred-list span { color: var(--ink-soft); text-align: right; }

.account-password-form { display: grid; gap: 16px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.account-subhead { margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 400; }
.account-password-form .field { min-width: 0; }
.password-input { position: relative; display: flex; align-items: center; }
.password-input input { flex: 1 1 auto; min-width: 0; padding-right: 68px; }
.password-reveal { position: absolute; right: 7px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink-soft); font-size: 12px; font-weight: 700; cursor: pointer; }
.password-reveal:hover { color: var(--ink); }
.account-password-form .field-hint { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.account-password-form .field-hint .text-btn { font-size: 12px; }
#changePasswordStatus { min-height: 20px; margin: 0; color: var(--green); font-size: 12px; }
#changePasswordError { min-height: 0; margin: 0; }

.account-session-actions { display: grid; gap: 14px; margin-top: 20px; }
.account-session-action { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 19px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.account-session-action > div { min-width: 0; }
.account-session-action h3 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 400; }
.account-session-action p { margin: 7px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.account-session-action .btn { flex: 0 0 auto; }
.account-session-warning { color: #6d5430 !important; font-weight: 600; }
.account-session-status,
.account-session-error { min-height: 20px; margin: 14px 0 0; font-size: 12px; line-height: 1.6; }
.account-session-status { color: var(--green); }
.account-session-error { padding: 11px 13px; border-radius: 10px; color: var(--red); background: var(--red-soft); font-weight: 700; }
.account-session-error[hidden] { display: none; }
.account-session-dialog { width: min(610px, calc(100vw - 28px)); }
.account-session-dialog .modal-header { border-top: 5px solid var(--brass); }
.account-session-dialog .modal-body p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.account-session-dialog .modal-body .account-session-error { margin-top: 15px; color: var(--red); }

.account-lead { margin-top: 0; color: var(--ink) !important; font-size: 16px !important; }
.account-fact-list { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 14px; line-height: 1.75; }
.account-fact-list li + li { margin-top: 7px; }
.judgment-summary { min-height: 74px; }
.judgment-card { padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.judgment-card h3 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 400; overflow-wrap: anywhere; }
.judgment-card > p { margin: 10px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.judgment-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.judgment-stat { min-width: 0; }
.judgment-stat strong { display: block; overflow-wrap: anywhere; font-size: 12px; }
.account-deletion-status { border-color: rgba(155, 73, 63, .34); background: rgba(255, 253, 248, .96); }
.account-deletion-status strong { color: var(--red); }

.account-error-card { width: min(560px, 100%); padding: 34px 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--shadow); }
.account-error-card h1 { margin: 8px 0 12px; font-family: var(--serif); font-size: 30px; font-weight: 400; }
.account-error-card p { color: var(--ink-soft); line-height: 1.7; }

@media (max-width: 900px) {
  .account-layout { grid-template-columns: 205px minmax(0, 1fr); }
  .account-main { padding-left: 28px; padding-right: 28px; }
  .judgment-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .account-layout { display: block; }
  .account-sidebar { position: static; min-height: 0; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .account-sidebar > .eyebrow, .account-back-link { display: none; }
  .account-sidebar nav { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; }
  .account-sidebar nav a { flex: 0 0 auto; padding: 8px 10px; white-space: nowrap; }
  .account-main { padding: 34px 16px 58px; }
  .account-overview-grid, .account-profile-form, .account-trial-panel { grid-template-columns: 1fr; }
  .account-profile-form .field:nth-child(3) { grid-column: auto; }
  .account-profile-actions { grid-column: auto; display: grid; }
  .account-profile-actions .btn { width: 100%; }
  .account-session-action { display: grid; gap: 16px; padding: 17px; }
  .account-session-action .btn { width: 100%; white-space: normal; }
  .account-session-dialog .modal-actions { display: grid; }
  .account-session-dialog .modal-actions .btn { width: 100%; }
  .account-deferred-list p { display: block; }
  .account-deferred-list span { display: block; margin-top: 5px; text-align: left; }
  .account-section { padding: 23px 19px; border-radius: 17px; }
  .account-section-heading { display: block; }
  .account-section-heading .account-plan-badge { display: inline-block; margin-top: 12px; }
  .judgment-stats { grid-template-columns: 1fr 1fr; }
  #accountSignOutBtn { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .account-skip-link { transition: none; }
}

@media print {
  .account-sidebar, .topbar, .account-skip-link, .account-profile-actions { display: none !important; }
  .account-layout { display: block; }
  .account-main { padding: 0; }
  .account-section { box-shadow: none; break-inside: avoid; }
}
