@font-face {
  font-family: "Riff Navigation Russo";
  src: url("fonts/russo-one.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Shared navigation: the same destinations become desktop panels or a mobile drawer. */
.riff-navigation {
  --rn-surface: #0b1028; --rn-muted: #abb9d7; --rn-border: rgba(171,199,235,.18);
  --rn-header-light: radial-gradient(ellipse at 5% 0%,rgba(196,73,163,.13),transparent 38%);
  --rn-panel-light: radial-gradient(ellipse at 0% 0%,rgba(35,143,167,.14),transparent 55%), radial-gradient(ellipse at 100% 100%,rgba(196,73,163,.10),transparent 55%);
  --rn-panel-base: linear-gradient(125deg,#13213d,#171c39 55%,#251b3a);
  position: sticky; top: 0; z-index: 10002; display: flex; align-items: center;
  gap: 24px; min-height: 72px; padding: 8px max(24px, env(safe-area-inset-right)) 8px max(24px, env(safe-area-inset-left));
  color: #f3f6ff; background: var(--rn-header-light), linear-gradient(110deg,#11223d,#171c3d 60%,#241638); border-bottom: 1px solid var(--rn-border);
  font-family: inherit; isolation: isolate;
}
@supports (backdrop-filter: blur(16px)) {
  .riff-navigation { background: var(--rn-header-light), linear-gradient(110deg,rgba(17,34,61,.97),rgba(23,28,61,.97) 60%,rgba(36,22,56,.97)); backdrop-filter: blur(16px); }
}
.riff-navigation *, .riff-navigation *::before, .riff-navigation *::after { box-sizing: border-box; }
.riff-navigation *::before, .riff-navigation *::after { pointer-events: none; }
.riff-navigation [hidden] { display: none !important; }
.riff-navigation button, .riff-navigation a { -webkit-tap-highlight-color: transparent; }
.riff-navigation button { font: inherit; cursor: pointer; color: inherit; }
.riff-navigation a { color: inherit; text-decoration: none; }
.riff-navigation :is(button,a,input):focus:not(:focus-visible) { outline: none; box-shadow: none; }
.riff-navigation :is(button,a,input):focus-visible { outline: 2px solid #a8d7ee; outline-offset: 3px; }
.rn-brand { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 0 1 185px; }
.rn-brand img { display: block; width: 38px; height: 38px; object-fit: contain; }
.rn-brand picture { flex: 0 0 auto; }
.rn-brand strong { font-family: "Riff Navigation Russo", sans-serif; font-weight: 400; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.025em; }
.rn-navigation { flex: 1; display: flex; align-items: center; gap: 3px; min-width: 0; }
.rn-section-button, .rn-search-button, .rn-account-button, .rn-stage-shortcut, .rn-menu-button, .rn-close {
  display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px;
  padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; white-space: nowrap;
  font-size: .94rem; font-weight: 600; position: relative;
}
.rn-section-button > .rn-icon { display: none; }
.rn-icon { flex: 0 0 20px; pointer-events: none; }
.rn-disclosure-mark { display: none; pointer-events: none; }
.rn-section-button.is-active { background: rgba(135,116,203,.14); color: #fff; }
.rn-section-button::before { content: none; }
.riff-navigation [data-panel-toggle][aria-expanded="true"]::after {
  content: ''; height: 1px; position: absolute; bottom: 2px; left: 12px; right: 12px;
  background: linear-gradient(90deg,#74c9dc,#baaef0,#dd94c5); border-radius: 1px;
}
.riff-navigation [data-panel-toggle][aria-expanded="true"] { color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .riff-navigation :is(.rn-section-button,.rn-search-button,.rn-account-button):hover { background: rgba(142,163,217,.08); }
  .riff-navigation .rn-stage-shortcut:hover { color: #fff; background: transparent; }
}
.riff-navigation .rn-stage-shortcut { color: var(--rn-muted); background: transparent; }
.riff-navigation .rn-stage-shortcut.is-active { color: #fff; }
.rn-search-button { margin-left: auto; min-width: 46px; }
.rn-section-admin { margin-left: 0; }
.rn-section-admin .rn-section-button { color: var(--rn-muted); }
.rn-account { margin-left: 0; }
.rn-section-admin + .rn-account { margin-left: 0; }
.rn-account-button { border: 0; }
.rn-panel {
  position: absolute; top: calc(100% + 8px); left: 24px; right: 24px; max-width: 1160px; margin-inline: auto; padding: 22px;
  background: var(--rn-panel-light), var(--rn-panel-base); border: 1px solid var(--rn-border); border-radius: 16px;
  box-shadow: 0 16px 40px rgba(4,9,25,.28); max-height: calc(100dvh - 104px); overflow-y: auto;
  animation: rn-reveal .18s ease-out;
}
.rn-panel-title { margin: 0 0 15px; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--rn-muted); }
.rn-destination-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.rn-destination { position: relative; isolation: isolate; display: flex; align-items: flex-start; gap: 12px; padding: 14px; min-height: 76px; border-radius: 12px; border: 1px solid transparent; }
.rn-destination > .rn-icon { margin-top: 2px; color: #9fbddd; }
.rn-destination span { min-width: 0; }
.rn-destination strong { display: block; font-size: .98rem; font-weight: 600; line-height: 1.35; }
.rn-destination small { display: block; font-size: .83rem; color: var(--rn-muted); line-height: 1.5; margin-top: 4px; }
.rn-destination.is-active { background: rgba(135,116,203,.10); border-color: transparent; }
.rn-destination::before, .rn-search-results a::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; opacity: 0;
  background: linear-gradient(110deg,rgba(72,175,198,.11),rgba(161,150,224,.09),rgba(210,121,177,.10));
  transition: opacity .18s ease;
}
.rn-destination::after, .rn-search-results a::after {
  content: ''; position: absolute; height: 1px; left: 12px; right: 12px; bottom: 0; opacity: 0;
  background: linear-gradient(90deg,transparent,rgba(101,206,224,.55),rgba(190,174,239,.55),rgba(228,154,203,.5),transparent);
  transition: opacity .18s ease;
}
.rn-destination strong::after {
  content: '↗'; display: inline-block; margin-left: 8px; opacity: 0; color: #b9dfed;
  transition: opacity .18s ease;
}
.rn-destination:focus-visible::before, .rn-destination:focus-visible::after,
.rn-destination:focus-visible strong::after, .rn-search-results a:focus-visible::before,
.rn-search-results a:focus-visible::after { opacity: 1; }
.rn-destination:focus-visible > .rn-icon, .rn-destination:focus-visible strong { color: #f3f6ff; }
@media (hover: hover) and (pointer: fine) {
  .rn-destination:hover, .rn-search-results a:hover { background: transparent; }
  .rn-destination:hover::before, .rn-destination:hover::after, .rn-destination:hover strong::after,
  .rn-search-results a:hover::before, .rn-search-results a:hover::after { opacity: 1; }
  .rn-destination:hover > .rn-icon, .rn-destination:hover strong { color: #f3f6ff; }
}
.rn-wheels { grid-column: 1 / -1; border-top: 1px solid var(--rn-border); margin-top: 10px; padding-top: 14px; }
.rn-wheel-heading { display: flex; align-items: center; gap: 10px; margin: 0; padding: 6px 14px; min-height: 44px; font-size: 1rem; }
.rn-wheel-toggle { display: flex; align-items: center; gap: 10px; background: transparent; border: 0; padding: 6px 14px; min-height: 44px; }
.rn-wheel-links { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.rn-account-panel { left: auto; width: 360px; margin-inline: 0; }
.rn-identity { display: flex; gap: 12px; align-items: center; }
.rn-avatar { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg,#31577c,#654875); color: #fff; font-weight: 600; }
.rn-identity div { min-width: 0; }
.rn-identity strong { display: block; overflow-wrap: anywhere; line-height: 1.4; }
.rn-identity div > span, .rn-account-status { color: var(--rn-muted); font-size: .85rem; }
.rn-account-status { margin: 16px 0; }
.rn-logout { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; border: 1px solid var(--rn-border); background: rgba(211,167,244,.06); border-radius: 9px; }
.rn-logout:hover { background: rgba(211,167,244,.14); }
.rn-search-panel { max-width: 720px; margin-left: auto; margin-right: auto; }
.rn-search-panel label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 10px; }
.rn-search-field { display: flex; align-items: center; gap: 10px; border: 1px solid #536482; border-radius: 10px; padding: 0 12px; background: rgba(11,16,40,.7); }
.rn-search-field input { width: 100%; min-width: 0; min-height: 48px; background: transparent; color: #fff; border: 0; padding: 8px 0; font: inherit; box-shadow: none; }
.rn-search-field input::placeholder { color: #abb9d7; }
.rn-search-hint, .rn-search-status { color: var(--rn-muted); font-size: .8rem; margin: 10px 0; }
.rn-search-status:empty { display: none; }
.rn-search-results { list-style: none; padding: 0; margin: 0; }
.rn-search-results a { position: relative; isolation: isolate; display: flex; flex-direction: column; padding: 10px 12px; min-height: 48px; border-radius: 8px; }

.rn-search-results small { color: var(--rn-muted); font-size: .8rem; }
.rn-menu-button, .rn-drawer-heading { display: none; }
@media (min-width: 1200px) {
  .riff-navigation .rn-wheel-links[hidden] { display: grid !important; }
  .rn-wheel-toggle { display: none; }

}
@media (min-width: 1200px) and (max-width: 1299px) {
  .rn-section-resources .rn-destination-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1199px) {
  .riff-navigation { min-height: 64px; padding: max(7px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 7px max(16px,env(safe-area-inset-left)); justify-content: space-between; gap: 12px; }
  .rn-brand { flex: 0 1 auto; }
  .rn-brand img { width: 34px; height: 34px; }
  .rn-menu-button { display: flex; border: 1px solid var(--rn-border); padding: 9px 12px; }
  .rn-navigation { display: none; }
  .rn-navigation.is-open {
    position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh; display: flex;
    flex-direction: column; align-items: stretch; gap: 0; background: var(--rn-panel-light), linear-gradient(155deg,#11223d,#111930 55%,#20182f);
    overflow-y: auto; overscroll-behavior: contain; scroll-padding-top: 80px; padding: max(16px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));
    animation: rn-reveal .18s ease-out;
  }
  /* A transformed/backdrop-filtered ancestor must not constrain the fixed drawer. */
  .riff-navigation:has(.rn-navigation.is-open) { backdrop-filter: none; }
  .rn-drawer-heading { position: sticky; top: calc(-1 * max(16px,env(safe-area-inset-top))); z-index: 2; background: linear-gradient(110deg,#15263f,#191f39); padding-block: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; margin-bottom: 18px; }
  .rn-drawer-heading strong { font-size: 1rem; overflow-wrap: anywhere; }
  .rn-close { border: 1px solid var(--rn-border); }
  .rn-panel { position: static; width: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
  .rn-panel-title { display: none; }
  .rn-section { flex-shrink: 0; border-bottom: 1px solid var(--rn-border); }
  .rn-section-button { justify-content: flex-start; width: 100%; min-height: 52px; padding: 12px 10px; margin: 4px 0; font-size: 1rem; }
  .rn-section-button > .rn-icon { display: block; color: #9fbddd; }
  .rn-disclosure-mark { display: block; position: relative; width: 16px; height: 16px; flex: 0 0 16px; margin-left: auto; color: var(--rn-muted); }
  .rn-disclosure-mark::before, .rn-disclosure-mark::after { content: ''; position: absolute; background: currentColor; border-radius: 1px; }
  .rn-disclosure-mark::before { width: 12px; height: 1px; left: 2px; top: 7px; }
  .rn-disclosure-mark::after { width: 1px; height: 12px; left: 7px; top: 2px; transition: opacity .18s ease; }
  [aria-expanded="true"] > .rn-disclosure-mark::after { opacity: 0; }
  .riff-navigation [data-panel-toggle][aria-expanded="true"]::after { left: 10px; right: 10px; }
  .rn-destination-grid, .rn-wheel-links { display: grid; grid-template-columns: minmax(0,1fr); gap: 3px; padding-bottom: 10px; }
  .rn-destination { min-height: 48px; padding: 11px 12px; margin-left: 8px; border-radius: 8px; }
  .rn-destination strong { font-size: .94rem; }
  .rn-destination small { font-size: .8rem; margin-top: 2px; }
  .rn-destination.is-active { border-color: transparent; border-left: 3px solid #eaa1d5; }
  .rn-wheels { margin: 0 0 0 8px; padding: 0; border-top: 0; }
  .rn-wheel-heading { display: none; }
  .rn-wheel-toggle { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 8px; }
  .rn-wheel-links { border-left: 1px solid var(--rn-border); margin-left: 21px; }
  .rn-wheel-links .rn-destination > .rn-icon { display: none; }
  .rn-section-admin { margin-left: 0; }
  .rn-stage-shortcut, .rn-search-button, .rn-account-button { display: none; }
  .rn-search-panel { flex-shrink: 0; padding: 24px 8px 4px; }
  .rn-search-hint { display: none; }
  .rn-search-results { margin-top: 8px; }
  .rn-account { margin-left: 0; margin-top: auto; padding-top: 24px; flex-shrink: 0; }
  .rn-account-panel { padding: 0 8px 4px; }
}
@keyframes rn-reveal { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .riff-navigation *, .riff-navigation *::before, .riff-navigation *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
