/* AIM Academy, account-based build only (ACADEMY_ACCOUNT_BASE; build.mjs emits this file as
   assets/css/account.css only then). Layout for the account controls; every colour, radius,
   font, size and shadow is an existing token or the existing component it extends
   (.lang-link, .btn, .box, .status-note). No new art, palette or type (DESIGN.md
   "Accounts: header control, save status, sign-in prompt"). */

/* Header account control. In the bar only from 1024px, where the primary nav shows: the
   phone bar keeps its locked three controls (theme, language, menu: 44px each, the whole
   wordmark at 390/360px). Below 1024px the same control sits in the mobile menu. */
.account-nav { display: none; }
@media (min-width: 1024px) {
  .account-nav { display: inline-flex; align-items: center; gap: var(--s-2); }
}
/* 1024-1279px signed in, two account controls share the bar with the full English
   wordmark: they (only they) take a tighter inline padding so the wordmark never ellipsizes
   (check-accounts.mjs probes 1024px signed in). */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .site-header .account-nav .lang-link { padding-inline: 8px; }
}
.account-nav__btn { font: inherit; font-weight: 600; font-size: 0.95rem; line-height: inherit; cursor: pointer; }
.account-nav [hidden], .account-menu [hidden] { display: none !important; }
.account-menu { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.account-menu .btn { min-height: 45px; }

/* Save status and sign-in prompt: one quiet panel pinned to the end corner of the viewport.
   The status line is a polite live region that stays in the accessibility tree when empty
   (visually hidden then), so every message is announced. */
.sync-panel {
  position: fixed; inset-inline-end: var(--s-4); bottom: var(--s-4); z-index: 40;
  display: grid; gap: var(--s-2); justify-items: end; max-width: min(30rem, calc(100vw - 2 * var(--s-4)));
  pointer-events: none;
}
.sync-panel > * { pointer-events: auto; }
.sync-panel__status {
  margin: 0; padding: var(--s-2) var(--s-4); border-radius: var(--radius-sm);
  background: var(--c-surface); border: 1px solid var(--c-border); box-shadow: var(--shadow-sm);
  color: var(--c-primary); font-weight: 650; font-size: 0.92rem;
  pointer-events: none; /* a message, never in the way of a click */
}
.sync-panel__status.is-error { color: var(--c-accent); border-color: var(--c-interactive-border); }
.sync-panel__status:empty {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sync-panel__prompt { margin: 0; box-shadow: var(--shadow); }
.sync-panel__prompt .box__title:focus { outline: none; }
.sync-panel__prompt .box__title:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.sync-panel__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; }
@media (max-width: 639.98px) {
  .sync-panel { inset-inline: var(--s-3); bottom: var(--s-3); max-width: none; justify-items: stretch; }
  .sync-panel__actions .btn { flex: 1 1 auto; }
}
@media print { .sync-panel, .account-nav, .account-menu { display: none !important; } }
