/* Account actions connect only to the local server. Disabled fields indicate
   a connection or submission in progress; errors stay next to the form. */
.account-page {
  min-height: 100dvh;
  background: radial-gradient(ellipse at 75% 35%, #0b1b2a, transparent 55%), #050a12;
}

.account-header {
  max-width: 1500px;
  margin: auto;
  padding: 35px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.account-header > span {
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--muted);
}

/* Zero-minimum tracks let enlarged words wrap instead of widening the form. */
.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  max-width: 1500px;
  margin: auto;
  padding: 0 5% 45px;
  gap: 50px;
  align-items: center;
}

.account-story {
  min-width: 0;
  position: relative;
  min-height: 680px;
  padding: 85px 28px 80px;
  border: 0;
  background: linear-gradient(90deg, #050a12, #050a1200 12%, #050a1200 75%, #050a12),
    linear-gradient(180deg, #050a1270, transparent 70%, #050a12),
    url("assets/midnight-landscape.png") 60% center / cover;
}

.account-story h1 {
  font-size: clamp(2.5rem, 4.4vw, 4.5rem);
}

.account-story > p:not(.eyebrow) {
  max-width: 390px;
  font-size: .95rem;
  color: #d3e3f7;
}

.account-art-note {
  position: absolute;
  bottom: 22px;
  left: 28px;
  font-size: .58rem;
  color: var(--muted);
}

.account-card {
  padding: 30px;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.account-page.account-enhanced .account-switch {
  display: flex;
}

.account-switch {
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 24px;
  border: 0;
}

/* Leave the provider's accessible controls intact; use compact mode in narrow forms. */
.account-captcha {
  margin-top: 22px;
  max-width: 100%;
}
.account-captcha [data-captcha-status] {
  font-size: .75rem;
  color: var(--muted);
  margin: 10px 0;
}
.account-captcha [data-captcha-retry] {
  font-size: .78rem;
}

.account-switch button {
  flex: 0 1 auto;
  background: transparent;
  min-height: 44px;
  font-size: .86rem;
}

.account-switch button[aria-pressed="true"] {
  color: var(--cyan);
  background: #133042;
  border-color: #80d5ec;
}

.account-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0;
  font-size: .72rem;
  color: var(--cyan);
}

.account-view h2 {
  font-size: 1.9rem;
  margin: 0 0 14px;
}

.account-view > p {
  font-size: .88rem;
}

.account-view fieldset {
  padding: 0;
  margin: 24px 0 0;
  border: 0;
  min-width: 0;
}

.account-view label {
  display: block;
  font-size: .79rem;
  margin: 17px 0 8px;
}

.account-view input:not([type="checkbox"]) {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 13px;
  border: 1px solid #354a64;
  border-radius: 7px;
  background: #080f1c;
  font: inherit;
  color: var(--text);
}

.account-view input::placeholder {
  color: #a8b7ce;
  opacity: 1;
  font-size: .8rem;
}

.account-view input:disabled {
  opacity: .8;
}

.account-view input:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.account-error {
  padding: 14px;
  border: 1px solid #e9b7a1;
  border-radius: 7px;
  background: #34242a;
  color: #ffe0d3;
  font-size: .85rem;
}

.account-error[hidden] {
  display: none;
}

.account-view button[type="submit"] {
  display: block;
  margin-top: 23px;
  min-height: 46px;
  width: fit-content;
  font-size: .84rem;
}

/* Keep the everyday password flow separate from an explicitly chosen passkey. */
.login-other-options {
  margin: 24px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.login-other-options summary {
  min-height: 48px;
  padding: 14px 2px;
  font-size: .82rem;
  color: var(--muted);
}

.login-other-options[open] summary {
  margin-bottom: 10px;
  color: var(--text);
}

.login-other-options button {
  min-height: 46px;
  max-width: 100%;
  font-size: .82rem;
  white-space: normal;
}

.login-other-options .account-small {
  margin: 12px 0 0;
}

.account-checkpoint {
  margin-top: 20px;
  padding: 12px 0;
  border: 0;
  background: transparent;
}

.account-checkpoint p {
  margin: 0;
  font-size: .73rem;
  color: var(--muted);
}

.account-checkpoint [data-state="ready"] {
  color: var(--cyan);
}

.account-checkpoint [data-state="error"] {
  color: #ffe0d3;
}

.account-checkpoint button {
  margin-top: 10px;
  min-height: 44px;
  font-size: .75rem;
}

.account-checkpoint [hidden] {
  display: none;
}

.account-view .account-consent {
  display: flex;
  align-items: start;
  gap: 10px;
  font-size: .73rem;
  color: var(--muted);
}

.account-consent input {
  margin: 4px 0 0;
  flex-shrink: 0;
}

.account-reset {
  border: 0;
  padding: 15px 0;
  background: transparent !important;
  font-size: .72rem;
}

.account-small {
  font-size: .7rem !important;
  margin: 17px 0 0;
}

.local-account-note {
  border: 0;
  padding-top: 22px;
  margin-top: 24px;
}

.local-account-note p {
  font-size: .74rem;
  margin-bottom: 13px;
}

.local-account-note a {
  display: inline-flex;
  gap: 22px;
  align-items: center;
  color: var(--cyan);
  font-size: .84rem;
  min-height: 44px;
}

.local-account-note small {
  display: block;
  font-size: .65rem;
  color: var(--muted);
}

.account-footer {
  max-width: 1350px;
  margin: auto;
  padding: 25px 5%;
  justify-content: space-between;
  color: var(--muted);
  font-size: .7rem;
}

/* A short illustrated route explains the action without another enclosing card.
   The icons are decorative; ordered text carries the same meaning without them. */
.account-example {
  margin: 26px 0;
}

.account-example figcaption {
  color: #c5d8eb;
  font-size: .78rem;
  margin-bottom: 17px;
}

.account-journey {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 23px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.account-journey-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-journey li {
  position: relative;
  min-width: 0;
}

.account-journey li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 9px;
  right: -17px;
  color: #90aaca;
}

.account-journey svg {
  display: block;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-journey strong,
.account-journey span {
  display: block;
  overflow-wrap: anywhere;
}

.account-journey strong {
  color: var(--text);
  font-size: .78rem;
  line-height: 1.5;
  margin-bottom: 5px;
}

.account-journey span {
  color: #aebfd4;
  font-size: .73rem;
  line-height: 1.55;
}

@media(max-width:1000px) {
  .account-layout {
    gap: 25px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }

  .account-story {
    padding-left: 0;
    min-height: 650px;
  }

  .account-story h1 {
    font-size: 2.8rem;
  }

  .account-card {
    padding: 24px;
  }
}

@media(max-width:700px) {
  .account-header {
    padding: 25px 6%;
  }

  .account-header > span {
    font-size: .52rem;
    max-width: 125px;
    text-align: right;
  }

  .account-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 6% 30px;
    gap: 0;
  }

  .account-story {
    min-height: 0;
    padding: 34px 16px 30px;
    /* The short phone crop puts bright waves behind the introduction copy. */
    background-image: linear-gradient(180deg, #050a1250, #050a12),
      url("assets/midnight-landscape.png");
    background-position: center 43%;
  }

  .account-story .eyebrow {
    font-size: .55rem;
    margin-bottom: 16px;
  }

  .account-story h1 {
    font-size: 2.35rem;
    margin-bottom: 18px;
  }

  .account-story > p:not(.eyebrow) {
    font-size: .82rem;
  }

  .account-art-note {
    position: static;
    font-size: .5rem;
  }

  .account-card {
    margin-top: 24px;
    padding: 22px 0;
  }

  .account-switch {
    gap: 8px;
  }

  .account-switch button {
    font-size: .78rem;
    padding: 10px;
  }

  .account-view h2 {
    font-size: 1.7rem;
  }

  .account-footer {
    padding: 20px 6%;
    gap: 10px;
    font-size: .62rem;
  }
}

/* A long registration form must not center a short illustration in a blank column.
   Keep the artwork near the top, then alongside the form as desktop readers scroll.
   Short windows scroll normally; the artwork can grow if enlarged text needs room. */
@media (min-width: 701px) {
  #account-main.account-layout { align-items: start; }
  #account-main > .account-story { align-self: start; }
}
@media (min-width: 701px) and (min-height: 680px) {
  #account-main > .account-story {
    position: sticky;
    top: 24px;
    min-height: clamp(580px, calc(100dvh - 48px), 900px);
    padding-block: 64px 72px;
  }
}
.verification-card h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  margin: 16px 0;
}

.verification-card > p {
  line-height: 1.7;
}

.verification-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: 24px 0;
}

.verification-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid #8ae5ff;
  background: #8ae5ff;
  color: #08111f;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
}

.verification-login:hover {
  background: #b8efff;
}

.verification-actions button {
  min-height: 46px;
  white-space: normal;
}

.verification-inbox {
  margin: 24px 0;
}

.verification-inbox label {
  display: block;
  margin-bottom: 10px;
  font-size: .85rem;
}

.verification-inbox select {
  width: 100%;
  background: #081321;
  color: #e3ecfb;
  border: 1px solid #49617b;
  border-radius: 7px;
  padding: 12px;
  font: inherit;
  font-size: 1rem;
}

.verification-inbox-link {
  display: inline-block;
  margin: 16px 0 4px;
  padding: 14px 18px;
  border: 1px solid #80d5ec;
  border-radius: 7px;
  background: #153342;
  color: #8ae5ff;
}

.verification-inbox [hidden] {
  display: none;
}

/* Account management is one continuous page. Spacing and headings separate
   choices; borders remain only where inputs and destructive actions need them. */
.account-options li::after {
  display: none;
}

/* Newsletter controls remain an open part of the account page; only the
   deliberate actions need button boundaries. Status text carries the meaning. */
.management-newsletter {
  min-width: 0;
}

.newsletter-state {
  color: var(--cyan);
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 0;
}

.newsletter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 14px;
}

.newsletter-actions button {
  min-height: 46px;
  max-width: 100%;
  white-space: normal;
}

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

.account-small a,
.management-nav a,
.management-page .text-link {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.management-shell {
  max-width: 1280px;
}

.management-shell .account-header {
  padding: 30px 0;
}

.management-main {
  max-width: 1120px;
  margin: 55px auto 0;
}

.management-intro {
  max-width: 720px;
}

.management-intro h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  margin: 20px 0;
}

.management-intro h1 span {
  color: var(--cyan);
}

.management-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 30px 0 18px;
}

.management-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--cyan);
  font-size: .85rem;
}

.management-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(30px, 6vw, 85px);
  margin: 70px 0 90px;
  scroll-margin-top: 25px;
  align-items: start;
}

.management-explanation > p:not(.eyebrow) {
  font-size: .92rem;
  line-height: 1.7;
}

.management-section form,
.management-section .management-action,
.management-delete-details {
  min-width: 0;
}

.management-section fieldset {
  margin: 0;
}

.management-action {
  padding-top: 30px;
}

.management-action button {
  min-height: 48px;
  width: fit-content;
}

.management-delete-details summary {
  cursor: pointer;
  padding: 15px 0;
  min-height: 48px;
  color: #f7c8b5;
}

.management-delete-details[open] summary {
  margin-bottom: 10px;
}

.destructive-action {
  border-color: #ce8b7b;
  color: #ffe0d3;
  background: #36242b;
}

.management-page input[readonly] {
  color: #b0c0d7;
  background: #0d1420;
}

@media(max-width:700px) {
  .management-main {
    margin-top: 35px;
  }

  .management-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin: 55px 0 70px;
  }

  .management-action {
    padding-top: 0;
  }

  .management-intro h1 {
    font-size: 2.65rem;
  }

  .management-nav {
    gap: 4px 20px;
  }

  .management-shell .account-header .text-link {
    font-size: .73rem;
  }
}
