/* NotedSuite shared menu bar (floating dark pill + mega menus). Same on every NotedSuite site.
   All classes are prefixed "sn-" so they never clash with the site's own styles. */
.sn-header {
  --sn-nav: #0f1020; --sn-mega: #14152a; --sn-line: rgba(255, 255, 255, 0.08);
  --sn-ink: #ffffff; --sn-dim: #a8abbd; --sn-action: #1f5ed1; --sn-action-hover: #194fb2;
  --sn-text: #14162b; --sn-suite: #d9542e; --sn-bg: rgba(250, 249, 247, 0.86);
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 12px max(20px, calc((100vw - 1240px) / 2 + 28px));
  font-family: inherit;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
@media (prefers-color-scheme: dark) {
  .sn-header { --sn-nav: #05070f; --sn-mega: #0a0d1c; --sn-text: #f2f4fb; --sn-suite: #ff8a6b; --sn-bg: rgba(14, 19, 38, 0.86); }
}
.sn-header *, .sn-header *::before, .sn-header *::after { box-sizing: border-box; }
.sn-header :focus-visible { outline: 3px solid var(--sn-action); outline-offset: 3px; border-radius: 8px; }
.sn-logo { justify-self: start; font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; color: var(--sn-text); text-decoration: none; transition: opacity 0.2s ease; }
.sn-logo span { color: var(--sn-suite); }
.sn-cta {
  justify-self: end; display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 16px; border-radius: 11px;
  background: var(--sn-action); color: #ffffff; font-size: 15px; font-weight: 600; text-decoration: none;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.sn-cta:hover { background: var(--sn-action-hover); color: #ffffff; }
.sn-header.is-scrolled .sn-logo, .sn-header.is-scrolled > .sn-cta { opacity: 0; pointer-events: none; }

.sn-nav { position: relative; }
.sn-list {
  display: flex; align-items: center; gap: 2px; margin: 0; padding: 5px; list-style: none;
  background: var(--sn-nav); border-radius: 999px; box-shadow: 0 10px 30px rgba(10, 12, 30, 0.18);
}
.sn-btn, .sn-link {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px;
  border: 0; border-radius: 999px; background: transparent; color: var(--sn-ink);
  font: inherit; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.sn-btn:hover, .sn-link:hover, .sn-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.10); color: var(--sn-ink); }
.sn-chev { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.sn-btn[aria-expanded="true"] .sn-chev { transform: rotate(180deg); }
.sn-cta-in { display: none; }
.sn-header.is-scrolled .sn-cta-in { display: block; margin-left: 4px; }
.sn-cta-in .sn-cta { min-height: 38px; border-radius: 999px; }

.sn-mega {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  width: min(920px, calc(100vw - 32px)); overflow: hidden;
  background: var(--sn-mega); color: var(--sn-ink); text-align: left;
  border: 1px solid var(--sn-line); border-radius: 20px; box-shadow: 0 30px 70px rgba(5, 6, 20, 0.45);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.18s ease, visibility 0.18s ease;
}
.sn-mega--narrow { width: min(620px, calc(100vw - 32px)); }
.sn-item.is-open .sn-mega { opacity: 1; visibility: visible; pointer-events: auto; }
.sn-cols { display: grid; }
.sn-cols--4 { grid-template-columns: repeat(4, 1fr); }
.sn-cols--2 { grid-template-columns: repeat(2, 1fr); }
.sn-col { padding: 24px 22px 22px; border-right: 1px solid var(--sn-line); }
.sn-col:last-child { border-right: 0; }
.sn-col.is-current { background: rgba(255, 255, 255, 0.035); }
.sn-head { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; color: var(--sn-ink); text-decoration: none; }
.sn-head:hover { opacity: 0.85; color: var(--sn-ink); }
.sn-head img { width: 28px; height: 28px; border-radius: 7px; }
.sn-q { color: #fcd643; } .sn-t { color: #ff8a6b; } .sn-r { color: #6f9bf2; } .sn-p { color: #10b981; }
.sn-tag { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--sn-action); color: #fff; font-size: 11px; font-weight: 600; }
.sn-desc { margin: 8px 0 14px; color: var(--sn-dim); font-size: 13.5px; line-height: 1.45; min-height: 3.9em; }
.sn-label { margin: 0 0 10px; color: var(--sn-dim); font-size: 13px; }
.sn-links { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.sn-links a { display: block; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; color: #e4e6f0; font-size: 14.5px; line-height: 1.4; text-decoration: none; }
.sn-links a:hover, .sn-links a[aria-current="page"] { background: rgba(255, 255, 255, 0.07); color: #ffffff; }
.sn-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 22px; border-top: 1px solid var(--sn-line); background: rgba(255, 255, 255, 0.03);
  font-size: 13.5px; color: var(--sn-dim);
}
.sn-foot strong { color: #ffffff; font-weight: 600; }
.sn-foot a { color: #ffffff; text-decoration: none; }
.sn-foot a:hover { text-decoration: underline; color: #ffffff; }
.sn-toggle { display: none; }

@media (max-width: 900px) {
  .sn-header { grid-template-columns: 1fr auto auto; padding: 12px 18px; background: var(--sn-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .sn-header.is-scrolled .sn-logo, .sn-header.is-scrolled > .sn-cta { opacity: 1; pointer-events: auto; }
  .sn-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 0 10px; border: 0; border-radius: 11px; background: var(--sn-nav); cursor: pointer;
  }
  .sn-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
  .sn-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .sn-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .sn-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .sn-nav {
    display: none; position: fixed; inset: 70px 12px auto 12px; max-height: calc(100svh - 86px); overflow-y: auto;
    background: var(--sn-mega); border-radius: 20px; box-shadow: 0 30px 70px rgba(5, 6, 20, 0.45);
  }
  .sn-nav.is-open { display: block; }
  .sn-list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px; background: transparent; box-shadow: none; border-radius: 0; }
  .sn-btn, .sn-link { width: 100%; justify-content: space-between; height: 50px; border-radius: 12px; font-size: 17px; }
  .sn-header.is-scrolled .sn-cta-in, .sn-cta-in { display: none; }
  .sn-mega, .sn-mega--narrow { position: static; transform: none; width: auto; border: 0; border-radius: 0; box-shadow: none; background: transparent; display: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .sn-item.is-open .sn-mega { display: block; }
  .sn-cols--4, .sn-cols--2 { grid-template-columns: 1fr; }
  .sn-col { border-right: 0; border-top: 1px solid var(--sn-line); padding: 16px 14px; }
  .sn-col.is-current { background: transparent; }
  .sn-desc { min-height: 0; }
  .sn-foot { display: none; }
}
@media (max-width: 480px) { .sn-header > .sn-cta { display: none; } }
@media (prefers-reduced-motion: reduce) { .sn-header *, .sn-header { transition: none !important; } }
