.account-page {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 40px 24px 64px;
}
.account-shell {
  max-width: 900px;
  margin: 0 auto;
}
.account-preference {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: center;
  margin-top: 24px;
}
.account-preference h3 { margin: 0 0 6px; }
@media (max-width: 640px) {
  .account-preference {grid-template-columns: minmax(0, 1fr); gap: 16px;}
}
.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.account-header h1 {
  font-size: 32px;
  font-weight: 850;
  letter-spacing: -0.04em;
}
.account-section {
  scroll-margin-top: 128px;
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.account-section h2 {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.account-section h3 {
  font-size: 13px;
  font-weight: 700;
}
.account-identity {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 20px;
}
.account-identity dt,
.account-muted {
  color: var(--text-muted);
  font-size: 12px;
}
.account-identity dd {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
/* Shared full-width rows: identity/details left, action right. */
.account-row,
.account-services > section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  column-gap: 24px;
  align-items: center;
  min-height: 104px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  scroll-margin-top: 128px;
}
.account-card #account-info {
  padding-bottom: 24px;
}
.account-subscription-body {
  display: contents;
}
.account-row-details {
  grid-column: 1;
  grid-row: 1 / span 2;
}
.account-row h2,
.account-services > section h2 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 750;
}
.account-plan {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.account-plan-name,
.account-plan-price,
.account-plan-status {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}
.account-plan-price::before {
  content: '·';
  margin-right: 8px;
}
.account-plan-status {
  margin-top: 4px;
}
.account-row > .account-action,
.account-subscription-action,
.account-services > section > :is(button, a) {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 220px;
  margin: 0;
}
.account-subscription-action .account-action {
  width: 100%;
}
.account-row #vip-membership {
  position: absolute;
}
.account-subscription-action button,
.account-action {
  min-height: 44px;
  font-size: 13px;
}
.account-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 750;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
}
.account-action:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}
.account-action.secondary {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--text-muted);
}
.account-usage-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.account-usage-groups h3 {
  margin-bottom: 4px;
  color: var(--text-muted);
}
.account-usage-row {
  padding: 14px 0;
}
.account-usage-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  font-size: 13px;
}
.account-usage-label dd {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.account-usage-label dd span,
.account-usage-period {
  color: var(--text-muted);
  font-weight: 400;
}
.account-progress {
  margin-top: 9px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.account-progress > span {
  display: block;
  height: 100%;
  background: var(--text-muted);
  border-radius: inherit;
}
.account-progress.over-limit > span {
  background: #e7b25a;
}
/* Keep both connection components and all their handlers intact. */
.account-services > section > div {
  margin: 0;
  min-width: 0;
}
.account-services > section > div:first-child {
  grid-column: 1;
  grid-row: 1;
}
.account-services > section > div:first-child > span {
  display: none;
}
.account-services > section > div:nth-of-type(2) {
  grid-column: 1;
  grid-row: 2;
}
.account-services > section > div:nth-of-type(2) > p {
  display: inline;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}
.account-services > section > div:nth-of-type(2) > p + p::before {
  content: ' · ';
}
.account-services > section > :is(button, a) {
  min-height: 44px;
  font-size: 13px;
}
.account-services > section > p {
  grid-column: 1 / -1;
  margin: 8px 0 0;
}
.account-email-preferences {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.account-email-preferences summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
}
.account-email-preferences #notifications > div {
  padding: 16px 0 0;
  border: 0;
}
@media (max-width: 640px) {
  .account-page {
    padding: 28px 16px 48px;
  }
  .account-header h1 {
    font-size: 28px;
  }
  .account-section {
    padding: 20px;
    margin-top: 16px;
  }
  .account-identity {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .account-identity > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: baseline;
  }
  .account-identity dd {
    margin: 0;
    text-align: right;
  }
  .account-identity dt {
    flex-shrink: 0;
  }
  .account-row,
  .account-services > section {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 20px 0;
  }
  .account-row > .account-action,
  .account-subscription-action,
  .account-services > section > :is(button, a) {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    margin-top: 16px;
  }
  .account-usage-groups {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
.account-reset {
  margin-top: 6px;
}

#main.account-workspace {
  max-width: none;
  padding: 40px 24px 64px;
}
.account-workspace .account-shell {
  width: 100%;
  max-width: 900px;
  margin: auto;
}
.account-workspace :is(p, dl, dd, h1, h3) {
  margin: 0;
}
.account-workspace .account-identity dd {
  margin-top: 6px;
}
.account-workspace .account-header h1 {
  line-height: 1.2;
}
.account-workspace .account-row-details p {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.account-workspace .account-action {
  cursor: pointer;
  font-family: inherit;
}
.account-workspace .account-action:not(.secondary) {
  background: var(--accent);
  color: #fff;
  border: 0;
}
.account-workspace .account-progress {
  display: block;
  width: 100%;
  appearance: none;
  border: 0;
}
.account-progress::-webkit-progress-bar {
  background: var(--border);
}
.account-progress::-webkit-progress-value {
  background: var(--text-muted);
}
.account-progress::-moz-progress-bar {
  background: var(--text-muted);
}
.account-progress.over-limit::-webkit-progress-value {
  background: #e7b25a;
}
.account-progress.over-limit::-moz-progress-bar {
  background: #e7b25a;
}
.account-workspace .account-reset {
  margin-top: 6px;
}
.account-workspace [role='alert']:empty {
  display: none;
}
@media (max-width: 640px) {
  #main.account-workspace {
    padding: 28px 16px 48px;
  }
  .account-workspace .account-identity dd {
    margin: 0;
  }
}
/* Isolate the copied PT layout from the retired TCGT account definition-list rules. */
.account-workspace .account-section dl {
  margin: 0;
}
.account-workspace .account-identity {
  gap: 20px;
}
.account-workspace .account-identity > div {
  display: block;
  padding: 0;
  border: 0;
}
.account-workspace .account-identity dt {
  font-size: 12px;
  color: var(--text-muted);
}
.account-workspace .account-identity dd {
  font-size: 14px;
  text-align: left;
  line-height: 1.5;
}
.account-workspace .account-usage-list {
  display: block;
}
.account-workspace .account-usage-list > .account-usage-row {
  display: block;
  padding: 14px 0;
  border: 0;
}
.account-workspace .account-usage-label dt {
  font-size: 13px;
  color: var(--text);
}
.account-workspace .account-usage-label dd {
  font-size: 13px;
  line-height: 1.5;
}
.account-workspace .account-usage-row p {
  font-size: 12px;
  line-height: 1.5;
}
.account-workspace .account-identity {
  padding: 0;
  border: 0;
}
@media (max-width: 640px) {
  .account-workspace .account-identity {
    gap: 14px;
  }
  .account-workspace .account-identity > div {
    display: flex;
    gap: 20px;
  }
  .account-workspace .account-identity dd {
    text-align: right;
  }
}

/* One Account explanatory-text owner, independent of host page paragraph rules. */
html[data-tcgn-v1] .account-shell .account-muted {font:400 12px/1.5 var(--font);letter-spacing:normal;color:var(--muted);margin-block:0}
html[data-tcgn-v1] .account-shell .account-reset {margin-top:6px}
