/* Sign in control shared by every techieray page outside the tracker.
   accountAuth.js renders into #account-nav; these rules mirror the tracker's
   (globalAIregTracker/demo/html/demo.css) so the control looks the same everywhere. */

.account-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.account-nav-who {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #475569;
}

/* The initial carries the signed in state on its own when the address is dropped on a phone. */
.account-nav-who::before {
  content: attr(data-initial);
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #14b8a6, #0d9488);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.account-nav .account-nav-btn {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(13, 148, 136, 0.35);
  border-radius: 999px;
  background: #fff;
  color: #0d9488;
  font: 600 12px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s cubic-bezier(0.32, 0.72, 0, 1),
              transform 0.18s cubic-bezier(0.32, 0.72, 0, 1);
}

.account-nav .account-nav-btn:hover { background: rgba(13, 148, 136, 0.12); color: #0d9488; text-decoration: none; }
.account-nav .account-nav-btn:active { transform: scale(0.96); }
.account-nav .account-nav-btn:focus-visible { outline: 3px solid #16788c; outline-offset: 3px; }
.account-nav .account-nav-btn-primary { background: #0d9488; border-color: #0d9488; color: #fff; }
.account-nav .account-nav-btn-primary:hover { background: #0f766e; color: #fff; }

@media (max-width: 640px) {
  .account-nav-who { max-width: 22px; gap: 0; font-size: 0; }
}

/* Main header: the control sits after the navigation links. On pages that are not
   .publication (the legal pages) the header still needs the publication typeface. */
.publication-header { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
@media (min-width: 1001px) { .publication-header nav { margin-left: auto; } }

/* Slim bar for full screen app pages, the essay and the 404 page. */
.site-bar {
  position: relative;
  z-index: 10000;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 20px;
  background: #fff;
  border-bottom: 1px solid #d9e1e7;
  font: 600 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #526475;
  cursor: auto;
  box-sizing: border-box;
}
.site-bar * { cursor: inherit; }
.site-bar a, .site-bar button { cursor: pointer; }
.site-bar-brand { display: block; flex-shrink: 0; }
.site-bar-brand img { display: block; width: 104px; height: auto; }
.site-bar-sep { color: #cbd5e1; }
.site-bar-page { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-bar .account-nav { margin-left: auto; }

/* Live and Breathing Essay: its own top bar, with the control pushed to the right. */
.lbe-topbar .account-nav { margin-left: auto; }
@media (max-width: 480px) {
  .lbe-topbar { flex-wrap: nowrap; }
  .lbe-topbar .brand-wordmark { width: 120px; height: auto; }
}

/* Below full desktop width the address would push the main navigation onto two lines.
   The avatar keeps the signed in state visible and its title still shows the address. */
@media (max-width: 1320px) {
  .publication-header .account-nav-who { max-width: 22px; gap: 0; font-size: 0; }
}
