/* Announcement bar, site header, nav links and mega menu. */
/* ============ announcement & header ============ */
.announce { background: var(--bg-2); color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; overflow: hidden; height: 36px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.announce b { color: var(--gold); font-weight: 700; }
.announce-inner { display: flex; width: max-content; }
.announce-track { display: flex; gap: 26px; align-items: center; white-space: nowrap; animation: marquee var(--marquee-s, 48s) linear infinite; padding-right: 26px; }
/* Hovering or tabbing into the bar holds it still so a message can be read or clicked. */
.announce:hover .announce-track, .announce:focus-within .announce-track { animation-play-state: paused; }
.announce .dot { width: 5px; height: 5px; border-radius: 1px; background: var(--gold); opacity: .75; transform: rotate(45deg); flex: none; }
@keyframes marquee { to { transform: translateX(-100%); } }
/* The site-wide reduced-motion rule would freeze the ticker half-way; keep it rolling, slower. */
@media (prefers-reduced-motion: reduce) {
  .announce .announce-track { animation-duration: calc(var(--marquee-s, 48s) * 1.6) !important; animation-iteration-count: infinite !important; }
}

.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s; }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 14px 30px -26px rgba(0, 0, 0, .8); }
.header-row { height: var(--header-h); display: flex; align-items: center; gap: 22px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--gold); flex: none; }
.logo-mark { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.logo-word { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--text); }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a, .nav-item > a { padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .2s, background .2s; }
.main-nav > a:hover, .nav-item > a:hover, .main-nav a.current { color: var(--text); background: var(--surface); }
.nav-highlight { color: var(--gold) !important; }
.header-actions { margin-left: auto; min-width: 0; display: flex; align-items: center; gap: 6px; }
.search-trigger { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px 0 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 13.5px; flex: 0 1 230px; min-width: 132px; transition: border-color .2s; margin-right: 6px; }
.search-trigger:hover { border-color: var(--gold); }
.search-trigger span { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { font: 600 11px var(--font-body); border: 1px solid var(--line-2); padding: 2px 6px; border-radius: 6px; color: var(--faint); }
#theme-btn .i-sun { display: none; }
:root[data-theme="light"] #theme-btn .i-sun { display: block; }
:root[data-theme="light"] #theme-btn .i-moon { display: none; }
.only-mobile, .only-mobile-sm { display: none !important; }

/* mega menu */
.nav-item { position: relative; }
.mega {
  position: absolute; top: calc(100% + 14px); left: -20px; width: 640px; padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .22s var(--ease);
}
.mega::before { content: ''; position: absolute; inset: -16px 0 auto; height: 16px; }
.nav-item:hover .mega, .nav-item:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega a { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; transition: background .2s; }
.mega a:hover { background: var(--surface-2); }
.mega .gem-dot { width: 34px; height: 34px; flex: none; }
.mega b { display: block; font-size: 14px; font-weight: 600; }
.mega small { color: var(--muted); font-size: 12px; }
.mega-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 14px 10px 2px; margin-top: 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

