/* The top bar: exactly the same on every page. The logo, the theme switch next to it (assets/js/theme.js puts it
   there), the links and Join. Everything is scoped to .nb-top, so a page's own styles never change it
   (index.html has the same rules in its own styles too). */
.nb-top {
  --nb-ink: #211f24; --nb-line: #ecebef;
  --nb-run: linear-gradient(100deg, #178a5a 0%, #0d8a94 20%, #2d63c8 40%, #6f45c4 58%, #c23a6b 76%, #c46a00 90%, #178a5a 100%);
  position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--nb-line);
  font: 17px/1.6 "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.nb-top .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.nb-top .nb-logo { display: block; height: 30px; aspect-ratio: 856 / 200; background: var(--nb-ink);
  -webkit-mask: url("../img/nailbet-logo.png?v=2") center / contain no-repeat; mask: url("../img/nailbet-logo.png?v=2") center / contain no-repeat; }
.nb-top nav { display: flex; gap: 26px; margin-left: auto; font-weight: 700; font-size: .98rem; }
.nb-top nav a { color: var(--nb-ink); text-decoration: none; }
.nb-top nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nb-top .nb-pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 999px;
  font: 800 1rem/1 "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.nb-top .nb-pill:hover { transform: translateY(-1px); }
.nb-top .nb-grad { background: var(--nb-run) 0 50% / 220% 100%; animation: nb-top-flow 14s ease-in-out infinite alternate; color: #fff; }
@keyframes nb-top-flow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
/* the theme switch (assets/css/theme.css): a little closer to the logo */
.nb-top .theme-toggle { margin: 0 0 0 -14px; }
@media (max-width: 860px) {
  .nb-top nav { display: none; }
  .nb-top .nb-pill { margin-left: auto; padding: 10px 18px; }
}
@media (max-width: 620px) { .nb-top .nb-logo { height: 24px; } }
@media (prefers-reduced-motion: reduce) { .nb-top .nb-grad { animation: none; } }
/* the cream theme (html[data-theme="dark"]): the bar takes the cream, Join's white words turn cream */
html[data-theme="dark"] .nb-top { --nb-line: rgba(33, 31, 36, .14); background: rgba(248, 226, 209, .94); }
html[data-theme="dark"] .nb-top .nb-grad { color: #f8e2d1; }
/* 🔑 Connect wallet (assets/js/wallet-auth.js): the button where Join was, and the small panel of the signed-in wallet */
.nb-top .wrap { position: relative; }
.nb-top .nb-connect:disabled { opacity: .7; cursor: progress; }
.nb-top .nb-account { position: absolute; right: 0; top: 64px; z-index: 50; width: min(340px, calc(100vw - 32px)); padding: 14px 16px;
  border-radius: 18px; background: #fff; color: var(--nb-ink); border: 1px solid var(--nb-line); box-shadow: 0 16px 40px rgba(0, 0, 0, .16);
  font-size: .95rem; line-height: 1.45; }
.nb-top .nb-account p { margin: 0 0 8px; }
.nb-top .nb-account a { color: inherit; font-weight: 700; }
.nb-top .nb-acc-w { font: 600 .8rem/1.3 ui-monospace, monospace; word-break: break-all; color: #5f6368; }
.nb-top .nb-acc-h { font-weight: 800; }
.nb-top .nb-acc-m { color: #5f6368; }
.nb-top .nb-acc-apps { display: grid; gap: 8px; margin-top: 6px; }
.nb-top .nb-acc-app { display: block; text-align: center; padding: 11px 14px; border-radius: 999px; background: #ab9ff2; color: #1c1c1c !important;
  text-decoration: none; font-weight: 800; }
.nb-top .nb-acc-app:nth-child(2) { background: #fc7227; } .nb-top .nb-acc-app:nth-child(3) { background: #e33e3f; color: #fff !important; }
.nb-top .nb-acc-out { border: 1px solid var(--nb-line); background: none; border-radius: 999px; padding: 6px 14px; font: 700 .9rem inherit; cursor: pointer; }
@media (max-width: 860px) { .nb-top .nb-account { top: 60px; } }
/* THE NAILBET SITES: every name in the top bar is one of them, in the nailbet lettering (dev/make-domain-words.py
   draws them; the page colours them through a mask like the logo). The site you are on is full ink, the others lighter.
   The first one is also the ".brand": the theme switch (assets/js/theme.js) goes right after it. */
html .nb-top .nb-domains { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 18px; margin: 0; min-width: 0;
  overflow-x: auto; scrollbar-width: none; }
html .nb-top .nb-domains::-webkit-scrollbar { display: none; }
.nb-top .nbw { position: relative; display: block; flex: none; height: 23px; background: var(--nb-ink); opacity: .45; transition: opacity .15s;
  -webkit-mask: var(--w) center / contain no-repeat; mask: var(--w) center / contain no-repeat; }
.nb-top .nbw:hover, .nb-top .nbw:focus-visible { opacity: .85; }
.nb-top .nbw[aria-current="page"] { opacity: 1; }
.nb-top .nbw-news { aspect-ratio: 709 / 160; --w: url("/assets/img/word-nail-news.png?v=1"); }
.nb-top .nbw-finance { aspect-ratio: 875 / 160; --w: url("/assets/img/word-nail-finance.png?v=1"); }
.nb-top .nbw-bet { aspect-ratio: 579 / 160; --w: url("/assets/img/word-nail-bet.png?v=1"); }
.nb-top .nbw-institute { aspect-ratio: 962 / 160; --w: url("/assets/img/word-nail-institute.png?v=1"); }
.nb-top .nbw-family { aspect-ratio: 812 / 160; --w: url("/assets/img/word-nail-family.png?v=1"); }
.nb-top .nb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html .nb-top .nb-links { margin-left: 0; gap: 18px; flex: none; }
/* narrower: FAQ and Rules go (they are on nail.bet's own pages), then the names scroll sideways in one row */
@media (max-width: 1180px) { html .nb-top .nb-links { display: none; } }
@media (max-width: 860px) {
  html .nb-top .nb-domains { display: flex; justify-content: flex-start; gap: 22px;
    -webkit-mask: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 26px), transparent); mask: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 26px), transparent); }   /* more names to the side */
  html .nb-top .wrap { gap: 14px; }
  .nb-top .nbw { height: 20px; }
}
@media (max-width: 480px) {
  html .nb-top .wrap { gap: 10px; }
  html .nb-top .nb-domains { gap: 18px; }
  .nb-top .nbw { height: 17px; }
  html .nb-top .theme-toggle { margin-left: -6px; }
  html .nb-top .nb-pill { padding: 9px 13px; font-size: .88rem; }
}
