:root {
  color-scheme: light;
  --account-navy: #14223b;
  --account-green: #6a8b5b;
  --account-green-dark: #4f6e43;
  --account-paper: #f3f5f3;
  --account-mist: #daddd6;
  --account-white: #ffffff;
  --account-muted: #536074;
  --account-danger: #8f2f28;
  --account-line: rgba(20, 34, 59, 0.18);
  --account-focus: #2f653d;
  --account-content: 1180px;
}

.client-account-page,
.client-account-page * {
  box-sizing: border-box;
}

.client-account-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--account-navy);
  background:
    radial-gradient(circle at 82% 12%, rgba(106, 139, 91, 0.14), transparent 28rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), transparent 24rem),
    var(--account-paper);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

.client-account-page button,
.client-account-page input,
.client-account-page textarea {
  font: inherit;
}

.client-account-page button:focus-visible,
.client-account-page input:focus-visible,
.client-account-page textarea:focus-visible,
.client-account-page a:focus-visible {
  outline: 3px solid var(--account-focus);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.account-skip-link {
  position: fixed;
  z-index: 30;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: var(--account-white);
  background: var(--account-navy);
  transform: translateY(-180%);
}

.account-skip-link:focus {
  transform: translateY(0);
}

.account-header,
.account-footer,
.account-main {
  width: min(calc(100% - 48px), var(--account-content));
  margin-inline: auto;
}

.account-header {
  min-height: 98px;
  display: grid;
  grid-template-columns: 245px 1fr auto;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--account-mist);
}

.account-brand {
  display: inline-flex;
  align-items: center;
}

.account-brand img {
  display: block;
  width: 225px;
  height: auto;
}

.account-context {
  justify-self: end;
  margin: 0;
  color: var(--account-muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-help-link,
.account-secondary-link {
  color: var(--account-green-dark);
  font-weight: 800;
  text-underline-offset: 4px;
}

.account-help-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.account-offline {
  padding: 10px 24px;
  color: #62430d;
  background: #fff5dc;
  border-bottom: 1px solid #d6b76d;
  text-align: center;
  font-weight: 800;
}

.account-main {
  flex: 1;
  padding: clamp(32px, 5vw, 70px) 0 72px;
}

.account-message {
  max-width: 760px;
  min-height: 0;
  margin: 0 auto 20px;
  padding: 12px 16px;
  color: var(--account-green-dark);
  background: rgba(255, 255, 255, 0.8);
  border-left: 4px solid var(--account-green);
  font-weight: 750;
}

.account-message:empty {
  display: none;
}

.account-message[data-tone="error"] {
  color: var(--account-danger);
  border-left-color: var(--account-danger);
}

.account-loading {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.account-spinner {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 4px solid var(--account-mist);
  border-top-color: var(--account-green-dark);
  border-radius: 50%;
  animation: account-spin 800ms linear infinite;
}

@keyframes account-spin {
  to { transform: rotate(360deg); }
}

.account-eyebrow {
  margin: 0 0 14px;
  color: var(--account-green-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.client-account-page h1,
.client-account-page h2 {
  text-wrap: balance;
  font-family: Newsreader, Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.client-account-page h1[tabindex="-1"]:focus {
  outline: none;
}

.client-account-page h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.7rem, 6vw, 5rem);
  line-height: 0.98;
}

.client-account-page h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.7rem);
  line-height: 1.08;
}

.account-lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--account-muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.account-signin-layout {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.7fr);
  align-items: center;
  gap: clamp(56px, 9vw, 126px);
}

.account-signin-copy {
  max-width: 590px;
}

.account-auth-surface {
  max-width: 540px;
  margin-top: 26px;
}

.account-provider-button,
.account-primary-action {
  width: 100%;
  min-height: 56px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 800;
}

.account-provider-button {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 0 18px;
  color: var(--account-navy);
  background: var(--account-white);
  border: 1px solid var(--account-line);
}

.account-provider-button svg {
  width: 23px;
  height: 23px;
}

.account-provider-button > span {
  color: var(--account-muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-provider-button:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.account-provider-note {
  margin: 8px 0 0;
  color: var(--account-muted);
  font-size: 0.76rem;
}

.account-apple-held {
  margin-top: 22px;
  padding-top: 10px;
  border-top: 1px solid var(--account-line);
}

.account-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0 16px;
  color: var(--account-muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.account-divider::before,
.account-divider::after {
  height: 1px;
  flex: 1;
  content: "";
  background: var(--account-line);
}

.account-form,
.account-access-form {
  display: grid;
  gap: 18px;
}

.account-field {
  min-width: 0;
}

.account-field label,
.account-field-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 7px;
  font-weight: 800;
}

.account-field label span {
  color: var(--account-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.account-field input,
.account-field textarea {
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  color: var(--account-navy);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(20, 34, 59, 0.3);
  border-radius: 4px;
}

.account-field textarea {
  min-height: 112px;
  resize: vertical;
}

.account-field input[aria-invalid="true"],
.account-field textarea[aria-invalid="true"] {
  border-color: var(--account-danger);
}

.account-field-error {
  min-height: 0;
  margin: 5px 0 0;
  color: var(--account-danger);
  font-size: 0.8rem;
  font-weight: 700;
}

.account-field-error:empty {
  display: none;
}

.account-inline-button,
.account-text-action {
  padding: 4px 0;
  color: var(--account-green-dark);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.account-inline-button {
  font-size: 0.78rem;
}

.account-remember {
  min-height: 44px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: var(--account-muted);
  font-size: 0.84rem;
}

.account-remember--provider {
  margin-bottom: 10px;
}

.account-remember input {
  width: 21px;
  height: 21px;
  margin: 3px 0 0;
  flex: 0 0 auto;
  accent-color: var(--account-green-dark);
}

.account-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  color: var(--account-white);
  background: var(--account-navy);
  border: 1px solid var(--account-navy);
  box-shadow: 0 16px 34px rgba(20, 34, 59, 0.14);
}

.account-primary-action:hover:not(:disabled) {
  background: #243a5f;
}

.account-primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.account-link-action {
  max-width: 360px;
  margin-top: 26px;
  text-decoration: none;
}

.account-compact-action {
  width: auto;
  min-width: 220px;
  margin-top: 26px;
}

.account-welcome-note {
  position: relative;
  padding: clamp(30px, 5vw, 58px);
  color: var(--account-white);
  background:
    linear-gradient(145deg, rgba(20, 34, 59, 0.98), rgba(34, 60, 78, 0.95));
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(20, 34, 59, 0.2);
}

.account-welcome-note::after {
  position: absolute;
  inset: 18px;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.account-welcome-note .account-eyebrow {
  color: #c7d5bd;
}

.account-welcome-note h2 {
  position: relative;
  z-index: 1;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
}

.account-welcome-note ul {
  position: relative;
  z-index: 1;
  margin: 30px 0;
  padding: 0;
  list-style: none;
}

.account-welcome-note li {
  padding: 11px 0 11px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.account-welcome-note li::before {
  margin-left: -28px;
  margin-right: 13px;
  content: "✓";
  color: #c7d5bd;
  font-weight: 800;
}

.account-path-links {
  position: relative;
  z-index: 1;
  padding-top: 8px;
}

.account-path-links p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
}

.account-path-links a {
  color: var(--account-white);
  font-weight: 800;
  text-underline-offset: 4px;
}

.account-status-layout,
.account-access-layout {
  max-width: 900px;
  min-height: 580px;
  margin: 0 auto;
}

.account-status-layout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.account-status-heading {
  max-width: 700px;
}

.account-account-email,
.account-review-date {
  margin: 14px 0 0;
  color: var(--account-muted);
  overflow-wrap: anywhere;
}

.account-status-symbol {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--account-white);
  background: var(--account-green-dark);
  border-radius: 50%;
  font-size: 1.55rem;
  font-weight: 800;
}

.account-status-symbol--quiet {
  background: var(--account-muted);
}

.account-status-symbol--warning {
  background: #8a5b14;
}

.account-receipt-list {
  width: min(100%, 640px);
  margin: 30px 0 0;
  border-top: 1px solid var(--account-line);
}

.account-receipt-list div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--account-line);
}

.account-receipt-list dt {
  color: var(--account-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-receipt-list dd {
  margin: 0;
  font-weight: 700;
}

.account-ledger {
  width: 100%;
  margin: 40px 0 24px;
  padding: clamp(24px, 4vw, 38px) 0;
  border-top: 1px solid var(--account-line);
  border-bottom: 1px solid var(--account-line);
}

.account-ledger-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.account-connected-mark {
  padding: 7px 12px;
  color: var(--account-green-dark);
  background: rgba(106, 139, 91, 0.12);
  border: 1px solid rgba(106, 139, 91, 0.3);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.account-property-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--account-line);
}

.account-property-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 86px;
  padding: 14px 0;
  border-bottom: 1px solid var(--account-line);
}

.account-property-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--account-green-dark);
  background: rgba(106, 139, 91, 0.12);
  border-radius: 50%;
  font-size: 1.15rem;
}

.account-property-list strong,
.account-property-list span {
  display: block;
}

.account-property-list span {
  margin-top: 2px;
  color: var(--account-muted);
  font-size: 0.86rem;
}

.account-empty-copy {
  margin: 22px 0 0;
  color: var(--account-muted);
}

.account-next-step {
  margin-top: 28px;
  padding-left: 20px;
  border-left: 4px solid var(--account-green);
}

.account-next-step p {
  max-width: 720px;
  margin: 6px 0 12px;
  color: var(--account-muted);
}

.account-access-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(420px, 1fr);
  gap: clamp(42px, 7vw, 90px);
  align-items: start;
}

.account-access-form {
  grid-template-columns: 1fr 1fr;
  padding: clamp(24px, 4vw, 40px);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(20, 34, 59, 0.12);
  border-radius: 4px;
  box-shadow: 0 24px 64px rgba(20, 34, 59, 0.1);
}

.account-field--wide {
  grid-column: 1 / -1;
}

.account-access-actions p {
  margin: 12px 0 0;
  color: var(--account-muted);
  font-size: 0.78rem;
}

.account-alternate-path {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--account-line);
}

.account-alternate-path p {
  margin: 0;
}

.account-alternate-path a {
  color: var(--account-green-dark);
  font-weight: 800;
}

.account-footer {
  min-height: 92px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  color: var(--account-muted);
  border-top: 1px solid var(--account-mist);
  font-size: 0.76rem;
}

.account-footer p {
  margin: 0;
}

.account-footer a {
  margin-left: auto;
  color: inherit;
}

.is-busy [data-google-signin],
.is-busy [data-signin-form] button,
.is-busy [data-access-form] button,
.is-offline [data-google-signin],
.is-offline [data-signin-form] button[type="submit"],
.is-offline [data-password-reset],
.is-offline [data-access-form] button[type="submit"],
.is-offline [data-refresh-account] {
  pointer-events: none;
  opacity: 0.58;
}

@media (max-width: 900px) {
  .account-signin-layout,
  .account-access-layout {
    grid-template-columns: 1fr;
  }

  .account-signin-layout {
    gap: 52px;
  }

  .account-welcome-note {
    max-width: 660px;
  }

  .account-status-layout,
  .account-access-layout {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .client-account-page {
    font-size: 17px;
  }

  .account-header,
  .account-footer,
  .account-main {
    width: min(calc(100% - 32px), var(--account-content));
  }

  .account-header {
    min-height: 82px;
    grid-template-columns: 1fr auto;
    gap: 14px;
  }

  .account-brand img {
    width: min(205px, 58vw);
  }

  .account-context {
    display: none;
  }

  .account-help-link {
    font-size: 0.82rem;
  }

  .account-main {
    padding-top: 38px;
  }

  .client-account-page h1 {
    font-size: clamp(2.65rem, 13vw, 4rem);
  }

  .account-signin-layout {
    display: block;
  }

  .account-welcome-note {
    margin-top: 46px;
    padding: 34px 28px;
  }

  .account-welcome-note::after {
    inset: 12px;
  }

  .account-access-form {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }

  .account-field--wide {
    grid-column: auto;
  }

  .account-receipt-list div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .account-ledger-heading {
    display: block;
  }

  .account-connected-mark {
    display: inline-block;
    margin-top: 16px;
  }

  .account-compact-action,
  .account-link-action {
    width: 100%;
    max-width: none;
  }

  .account-footer {
    padding: 22px 0;
  }

  .account-footer a {
    width: 100%;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-spinner {
    animation-duration: 1600ms;
  }
}
