/* 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 {
  /* each site gives the bar its own colours in both themes (its own stylesheets set these on :root): the page's colour */
  --nb-ink: var(--nb-bar-ink, #211f24); --nb-line: var(--nb-bar-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: var(--nb-bar, 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: var(--nb-bar-line, rgba(33, 31, 36, .14)); background: var(--nb-bar, rgba(248, 226, 209, .94)); }
html[data-theme="dark"] .nb-top .nb-grad { color: var(--nb-grad-ink, #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: 668 / 160; --w: url("/assets/img/word-nail-news.png?v=2"); }
.nb-top .nbw-finance { aspect-ratio: 838 / 160; --w: url("/assets/img/word-nail-finance.png?v=2"); }
.nb-top .nbw-capital { aspect-ratio: 797 / 160; --w: url("/assets/img/word-nail-capital.png?v=1"); }
.nb-top .nbw-bet { aspect-ratio: 537 / 160; --w: url("/assets/img/word-nail-bet.png?v=2"); }
.nb-top .nbw-institute { aspect-ratio: 921 / 160; --w: url("/assets/img/word-nail-institute.png?v=2"); }
.nb-top .nbw-family { aspect-ratio: 775 / 160; --w: url("/assets/img/word-nail-family.png?v=2"); }
.nb-top .nbw-foundation { aspect-ratio: 1109 / 160; --w: url("/assets/img/word-nail-foundation.png?v=1"); }
.nb-top .nbw-games { aspect-ratio: 786 / 160; --w: url("/assets/img/word-nail-games.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; }
}
/* 🕶️ Buy NAIL (assets/js/wallet-auth.js puts it before Connect wallet): ink, the mascot's sunglasses face in front */
.nb-top .nb-buy { gap: 8px; padding: 7px 18px 7px 8px; margin-right: -14px; background: var(--nb-ink); color: #fff; }
.nb-top .nb-buy img { width: 26px; height: 26px; border-radius: 50%; background: #fff; object-fit: contain; }
html[data-theme="dark"] .nb-top .nb-buy { color: var(--nb-buy-ink, #f8e2d1); }   /* on a dark bar: the bar's dark colour */
@media (max-width: 860px) { .nb-top .nb-buy + .nb-connect { margin-left: 0; } .nb-top .nb-buy { margin-right: -6px; } }
@media (max-width: 480px) { .nb-top .nb-buy-word { display: none; } html .nb-top .nb-buy { padding: 5px 12px 5px 5px; } }
/* ONE ROW ON EVERY SITE: seven site names, the theme switch, Buy NAIL and Connect wallet must fit side by side on a
   computer screen (from 861 px wide; narrower, the names scroll sideways as before). FAQ and Rules leave the bar
   (they are in nail.bet's footer); the names get a little smaller in steps; Buy NAIL becomes "Buy". */
html .nb-top .nb-links { display: none; }
@media (min-width: 861px) {
  html .nb-top .wrap { gap: 20px; }
  html .nb-top .nb-domains { gap: 12px; }
  html .nb-top .nbw { height: 18px; }   /* seven names since 3 Dec 2026 (nail.games) */
  html .nb-top .theme-toggle { margin-left: -6px; }
}
@media (min-width: 861px) and (max-width: 1180px) {
  html .nb-top .nbw { height: 16px; }
  html .nb-top .nb-domains { gap: 10px; }
  html .nb-top .wrap { gap: 14px; }
  .nb-top .nb-buy-word { display: none; }
  html .nb-top .nb-buy { margin-right: -6px; padding-right: 14px; }
  html .nb-top .nb-connect { padding: 10px 16px; font-size: .92rem; }
}
@media (min-width: 861px) and (max-width: 960px) {
  html .nb-top .nbw { height: 13px; }
  html .nb-top .nb-domains { gap: 7px; }
  .nb-top .nb-buy > span { display: none; }                 /* Buy NAIL: the face alone */
  html .nb-top .nb-buy { padding: 5px; margin-right: -4px; }
}
/* "Follow Nail News: X · Telegram · YouTube · Instagram": the last line of every page (its footer) */
.nn-follow { display: block; flex-basis: 100%; margin-top: 8px; font-size: .92rem; }
.nn-follow a { color: inherit; font-weight: 800; }
.nn-follow-row { margin: 0 0 32px; }
/* 📱 ON A PHONE (up to 860 px): TWO ROWS. On top, all seven site names, centred and wrapping onto a second line rather
   than hiding to the side; under them the theme switch on the left, Buy NAIL and Connect wallet on the right. The bar
   is taller there, which is fine. (Replaces the names that scrolled sideways beside the buttons: mostly one showed.) */
@media (max-width: 860px) {
  html .nb-top .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; column-gap: 8px; }
  html .nb-top .nb-domains { flex: 0 0 100%; flex-wrap: wrap; justify-content: center; gap: 7px 16px; overflow: visible;
    -webkit-mask: none; mask: none; }
  html .nb-top .nbw { height: 17px; }
  html .nb-top .theme-toggle { position: absolute; left: 16px; bottom: 15px; margin: 0; }   /* the second row, on the left */
  html .nb-top .nb-buy { margin-left: auto; margin-right: 0; padding: 7px 16px 7px 7px; }
  html .nb-top .nb-buy-word { display: inline; }                                           /* room for "Buy NAIL" again */
  html .nb-top .nb-buy + .nb-connect { margin-left: 0; }
  html .nb-top .nb-connect { padding: 10px 18px; }
  .nb-top .nb-account { top: calc(100% + 4px); }
}
@media (max-width: 400px) {
  html .nb-top .nb-domains { gap: 6px 12px; }
  html .nb-top .nbw { height: 15px; }
  html .nb-top .nb-buy { padding: 5px 12px 5px 5px; font-size: .88rem; }
  html .nb-top .nb-connect { padding: 9px 13px; font-size: .88rem; }
}
@media (max-width: 360px) {   /* the smallest phones: the names a size smaller (two lines), Buy NAIL as "Buy" beside the switch */
  html .nb-top .nb-domains { gap: 5px 10px; }
  html .nb-top .nbw { height: 13px; }
  html .nb-top .nb-buy-word { display: none; }
  html .nb-top .theme-toggle { left: 12px; }
}
/* EIGHT NAMES (nail.foundation, 3 Dec 2026): one row on a computer from 1024 px, the names a step smaller; below 1024
   (tablets) the two-row layout of the phones — names on top, the switch and the buttons under them. */
@media (min-width: 861px) {
  html .nb-top .nbw { height: 15px; }
  html .nb-top .nb-domains { gap: 9px; }
  html .nb-top .nb-connect { padding: 11px 18px; }
}
@media (min-width: 861px) and (max-width: 1180px) {
  html .nb-top .nbw { height: 13px; }
  html .nb-top .nb-domains { gap: 7px; }
}
@media (min-width: 861px) and (max-width: 1023px) {
  html .nb-top .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; column-gap: 8px; }
  html .nb-top .nb-domains { flex: 0 0 100%; flex-wrap: wrap; justify-content: center; gap: 7px 16px; overflow: visible; -webkit-mask: none; mask: none; }
  html .nb-top .nbw { height: 17px; }
  html .nb-top .theme-toggle { position: absolute; left: 20px; bottom: 15px; margin: 0; }
  html .nb-top .nb-buy { margin-left: auto; margin-right: 0; padding: 7px 16px 7px 7px; }
  html .nb-top .nb-buy > span, html .nb-top .nb-buy-word { display: inline; }
  html .nb-top .nb-buy + .nb-connect { margin-left: 0; }
  .nb-top .nb-account { top: calc(100% + 4px); }
}
