/* Inner Dive app shell. Every screen carries its own tab bar and styles; nothing is added on top of them here.
   Colors and fonts come from each screen's own tokens (--bg, --surface, --ink, ...). */

/* ---------- the sign-in gate (gate.js) ----------
   On the Account page, a line saying why the person was sent there; in the bar of pages, a small lock on the
   screens that need an account, while nobody is signed in. */
.gatenote {
  margin: 14px 0 0;
  max-width: 46ch;
  padding: 12px 14px;
  border: 1px solid var(--accent, #9DB4FF);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent, #9DB4FF) 10%, transparent);
  color: var(--ink, #E7EBF8);
  font-size: 0.95rem;
  line-height: 1.5;
}
.gatenote[hidden] { display: none; }
/* 19 Oct 2026: Generator and Your Journey open to everyone; only their complex parts are locked (lock.js) */

/* ---------- the Neuroacoustics tab ----------
   Opened with a personal code. Its short name and a lock in the bar along the bottom; the full name and a
   small lock in the bar across the top. Seven names side by side on phones: slightly smaller letters. */
.navlinks .nav-long, .navlinks svg.nav-lock { display: none; }
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .navlinks .nav-long { display: inline; }
  .navlinks .nav-short { display: none; }
  .navlinks a svg.nav-lock { display: block; width: 13px; height: 13px; margin-left: -2px; opacity: 0.8; }
}
@media (max-width: 1023px), (hover: none), (pointer: coarse) { .navlinks a { font-size: 0.64rem; } }
@media (max-width: 480px) { .navlinks { padding-inline: 2px; column-gap: 3px; } .navlinks a { font-size: 0.6rem; letter-spacing: -0.015em; } }

/* 16 Oct 2026 · top bar dropdowns (computer only). Our own take on a mega-menu:
   the deep Sonik blue, a thin light line on top, a coloured dot per item. */
.nd { display: contents; }
.nd-btn, .nd-panel { display: none; }
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .nd { display: inline-flex; align-items: center; position: relative; }
  .nd > a { padding-right: 6px !important; }
  .nd-btn { display: inline-grid; place-items: center; width: 22px; height: 28px; margin-left: -4px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: inherit; opacity: 0.7; cursor: pointer; }
  .nd-btn:hover, .nd.on .nd-btn { opacity: 1; }
  .nd-btn:focus-visible { outline: 2px solid #8FD0FF; outline-offset: 1px; }
  .nd-caret { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
  .nd.on .nd-caret { transform: rotate(180deg); }
  .nd-panel:not([hidden]) { display: block; position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); z-index: 60; min-width: 300px; padding: 14px; border: 1px solid #1D4A82; border-radius: 18px;
    background: linear-gradient(180deg, #0B2A57 0%, #071C40 100%); box-shadow: 0 18px 50px rgba(2, 8, 24, 0.6), inset 0 1px 0 rgba(143, 208, 255, 0.18); animation: ndIn 0.18s ease-out; }
  .nd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }   /* keeps the hover alive between link and panel */
  .nd-panel::after { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, #8FD0FF, transparent); opacity: 0.6; }
  .nd-panel.wide { min-width: 860px; }
  .nd-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px 14px; }
  .nd-h { margin: 4px 10px 6px; font: 600 0.66rem/1 var(--font-mono, monospace); letter-spacing: 0.16em; text-transform: uppercase; color: #6F94C2; }
  .nd-it { display: flex !important; flex-direction: row !important; justify-content: flex-start !important; width: 100%; box-sizing: border-box; min-height: 0 !important; align-items: flex-start !important; gap: 12px; padding: 10px 12px !important; border-radius: 12px; color: #E6EAF2 !important; text-decoration: none; text-align: left; white-space: normal !important; background: transparent !important; }
  .nd-it i { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--k); box-shadow: 0 0 8px var(--k); }
  .nd-it span { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; flex: 1; text-align: left; }
  .nd-it::after, .nd-it::before { content: none !important; }
  .nd-it strong { font-weight: 500; font-size: 0.95rem; line-height: 1.25; }
  .nd-it small { font: 0.7rem/1.3 var(--font-mono, monospace); color: #8FB9E6; letter-spacing: 0.02em; }
  .nd-it:hover, .nd-it:focus-visible { background: rgba(77, 168, 255, 0.10) !important; outline: none; }
  .nd-it:hover strong, .nd-it:focus-visible strong { color: #fff; }
  @keyframes ndIn { from { opacity: 0; transform: translate(-50%, -4px); } to { opacity: 1; transform: translate(-50%, 0); } }
  @media (prefers-reduced-motion: reduce) { .nd-panel:not([hidden]) { animation: none; } }
}

/* 16 Oct 2026 · Home waits for its new design: the logo alone, centred (buttons, name and install stay in the code) */
.app.home .bigbtns, .app.home #get, .app.home > header h1 { display: none !important; }
.app.home > header { min-height: 58vh; display: flex; align-items: center; justify-content: center; }
/* Science of Frequency: a blank page for now */
.app.science > header { min-height: 40vh; }

/* 16 Oct 2026 · the Account icon beside the flag, in every page's bar */
.topbar .tools { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.acctbtn { position: relative; display: grid; place-items: center; width: 40px; height: 36px; border: 1px solid var(--line, #1D3A66); border-radius: 10px; color: var(--muted, #9FB3D1); text-decoration: none; }
.acctbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.acctbtn:hover, .acctbtn[aria-current="page"] { color: var(--ink, #E6EAF2); border-color: var(--accent, #4DA8FF); }
.acctbtn:focus-visible { outline: 2px solid var(--accent, #4DA8FF); outline-offset: 2px; }
.acctbtn[data-in="true"]::after { content: ""; position: absolute; top: 4px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok, #5FD3C0); box-shadow: 0 0 0 2px var(--bg, #0A1024); }
/* the search bar on Home: wide and thin */
.homesearch { position: relative; display: flex; align-items: center; width: 100%; max-width: 640px; height: 46px; margin: 0 auto; padding: 0 6px 0 46px; border: 1px solid var(--line, #1D3A66); border-radius: 999px; background: color-mix(in srgb, var(--surface, #111A33) 85%, transparent); box-sizing: border-box; }
.homesearch:focus-within { border-color: var(--accent, #4DA8FF); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #4DA8FF) 20%, transparent); }
.homesearch > svg { position: absolute; left: 16px; width: 20px; height: 20px; fill: none; stroke: var(--muted, #9FB3D1); stroke-width: 1.8; stroke-linecap: round; }
.homesearch input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink, #E6EAF2); font: inherit; font-size: 0.98rem; outline: none; }
.homesearch input::placeholder { color: var(--muted, #9FB3D1); opacity: 0.8; }
.homesearch input::-webkit-search-cancel-button { display: none; }
.homesearch button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--accent, #4DA8FF); color: #04112A; cursor: pointer; }
.homesearch button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.app.home > header { min-height: 46vh; }

/* 19 Oct 2026 · locked pictures (the SONIK LABS CORP. mark is in the image files themselves) */
img { -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }

/* 19 Oct 2026 · sign-in locks (lock.js): Modulator, Advanced and the guided sessions need a free account */
.lk-veil { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: rgba(2, 8, 24, 0.72); backdrop-filter: blur(4px); }
.lk-veil[hidden] { display: none; }
.lk-dlg { width: min(420px, 100%); padding: 26px 22px 18px; border: 1px solid #1D4A82; border-radius: 20px; background: linear-gradient(180deg, #0B2550, #071937); color: var(--ink, #E7EBF8); text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.lk-ic { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: color-mix(in srgb, var(--accent, #9DB4FF) 16%, transparent); }
.lk-ic svg { width: 22px; height: 22px; fill: var(--accent, #9DB4FF); }
.lk-dlg h2 { margin: 14px 0 6px; font-size: 1.25rem; }
.lk-p { margin: 0 0 18px; opacity: 0.85; line-height: 1.5; }
.lk-go, .lk-no { display: block; width: 100%; min-height: 46px; border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer; }
.lk-go { border: 0; background: var(--accent, #9DB4FF); color: #061430; }
.lk-no { margin-top: 8px; border: 0; background: transparent; color: inherit; opacity: 0.75; }
.lk-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 1px 7px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--k, #9DB4FF) 55%, transparent); color: var(--k, #9DB4FF); font-style: normal; font-weight: 600; font-size: 0.6rem; letter-spacing: 0.06em; white-space: nowrap; }
.lk-badge svg, .lk-mini { width: 10px; height: 10px; fill: currentColor; flex: none; }
.lk-mini { display: inline-block; margin-left: 6px; vertical-align: -1px; opacity: 0.8; }
html:not([data-gate="out"]) .lk-badge, html:not([data-gate="out"]) .lk-mini { display: none; }

/* 19 Oct 2026 · Neuroacoustics back in the bar, always locked (sign-in and a professional code) */
.navlinks a[data-page="neuro"] .nav-short::before { content: "🔒 "; font-size: 0.85em; }
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) { .navlinks a[data-page="neuro"] .nav-short::before { content: none; } }
.gm-chrome .lk-badge { padding: 0 6px; line-height: 14px; font-size: 0.56rem; }
/* 21 Oct 2026 · Science of Frequency menu in four groups */
@media (min-width: 1024px) {
  .nd-panel.wide4 { min-width: 0; width: min(1080px, calc(100vw - 48px)); }
  .nd-panel.wide4 .nd-cols { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nd-panel.wide4 .nd-col + .nd-col { border-left: 1px solid rgba(143, 208, 255, 0.12); padding-left: 10px; }
  .nd-panel.wide4 .nd-it { padding: 8px 10px !important; }
  .nd-panel.wide4 .nd-it strong { font-size: 0.88rem; }
}
@media (min-width: 1024px) { .nd-panel.wide4 .nd-h { line-height: 1.35; } }

/* 21 Oct 2026 · bigger tabs in the top bar, with more room between them (computer only; large screens) */
@media (min-width: 1280px) and (hover: hover) and (pointer: fine) {
  .topbar-in { max-width: 1320px !important; }
  .navlinks { gap: clamp(4px, 0.7vw, 12px) !important; }
  .navlinks a { font-size: 1.02rem !important; padding: 10px 15px !important; border-radius: 10px !important; }
}

/* 21 Oct 2026: Science menu with a 5th group (Neuroacoustics) */
@media (min-width: 1024px) {
  .nd-panel.wide4.wide5 { width: min(1240px, calc(100vw - 32px)); }
  .nd-panel.wide4.wide5:not([hidden]) { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); }
  .nd-panel.wide4.wide5 .nd-cols { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* 22 Oct 2026 · Quizzes: the card at the end of every Science of Frequency topic */
.quiz-cta { display: flex; align-items: center; gap: 16px; max-width: 760px; width: 100%; box-sizing: border-box; margin: 8px auto 0; padding: 18px 20px; border: 1px solid var(--k); border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--k) 16%, transparent), rgba(18, 25, 53, 0.9)); color: var(--ink); text-decoration: none; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.quiz-cta:hover, .quiz-cta:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--k); outline: none; }
.quiz-cta-ic { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--k); color: #0A0F24; }
.quiz-cta-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.quiz-cta-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.quiz-cta-tx strong { font-size: 1.15rem; font-weight: 600; }
.quiz-cta-tx small { font-size: 0.88rem; color: color-mix(in srgb, var(--ink) 75%, transparent); }
.quiz-cta-go { flex: none; font-size: 1.5rem; color: var(--k); }
@media (prefers-reduced-motion: reduce) { .quiz-cta { transition: none; } }
/* 22 Oct 2026 · seven tabs in the bar along the bottom: a long name may take two short lines */
@media (max-width: 1023px), (hover: none), (pointer: coarse) {
  .navlinks { padding-inline: max(4px, calc(50% - 320px)); }
  .navlinks a { white-space: normal; text-align: center; overflow-wrap: normal; }
}
/* 22 Oct 2026 · v2: the card opens this topic's quiz; a small link opens the group's big quiz */
.quiz-cta-wrap { max-width: 760px; width: 100%; margin: 8px auto 0; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.quiz-cta-wrap .quiz-cta { margin: 0; }
.quiz-cta-big { align-self: center; color: var(--k); font-size: 0.92rem; font-weight: 600; text-decoration: none; padding: 4px 8px; border-radius: 8px; }
.quiz-cta-big:hover, .quiz-cta-big:focus-visible { text-decoration: underline; outline: none; }
/* 24 Oct 2026 · Science menu: the 6 groups side by side, left to right in the page order */
@media (min-width: 1024px) {
  #nd-science.nd-panel.wide4 { width: min(1340px, calc(100vw - 32px)); }
  #nd-science.nd-panel.wide4:not([hidden]) { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); max-height: calc(100vh - 80px); overflow-y: auto; }
  #nd-science .nd-cols { grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: start; }
  #nd-science .nd-it strong { font-size: 0.84rem; }
}

/* 24 Oct 2026 · Science · Everything Vibrates */
.sci-motto { display: inline-block; margin: 6px 0 0; font: 600 0.85rem/1.2 var(--font-mono, monospace); letter-spacing: 0.22em; text-transform: uppercase; background: linear-gradient(90deg, #8B5CF6, #6E8BFF, #22D3EE, #34D399, #FACC15, #F97316, #EF4444); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 25 Oct 2026 · Home: "Everything Vibrates" sits in the true centre under "Science" (phone and computer) */
.h2-sec > .sci-motto { display: table; margin: 6px auto 0; padding-left: 0.22em; text-align: center; }

/* 25 Oct 2026 · Phones: the page always fits the screen width (no side-to-side floating) */
html, body { max-width: 100%; overflow-x: clip; }
.lk-dlg, .gm-dlg { box-sizing: border-box; max-width: 100%; }
.app.science .cof-hero { box-sizing: border-box; max-width: 100%; }
.app.science .cof-hero svg { max-width: 100%; height: auto; }

/* 26 Oct 2026 · Science menu: groups on the left, topics on the right */
@media (min-width: 1024px) {
  #nd-science.nd-panel.ndt { width: min(1120px, calc(100vw - 32px)); padding: 0; overflow: hidden; max-height: none; }
  #nd-science .ndt-wrap { display: grid; grid-template-columns: 270px 1fr; min-height: 420px; }
  #nd-science .ndt-tabs { display: flex; flex-direction: column; gap: 4px; padding: 14px 10px; background: linear-gradient(180deg, rgba(77, 168, 255, .06), rgba(155, 107, 255, .05)); border-right: 1px solid rgba(143, 208, 255, .14); }
  #nd-science .ndt-tab { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 11px 14px 11px 18px; border: 1px solid transparent; border-radius: 12px; background: none; color: #C9D8F2; font: 500 .92rem/1.25 var(--font-body, Inter, sans-serif); text-align: left; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
  #nd-science .ndt-tab::before { content: ''; position: absolute; left: 6px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--k); box-shadow: 0 0 8px var(--k); transform: translateY(-50%); transition: height .2s, border-radius .2s; }
  #nd-science .ndt-tab em { font: 400 .68rem var(--font-mono, monospace); font-style: normal; color: #7FA3CF; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .05); }
  #nd-science .ndt-tab:hover, #nd-science .ndt-tab:focus-visible { background: rgba(77, 168, 255, .08); color: #fff; outline: none; }
  #nd-science .ndt-tab.on { color: #fff; border-color: color-mix(in srgb, var(--k) 55%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--k) 20%, transparent), transparent); box-shadow: inset 0 0 22px -10px var(--k); }
  #nd-science .ndt-tab.on::before { height: 60%; border-radius: 3px; }
  #nd-science .ndt-tab.on em { color: #0A0F22; background: var(--k); }
  #nd-science .ndt-pane { position: relative; padding: 18px 20px 20px; max-height: calc(100vh - 110px); overflow-y: auto; }
  #nd-science .ndt-pane::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 80% 0%, color-mix(in srgb, var(--k) 14%, transparent), transparent 70%); }
  #nd-science .ndt-h { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 6px 12px; padding-bottom: 10px; border-bottom: 1px solid color-mix(in srgb, var(--k) 35%, transparent); }
  #nd-science .ndt-h span { font: 600 .72rem/1 var(--font-mono, monospace); letter-spacing: .2em; text-transform: uppercase; color: var(--k); text-shadow: 0 0 10px color-mix(in srgb, var(--k) 60%, transparent); }
  #nd-science .ndt-h a { font-size: .8rem; color: #8FC8FF; text-decoration: none; }
  #nd-science .ndt-h a:hover { color: #fff; }
  #nd-science .ndt-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 10px; }
  #nd-science .ndt-grid .nd-it strong { font-size: .9rem; }
}

/* 27 Oct 2026 · Your Journey menu: same tabs as Science */
@media (min-width: 1024px) {
  #nd-protocols.nd-panel.ndt:not([hidden]) { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); max-height: calc(100vh - 80px); overflow-y: auto; }
  #nd-protocols.nd-panel.ndt { width: min(1120px, calc(100vw - 32px)); padding: 0; overflow: hidden; max-height: none; }
  #nd-protocols .ndt-wrap { display: grid; grid-template-columns: 270px 1fr; min-height: 420px; }
  #nd-protocols .ndt-tabs { display: flex; flex-direction: column; gap: 4px; padding: 14px 10px; background: linear-gradient(180deg, rgba(77, 168, 255, .06), rgba(155, 107, 255, .05)); border-right: 1px solid rgba(143, 208, 255, .14); }
  #nd-protocols .ndt-tab { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 11px 14px 11px 18px; border: 1px solid transparent; border-radius: 12px; background: none; color: #C9D8F2; font: 500 .92rem/1.25 var(--font-body, Inter, sans-serif); text-align: left; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
  #nd-protocols .ndt-tab::before { content: ''; position: absolute; left: 6px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--k); box-shadow: 0 0 8px var(--k); transform: translateY(-50%); transition: height .2s, border-radius .2s; }
  #nd-protocols .ndt-tab em { font: 400 .68rem var(--font-mono, monospace); font-style: normal; color: #7FA3CF; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .05); }
  #nd-protocols .ndt-tab:hover, #nd-protocols .ndt-tab:focus-visible { background: rgba(77, 168, 255, .08); color: #fff; outline: none; }
  #nd-protocols .ndt-tab.on { color: #fff; border-color: color-mix(in srgb, var(--k) 55%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--k) 20%, transparent), transparent); box-shadow: inset 0 0 22px -10px var(--k); }
  #nd-protocols .ndt-tab.on::before { height: 60%; border-radius: 3px; }
  #nd-protocols .ndt-tab.on em { color: #0A0F22; background: var(--k); }
  #nd-protocols .ndt-pane { position: relative; padding: 18px 20px 20px; max-height: calc(100vh - 110px); overflow-y: auto; }
  #nd-protocols .ndt-pane::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 80% 0%, color-mix(in srgb, var(--k) 14%, transparent), transparent 70%); }
  #nd-protocols .ndt-h { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 6px 12px; padding-bottom: 10px; border-bottom: 1px solid color-mix(in srgb, var(--k) 35%, transparent); }
  #nd-protocols .ndt-h span { font: 600 .72rem/1 var(--font-mono, monospace); letter-spacing: .2em; text-transform: uppercase; color: var(--k); text-shadow: 0 0 10px color-mix(in srgb, var(--k) 60%, transparent); }
  #nd-protocols .ndt-h a { font-size: .8rem; color: #8FC8FF; text-decoration: none; }
  #nd-protocols .ndt-h a:hover { color: #fff; }
  #nd-protocols .ndt-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 10px; }
  #nd-protocols .ndt-grid .nd-it strong { font-size: .9rem; }
}
/* 27 Oct 2026 · Generator and Quizzes menus with previews */
@media (min-width: 1024px) {
  #nd-generator.nd-panel.ndt:not([hidden]) { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); max-height: calc(100vh - 80px); overflow-y: auto; }
  #nd-generator.nd-panel.ndt { width: min(1120px, calc(100vw - 32px)); padding: 0; overflow: hidden; max-height: none; }
  #nd-generator .ndt-wrap { display: grid; grid-template-columns: 270px 1fr; min-height: 420px; }
  #nd-generator .ndt-tabs { display: flex; flex-direction: column; gap: 4px; padding: 14px 10px; background: linear-gradient(180deg, rgba(77, 168, 255, .06), rgba(155, 107, 255, .05)); border-right: 1px solid rgba(143, 208, 255, .14); }
  #nd-generator .ndt-tab { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 11px 14px 11px 18px; border: 1px solid transparent; border-radius: 12px; background: none; color: #C9D8F2; font: 500 .92rem/1.25 var(--font-body, Inter, sans-serif); text-align: left; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
  #nd-generator .ndt-tab::before { content: ''; position: absolute; left: 6px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--k); box-shadow: 0 0 8px var(--k); transform: translateY(-50%); transition: height .2s, border-radius .2s; }
  #nd-generator .ndt-tab em { font: 400 .68rem var(--font-mono, monospace); font-style: normal; color: #7FA3CF; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .05); }
  #nd-generator .ndt-tab:hover, #nd-generator .ndt-tab:focus-visible { background: rgba(77, 168, 255, .08); color: #fff; outline: none; }
  #nd-generator .ndt-tab.on { color: #fff; border-color: color-mix(in srgb, var(--k) 55%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--k) 20%, transparent), transparent); box-shadow: inset 0 0 22px -10px var(--k); }
  #nd-generator .ndt-tab.on::before { height: 60%; border-radius: 3px; }
  #nd-generator .ndt-tab.on em { color: #0A0F22; background: var(--k); }
  #nd-generator .ndt-pane { position: relative; padding: 18px 20px 20px; max-height: calc(100vh - 110px); overflow-y: auto; }
  #nd-generator .ndt-pane::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 80% 0%, color-mix(in srgb, var(--k) 14%, transparent), transparent 70%); }
  #nd-generator .ndt-h { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 6px 12px; padding-bottom: 10px; border-bottom: 1px solid color-mix(in srgb, var(--k) 35%, transparent); }
  #nd-generator .ndt-h span { font: 600 .72rem/1 var(--font-mono, monospace); letter-spacing: .2em; text-transform: uppercase; color: var(--k); text-shadow: 0 0 10px color-mix(in srgb, var(--k) 60%, transparent); }
  #nd-generator .ndt-h a { font-size: .8rem; color: #8FC8FF; text-decoration: none; }
  #nd-generator .ndt-h a:hover { color: #fff; }
  #nd-generator .ndt-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 10px; }
  #nd-generator .ndt-grid .nd-it strong { font-size: .9rem; }
  #nd-quiz.nd-panel.ndt:not([hidden]) { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); max-height: calc(100vh - 80px); overflow-y: auto; }
  #nd-quiz.nd-panel.ndt { width: min(1120px, calc(100vw - 32px)); padding: 0; overflow: hidden; max-height: none; }
  #nd-quiz .ndt-wrap { display: grid; grid-template-columns: 270px 1fr; min-height: 420px; }
  #nd-quiz .ndt-tabs { display: flex; flex-direction: column; gap: 4px; padding: 14px 10px; background: linear-gradient(180deg, rgba(77, 168, 255, .06), rgba(155, 107, 255, .05)); border-right: 1px solid rgba(143, 208, 255, .14); }
  #nd-quiz .ndt-tab { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 11px 14px 11px 18px; border: 1px solid transparent; border-radius: 12px; background: none; color: #C9D8F2; font: 500 .92rem/1.25 var(--font-body, Inter, sans-serif); text-align: left; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
  #nd-quiz .ndt-tab::before { content: ''; position: absolute; left: 6px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--k); box-shadow: 0 0 8px var(--k); transform: translateY(-50%); transition: height .2s, border-radius .2s; }
  #nd-quiz .ndt-tab em { font: 400 .68rem var(--font-mono, monospace); font-style: normal; color: #7FA3CF; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .05); }
  #nd-quiz .ndt-tab:hover, #nd-quiz .ndt-tab:focus-visible { background: rgba(77, 168, 255, .08); color: #fff; outline: none; }
  #nd-quiz .ndt-tab.on { color: #fff; border-color: color-mix(in srgb, var(--k) 55%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--k) 20%, transparent), transparent); box-shadow: inset 0 0 22px -10px var(--k); }
  #nd-quiz .ndt-tab.on::before { height: 60%; border-radius: 3px; }
  #nd-quiz .ndt-tab.on em { color: #0A0F22; background: var(--k); }
  #nd-quiz .ndt-pane { position: relative; padding: 18px 20px 20px; max-height: calc(100vh - 110px); overflow-y: auto; }
  #nd-quiz .ndt-pane::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 80% 0%, color-mix(in srgb, var(--k) 14%, transparent), transparent 70%); }
  #nd-quiz .ndt-h { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 6px 12px; padding-bottom: 10px; border-bottom: 1px solid color-mix(in srgb, var(--k) 35%, transparent); }
  #nd-quiz .ndt-h span { font: 600 .72rem/1 var(--font-mono, monospace); letter-spacing: .2em; text-transform: uppercase; color: var(--k); text-shadow: 0 0 10px color-mix(in srgb, var(--k) 60%, transparent); }
  #nd-quiz .ndt-h a { font-size: .8rem; color: #8FC8FF; text-decoration: none; }
  #nd-quiz .ndt-h a:hover { color: #fff; }
  #nd-quiz .ndt-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 10px; }
  #nd-quiz .ndt-grid .nd-it strong { font-size: .9rem; }
  .ndx .ndt-wrap { min-height: 360px; }
  .ndx-gen { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: stretch; margin: 0 6px; }
  .ndx-prev { position: relative; display: block; min-height: 250px; border-radius: 16px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--k) 40%, transparent);
    background: radial-gradient(80% 80% at 50% 40%, color-mix(in srgb, var(--k) 14%, transparent), transparent 70%), rgba(4, 8, 24, .75); box-shadow: 0 0 40px -16px var(--k) inset; }
  .ndx-prev canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
  .ndx-info { display: flex; flex-direction: column; gap: 14px; padding: 6px 0; }
  .ndx-d { margin: 0; font-size: .98rem; line-height: 1.55; color: #DDE6FF; }
  .ndx-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
  .ndx-tags span { font: 500 .66rem/1 var(--font-mono, monospace); letter-spacing: .12em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; color: var(--k); border: 1px solid color-mix(in srgb, var(--k) 40%, transparent); background: color-mix(in srgb, var(--k) 8%, transparent); }
  .ndx-go { align-self: flex-start; margin-top: auto; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; text-decoration: none; color: #0A0F22; background: var(--k); box-shadow: 0 8px 26px -10px var(--k); }
  .ndx-go:hover { filter: brightness(1.08); }
  .ndx-go.alt { color: var(--k); background: transparent; border: 1px solid color-mix(in srgb, var(--k) 55%, transparent); box-shadow: none; }
  .ndx-quiz { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 0 6px; }
  .ndx-qcol { display: flex; flex-direction: column; gap: 14px; }
  .ndx-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
  .ndx-stats span { font-size: .8rem; color: #CFE0FF; padding: 6px 10px; border-radius: 10px; background: rgba(143,200,255,.07); border: 1px solid rgba(143,200,255,.12); }
  .ndx-mix { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .8rem; color: #9FB4DA; }
  .ndx-mix i { width: 18px; height: 5px; border-radius: 3px; } .ndx-mix i.e { background: #4BE38A; } .ndx-mix i.m { background: #FFC857; } .ndx-mix i.h { background: #FF5A6E; margin-right: 4px; }
  .ndx-sample { position: relative; padding: 14px 16px; border-radius: 14px; border: 1px dashed color-mix(in srgb, var(--k) 45%, transparent); background: color-mix(in srgb, var(--k) 6%, rgba(4,8,24,.5)); }
  .ndx-sample small, .ndx-prog small { display: block; font: 600 .62rem/1 var(--font-mono, monospace); letter-spacing: .16em; text-transform: uppercase; color: var(--k); margin-bottom: 8px; }
  .ndx-sample p { margin: 0; font-size: .95rem; line-height: 1.45; color: #fff; }
  .ndx-sample p::before { content: '?'; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; font-size: .75rem; font-weight: 700; color: #0A0F22; background: var(--k); vertical-align: 1px; }
  .ndx-prog p { margin: 6px 0 0; font-size: .85rem; color: #CFE0FF; }
  .ndx-bar { height: 6px; border-radius: 6px; background: rgba(143,200,255,.1); overflow: hidden; }
  .ndx-bar i { display: block; height: 100%; min-width: 4px; background: linear-gradient(90deg, var(--k), #fff); box-shadow: 0 0 10px var(--k); }
  .ndx-lvl { padding: 12px 14px; border-radius: 12px; background: rgba(143,200,255,.06); border: 1px solid rgba(143,200,255,.12); }
  .ndx-lvl b { display: block; font-size: .9rem; color: #fff; } .ndx-lvl span { font-size: .8rem; color: #9FB4DA; }
  .ndx-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
  .ndx-btns .ndx-go { margin-top: 0; }
  .ndx-wait { min-height: 200px; }
  .nd-panel.ndx a.ndx-go { color: #0A0F22; opacity: 1; }
  .nd-panel.ndx a.ndx-go.alt { color: var(--k); }
}

/* 27 Oct 2026 · Modulator and Advanced are Pro: gold PRO badge while locked */
html[data-gm-pro-lock] .lk-badge, html[data-gm-pro-lock] .lk-mini { display: inline-flex; }
.lk-badge.lk-pro { color: #FFD24A; border-color: rgba(255,210,74,.6); background: rgba(255,210,74,.08); }
@media (min-width: 1024px) {
  .ndx-prev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; transition: transform 6s ease; }
  .ndx-prev:hover img { transform: scale(1.04); }
  .ndx-scan { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 0, color-mix(in srgb, var(--k) 22%, transparent) 50%, transparent 52%) 0 -100% / 100% 60% no-repeat; animation: ndxScan 3.6s linear infinite; mix-blend-mode: screen; }
  @keyframes ndxScan { to { background-position: 0 260%; } }
  .ndx-gen { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .ndx-prev { min-height: 280px; }
}
@media (prefers-reduced-motion: reduce) { .ndx-scan { display: none; } }
/* 27 Oct 2026 · Neuroacoustics: in the bar on computers, hidden on phones (professionals open it from their link) */
@media (max-width: 819.98px) { .navlinks a[data-page="neuro"] { display: none !important; } }
/* 27 Oct 2026 · Quizzes live in Science now (Your Map): out of the main bar */
.navlinks a[data-page="quiz"] { display: none !important; }
.navlinks a[data-page="quiz"] + .nd-btn, #nd-quiz { display: none !important; }

/* 28 Oct 2026 · Back button on every page (assets/back-bar.js), same look as on Science topics */
.sci-backbar { display: flex; gap: 10px; align-items: center; margin: 4px 0 14px; position: sticky; top: calc(var(--nav-h, 56px) + env(safe-area-inset-top, 0px) + 8px); z-index: 5; }
.sci-backbar a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px; border-radius: 999px; font: 600 0.95rem/1 var(--font-body); color: var(--ink, #E6EAF2); text-decoration: none; background: rgba(14, 21, 48, 0.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(143, 208, 255, 0.35); transition: border-color .15s, transform .15s; }
.sci-backbar a:hover, .sci-backbar a:focus-visible { border-color: #8FD0FF; transform: translateY(-1px); }
.sci-backbar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sci-backbar .sci-back svg { stroke-width: 2.6; }
.sci-backbar .sci-all { color: #8FD0FF; }
.id-backbar[hidden] { display: none; }
/* 28 Oct 2026 · Back slips away while reading; the Top button appears deep in long pages */
.sci-backbar { transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .25s ease; }
.sci-backbar.is-away { transform: translateY(-160%); opacity: 0; pointer-events: none; }
.id-top { position: fixed; right: 18px; bottom: 22px; z-index: 40; display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px 10px 12px; border-radius: 999px;
  font: 600 0.9rem/1 var(--font-body, system-ui); color: var(--ink, #E6EAF2); background: rgba(14, 21, 48, 0.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(143, 208, 255, 0.35); box-shadow: 0 8px 26px -10px rgba(95, 230, 255, .45); cursor: pointer;
  opacity: 0; transform: translateY(14px) scale(.96); pointer-events: none; transition: opacity .25s ease, transform .32s cubic-bezier(.2,.8,.2,1), border-color .15s; }
.id-top.on { opacity: 1; transform: none; pointer-events: auto; }
.id-top:hover, .id-top:focus-visible { border-color: #8FD0FF; outline: none; box-shadow: 0 0 0 1px #8FD0FF, 0 10px 30px -8px rgba(95, 230, 255, .6); }
.id-top svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .sci-backbar, .id-top { transition: none; } }
