.account-shell {
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 30px 24px 0;
}

.account-heading {
  margin-bottom: 28px;
}

.account-title {
  margin: 5px 0 0;
  font-family: var(--bw-font-display);
  color: var(--bw-ink);
  font-size: 36px;
  font-weight: 900;
  line-height: 0.95;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: start;
}

.account-identity-card {
  position: sticky;
  top: 18px;
  overflow: hidden;
  border: 1px solid rgba(199, 154, 58, 0.2);
  border-radius: 18px;
  background: var(--bw-navy);
  color: #fff;
  box-shadow: var(--bw-shadow-strong);
}

.account-identity-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(620px 280px at 90% -30%, rgba(199, 154, 58, 0.2), transparent 60%);
  pointer-events: none;
}

.account-identity-card > * {
  position: relative;
}

.account-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 26px 26px 0;
}

.account-avatar {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(199, 154, 58, 0.48);
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--bw-navy-soft);
  color: #fff;
  font-size: 21px;
  font-weight: 900;
}

.account-profile__text {
  min-width: 0;
}

.account-profile h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.08;
}

.account-profile p {
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--bw-navy-on-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 26px 0;
}

.account-pill {
  border-radius: 999px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  color: var(--bw-navy-on-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.account-pill--gold {
  background: var(--bw-gold);
  color: #1a1408;
}

.account-pill--outline {
  border: 1px solid rgba(157, 180, 207, 0.34);
}

.account-status {
  margin: 22px 26px 0;
  padding-top: 22px;
  border-top: 1px solid rgba(157, 180, 207, 0.18);
  color: var(--bw-navy-on-dark);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.account-actions {
  margin: 22px 26px 0;
  border-top: 1px solid rgba(157, 180, 207, 0.18);
  padding: 22px 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-actions:empty {
  display: none;
}

.account-actions .bw-button {
  min-height: 42px;
}

.account-side {
  display: grid;
  gap: 12px;
}

.account-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.account-section-head h2 {
  margin: 0;
  color: var(--bw-ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.account-section-head p {
  margin: 4px 0 0;
  color: var(--bw-navy-muted);
  font-size: 13px;
  line-height: 1.45;
}

.account-access-list {
  display: grid;
  gap: 14px;
}

.account-billing,
.account-manage {
  border: 1px solid var(--bw-border);
  border-radius: 18px;
  padding: 20px 22px;
  background: var(--bw-panel);
}

.account-billing__title,
.account-manage__title {
  margin: 0 0 12px;
  color: var(--bw-ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.account-billing__rows {
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
}

.account-billing__rows > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 14px;
}

.account-billing__rows dt {
  color: var(--bw-navy-muted);
  font-weight: 700;
}

.account-billing__rows dd {
  margin: 0;
  color: var(--bw-ink);
  text-align: right;
}

.account-billing__note,
.account-manage__warn {
  margin: 12px 0;
  color: var(--bw-navy-muted);
  font-size: 13px;
  line-height: 1.5;
}

.account-billing__note a,
.account-manage__warn a {
  color: var(--bw-ink);
  text-decoration: underline;
}

.account-access-card {
  border: 1px solid var(--bw-border);
  border-radius: 18px;
  min-height: 90px;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  background: var(--bw-panel);
  color: var(--bw-ink);
  box-shadow: var(--bw-shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.account-access-card.is-available:hover {
  border-color: var(--bw-gold);
  box-shadow: 0 10px 28px rgba(17, 38, 59, 0.14);
}

.account-access-card.is-locked {
  background: #f4f2ec;
}

.account-access-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--bw-navy);
  color: var(--bw-gold);
  font-family: var(--bw-font-display);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.account-access-icon::before {
  color: inherit;
  font-family: var(--bw-font-sans);
  font-size: 17px;
  line-height: 1;
}

.account-access-icon--hex::before {
  content: "⬡";
}

.account-access-icon--arrow::before {
  content: "↗";
}

.account-access-card.is-locked .account-access-icon {
  background: #e3ddd0;
  color: var(--bw-navy-muted);
}

.account-access-main {
  min-width: 0;
}

.account-access-main h3 {
  margin: 0;
  color: var(--bw-ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.12;
}

.account-access-status {
  margin: 3px 0 0;
  color: var(--bw-navy-muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.account-access-card.is-locked .account-access-main h3 {
  color: var(--bw-navy-muted);
}

.account-access-status.is-positive {
  color: var(--bw-positive);
}

.account-access-status.is-locked {
  color: var(--bw-navy-muted);
}

.account-access-action {
  color: var(--bw-navy);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, transform 0.15s ease;
}

.account-access-card.is-available:hover .account-access-action {
  color: var(--bw-gold);
  transform: translateX(3px);
}

.account-lock-mark {
  position: relative;
  width: 18px;
  height: 18px;
  justify-self: end;
}

.account-lock-mark::before,
.account-lock-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.account-lock-mark::before {
  top: 3px;
  width: 8px;
  height: 7px;
  border: 2px solid var(--bw-muted-light);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.account-lock-mark::after {
  bottom: 2px;
  width: 12px;
  height: 9px;
  border-radius: 3px;
  background: var(--bw-gold);
}

@media (max-width: 860px) {
  .account-grid {
    grid-template-columns: 1fr;
  }

  .account-identity-card {
    position: relative;
    top: auto;
  }
}

@media (max-width: 620px) {
  .account-shell {
    padding: 24px 14px 0;
  }

  .account-title {
    font-size: 36px;
  }

  .account-profile {
    align-items: flex-start;
    padding: 22px 18px 0;
  }

  .account-avatar {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    font-size: 19px;
  }

  .account-pills,
  .account-actions {
    margin-left: 0;
    margin-right: 0;
    padding-left: 18px;
    padding-right: 18px;
  }

  .account-actions {
    padding-top: 20px;
    padding-bottom: 22px;
  }

  .account-actions .bw-button {
    flex: 1 1 140px;
  }

  .account-access-card {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 18px;
  }

  .account-access-action,
  .account-lock-mark {
    grid-column: 2;
    justify-self: end;
  }
}

@media (max-width: 420px) {
  .account-profile h2 {
    font-size: 20px;
  }

  .account-profile p {
    white-space: normal;
  }
}
