/* Shared account entry and side panel; current identity is deliberately demo data. */
.site-header .account-trigger.identity-control {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 212px;
  min-width: 0;
  min-height: 56px;
  flex: none;
  padding: 4px 8px 4px 12px;
  border: 0;
  border-left: 1px solid var(--arena-line);
  border-radius: 2px;
  background: transparent;
  color: var(--arena-heading);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease;
}
.site-header .account-trigger:hover,
.site-header .account-trigger[aria-expanded="true"] { background: var(--arena-hover); }
.account-trigger__avatar {
  display: block;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--arena-avatar-line);
  border-radius: 50%;
  background: var(--arena-pale);
  object-fit: cover;
}
.site-header .account-trigger .account-trigger__copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
}
.account-trigger__label { font-size: var(--type-xs); font-weight: 400; line-height: 1.4; color: var(--arena-muted); white-space: nowrap; }
.account-trigger__name { overflow: hidden; font-size: var(--type-sm); font-weight: 600; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; color: var(--arena-heading); }
.account-trigger .account-trigger__chevron { width: 16px; height: 16px; flex: none; }

/* Live and Trading keep exactly the same navigation-control allocations. */
.site-header .language-button { width: 52px; flex: none; }
.site-header .theme-toggle { width: 82px; }
@media (min-width: 1341px) {
  .site-header .arena-nav { width: 320px; flex: none; justify-content: space-between; }
}

.account-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: 400px;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--arena-control);
  border-radius: 0;
  background: var(--arena-surface);
  color: var(--arena-ink);
  font-family: var(--font);
  font-size: var(--type-sm);
  line-height: 1.5;
  box-shadow: -16px 0 48px #00356b1f;
}
.account-drawer[open] { display: flex; flex-direction: column; animation: account-drawer-enter 180ms ease-out; }
.account-drawer::backdrop { background: #102b4670; animation: account-backdrop-enter 180ms ease-out; }
.account-drawer__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: none;
  padding: 16px 24px;
  border-bottom: 1px solid var(--arena-line);
  background: var(--arena-raised);
}
.account-drawer__title { margin: 0; color: var(--arena-heading); font-size: var(--type-md); font-weight: 600; line-height: 1.4; }
.account-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  flex: none;
  padding: 10px;
  border: 1px solid var(--arena-control);
  border-radius: 2px;
  background: var(--arena-surface);
  color: var(--arena-heading);
  cursor: pointer;
}
.account-drawer__close:hover { background: var(--arena-hover); }
.account-drawer__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 24px;
  min-height: 0;
  padding: 24px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--arena-control) var(--arena-raised);
}
.account-drawer__profile { display: flex; align-items: center; gap: 16px; min-width: 0; }
.account-drawer__avatar { display: block; width: 64px; height: 64px; flex: none; border: 1px solid var(--arena-avatar-line); border-radius: 50%; background: var(--arena-pale); object-fit: cover; }
.account-drawer__profile-copy { min-width: 0; }
.account-drawer__name { margin: 0; color: var(--arena-heading); font-size: var(--type-md); font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.account-drawer__profile-caption { margin: 4px 0 0; color: var(--arena-muted); font-size: var(--type-xs); line-height: 1.6; }
.account-drawer__facts { display: grid; gap: 12px; margin: 0; }
.account-drawer__fact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, max-content); gap: 16px; align-items: start; }
.account-drawer__fact dt { color: var(--arena-muted); font-size: var(--type-sm); line-height: 1.5; }
.account-drawer__fact dd { max-width: 18ch; margin: 0; color: var(--arena-heading); font-size: var(--type-sm); line-height: 1.5; text-align: right; overflow-wrap: anywhere; }
.account-drawer__number { font-variant-numeric: tabular-nums; }
.account-drawer__section { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding-top: 24px; border-top: 1px solid var(--arena-line); }
.account-drawer__section-title { display: block; margin: 0; color: var(--arena-heading); font-size: var(--type-sm); font-weight: 600; line-height: 1.5; }
.account-drawer__competition-link { display: flex; align-items: center; min-height: 44px; color: var(--arena-heading); font-size: var(--type-sm); font-weight: 600; line-height: 1.6; text-decoration: none; overflow-wrap: anywhere; }
.account-drawer__competition-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.account-drawer .account-drawer__view-select {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--arena-control);
  border-radius: 2px;
  background: var(--arena-surface);
  color: var(--arena-ink);
  font-family: var(--font);
  font-size: var(--type-sm);
  line-height: 1.5;
}
.account-drawer__helper { margin: 0; color: var(--arena-muted); font-size: var(--type-xs); line-height: 1.6; }
.account-drawer__return { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--arena-control); border-radius: 2px; background: var(--arena-raised); color: var(--arena-heading); font-size: var(--type-sm); font-weight: 600; line-height: 1.5; text-align: center; text-decoration: none; }
.account-drawer__return:hover { background: var(--arena-hover); }
.account-drawer__note { flex: none; margin: 0; padding: 16px 24px; border-top: 1px solid var(--arena-line); background: var(--arena-raised); color: var(--arena-muted); font-size: var(--type-xs); line-height: 1.6; }
.account-drawer :is(button, select, a):focus-visible,
.site-header .account-trigger:focus-visible { outline: 2px solid var(--arena-action); outline-offset: 3px; }

@media (max-width: 760px) {
  .site-header .account-trigger.identity-control { order: 4; width: 100%; flex-basis: 100%; min-height: 56px; padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--arena-line); }
}
@media (max-width: 400px) {
  .account-drawer__heading { padding-inline: 16px; }
  .account-drawer__content { padding: 20px 16px; }
  .account-drawer__note { padding-inline: 16px; }
}
@keyframes account-drawer-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes account-backdrop-enter { from { background: #102b4600; } to { background: #102b4670; } }
@media (prefers-reduced-motion: reduce) {
  .account-drawer[open], .account-drawer::backdrop { animation: none; }
  .site-header .account-trigger { transition: none; }
}
