/* ── Your account: the button in the top bar, its menu, the Sign in window (src/cloud.js) ── */
.account-btn {
  margin-left: 6px; height: 28px; min-width: 28px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid #3a3a3a; border-radius: 14px; background: #1e1e1e; color: #e0e0e0; font: inherit; font-size: 0.78rem; cursor: pointer; position: relative;
}
.account-btn[hidden] { display: none; }
.account-btn:hover, .account-btn[aria-expanded="true"] { background: #2a2a2a; border-color: #4a4a4a; color: #fff; }
.account-btn:focus-visible { outline: 2px solid #4a7fcb; outline-offset: 1px; }
/* signed in: a round initial, and a dot for the saving — green saved, blue saving, amber offline, red a problem */
.account-btn.signed-in { width: 28px; padding: 0; border-radius: 50%; background: #2d4a75; border-color: #4a7fcb; font-weight: 600; }
.account-initial:empty { display: none; }
.account-btn.signed-in::after {
  content: ''; position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid #111; background: #5fb36b;
}
.account-btn[data-status="syncing"]::after { background: #6fa3ef; animation: account-pulse 1s ease-in-out infinite alternate; }
.account-btn[data-status="offline"]::after { background: #d6a23a; }
.account-btn[data-status="error"]::after { background: #e5605b; }
@keyframes account-pulse { from { opacity: 1; } to { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .account-btn[data-status="syncing"]::after { animation: none; } }

#account-menu { min-width: 260px; }
.am-head { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 6px; }
.am-email { font-size: 0.8rem; font-weight: 600; color: #e0e0e0; overflow-wrap: anywhere; }
.am-status { font-size: 0.72rem; line-height: 1.4; color: #6f8f6f; }
.am-status[data-status="syncing"] { color: #8fb4f0; }
.am-status[data-status="offline"] { color: #c9a24a; }
.am-status[data-status="error"] { color: #e5605b; }

/* the Sign in window, in the New canvas window's frame (templates.css) */
.si-panel { width: min(440px, 100%); gap: 14px; }
.si-step { display: flex; flex-direction: column; gap: 8px; }
.si-step[hidden], .si-providers[hidden], .si-or[hidden] { display: none; }
.si-providers { display: flex; flex-direction: column; gap: 8px; }
.si-provider { height: 40px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 0.86rem; font-weight: 600; }
.si-provider[data-provider="google"] { background: #fff; border-color: #dadce0; color: #1f1f1f; }
.si-provider[data-provider="google"]:hover { background: #f1f3f4; }
.si-or { display: flex; align-items: center; gap: 10px; color: #777; font-size: 0.74rem; margin: 2px 0; }
.si-or::before, .si-or::after { content: ''; flex: 1; height: 1px; background: #333; }
.si-row { display: flex; gap: 8px; }
.si-input {
  flex: 1; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid #3a3a3a; border-radius: 6px;
  background: #141414; color: #e0e0e0; font: inherit; font-size: 0.86rem;
}
.si-input:focus { outline: none; border-color: #4a7fcb; box-shadow: 0 0 0 1px #4a7fcb; }
.si-code { letter-spacing: 0.2em; font-variant-numeric: tabular-nums; }
.si-row .btn { height: 34px; padding: 0 14px; white-space: nowrap; }
.si-note, .si-sent { margin: 0; font-size: 0.76rem; line-height: 1.5; color: #9a9a9a; }
.si-sent b { color: #e0e0e0; font-weight: 600; overflow-wrap: anywhere; }
.si-mail { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 8px; background: #222a37; border: 1px solid #34507a; color: #8fb4f0; }
.si-mail svg { flex-shrink: 0; }
.si-mail-h { display: block; margin-bottom: 4px; font-size: 0.92rem; font-weight: 600; color: #e0e0e0; }
.si-link { align-self: flex-start; padding: 0; border: none; background: none; color: #8fb4f0; font: inherit; font-size: 0.76rem; cursor: pointer; }
.si-link:hover { text-decoration: underline; }
.si-dev { margin: 0; padding: 8px 10px; border: 1px dashed #6a5a2a; border-radius: 6px; font-size: 0.74rem; line-height: 1.45; color: #c9a24a; }
.si-dev[hidden] { display: none; }
.si-error { margin: 0; font-size: 0.76rem; color: #e5605b; }
.si-error:empty { display: none; }
@media (max-width: 420px) { .si-row { flex-direction: column; } }
