.account-page {
  min-height: 100%;
  margin: 0;
  background: #f3f7f6;
  color: #17332d;
  font-family: Arial, Helvetica, sans-serif;
}

.account-page [hidden] {
  display: none !important;
}

.account-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  box-sizing: border-box;
  padding: 2rem 1rem;
}

.account-card {
  width: min(100%, 34rem);
  box-sizing: border-box;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid #cedbd7;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 1rem 3rem rgba(18, 61, 51, 0.1);
}

.account-brand {
  display: inline-flex;
  margin-bottom: 1.5rem;
  border-radius: 0.25rem;
}

.account-page-navigation {
  margin: 0 0 1.25rem;
}

.account-nav {
  display: flex;
  min-height: 2.25rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.account-nav-link,
.account-nav-button {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0.4rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  background: transparent;
  color: #245f52;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.account-nav-primary {
  border-color: #8ca69f;
}

.account-nav-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.account-nav-status {
  flex-basis: 100%;
  color: #82231f;
  font-size: 0.82rem;
  text-align: right;
}

.nav-actions .account-nav .account-nav-link {
  display: inline-flex;
}

.account-brand img {
  display: block;
  width: auto;
  height: 2.75rem;
}

.account-eyebrow {
  margin: 0 0 0.5rem;
  color: #2f7667;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.account-heading {
  margin: 0;
  color: #17332d;
  font-size: clamp(1.75rem, 6vw, 2.35rem);
  line-height: 1.15;
}

.account-intro {
  margin: 0.9rem 0 1.75rem;
  color: #4a625c;
  line-height: 1.6;
}

.account-form {
  display: grid;
  gap: 1.25rem;
}

.account-field {
  display: grid;
  gap: 0.45rem;
}

.account-field label {
  font-weight: 700;
}

.account-field input {
  width: 100%;
  box-sizing: border-box;
  min-height: 3rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #8ca69f;
  border-radius: 0.45rem;
  background: #ffffff;
  color: #17332d;
  font: inherit;
}

.account-field input[aria-invalid="true"] {
  border-color: #a42d28;
}

.account-field-hint {
  margin: 0;
  color: #60756f;
  font-size: 0.88rem;
  line-height: 1.45;
}

.account-password-control {
  position: relative;
}

.account-password-control input {
  padding-right: 4.75rem;
}

.account-visibility-button {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  min-height: 2.2rem;
  padding: 0.25rem 0.65rem;
  transform: translateY(-50%);
  border: 0;
  border-radius: 0.3rem;
  background: #e4efec;
  color: #24594e;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.account-submit {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0.75rem 1.1rem;
  border: 1px solid #245f52;
  border-radius: 0.45rem;
  background: #245f52;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.account-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.account-message {
  margin: 0;
  padding: 0.8rem;
  border-radius: 0.45rem;
  line-height: 1.5;
}

.account-message-error {
  border: 1px solid #d6a29f;
  background: #fff2f1;
  color: #82231f;
}

.account-message-success {
  border: 1px solid #93c4a8;
  background: #effaf3;
  color: #17613a;
}

.account-secondary-action {
  margin: 1.5rem 0 0;
  color: #526a64;
  text-align: center;
}

.account-secondary-action a,
.account-text-link {
  color: #245f52;
  font-weight: 700;
}

.account-secondary-action span {
  font-size: 0.85rem;
}

.account-support-links {
  display: flex;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.account-support-links a,
.account-inline-action {
  color: #245f52;
  font-weight: 700;
}

.account-support-links span {
  font-size: 0.85rem;
  font-weight: 400;
}

.account-support-contact {
  margin: 1.5rem 0 0;
  color: #526a64;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.account-support-contact a {
  color: #245f52;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.account-action-policy {
  margin: 0;
  color: #526a64;
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
}

.account-action-policy a {
  color: #245f52;
  font-weight: 700;
}

.account-legal-links {
  display: flex;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
}

.account-legal-links a {
  color: #245f52;
  font-weight: 700;
}

.account-resend {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #cedbd7;
}

.account-resend summary {
  color: #245f52;
  cursor: pointer;
  font-weight: 700;
}

.account-resend-form {
  margin-top: 1rem;
}

.account-submit-secondary {
  border-color: #8ca69f;
  background: #ffffff;
  color: #245f52;
}

.account-recovery-state {
  text-align: center;
}

.account-recovery-state[data-recovery-result="ready"] {
  text-align: left;
}

.account-dashboard-shell {
  align-items: start;
}

.account-dashboard-card {
  width: min(100%, 52rem);
}

.account-dashboard-root {
  min-height: 18rem;
}

.account-dashboard-loading,
.account-dashboard-message {
  padding: 2rem 0;
  text-align: center;
}

.account-dashboard-header {
  padding-bottom: 1.75rem;
  border-bottom: 1px solid #cedbd7;
}

.account-dashboard-label {
  margin: 1.5rem 0 0.35rem;
  color: #60756f;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
}

.account-dashboard-identity {
  display: grid;
  gap: 0.25rem;
}

.account-dashboard-name {
  color: #17332d;
  font-size: 1.1rem;
}

.account-dashboard-email {
  overflow-wrap: anywhere;
  color: #4a625c;
}

.account-dashboard-products {
  padding-top: 1.75rem;
}

.account-dashboard-section-heading {
  margin: 0 0 1rem;
  color: #17332d;
  font-size: 1.35rem;
}

.account-dashboard-product-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem;
  border: 1px solid #cedbd7;
  border-radius: 0.7rem;
  background: #f8fbfa;
}

.account-dashboard-product-copy {
  display: grid;
  gap: 0.45rem;
}

.account-dashboard-product-name {
  margin: 0;
  color: #17332d;
  font-size: 1.15rem;
}

.account-dashboard-product-status {
  width: fit-content;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.account-dashboard-product-status.is-owned {
  background: #dff4e7;
  color: #17613a;
}

.account-dashboard-product-status.is-locked {
  background: #f4e8e6;
  color: #82231f;
}

.account-dashboard-attempts {
  display: grid;
  gap: 0.65rem;
  width: min(34rem, 100%);
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #cedbd7;
}

.account-dashboard-attempt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.account-dashboard-attempt-summary {
  display: grid;
  gap: 0.1rem;
}

.account-dashboard-attempt-summary span {
  color: #526d66;
  font-size: 0.9rem;
}

.account-dashboard-attempt-link {
  color: #245f52;
  font-weight: 800;
  white-space: nowrap;
}

.account-dashboard-expiration,
.account-dashboard-empty {
  margin: 0;
  color: #60756f;
  line-height: 1.5;
}

.account-message-copy {
  margin: 0 0 0.65rem;
}

.account-callback-state {
  text-align: center;
}

.account-callback-state[data-callback-result="success"] .account-heading {
  color: #17613a;
}

.account-callback-state[data-callback-result="expired"] .account-heading,
.account-callback-state[data-callback-result="reused"] .account-heading,
.account-callback-state[data-callback-result="malformed"] .account-heading {
  color: #82231f;
}

.account-spinner {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 1.5rem;
  border: 0.3rem solid #d8e6e2;
  border-top-color: #2f7667;
  border-radius: 50%;
  animation: account-spin 0.85s linear infinite;
}

.account-callback-actions {
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.checkout-state-card {
  width: min(100%, 38rem);
}

.checkout-state {
  padding: 1rem 0 0;
  text-align: center;
}

.checkout-state .account-intro {
  max-width: 31rem;
  margin-right: auto;
  margin-left: auto;
}

.checkout-state-actions {
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.checkout-state-actions .account-submit {
  min-width: min(100%, 16rem);
}

.account-brand:focus-visible,
.account-nav-link:focus-visible,
.account-nav-button:focus-visible,
.account-field input:focus-visible,
.account-visibility-button:focus-visible,
.account-submit:focus-visible,
.account-secondary-action a:focus-visible,
.account-resend summary:focus-visible,
.account-support-links a:focus-visible,
.account-support-contact a:focus-visible,
.account-action-policy a:focus-visible,
.account-legal-links a:focus-visible,
.account-inline-action:focus-visible,
.account-text-link:focus-visible {
  outline: 3px solid #f0a83d;
  outline-offset: 3px;
}

@keyframes account-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-spinner {
    animation: none;
  }
}

@media (max-width: 30rem) {
  .account-shell {
    align-items: start;
    padding: 1rem 0.65rem;
  }

  .account-card {
    border-radius: 0.7rem;
  }

  .account-dashboard-product-card {
    align-items: stretch;
    flex-direction: column;
  }
}
