/* The account menu in the bar (account-menu.js) and the avatar (identity.js), on every page. --ob-* tokens only
   (theme.css). Nothing animates. */
header.top .oacct { position: relative; flex: none; margin-left: 8px; }
header.top .tr + .oacct, header.top .stats + .oacct { margin-left: 0; }
.oacct-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; max-width: 200px; padding: 0 8px 0 4px; border: 0; border-radius: 8px; background: transparent; color: var(--ob-label); font: 510 13px/1 var(--ob-sans); cursor: pointer; }
.oacct.open .oacct-btn { background: var(--ob-hover); color: var(--ob-ink); }
@media (hover: hover) { .oacct-btn:hover { background: var(--ob-hover); color: var(--ob-ink); } }
.oacct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* opaque: the page under it never shows through (it was a see-through material) */
.oacct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 248px; max-height: calc(100vh - var(--hdr, 64px) - 16px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; border-radius: 16px; background: #141416; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 40px rgba(0, 0, 0, 0.6); }
.oacct-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; }
.oacct-whobox { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.oacct-who { min-width: 0; font-size: 15px; font-weight: 600; color: var(--ob-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oacct-via { font: 400 12px/1.2 var(--ob-sans); color: var(--ob-label); }
/* a guest's Sign in in the bar, beside Balance: plain text, never a bordered pill */
header.top .oacct-signin { flex: none; display: inline-flex; align-items: center; height: 32px; padding: 0 10px; margin-left: 8px; border-radius: 8px; color: var(--ob-ink); font: 510 13px/1 var(--ob-sans); text-decoration: none; white-space: nowrap; }
@media (hover: hover) { header.top .oacct-signin:hover { background: var(--ob-hover); color: var(--ob-ink); text-decoration: none; } }
header.top .oacct-signin:focus-visible { outline: 2px solid var(--ob-focus); outline-offset: 2px; }
header.top .oacct-signin[hidden] { display: none; }
.oacct-sep { height: 1px; margin: 4px 2px; background: var(--ob-line); }
.oacct-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; box-sizing: border-box; height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ob-ink-2); font: 500 14px/1 var(--ob-sans); text-decoration: none; text-align: left; cursor: pointer; }
.oacct-item:focus-visible { background: #1c1c20; color: var(--ob-ink); text-decoration: none; }
@media (hover: hover) { .oacct-item:hover:not(:disabled) { background: #1c1c20; color: var(--ob-ink); text-decoration: none; } }
.oacct-item[aria-current="page"] { color: var(--ob-ink); }
.oacct-item:disabled { cursor: default; color: var(--ob-label); }
.oacct-item:focus-visible { outline: 3px solid var(--ob-focus); outline-offset: -3px; }
/* Agents · Exchange · Docs: one quiet line */
.oacct-refs { display: flex; gap: 2px; padding: 2px 0; }
.oacct-ref { flex: 0 0 auto; height: 32px; padding: 0 10px; border-radius: 10px; font: 500 13px/32px var(--ob-sans); color: var(--ob-label); text-decoration: none; }
.oacct-ref:focus-visible { background: #1c1c20; color: var(--ob-ink); text-decoration: none; }
@media (hover: hover) { .oacct-ref:hover { background: #1c1c20; color: var(--ob-ink); text-decoration: none; } }
.oacct-ref:focus-visible { outline: 3px solid var(--ob-focus); outline-offset: -3px; }

/* avatar: initials on the colour the person picked */
.oav { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border-radius: 50%; font: 600 10px/1 var(--ob-sans); letter-spacing: 0.02em; color: #0b0c0e; user-select: none; }
.oav-lg { width: 36px; height: 36px; font-size: 13px; }
.oav-xl { width: 64px; height: 64px; font-size: 22px; }
.av-slate { background: #9aa3ad; } .av-teal { background: #7fc9c4; } .av-blue { background: #8fb2f0; } .av-violet { background: #b9a2ef; }
.av-rose { background: #ef9fb8; } .av-amber { background: #eec27a; } .av-lime { background: #b9d98a; } .av-sand { background: #d8c6a6; }

/* Settings, Display: hide balance. The figure stays masked until clicked (identity.js) */
html.omni-hidebal:not(.omni-showbal) #cash, html.omni-hidebal:not(.omni-showbal) [data-bal] { color: transparent !important; background: #121214; width: fit-content; max-width: 100%; border-radius: 4px; cursor: pointer; user-select: none; }
html.omni-hidebal #cash, html.omni-hidebal [data-bal] { cursor: pointer; }

/* phones: the bar's button gives way to the bottom bar's Account button (shell.js .bbar); the menu opens above that bar */
@media (max-width: 640px) {
  header.top > .oacct { order: 2; margin: 0; }
  /* html header.top: over nav.css's touch rule (pointer: coarse, display: inline-flex), which put the name on a second
     sticky row on every page but Home (final-pass r5: "a third of my phone is menus"); the Account tab carries it */
  .oacct-btn, html header.top .oacct-btn { display: none; }
  .oacct-menu { position: fixed; top: auto; right: 8px; left: 8px; bottom: calc(var(--bbar-h, 60px) + 8px + env(safe-area-inset-bottom)); width: auto; max-height: calc(100vh - var(--bbar-h, 60px) - 80px); overflow-y: auto; }
  .oacct-item { height: 44px; font-size: 15px; }
  .oacct-ref { height: 44px; line-height: 44px; font-size: 14px; }
  /* r15: a bottom sheet over a dimmed page, as every other phone sheet (Home's buy sheet, Ask): a scrim behind it (its own
     element, so a press on it is an outside press and closes the menu), a grab handle on top, swipe down from the
     handle or the name row to close (account-menu.js, overlay.js drag) */
  .oacct-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, 0.6); }
  .oacct-scrim[hidden] { display: none; }
  .oacct-menu { padding-top: 0; }
  .oacct-grip { display: flex; justify-content: center; align-items: center; height: 20px; margin: 0 -6px; touch-action: none; }
  .oacct-grip::before { content: ""; width: 36px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.24); }
  .oacct-head { min-height: 52px; padding-top: 2px; touch-action: none; }
}
.oacct-grip { display: none; }
@media (max-width: 640px) { .oacct-grip { display: flex; } }
.oacct-scrim { display: none; }
@media (max-width: 640px) { .oacct-scrim:not([hidden]) { display: block; } }

/* the Leaderboard's link from a row to the person's public profile (leaderboard.js) */
.who .pubp { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--ob-ink-2); text-decoration: none; }
@media (hover: hover) { .who .pubp:hover { color: var(--ob-ink); text-decoration: none; } }
header.top .oacct-btn[hidden] { display: none; }

/* the in-app confirm sheet (account-menu.js ask): the sign-in page's type and buttons on the black, never the browser's box */
.ocf-back { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.6); }
.ocf { width: 100%; max-width: 360px; box-sizing: border-box; padding: 24px; border-radius: 16px; background: #141416; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 40px rgba(0, 0, 0, 0.6); text-align: center; }
.ocf-t { margin: 0; font: 600 20px/1.2 var(--ob-sans); color: var(--ob-ink); }
.ocf-x { margin: 8px 0 0; font: 400 14px/1.5 var(--ob-sans); color: var(--ob-label); }
.ocf-acts { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.ocf-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 40px; border: 0; border-radius: var(--ob-r, 8px); background: rgba(255, 255, 255, 0.08); color: var(--ob-ink); font: 510 14px/1 var(--ob-sans); cursor: pointer; }
@media (hover: hover) { .ocf-btn:hover { background: rgba(255, 255, 255, 0.12); } }
.ocf-btn.pri { background: var(--ob-ink); color: #000; }
@media (hover: hover) { .ocf-btn.pri:hover { background: var(--ob-brand-2, var(--ob-ink)); } }
.ocf-btn.danger { background: var(--ob-down, #e5484d); color: #fff; }
.ocf-btn:focus-visible { outline: 2px solid var(--ob-focus); outline-offset: 2px; }
/* one line at the bottom for a few seconds (account-menu.js toast): opaque, centred, never a left stripe */
.oam-toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); box-sizing: border-box; padding: 12px 16px; border-radius: 12px; background: #1c1c20; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 32px rgba(0, 0, 0, 0.5); font: 400 14px/1.45 var(--ob-sans); color: var(--ob-ink); text-align: center; }
@media (max-width: 640px) {
  .ocf-back { align-items: flex-end; }
  .ocf-btn { height: 44px; }
  /* a phone: the full width under the bar, never over the Up/Down buttons or the bottom bar */
  .oam-toast { top: calc(64px + env(safe-area-inset-top)); bottom: auto; left: 16px; right: 16px; transform: none; max-width: none; }
}
/* Hide balance on every page (round 10: Home's hero and the Ask chat's header showed it in clear) */
html.omni-hidebal:not(.omni-showbal) [data-bal-blur] { filter: blur(8px); opacity: .5; }
/* r27 responsive: a touch tablet or a sideways phone (the menu is the dropdown there, not the phone's sheet) gets 44px rows;
   from 641 to 760px the bar shows the avatar without the name, so the five pages fit beside it (Docs was cut to "D" at 667) */
@media (pointer: coarse) and (min-width: 641px) { .oacct-item { height: 44px; } .oacct-ref { height: 44px; line-height: 44px; } }
@media (min-width: 641px) and (max-width: 760px) { header.top .oacct-name { display: none; } header.top .oacct-btn { padding: 0 4px; } }
