.topbar.account-topbar {
  height: auto;
  min-height: 82px;
  justify-content: space-between;
  gap: 16px;
}

.account-topbar .brand { min-width: 0; }

.account-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 20px;
  flex-wrap: wrap;
}

.account-nav a,
.account-nav button {
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.account-nav button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.account-shell {
  max-width: 960px;
  margin-inline: auto;
  padding: clamp(32px, 6vw, 72px) 24px;
}

.account-shell--narrow { max-width: 540px; }

.account-shell h1,
.account-shell h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-weight: 500;
}

.account-shell h1 {
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.account-shell h2 { font-size: 25px; }

.account-shell p { line-height: 1.5; }
.account-shell a { color: #2d6769; text-underline-offset: 0.18em; }
.account-header { margin-bottom: 22px; }

.account-card {
  border: 1px solid #d9e4e0;
  border-radius: 18px;
  padding: clamp(16px, 4vw, 28px);
  background: var(--paper, #fff);
  box-shadow: 0 12px 40px #2522410b;
}

.account-stack { display: grid; gap: 16px; }
.account-stack > p { margin: 0; }

.account-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-weight: 600;
  font-size: 0.94rem;
}

.account-field input,
.account-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #a0ada9;
  border-radius: 9px;
  padding: 9px 11px;
  background-color: #fff;
  color: var(--ink, #252241);
  font: inherit;
  font-weight: 400;
}

.account-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.account-check input { flex-shrink: 0; margin: 2px 0 0; }
.account-shell input[type="checkbox"] { accent-color: #2d6769; }

.account-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.account-shell .account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--ink, #252241);
  border-radius: 10px;
  padding: 9px 15px;
  color: #fff;
  background: var(--ink, #252241);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.account-shell .account-button:hover { background: #3e395e; }
.account-shell .account-button--secondary {
  background: #fff;
  border-color: #a0ada9;
  color: var(--ink, #252241);
}
.account-shell .account-button--secondary:hover { background: #eef6f4; }

.account-shell :focus-visible,
.account-nav :focus-visible {
  outline: 3px solid #408589;
  outline-offset: 3px;
}

.account-status {
  padding: 12px 14px;
  margin: 0 0 16px;
  border: 1px solid #99aaa6;
  border-radius: 10px;
  background: #eef6f4;
}
.account-status--error {
  border-color: #c7847d;
  background: #fff2f0;
  color: #792a24;
}

.account-hint {
  color: #585465;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.45;
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.account-list {
  display: grid;
  gap: 10px;
}
.account-list details {
  padding: 0 16px;
  border: 1px solid #d9e4e0;
  border-radius: 12px;
  background-color: #fff;
}
.account-list summary {
  padding-block: 14px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.account-list details > *:last-child { margin-bottom: 16px; }

.account-person { font-weight: 600; }
.account-person-details {
  margin-inline-start: 0.35em;
  color: #585465;
  font-size: 0.9rem;
}

.account-tool-list {
  min-inline-size: 0;
  padding: 0;
  border: 0;
  margin: 0;
}
.account-tool-list legend {
  padding: 0 0 8px;
  font-weight: 600;
}

.account-tool-table {
  width: 100%;
  max-width: 34rem;
  border-collapse: collapse;
}

.account-tool-table th,
.account-tool-table td {
  border-bottom: 1px solid #d9e4e0;
  padding: 8px;
  text-align: center;
}

.account-tool-table th:first-child {
  text-align: left;
  overflow-wrap: anywhere;
}

.account-tool-table thead th { background: #eef6f4; }
.account-tool-table thead th:not(:first-child) { width: 4rem; }
.account-tool-table tbody th { font-weight: 400; }
.account-tool-table input { width: 1rem; height: 1rem; margin: 0; vertical-align: middle; cursor: pointer; }
.account-tool-table input:disabled { opacity: 0.55; cursor: default; }

.account-recovery-codes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 16px;
  padding-left: 1.6em;
  margin: 0;
  font: 0.98rem/1.5 ui-monospace, Consolas, monospace;
}

@media (max-width: 620px) {
  .topbar.account-topbar { min-height: 70px; padding-block: 10px; }
  .account-shell { padding-inline: 16px; }
  .account-form-grid { grid-template-columns: 1fr; }
  .account-nav { gap: 8px 12px; font-size: 0.88rem; }
  .account-person-details { display: block; margin: 3px 0 0; }
}

.portal-header-actions {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  align-items: center;
  gap: clamp(10px, 3vw, 24px);
  margin-inline-start: auto;
}

.portal-header-actions button {
  min-height: 44px;
  white-space: nowrap;
}
