.account-workspace {
  display: grid;
  gap: 18px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.account-workspace > .account-emergency-status {
  border-radius: var(--radius-md);
}

.account-workspace__nav {
  display: flex;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--white);
  scrollbar-width: none;
}

.account-workspace__nav::-webkit-scrollbar {
  display: none;
}

.account-workspace__nav button {
  min-height: 44px;
  padding: 8px 14px;
  color: var(--muted);
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  font: 700 15px/1.2 var(--font-sans);
  white-space: nowrap;
}

.account-workspace__nav button:hover,
.account-workspace__nav button:focus-visible {
  color: var(--ink-deep);
  background: var(--paper);
}

.account-workspace__nav button.is-active {
  color: var(--ink-deep);
  background: var(--selection-yellow);
  box-shadow: inset 0 0 0 1px var(--selection-yellow-strong);
}

.account-workspace__content {
  min-width: 0;
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid var(--rule-dark);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.account-eyebrow {
  display: block;
  color: var(--action-blue-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-profile-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}

.account-profile-identity .avatar {
  width: 68px;
  height: 68px;
  font-size: 20px;
}

.account-profile-identity h2,
.account-form-intro h2,
.account-today h2 {
  margin: 4px 0 0;
  color: var(--ink-deep);
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.08;
}

.account-profile-identity p,
.account-form-intro p,
.account-today p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.account-role-badge {
  align-self: start;
  padding: 7px 11px;
  color: var(--ink-deep);
  border: 1px solid var(--selection-yellow-strong);
  border-radius: var(--radius-pill);
  background: var(--selection-yellow-soft);
  font-size: 13px;
  font-weight: 800;
}

.account-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(24px, 4vw, 54px);
  padding: 30px 0;
}

.account-detail-list {
  margin: 12px 0 0;
}

.account-detail-list div {
  display: grid;
  grid-template-columns: minmax(120px, 0.65fr) minmax(0, 1.35fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.account-detail-list dt {
  color: var(--muted);
}

.account-detail-list dd {
  margin: 0;
  color: var(--ink-deep);
  font-weight: 700;
}

.account-guidance {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--rule);
  background: var(--info-surface);
}

.account-guidance > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--action-blue-strong);
  border-radius: 50%;
  background: var(--white);
}

.account-guidance svg,
.account-help-grid svg,
.account-schedule-row svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.account-guidance h3,
.account-help-grid h3 {
  margin: 0;
  color: var(--ink-deep);
  font-size: 18px;
}

.account-guidance p,
.account-help-grid p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.account-page-actions,
.account-form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.account-today {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--selection-yellow-strong);
  border-radius: var(--radius-md);
  background: var(--selection-yellow-soft);
}

.account-today h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.account-schedule-layout,
.account-activity-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 22px;
  margin-top: 24px;
}

.account-ledger,
.account-side-ledger > section,
.account-activity-summary {
  min-width: 0;
  border: 1px solid var(--rule);
  background: var(--white);
}

.account-ledger > header,
.account-side-ledger section > header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.account-ledger h3,
.account-side-ledger h3 {
  margin: 0;
  color: var(--ink-deep);
  font-size: var(--type-panel-size);
}

.account-ledger header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.account-ledger header > span,
.account-side-ledger header > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.account-schedule-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 76px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
}

.account-schedule-row:last-child {
  border-bottom: 0;
}

.account-schedule-row time,
.account-schedule-row div strong,
.account-schedule-row div small {
  display: block;
}

.account-schedule-row time strong {
  color: var(--action-blue-strong);
  font-size: 14px;
}

.account-schedule-row time span,
.account-schedule-row div small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.account-schedule-row div strong {
  color: var(--ink-deep);
  font-size: 16px;
}

.account-schedule-row em {
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: var(--selection-yellow);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.account-side-ledger {
  display: grid;
  gap: 18px;
  align-content: start;
}

.account-side-ledger ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.account-side-ledger li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
}

.account-side-ledger li:last-child {
  border-bottom: 0;
}

.account-side-ledger li > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--action-blue-strong);
  stroke-width: 1.8;
}

.account-side-ledger li > span {
  min-width: 0;
  flex: 1;
}

.account-side-ledger li strong,
.account-side-ledger li small {
  display: block;
}

.account-side-ledger li small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.account-empty {
  padding: 24px 18px;
  color: var(--muted);
}

.account-empty strong,
.account-empty span {
  display: block;
}

.account-empty strong {
  color: var(--ink-deep);
}

.account-empty span {
  margin-top: 4px;
}

.account-form-intro {
  max-width: 720px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}

.account-preferences-form {
  display: grid;
  max-width: 780px;
  margin-top: 8px;
}

.account-preferences-form > label {
  display: grid;
  grid-template-columns: minmax(210px, 0.9fr) minmax(260px, 1.1fr);
  gap: 4px 28px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.account-preferences-form label > span {
  color: var(--ink-deep);
  font-weight: 800;
}

.account-preferences-form label > small {
  grid-column: 1;
  color: var(--muted);
  line-height: 1.4;
}

.account-preferences-form select {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 100%;
  min-width: 0;
}

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

.account-activity-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
}

.account-activity-row:last-child {
  border-bottom: 0;
}

.account-activity-row > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--action-blue-strong);
  background: var(--info-surface);
}

.account-activity-row svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.account-activity-row strong,
.account-activity-row small {
  display: block;
}

.account-activity-row p {
  margin: 3px 0;
  color: var(--muted);
}

.account-activity-row small {
  color: var(--muted-light);
  font-size: 13px;
}

.account-activity-summary {
  align-self: start;
  padding: 24px;
  background: var(--paper);
}

.account-activity-summary > strong {
  display: block;
  margin-top: 8px;
  color: var(--ink-deep);
  font-size: 48px;
  line-height: 1;
}

.account-activity-summary p {
  margin: 8px 0 18px;
  color: var(--muted);
}

.account-help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
  border: 1px solid var(--rule);
}

.account-help-grid > section {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  align-content: start;
  min-height: 190px;
  padding: 22px;
  border-right: 1px solid var(--rule);
}

.account-help-grid > section:last-child {
  border-right: 0;
}

.account-help-grid > section > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--action-blue-strong);
  background: var(--info-surface);
}

.account-help-grid a {
  display: inline-block;
  margin-top: 10px;
  color: var(--action-blue-strong);
  font-weight: 800;
}

.account-help-grid kbd {
  padding: 2px 6px;
  border: 1px solid var(--rule-dark);
  border-radius: var(--radius-xs);
  background: var(--paper);
  font: 700 13px var(--font-sans);
}

html[data-motion-preference='reduced'] {
  scroll-behavior: auto !important;
  --motion-control: 0ms;
  --motion-layout: 0ms;
}

html[data-motion-preference='reduced'] *,
html[data-motion-preference='reduced'] *::before,
html[data-motion-preference='reduced'] *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
}

@media (max-width: 900px) {
  .account-detail-grid,
  .account-schedule-layout,
  .account-activity-layout {
    grid-template-columns: 1fr;
  }

  .account-help-grid {
    grid-template-columns: 1fr;
  }

  .account-help-grid > section {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .account-help-grid > section:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 690px) {
  .account-workspace {
    gap: 12px;
  }

  .account-workspace__content {
    padding: 20px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .account-profile-identity {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
  }

  .account-profile-identity .avatar {
    width: 52px;
    height: 52px;
    font-size: 17px;
  }

  .account-role-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .account-detail-list div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .account-page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-schedule-row {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }

  .account-schedule-row em {
    grid-column: 2;
    justify-self: start;
  }

  .account-preferences-form > label {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .account-preferences-form label > small,
  .account-preferences-form select {
    grid-column: 1;
    grid-row: auto;
  }

  .account-preferences-form select {
    margin-top: 8px;
  }

  .account-form-actions .button {
    width: 100%;
  }
}
