/* ============================================================================
   ClaudeLight — product quick access (experiment, 2026-09-13)

   Two candidate fixes for "PIF takes too many clicks to reach", shipped
   together so real visitors can be asked which one they use:

     A. A second level under the Product menu —
        Product › PIF › About PIF / Login PIF, and the same for AMM.
        Markup lives in each page's nav (desktop flyout + mobile rows);
        only the styling is here.

     B. A sticky rail in the bottom-right corner with a PIF tab and an AMM tab,
        each opening the same About / Login pair.
        Markup is injected by assets/product-access.js so it can be
        removed from every page by deleting one <script> line.

   Linked by index, dark, quote, pif and amm AFTER each page's own <style>,
   so page tokens (--white, --rule, --sage, --ink…) are already defined and
   the rail follows whichever theme the page is in.

   When feedback picks a winner, delete the other half of this file, the
   matching markup (A) or the script line (B), and this comment.
   ============================================================================ */

/* ─────────────────────────────────────────────────────────────
   A. Nested Product menu — desktop flyout
   ───────────────────────────────────────────────────────────── */
.nav-flyout { position: relative; }

/* The product row: label left, chevron right. */
.nav-dropdown-menu .nav-flyout-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.nav-flyout-toggle .nav-caret-r {
  width: 12px; height: 12px; flex: 0 0 12px; opacity: 0.6; transition: transform 0.2s;
}
.nav-flyout:hover > .nav-flyout-toggle,
.nav-flyout:focus-within > .nav-flyout-toggle {
  background: var(--sage-light); color: var(--sage);
}
.nav-flyout:hover > .nav-flyout-toggle .nav-caret-r,
.nav-flyout:focus-within > .nav-flyout-toggle .nav-caret-r { transform: translateX(2px); opacity: 1; }

/* The second-level panel, opening to the right of the row. */
.nav-flyout-menu {
  position: absolute; top: -0.4rem; left: calc(100% + 6px); min-width: 170px;
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px var(--shadow-lift, rgba(15,26,20,0.12)); padding: 0.4rem;
  list-style: none; margin: 0; z-index: 51;
  opacity: 0; visibility: hidden; transform: translateX(6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
/* Invisible bridge across the 6px gap so the pointer never "falls off". */
.nav-flyout-menu::before {
  content: ""; position: absolute; top: 0; bottom: 0; right: 100%; width: 10px;
}
.nav-flyout:hover > .nav-flyout-menu,
.nav-flyout:focus-within > .nav-flyout-menu {
  opacity: 1; visibility: visible; transform: translateX(0);
}
.nav-flyout-menu li { margin: 0; }

/* Keyboard users could never open the hover-only Product menu; now Tab does. */
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}

/* Mobile menu: product name becomes a label, About / Login sit beneath it. */
.mobile-menu .mobile-sub-label {
  font-size: 0.9rem; color: var(--ink); padding: 0.25rem 0 0 1rem; margin-bottom: -0.5rem;
}
.mobile-menu a.mobile-sub.mobile-sub2 { padding-left: 2rem; font-size: 0.95rem; }

/* ─────────────────────────────────────────────────────────────
   B. Sticky product rail — bottom-right corner
   ───────────────────────────────────────────────────────────── */
.qa-rail {
  position: fixed; right: 0; bottom: 28px;
  z-index: 90;                     /* under the navbar (100) and mobile menu (99) */
  display: flex; flex-direction: column; gap: 8px;
  font-family: inherit;
}
.qa-item { position: relative; }

/* Styled as the Share tab's mirror image (.cl-share-tab in assets/site-chrome.css): the same size,
   shape, ring, shadow and hover, so the two edge tabs read as one family. */
.qa-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 46px; min-height: 60px; padding: 8px 0;
  background: var(--ink); color: var(--paper);   /* inverts with the theme: dark tab on light, light tab on dark */
  border: 1px solid var(--ink); border-right: 0;
  border-radius: 12px 0 0 12px;
  /* The Share tab's faint light ring: invisible on a light page, but it outlines the tab where the
     page background IS --ink. quote.html's default dark view paints body with var(--ink), which
     swallowed these tabs and left PIF and AMM floating as bare text. */
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 8px 24px rgba(15, 26, 20, 0.12);
  cursor: pointer; font: inherit;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.qa-tab .qa-acronym {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; line-height: 1;
}
/* Gold rule under the acronym — the same family mark as the module logos. */
.qa-tab .qa-acronym::after {
  content: ""; display: block; width: 18px; height: 2px; margin: 5px auto 0;
  background: var(--gold);
}
.qa-tab .qa-free {                /* the Share tab's label type */
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.55rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1;
  color: var(--gold);
}
/* Hover/open goes gold with dark text — the Free-badge pairing — because a
   sage tab vanished against the green hero panels it sits beside. */
.qa-item:hover > .qa-tab,
.qa-item.open > .qa-tab,
.qa-tab:focus-visible {
  background: var(--gold); color: #0f1a14; border-color: var(--gold); transform: translateX(-2px);
}
.qa-item:hover > .qa-tab .qa-acronym::after,
.qa-item.open > .qa-tab .qa-acronym::after,
.qa-tab:focus-visible .qa-acronym::after { background: currentColor; }

/* The share-by-email tab that sat here was replaced (2026-09-21) by the shared
   product Share control — see the .cl-share-* block in assets/site-chrome.css. */
.qa-item:hover > .qa-tab .qa-free,
.qa-item.open > .qa-tab .qa-free,
.qa-tab:focus-visible .qa-free { color: #0f1a14; }
.qa-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.qa-panel {
  position: absolute; right: calc(100% + 8px); bottom: 0; min-width: 200px;
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px var(--shadow-lift, rgba(15,26,20,0.12)); padding: 0.5rem;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.qa-panel::before {                /* hover bridge across the 8px gap */
  content: ""; position: absolute; top: 0; bottom: 0; left: 100%; width: 12px;
}
.qa-panel .qa-title {
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-muted); padding: 0.35rem 0.85rem 0.45rem; white-space: nowrap;
}
.qa-panel a {
  display: block; padding: 0.6rem 0.85rem; border-radius: var(--radius);
  font-size: var(--fs-small, 0.9rem); color: var(--ink); text-decoration: none; white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.qa-panel a:hover, .qa-panel a:focus-visible { background: var(--sage-light); color: var(--sage); }

/* Open on hover only where hover is real; touch relies on the click toggle,
   otherwise a tap's sticky :hover fights the toggle and the panel never closes. */
@media (hover: hover) and (pointer: fine) {
  .qa-item:hover > .qa-panel { opacity: 1; visibility: visible; transform: translateX(0); }
}
.qa-item.open > .qa-panel,
.qa-item:focus-within > .qa-panel { opacity: 1; visibility: visible; transform: translateX(0); }

/* Phones: lift it above the cookie banner's line and shrink the tabs, as the Share tab does. */
@media (max-width: 720px) {
  .qa-rail { bottom: 96px; gap: 6px; transition: transform 0.25s ease, opacity 0.25s ease; }
  .qa-tab { width: 40px; min-height: 44px; padding: 6px 0; }
  .qa-tab .qa-acronym { font-size: 0.68rem; }
  .qa-tab .qa-acronym::after { margin-top: 4px; }
  .qa-tab .qa-free { display: none; }
  /* Slid off the edge while the visitor scrolls down, like the Share tab: a 40px edge tab cannot
     fit a ~16px gutter, so it sat on the ends of text lines (assets/product-access.js). */
  .qa-rail.qa-away { transform: translateX(110%); opacity: 0; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-flyout-menu, .nav-flyout-toggle .nav-caret-r, .qa-tab, .qa-panel, .qa-panel a, .qa-rail { transition: none; }
}
@media print { .qa-rail { display: none; } }
