/* Shared top bar for the public pages (and the avatar used by the app). Tokens only. */

/* TEMPORARY preview curtain (js/preview-gate.js) — remove before going live */
html.gated body > :not(.gate) { display: none !important; }
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.gate-card {
  width: 100%; max-width: 360px; text-align: center; padding: 32px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
}
.gate-card h1 { font: 600 1.6rem var(--font-display); color: var(--accent); margin: 12px 0 6px; }
.gate-card p { color: var(--muted); margin: 0 0 18px; font: 1rem/1.5 var(--font); }
.gate-card input {
  width: 100%; min-height: 52px; text-align: center; font: 600 1.3rem var(--font); letter-spacing: .2em;
  border: 2px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text);
}
.gate-card input:focus { outline: none; border-color: var(--pea); }
.gate-card button {
  width: 100%; min-height: 52px; margin-top: 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font: 700 1rem var(--font);
}
.gate-card .gate-err { color: var(--danger); margin: 10px 0 0; min-height: 1.4em; }

.site-head {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-head .wrap { display: flex; align-items: center; gap: 14px; height: 68px; }
.site-head .brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  font: 600 1.15rem var(--font-display); color: var(--accent);
}
.site-head .brand img { width: 40px; height: 40px; }
.site-head nav { margin-left: auto; display: flex; gap: 22px; font-weight: 600; font-size: .95rem; }
.site-head nav a { text-decoration: none; color: var(--muted); }
.site-head nav a:hover { color: var(--accent); }

/* 1 | 2 design switch */
.flip { display: flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; background: var(--surface); }
.flip a {
  min-width: 34px; height: 30px; display: grid; place-items: center; border-radius: 999px;
  text-decoration: none; font: 600 .9rem var(--font-display); color: var(--muted);
}
.flip a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }

/* account: log-in icon, or avatar + log out */
.account { display: flex; align-items: center; gap: 6px; min-width: 40px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  border: 2px solid var(--accent); color: var(--accent);
}
.icon-btn svg { width: 20px; height: 20px; }
.account .logout {
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  background: none; border: 0; padding: 0 6px; min-height: 40px; cursor: pointer;
  font: 600 .9rem var(--font); color: var(--muted);
}
.account .logout svg { width: 18px; height: 18px; }
.account .logout:hover { color: var(--accent); }

.avatar {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center; overflow: hidden;
  border-radius: 50%;
  border: 2px solid var(--pea);
  background: var(--pea-soft);
  color: var(--accent);
  font: 600 .75rem var(--font-display);
  text-decoration: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 820px) {
  .site-head nav { display: none; }
  .flip { margin-left: auto; }
}
@media (max-width: 480px) {
  .site-head .wrap { gap: 8px; }
  .site-head .brand { font-size: 1rem; white-space: nowrap; gap: 8px; }
  .site-head .brand img { width: 34px; height: 34px; }
  .account .logout span { display: none; } /* icon only on phones */
}
