/* Profile uses the same flat editorial account layout as login and registration. */
body[data-page="profile"] {
  color: var(--ui-ink);
  background: var(--surface);
}

body[data-page="profile"] .auth-shell {
  display: block;
  box-sizing: border-box;
  width: min(1180px, calc(100vw - 64px));
  max-width: none;
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: clamp(68px, 7vw, 112px) 0 clamp(86px, 8vw, 128px);
}

body[data-page="profile"] .profile-card,
html[data-theme="dark"] body[data-page="profile"] .profile-card {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(430px, 1fr);
  column-gap: clamp(70px, 9vw, 150px);
  row-gap: 24px;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body[data-page="profile"] .profile-card > .auth-heading {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: start;
}

body[data-page="profile"] .profile-card > :not(.auth-heading) {
  grid-column: 2;
}

body[data-page="profile"] .auth-heading {
  display: grid;
  gap: 20px;
}

body[data-page="profile"] .auth-heading::before {
  width: 30px;
  height: 1px;
  margin-bottom: 4px;
  background: var(--ui-accent);
  content: "";
}

body[data-page="profile"] .auth-heading h1 {
  margin: 0;
  color: var(--ui-ink);
  font-size: clamp(44px, 4.6vw, 66px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

body[data-page="profile"] .auth-heading p {
  max-width: 420px;
  margin: 0;
  color: var(--ui-muted);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
}

body[data-page="profile"] .auth-form {
  display: grid;
  gap: 22px;
  padding-top: 4px;
}

body[data-page="profile"] .auth-form label {
  display: grid;
  gap: 6px;
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body[data-page="profile"] .auth-form input,
body[data-page="profile"] .auth-form select,
html[data-theme="dark"] body[data-page="profile"] .auth-form input,
html[data-theme="dark"] body[data-page="profile"] .auth-form select {
  box-sizing: border-box;
  width: 100%;
  min-height: 50px;
  padding: 7px 10px 8px;
  color: var(--ui-ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ui-rule-strong);
  border-radius: 0;
  box-shadow: none;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.25;
  text-transform: none;
}

body[data-page="profile"] .auth-form select {
  cursor: pointer;
}

body[data-page="profile"] .auth-form input:hover,
body[data-page="profile"] .auth-form select:hover {
  border-bottom-color: color-mix(in srgb, var(--ui-accent) 65%, var(--ui-rule-strong));
}

body[data-page="profile"] .auth-form input:focus,
body[data-page="profile"] .auth-form select:focus,
html[data-theme="dark"] body[data-page="profile"] .auth-form input:focus,
html[data-theme="dark"] body[data-page="profile"] .auth-form select:focus {
  border-bottom-color: var(--ui-accent);
  outline: 0;
  box-shadow: inset 0 -1px 0 var(--ui-accent);
}

body[data-page="profile"] .auth-form input[readonly],
html[data-theme="dark"] body[data-page="profile"] .auth-form input[readonly] {
  color: var(--ui-muted);
  background: transparent;
}

body[data-page="profile"] .auth-name-grid {
  gap: 26px;
}

body[data-page="profile"] .button-primary,
html[data-theme="dark"] body[data-page="profile"] .button-primary {
  justify-self: start;
  min-height: 48px;
  padding: 0 20px;
  color: #fff;
  background: var(--ui-accent);
  border: 0;
  border-radius: 4px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

body[data-page="profile"] .button-primary:hover,
body[data-page="profile"] .button-primary:focus-visible,
html[data-theme="dark"] body[data-page="profile"] .button-primary:hover,
html[data-theme="dark"] body[data-page="profile"] .button-primary:focus-visible {
  color: #fff;
  background: var(--ui-accent-strong);
  border: 0;
  outline: 0;
  box-shadow: none;
  transform: none;
}

body[data-page="profile"] .button-primary:disabled {
  cursor: wait;
  opacity: 0.62;
}

body[data-page="profile"] .auth-status {
  min-height: 21px;
  color: var(--ui-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

body[data-page="profile"] .auth-status.is-success {
  color: var(--ui-accent-strong);
}

body[data-page="profile"] .auth-status.is-error {
  color: var(--ui-risk);
}

@media (max-width: 820px) {
  body[data-page="profile"] .auth-shell {
    width: calc(100vw - 44px);
    min-height: 0;
    padding: 54px 0 88px;
  }

  body[data-page="profile"] .profile-card {
    grid-template-columns: 1fr;
    row-gap: 34px;
  }

  body[data-page="profile"] .profile-card > .auth-heading,
  body[data-page="profile"] .profile-card > :not(.auth-heading) {
    grid-column: 1;
    grid-row: auto;
  }

  body[data-page="profile"] .auth-heading {
    max-width: 620px;
  }

  body[data-page="profile"] .auth-heading h1 {
    font-size: clamp(42px, 9vw, 58px);
  }
}

@media (max-width: 480px) {
  body[data-page="profile"] .auth-shell {
    width: calc(100vw - 32px);
    padding-top: 42px;
  }

  body[data-page="profile"] .auth-heading {
    gap: 16px;
  }

  body[data-page="profile"] .auth-heading h1 {
    font-size: clamp(38px, 11vw, 48px);
  }

  body[data-page="profile"] .auth-heading p {
    font-size: 16px;
  }

  body[data-page="profile"] .auth-name-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  body[data-page="profile"] .auth-form {
    gap: 20px;
  }

  body[data-page="profile"] .button-primary {
    width: 100%;
  }
}
