/* NAV6 — desktop study links stay visible; styles remain scoped to navigation. */
.nnav {
  --nnav-ink: #293045; --nnav-muted: #647083; --nnav-bg: #fff;
  --nnav-line: #e4e8ef; --nnav-soft: #f3f6fa; --nnav-focus: #215ac5;
  position: fixed; inset: 0 0 auto; z-index: 2147483400; background: var(--nnav-bg);
  color: var(--nnav-ink); border-bottom: 1px solid var(--nnav-line);
  box-shadow: 0 3px 16px rgb(24 33 60 / 5%); font-size: 13px;
}
.dark .nnav, .dark .nnav-drawer, .dark .nnav-search-modal {
  --nnav-ink: #edf2fa; --nnav-muted: #b5c0d1; --nnav-bg: #101827;
  --nnav-line: #2d3b51; --nnav-soft: #1a273b; --nnav-focus: #8cb9ff;
}
.nnav-inner { max-width: 1360px; margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 72px; padding: 8px 20px; }
.nnav-brand { min-width: 130px; max-width: 240px; flex: 0 1 190px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.nnav-title { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--primary, #5151e5); font-weight: 800; font-size: 19px; line-height: 1.6; }
.nnav-brand .nezakr-october-victory { white-space: nowrap; font-size: 10px; padding: 1px 7px; line-height: 1.6; }
.nnav-primary { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 3px; min-width: 0; max-width: 100%; flex: 1 0 auto; margin-inline: auto; }
.nnav-link, .nnav-daily { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 9px; border-radius: 12px; font-weight: 700; white-space: nowrap; line-height: 1.4; text-decoration: none; }
.nnav-link { color: var(--nnav-ink); }
.nnav-link:hover, .nnav-icon:hover, .nnav-more-panel a:hover { background: var(--nnav-soft); }
.nnav-link i { font-size: 13px; color: #5757d9; }
.dark .nnav-link i { color: #a4aaff; }
.nnav-daily { font-size: 12px; margin-inline: 2px; }
.nnav-daily--fact { color: #006958; background: #e8f8f3; border: 1px solid #b9e8d6; }
.nnav-daily--riddle { color: #775104; background: #fff5d9; border: 1px solid #f0dfa5; }
.dark .nnav-daily--fact { color: #a4ead5; background: #123d38; border-color: #296052; }
.dark .nnav-daily--riddle { color: #f1d783; background: #3b301a; border-color: #625024; }
.nnav-controls { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.nnav-icon, .nnav #nezakr-notif-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: 0; border-radius: 12px; color: var(--nnav-ink); cursor: pointer; background: transparent; text-decoration: none; }
.nnav-icon i { font-size: 18px; }
.nnav #nezakr-notif-btn > span { top: 1px; left: 1px; min-width: 17px; padding: 1px 4px; line-height: 1.5; border: 2px solid var(--nnav-bg); }
.nnav-account { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.nnav-account-name { display: none; }
.nnav #nezakr-student-menu-btn { min-height: 44px; }
.nnav-login, .nnav-register { min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; padding-inline: 12px; }
.nnav-more { position: relative; }
.nnav-more > summary { list-style: none; cursor: pointer; }
.nnav-more > summary::-webkit-details-marker { display: none; }
.nnav-more-panel { position: absolute; top: calc(100% + 8px); left: 0; width: min(244px, calc(100vw - 32px)); max-height: calc(100dvh - var(--nnav-height, 74px) - 16px); overflow-y: auto; padding: 8px; border: 1px solid var(--nnav-line); border-radius: 18px; background: var(--nnav-bg); box-shadow: 0 16px 42px rgb(15 23 42 / 18%); }
.nnav-more-panel a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px; border-radius: 10px; color: var(--nnav-ink); white-space: nowrap; }
.nnav-more-panel > a.nnav-daily--fact { color: #006958; background: #e8f8f3; }
.nnav-more-panel > a.nnav-daily--riddle { color: #775104; background: #fff5d9; }
.dark .nnav-more-panel > a.nnav-daily--fact { color: #a4ead5; background: #123d38; }
.dark .nnav-more-panel > a.nnav-daily--riddle { color: #f1d783; background: #3b301a; }
.nnav-menu-trigger, .nnav-mobile-daily { display: none; }
.nnav ~ [data-dc1-main] { padding-top: var(--nnav-height, 74px); }
.nnav-drawer, .nnav-search-modal { --nnav-ink: #293045; --nnav-muted: #647083; --nnav-bg: #fff; --nnav-line: #e4e8ef; --nnav-soft: #f3f6fa; --nnav-focus: #215ac5; position: fixed; inset: 0; z-index: 2147483600; color: var(--nnav-ink); }
.nnav-drawer { display: none; }
.nnav-drawer:target, .nnav-drawer.is-open { display: block; }
.nnav-drawer[hidden], .nnav-search-modal[hidden] { display: none !important; }
.nnav-drawer-backdrop, .nnav-search-backdrop { position: absolute; inset: 0; background: rgb(10 18 32 / 48%); }
.nnav-drawer-panel { position: absolute; inset: 0 0 0 auto; width: min(340px, calc(100vw - 28px)); overflow-y: auto; overscroll-behavior: contain; background: var(--nnav-bg); padding: 18px; box-shadow: -16px 0 50px rgb(10 18 32 / 20%); }
.nnav-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nnav-panel-heading strong, .nnav-panel-heading h2 { font-size: 17px; font-weight: 800; line-height: 1.8; margin: 0; }
.nnav-drawer-links { display: flex; flex-direction: column; gap: 3px; }
.nnav-drawer-links > a, .nnav-drawer-links > button { display: flex; gap: 12px; align-items: center; min-height: 44px; padding: 9px 12px; border-radius: 12px; color: var(--nnav-ink); font-size: 13px; font-weight: 700; text-align: right; }
.nnav-drawer-links > a:hover, .nnav-drawer-links > button:hover { background: var(--nnav-soft); }
.nnav-drawer-links > button { border: 0; background: none; cursor: pointer; }
.nnav-drawer-links i { width: 18px; text-align: center; }
.nnav-drawer-links > a.nnav-daily--fact { color: #006958; background: #e8f8f3; }
.nnav-drawer-links > a.nnav-daily--riddle { color: #775104; background: #fff5d9; }
.dark .nnav-drawer-links > a.nnav-daily--fact { color: #a4ead5; background: #123d38; }
.dark .nnav-drawer-links > a.nnav-daily--riddle { color: #f1d783; background: #3b301a; }
.nnav-section-title { padding: 16px 12px 4px; font-size: 11px; color: var(--nnav-muted); font-weight: 700; }
.nnav-drawer-links > a.nnav-signout { color: #c13535; }
.dark .nnav-drawer-links > a.nnav-signout { color: #ffabab; }
.nnav-search-modal { display: flex; justify-content: center; align-items: flex-start; padding: min(15vh, 110px) 16px 24px; overflow-y: auto; overscroll-behavior: contain; }
.nnav-search-panel { position: relative; background: var(--nnav-bg); width: min(580px, 100%); border-radius: 24px; padding: 24px; box-shadow: 0 28px 80px rgb(10 18 32 / 30%); }
.nnav-search-panel p { color: var(--nnav-muted); font-size: 13px; line-height: 1.9; margin: 8px 0 20px; }
.nnav-search-panel label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.nnav-search-field { position: relative; }
.nnav-search-field > i { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); color: var(--nnav-muted); pointer-events: none; }
.nnav-search-field input { display: block; width: 100%; min-height: 52px; padding: 12px 44px 12px 12px; border-radius: 14px; border: 1px solid var(--nnav-line); background: var(--nnav-soft); color: var(--nnav-ink); font: inherit; font-size: 15px; }
.nnav-search-submit { margin-top: 14px; width: 100%; min-height: 48px; display: flex; gap: 8px; align-items: center; justify-content: center; border: 0; border-radius: 14px; background: #4f46c8; color: white; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.nnav :focus-visible, .nnav-drawer :focus-visible, .nnav-search-modal :focus-visible { outline: 3px solid var(--nnav-focus); outline-offset: 3px; }
/* JS measures one line before selecting a second desktop row. */
html.nnav-ready .nnav-inner { flex-wrap: nowrap; }
/* A narrow desktop uses a second row, retaining every primary study link. */
.nnav.nnav-stacked .nnav-inner { flex-wrap: wrap; column-gap: 12px; row-gap: 4px; }
.nnav.nnav-stacked .nnav-controls { margin-inline-start: auto; }
.nnav.nnav-stacked .nnav-primary { order: 3; flex-basis: 100%; width: 100%; padding-bottom: 4px; }
.nnav.nnav-stacked ~ [data-dc1-main] { padding-top: var(--nnav-height, 116px); }
.nnav.nnav-stacked #nezakr-notif-menu, .nnav.nnav-stacked #nezakr-student-menu { position: fixed; left: 14px; top: calc(var(--nnav-height, 116px) + 8px); margin-top: 0; max-height: calc(100dvh - var(--nnav-height, 116px) - 24px); overflow-y: auto; max-width: calc(100vw - 28px); }
/* Natural wrapping remains usable without JavaScript or font measurement. */
html:not(.nnav-ready) .nnav { position: sticky; }
html:not(.nnav-ready) .nnav ~ [data-dc1-main] { padding-top: 0; }
@media (min-width: 1440px) { .nnav-account-name { display: inline; max-width: 96px; } }
@media (max-width: 991px) {
  .nnav-inner { padding-inline: 16px; min-height: 64px; gap: 8px; }
  .nnav-brand { flex: 1 1 auto; min-width: 0; max-width: none; }
  .nnav-primary { display: none; }
  .nnav-menu-trigger { display: inline-flex; }
  .nnav-mobile-daily { display: flex; justify-content: center; gap: 8px; padding: 0 12px 6px; }
  .nnav-mobile-daily .nnav-daily { min-height: 44px; padding: 6px 14px; font-size: 11px; }
  .nnav ~ [data-dc1-main] { padding-top: var(--nnav-height, 116px); }
  .nnav #nezakr-notif-menu { position: fixed; left: 14px; top: calc(var(--nnav-height, 116px) + 8px); margin-top: 0; max-height: calc(100dvh - var(--nnav-height, 116px) - 24px); overflow-y: auto; width: min(360px, calc(100vw - 28px)); max-width: none; }
}
@media (max-width: 767px) { .nnav-account { display: none; } .nnav-title { font-size: 18px; } }
@media (max-width: 479px) { .nnav-theme { display: none; } .nnav-inner { padding-inline: 12px; } .nnav-controls { gap: 2px; } .nnav-brand .nezakr-october-victory { font-size: 10px; } .nnav-search-panel { padding: 18px; } }
@media (prefers-reduced-motion: no-preference) { .nnav-search-panel { animation: nnav-enter .16s ease-out; } @keyframes nnav-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } }
/* AUTH-UI1: account actions have one identity across every study theme. */
#nnav-top .nnav-auth,#nnav-drawer .nnav-auth{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:9px 17px;border:1px solid #d4d0f2;border-radius:12px;font-size:14px;font-weight:700;line-height:1.6;text-decoration:none;white-space:nowrap;box-sizing:border-box;transition:background .16s,border-color .16s}
#nnav-top .nnav-auth--login,#nnav-drawer .nnav-auth--login{background:#eeecfa;color:#3730a3}
#nnav-top .nnav-auth--register,#nnav-drawer .nnav-auth--register{background:#3730a3;color:#fff;border-color:#3730a3}
#nnav-top .nnav-auth--login:hover,#nnav-drawer .nnav-auth--login:hover{background:#e3dff7;border-color:#a9a1da}
#nnav-top .nnav-auth--register:hover,#nnav-drawer .nnav-auth--register:hover{background:#29217f;border-color:#29217f}
#nnav-drawer .nnav-auth>i{color:inherit}
.dark #nnav-top .nnav-auth--login,.dark #nnav-drawer .nnav-auth--login,.dark-mode #nnav-top .nnav-auth--login,.dark-mode #nnav-drawer .nnav-auth--login{background:#282341;color:#d0caff;border-color:#514777}
#nnav-top .nnav-auth:focus-visible,#nnav-drawer .nnav-auth:focus-visible{outline:3px solid #8278dc;outline-offset:3px}
