/* The account menu (js/accountmenu.js): a popover under the avatar, two columns on a wide screen (the sections on the left, the selected section's links on the right) and a list of sections
   followed by one section's links with a Back button on a narrow one (820px and narrower, where the header itself collapses). The colours, borders, shadow and fonts are the site's own tokens,
   so it follows the light and dark theme; the panel is placed by the script (--am-top, --am-right, --am-max-h, --am-pointer) from where the avatar is and how much room the window has. */
.clq-account-pop { position: fixed; top: var(--am-top, 64px); right: var(--am-right, 12px); z-index: 60; width: var(--am-w, min(760px, calc(100vw - 24px))); animation: slipIn .14s; }
.clq-account-pop::before { content: ''; position: absolute; top: -7px; right: var(--am-pointer, 24px); width: 12px; height: 12px; background: var(--card); border-top: var(--bw) solid var(--line); border-left: var(--bw) solid var(--line); transform: rotate(45deg); z-index: 1; pointer-events: none; }
.clq-account { position: relative; display: flex; flex-direction: column; max-height: var(--am-max-h, calc(var(--view-h) - 100px)); box-sizing: border-box; text-align: left; isolation: isolate;
  color: var(--text); background: var(--card); border: var(--bw) solid var(--line); border-radius: var(--r-2); box-shadow: var(--sh-2); overflow: hidden; }
.clq-account *, .clq-account *::before, .clq-account *::after { box-sizing: border-box; }
.clq-account__header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; flex: none; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.clq-account__identity { display: flex; align-items: center; gap: 16px; min-width: 0; }
.clq-account__identity > :first-child { flex: none; }
.clq-account__who { min-width: 0; }
.clq-account__name { margin: 0; font: 800 clamp(20px, 2.4vw, 26px)/1.1 var(--f-display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.clq-account__tags { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; min-height: 22px; }
.clq-account__tags .rkt { display: inline-flex; line-height: 0; }
.clq-account__balances { display: grid; grid-template-columns: auto auto; gap: 6px 14px; margin: 0; font-size: 16px; align-items: baseline; }
.clq-account__balances dt { color: var(--text-2); text-align: right; }
.clq-account__balances dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.clq-account__body { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: min(360px, 100%); min-width: 0; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; }
.clq-account__sections { padding: 12px 0; border-right: 1px solid var(--line); min-width: 0; }
.clq-account__section { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 12px 20px 12px 19px; background: transparent; color: inherit; border: 0; border-left: 3px solid transparent; text-align: left; font: inherit; font-size: 16px; cursor: pointer; }
.clq-account__section[aria-pressed="true"] { border-left-color: var(--lime); background: rgb(242 234 219 / 5%); font-weight: 700; }
[data-theme="light"] .clq-account__section[aria-pressed="true"] { background: rgb(26 22 18 / 6%); border-left-color: var(--text); }
.clq-account__detail { padding: 20px 26px 22px; min-width: 0; }
.clq-account__heading { margin: 0 0 12px; font: 800 28px/1.1 var(--f-display); letter-spacing: -.035em; }
.clq-account__row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 10px 0; color: inherit; font: inherit; font-size: 16px; text-align: left; text-decoration: none; background: transparent; border: 0; border-top: 1px solid var(--line-soft); cursor: pointer; }
.clq-account__rows > :last-child { border-bottom: 1px solid var(--line-soft); }
.clq-account__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.clq-account__label { min-width: 0; overflow-wrap: anywhere; }
.clq-account__sub { color: var(--text-2); font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.clq-account__badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border: 1.5px solid var(--line); border-radius: 999px; color: var(--text-2); font: 700 11px/1.5 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; vertical-align: 2px; }
.clq-account__badge.hot { background: var(--lime); border-color: #0E0C0A; color: var(--lime-ink, #10140A); }
.clq-account__icon { width: 24px; height: 24px; flex: none; display: block; }
.clq-account__icon--mark svg { display: block; width: 22px; height: 22px; }
.clq-account__chevron { width: 18px; height: 18px; flex: none; margin-left: auto; display: block; color: var(--text-2); }
.clq-account__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: none; padding: 10px 24px; border-top: 1px solid var(--line); }
.clq-account__footer-action { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; color: var(--text-2); background: transparent; border: 0; font: inherit; font-size: 16px; text-decoration: none; cursor: pointer; }
.clq-account__footer-action .clq-account__icon { width: 22px; height: 22px; }
.clq-account__logout { margin-left: auto; }
.clq-account :is(a, button):hover { color: var(--text); }
.clq-account__row:hover, .clq-account__section:hover { background: var(--card-2); }
.clq-account :is(a, button):focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; border-radius: 6px; }
.clq-account__back, .clq-account__shortcuts, .clq-account__only-narrow { display: none; }

@media (max-width: 820px) {
  .clq-account__header { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px 18px; }
  .clq-account__balances { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 4px 10px; font-size: 15px; }
  .clq-account__balances dt, .clq-account__balances dd { text-align: left; }
  .clq-account__body { display: block; }
  .clq-account__sections { border-right: 0; padding: 6px 0 10px; }
  .clq-account__section { padding-left: 16px; padding-right: 16px; }
  .clq-account__only-narrow { display: block; }
  .clq-account__shortcuts { display: block; margin: 8px 16px 0; border-top: 1px solid var(--line); padding-top: 8px; }
  .clq-account__kicker { display: block; padding: 6px 0 2px; color: var(--text-3); font: 700 11px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; }
  .clq-account__shortcuts .clq-account__row:first-of-type { border-top: 0; }
  .clq-account__detail { padding: 14px 18px 18px; }
  .clq-account__back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0 0 6px -6px; padding: 0 8px; color: var(--text-2); background: transparent; border: 0; font: inherit; font-size: 16px; cursor: pointer; }
  .clq-account__heading { font-size: 24px; }
  .clq-account[data-mobile-view="sections"] .clq-account__detail { display: none; }
  .clq-account[data-mobile-view="detail"] .clq-account__sections { display: none; }
  .clq-account__footer { padding: 8px 16px; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .clq-account__identity { gap: 12px; }
  .clq-account__balances { grid-template-columns: auto minmax(0, 1fr); font-size: 15px; }
}
@media (max-width: 360px) { .clq-account__header { padding: 14px; } .clq-account__detail { padding: 12px 14px 16px; } .clq-account__badge { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .clq-account-pop { animation: none; } }
