/* The header's Menu (v4: shared by the landing page and every role page). On phones and
   mid-size screens (up to 1279px), where the header has no room for the role menu, a
   "Menu" button opens a panel under the header with the four role pages; on phones the
   panel also holds the page's main call to action. A page opts in with
   <header class="nav has-menu">. Loads after fixes.css. */

.lq-menu-btn { display: none; align-items: center; gap: 0.45rem; min-height: 44px; padding: 0 0.75rem; border: 1px solid var(--edge); border-radius: 9px; background: transparent; color: var(--ink); font: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: border-color 0.2s var(--ease-out), background 0.2s var(--ease-out); }
.lq-menu-btn:hover, .lq-menu-btn[aria-expanded="true"] { border-color: rgb(216 195 154 / 0.55); background: rgb(242 234 217 / 0.06); }
.lq-menu-btn svg { width: 1.1rem; height: 1.1rem; overflow: visible; }
.lq-menu-btn svg path { transform-box: fill-box; transform-origin: center; transition: transform 0.2s var(--ease-out); }
/* Two lines become a cross while the panel is open. */
.lq-menu-btn[aria-expanded="true"] .l1 { transform: translateY(4px) rotate(45deg); }
.lq-menu-btn[aria-expanded="true"] .l2 { transform: translateY(-4px) rotate(-45deg); }

/* The panel hangs from the header and covers the page below it. */
.lq-menu { position: absolute; left: 0; right: 0; top: 100%; background: #1b3024; border-bottom: 1px solid var(--edge-soft); box-shadow: 0 18px 32px rgb(0 0 0 / 0.32); }
.lq-menu[hidden] { display: none; }
.lq-menu ul { list-style: none; margin: 0; padding: 0.3rem 0 0.7rem; }
.lq-menu li + li > a { border-top: 1px solid var(--edge-soft); }
.lq-menu li > a { display: grid; grid-template-columns: 2.8rem minmax(0, 1fr) auto; align-items: center; gap: 0.9rem; min-height: 64px; padding: 0.55rem 0; color: var(--ink); }
.lq-menu img { width: 2.8rem; height: 2.8rem; object-fit: contain; filter: drop-shadow(0 4px 8px rgb(0 0 0 / 0.25)); }
.lq-menu b { display: block; font-weight: 600; font-size: 1.02rem; line-height: 1.25; }
.lq-menu small { display: block; font-size: 0.84rem; line-height: 1.35; color: var(--ink-2); }
.lq-menu-go { width: 1.1rem; height: 1.1rem; color: var(--ink-3); transition: transform 0.2s var(--ease-out), color 0.2s var(--ease-out); }
.lq-menu li > a:hover .lq-menu-go, .lq-menu li > a:focus-visible .lq-menu-go { transform: translateX(3px); color: var(--ink); }
.lq-menu li > a:focus-visible { outline-offset: -2px; }
.lq-menu .lq-menu-cta { color: var(--btn-ink); justify-content: center; align-items: center; }

/* Opens with a short drop and fade; closes faster and with less movement. */
.lq-menu.open { animation: lq-menu-in 0.22s var(--ease-out); }
.lq-menu.closing { animation: lq-menu-out 0.14s var(--ease-in) forwards; }
@keyframes lq-menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes lq-menu-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-3px); } }

@media (max-width: 1279px) {
  .has-menu .lq-menu-btn { display: inline-flex; }
}
@media (min-width: 1280px) {
  .lq-menu { display: none !important; }
}
/* The panel's own "Get more information" shows only on phones, where it leaves the header. */
.lq-menu-cta { display: none; }
@media (max-width: 640px) {
  .has-menu .nav-row { column-gap: 0.75rem; }
  .has-menu .nav-cta .btn-sm { display: none; }
  .lq-menu-cta { display: flex; width: 100%; height: 2.9rem; margin: 0.2rem 0 1rem; }
}
/* Narrow phones: a slightly smaller name keeps the header on one line. */
@media (max-width: 380px) {
  .has-menu .brand-name { font-size: 0.95rem; }
  .lq-menu-btn { padding: 0 0.6rem; gap: 0.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lq-menu.open, .lq-menu.closing { animation: none; }
  .lq-menu-btn, .lq-menu-btn svg path, .lq-menu-go { transition: none; }
}
/* 641-860px: both buttons share the header, so the contact button uses its short label. */
@media (min-width: 641px) and (max-width: 860px) {
  .has-menu .nav-cta-long { display: none; }
  .has-menu .nav-cta-short { display: inline; }
}
@media (max-width: 340px) {
  .has-menu .brand-name { font-size: 0.86rem; }
  .has-menu .nav-row { column-gap: 0.5rem; }
}
/* The smallest phones (320px): the gnome stands for the name, which screen readers still hear. */
@media (max-width: 330px) {
  .has-menu .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* With the Menu, the header is one row at every width: the sideways role row is retired and
   anchors only clear one row. */
.has-menu .role-row { display: none !important; }
@media (max-width: 1279px) {
  .has-menu .nav-links { display: none; }
  html:has(.nav.has-menu) [id] { scroll-margin-top: 84px; }
}
/* Gwo for AVImark: not a role, so it sits apart. On wide screens it ends the "For ..." row
   after a divider; in the panel it has its own "Practice software" row under the roles. */
.nav-links .nav-sep { align-self: center; width: 1px; height: 0.95em; background: var(--edge); }
.lq-menu-more { border-top: 1px solid var(--edge); padding: 0.85rem 0 0.6rem; }
.lq-menu-k { margin: 0 0 0.15rem; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.lq-menu-side { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.9rem; min-height: 52px; padding: 0.35rem 0; color: var(--ink); }
.lq-menu-side:hover .lq-menu-go, .lq-menu-side:focus-visible .lq-menu-go { transform: translateX(3px); color: var(--ink); }
.lq-menu-side:focus-visible { outline-offset: -2px; }

/* The page you're on is marked in the panel. */
.lq-menu li > a[aria-current="page"] b { text-decoration: underline; text-decoration-color: var(--mushroom); text-decoration-thickness: 2px; text-underline-offset: 0.3em; }

/* Wide screens: the full "For ..." row, Gwo for AVImark and the contact button share one
   line, so the row is set a little tighter than the 1200px page allows by default. */
@media (min-width: 1280px) {
  .has-menu .nav-row { column-gap: 1.1rem; }
  .has-menu .nav-links { gap: 0.95rem; font-size: 0.86rem; }
}
