.account-page {
  max-width: 65rem;
  padding-block: clamp(1rem, 4vw, 3.5rem) clamp(3rem, 6vw, 5rem);
}

.account-layout {
  display: grid;
  border: 1px solid var(--line);
  border-radius: clamp(.9rem, 2vw, 1.55rem);
  background: var(--white);
}

.account-panel {
  display: grid;
  align-content: center;
  min-width: 0;
  gap: clamp(1.15rem, 2.6vw, 1.8rem);
  padding: clamp(1.05rem, 4vw, 3.5rem);
}

.account-panel h1 { color: var(--green-dark); font-size: clamp(2rem, 4.3vw, 3.4rem); }

.account-form {
  display: grid;
  gap: .95rem;
  min-width: 0;
}

.account-field {
  display: grid;
  min-width: 0;
  gap: .38rem;
  color: var(--green-dark);
  font-size: .9rem;
  font-weight: 680;
}

.account-field > small { color: var(--muted); font-size: .82rem; font-weight: 450; }

.account-field input {
  width: 100%;
  min-height: 3rem;
  padding: .6rem .85rem;
  border: 1px solid #c9c7b9;
  border-radius: .65rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 450;
}

.account-type {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.account-type legend {
  margin-block-end: .4rem;
  padding: 0;
  color: var(--green-dark);
  font-size: .9rem;
  font-weight: 680;
}

.account-type__choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.account-type__option {
  display: flex;
  align-items: center;
  min-height: 3rem;
  gap: .55rem;
  padding: .52rem .65rem;
  border: 1px solid #c9c7b9;
  border-radius: .65rem;
  color: var(--green-dark);
  font-size: .88rem;
  font-weight: 680;
  line-height: 1.25;
  cursor: pointer;
}

.account-type__option:has(:checked) {
  border-color: var(--green);
  background: var(--soft-green);
}

.account-type__option:has(:focus-visible) {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
}

.account-type__option input {
  flex: none;
  width: .98rem;
  height: .98rem;
  margin: 0;
  accent-color: var(--green);
}

.account-type__option input:focus-visible { outline: none; }
.account-type__option span { overflow-wrap: anywhere; }

.account-organization { display: grid; gap: .95rem; }
.account-form:has(#account-individual:checked) .account-organization { display: none; }

.account-password { position: relative; }
.account-password:has(button:not([hidden])) input { padding-inline-end: 4.55rem; }

.account-password__toggle {
  position: absolute;
  inset-block: 2px;
  inset-inline-end: .25rem;
  min-width: 3.9rem;
  padding: 0 .5rem;
  border: 0;
  border-radius: .45rem;
  background: transparent;
  color: var(--green);
  font-weight: 700;
}

.account-password__toggle:focus-visible { outline-offset: -2px; }
.account-submit { min-height: 3.1rem; margin-block-start: .24rem; }

.account-error {
  padding: .7rem .85rem;
  border-inline-start: .2rem solid var(--terracotta);
  border-radius: .5rem;
  background: #faede7;
  color: var(--terracotta);
  font-size: .88rem;
}

.account-switch { color: var(--muted); font-size: .9rem; }
.account-switch a {
  display: inline-block;
  min-height: 2.75rem;
  align-content: center;
  padding-inline: .3rem;
  color: var(--green-dark);
  font-weight: 740;
}

.account-details { display: grid; margin: 0; }
.account-details > div {
  display: grid;
  gap: .2rem;
  padding-block: .8rem;
  border-block-end: 1px solid var(--line);
}
.account-details > div:first-child { border-block-start: 1px solid var(--line); }
.account-details dt { color: var(--muted); font-size: .85rem; }
.account-details dd { margin: 0; color: var(--green-dark); font-weight: 720; overflow-wrap: anywhere; }

.account-actions { display: flex; flex-wrap: wrap; align-items: start; gap: .6rem; }
.account-actions > .button { max-width: 100%; }

.account-image { display: none; }

@media (hover: hover) and (pointer: fine) {
  .account-type__option:hover:has(input:enabled:not(:checked)) {
    border-color: var(--green);
    background: #f5f8f0;
  }

  .account-password__toggle:hover:enabled { background: var(--soft-green); }
}

@media (prefers-reduced-motion: no-preference) {
  .account-type__option {
    transition: background-color var(--motion-feedback) ease-out, border-color var(--motion-feedback) ease-out;
  }

  .account-password__toggle { transition: background-color var(--motion-feedback) ease-out; }
}

@media (max-width: 380px) {
  .account-type__choices { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
}

@media (min-width: 760px) {
  .account-layout { grid-template-columns: minmax(0, 1.23fr) minmax(0, 1fr); }
  .account-image {
    display: block;
    min-height: 30rem;
    margin: .65rem .65rem .65rem 0;
    border-radius: clamp(.6rem, 1.35vw, 1rem);
    background: var(--soft-green) url('/assets/produce-market.webp') 55% center / cover no-repeat;
  }
}
