/* chrome.css — the ONE public-site chrome: header (.bh-nav), theme toggle
   and wipe, gooey nav, and the tokens they need. Loaded by every public
   page on recpt.com.au AND imported by web/src/components/help/HelpShell.tsx,
   so the prerendered help centre and the in-app /help wear the same header
   as pricing, blog and legal. The header markup itself is web/partials/
   bh-nav.html, stamped into pages by scripts/sync_public_chrome.py (pre-commit).
   Never restyle the header in a page, in docs.css, or in Tailwind: edit here. */

/* Theme tokens for the docs/blog/pricing frame. Light on :root, dark on
   [data-theme="dark"], same values as the app (web/src/index.css). The
   toggle lives in js/theme.js. */
:root {
  --ink-2: #222; --hover: #f7f7f7; --active: #f0f0f0; --faint: #8a8a8a;
  --accent-soft: #eef2fd; --accent-line: #c9d6f5; --accent-ink: #1739a8;
}
[data-theme="dark"] {
  --bg: #171717; --ink: #ededed; --ink-2: #e0e0e0; --muted: #a0a0a0; --faint: #6e6e6e;
  --line: #2b2b2b; --soft: #1c1c1c; --hover: #242424; --active: #2e2e2e; --accent: #6b96f2;
  --accent-soft: color-mix(in srgb, #6b96f2 14%, #1c1c1c); --accent-line: color-mix(in srgb, #6b96f2 35%, #1c1c1c); --accent-ink: #a9c1f8;
}

/* ── Header: beui Pro "Morphing navbar" (js/morph-nav.js) ──────────────
   Markup is web/partials/bh-nav.html (stamped by scripts/sync_public_chrome.py)
   and mirrored in web/src/components/help/HelpShell.tsx. One 64rem pill:
   logo left, links centred with a sliding hover pill, Product/Resources
   triggers share ONE dropdown panel that slides to the trigger and resizes,
   Open app right, hamburger morphs to a sheet below lg. Sam 2026-09-22. */
header.bh-nav { position: sticky; top: 0; z-index: 50; margin: 0; max-width: none; display: block; padding: 8px 12px 0; }
@media (min-width: 640px) { header.bh-nav { padding: 8px 20px 0; } }
.mh-bar { position: relative; margin: 0 auto; max-width: 64rem; display: flex; height: 56px; align-items: center; justify-content: space-between; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); background: color-mix(in srgb, var(--bg) 50%, transparent); padding: 0 12px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
@media (min-width: 640px) { .mh-bar { padding: 0 16px; } }
.bh-logo { display: flex; flex-shrink: 0; align-items: center; min-height: 44px; padding: 0 4px; border-radius: 8px; font-weight: 900; font-size: 19px; letter-spacing: -0.5px; color: var(--ink); text-decoration: none; }
.bh-logo .dot { color: var(--accent); }
/* Nudged 25px left of true centre: the right cluster (switch + Open app) is wider than the logo, so dead centre read as right-heavy (Sam 2026-09-22). */
.mh-nav { position: absolute; left: calc(50% - 50px); transform: translateX(-50%); display: none; align-items: center; gap: 4px; }
@media (min-width: 1024px) { .mh-nav { display: flex; } }
.mh-hover { pointer-events: none; position: absolute; top: 2px; bottom: 2px; left: 0; width: 0; border-radius: 999px; background: var(--active); opacity: 0; transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s; }
.mh-nav > a, .mh-nav > button { position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; border-radius: 8px; padding: 8px 12px; font: inherit; font-weight: 500; font-size: 14px; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap; transition: color 0.2s; }
.mh-nav > a:hover, .mh-nav > a.on, .mh-nav > button:hover, .mh-nav > button.on { color: var(--ink); }
.mh-nav svg { width: 14px; height: 14px; transition: transform 0.2s; }
.mh-nav > button.on svg { transform: rotate(180deg); }
.mh-r { display: flex; align-items: center; gap: 8px; }
.burger { position: relative; display: grid; width: 36px; height: 36px; place-items: center; border-radius: 8px; color: var(--ink); background: none; border: 0; cursor: pointer; }
@media (min-width: 1024px) { .burger { display: none; } }
.burger span { position: relative; display: block; height: 14px; width: 16px; }
.burger i { position: absolute; left: 0; height: 2px; width: 100%; border-radius: 999px; background: currentColor; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s; }
.burger i:nth-child(1) { top: 0; } .burger i:nth-child(2) { top: 6px; } .burger i:nth-child(3) { bottom: 0; }
.burger.on i:nth-child(1) { transform: translateY(6px) rotate(45deg); } .burger.on i:nth-child(2) { opacity: 0; } .burger.on i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mh-panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; opacity: 0; pointer-events: none; transform: translateX(var(--x, 0)) translateY(-4px); transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.mh-panel.open { opacity: 1; pointer-events: auto; transform: translateX(var(--x, 0)) translateY(0); }
.mh-panel-in { overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: var(--surface, var(--bg)); padding: 8px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08); transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), height 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.mh-panel-body { position: relative; }
.mh-item-hl { pointer-events: none; position: absolute; top: 0; left: 0; width: 0; height: 0; border-radius: 12px; background: var(--active); opacity: 0; transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), width 0.25s cubic-bezier(0.16, 1, 0.3, 1), height 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s; }
.mh-menu { display: grid; gap: 4px; transition: opacity 0.18s, filter 0.18s; }
.mh-menu.two { grid-template-columns: 1fr 1fr; }
.mh-menu.fade { opacity: 0; filter: blur(4px); }
.mh-menu a { position: relative; z-index: 1; display: block; width: 15rem; border-radius: 12px; padding: 12px; text-decoration: none; }
.mh-menu.one a { width: 11rem; padding: 10px 12px; }
.mh-menu a b { display: block; font-weight: 500; font-size: 14px; color: var(--ink); }
.mh-menu a small { display: block; margin-top: 2px; font-size: 12px; line-height: 20px; color: var(--muted); }
.mh-sheet { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 20; border-radius: 24px; border: 1px solid var(--line); background: var(--surface, var(--bg)); padding: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08); opacity: 0; transform: translateY(-6px); transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.mh-sheet.open { opacity: 1; transform: none; }
@media (max-width: 1023px) { .mh-sheet { display: block; pointer-events: none; } .mh-sheet.open { pointer-events: auto; } }
.mh-sheet p { margin: 0; padding: 8px 12px 4px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.mh-sheet a { display: block; border-radius: 12px; padding: 10px 12px; font-weight: 500; font-size: 15px; color: var(--ink); text-decoration: none; }
.mh-sheet a:hover { background: var(--hover); }
.mh-sheet .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mh-sheet .aud-row { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
/* Audience switch (mock B, Sam 2026-09-22): iOS-style segmented control, white
   thumb on grey, left of Open app. The thumb follows a.on (js/morph-nav.js);
   with no .on on the page it rests on Business, the primary audience. */
.aud { position: relative; display: none; align-items: center; height: 36px; padding: 3px; border-radius: 999px; background: var(--active); font-size: 13px; font-weight: 500; color: var(--muted); }
@media (min-width: 640px) { .aud { display: inline-flex; } }
.aud a { position: relative; z-index: 1; display: flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; color: inherit; text-decoration: none; white-space: nowrap; transition: color 0.25s; }
.aud a.on, .aud a.preview { color: var(--ink); }
.aud i { position: absolute; top: 3px; bottom: 3px; left: 3px; width: var(--w, 50%); border-radius: 999px; background: var(--surface, #fff); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04); transform: translateX(var(--x, 0)); transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.mh-r { gap: 10px; }
@media (prefers-reduced-motion: reduce) { .mh-hover, .mh-panel, .mh-panel-in, .mh-item-hl, .mh-menu, .mh-sheet, .burger i { transition: none; } }

/* Open app = beui ExpandingArrowButton (beui.dev/components/motion/
   expanding-arrow-button), scaled to the header and re-hued: ink body,
   orange tile, ink dotted chevrons. Markup lives in partials/bh-nav.html
   (.eab-tile / .eab-chev / .eab-arrows / .eab-label). On hover or focus the
   tile springs across the button (SPRING_LAYOUT 360/32/0.6 sampled to
   linear()), the single chevron fades, five chevrons fade in staggered
   left to right, the label slides out. Sam 2026-09-21. */
.bh-cta {
  position: relative; display: inline-flex; align-items: center; overflow: hidden; user-select: none;
  height: 44px; min-width: 150px; padding: 5px; border-radius: 15px;
  background: var(--ink); color: var(--bg); text-decoration: none; outline: none;
}
/* index.html has `.nav a` rules; the element+class form outranks them. */
a.bh-cta, a.bh-cta:hover { color: var(--bg); font-size: 15px; }
.bh-cta:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.bh-cta:active { transform: scale(0.97); }
.eab-tile {
  position: absolute; top: 5px; bottom: 5px; left: 5px; z-index: 1; overflow: hidden;
  width: 34px; border-radius: 11px; background: var(--accent); color: #0a0a0a;
  transition: width 0.70s linear(0.0417,0.1047,0.1771,0.2516,0.3241,0.3926,0.4560,0.5138,0.5662,0.6134,0.6557,0.6936,0.7274,0.7575,0.7844,0.8083,0.8295,0.8485,0.8653,0.8802,0.8935,0.9054,0.9159,0.9252,0.9335,0.9409,0.9475,0.9533,0.9585,0.9631,0.9672,0.9709,0.9741,0.9770,0.9795,0.9818,0.9838,0.9856,0.9872,0.9886,0.9899,0.9910,0.9920,0.9929,0.9937,0.9944,0.9950,0.9956,0.9961,0.9965,0.9969,0.9972,0.9975,0.9978,0.9981,0.9983,0.9985,0.9986,0.9988,0.9989,0.9990,0.9991,0.9992,0.9993,0.9994,0.9995,0.9995,0.9996,0.9996,0.9997,0.9997,0.9997,0.9998,0.9998,0.9998,0.9998,0.9999,0.9999,0.9999,0.9999,0.9999,0.9999,0.9999,0.9999,1);
}
.bh-cta:hover .eab-tile, .bh-cta:focus-visible .eab-tile { width: calc(100% - 10px); }
/* White variant (individual landing, Sam 2026-09-22): same anatomy, paper body
   with a hairline, ink label. Wrap the stamped CTA in .bh-cta-light. */
.bh-cta-light .bh-cta, .bh-cta-light a.bh-cta, .bh-cta-light a.bh-cta:hover { background: var(--raised, #fff); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.bh-cta-light .bh-cta:focus-visible { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.eab-chev { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity 0.1s cubic-bezier(0.16, 1, 0.3, 1); }
.eab-chev svg, .eab-arrows svg { width: 14px; height: 20px; }
.bh-cta:hover .eab-chev, .bh-cta:focus-visible .eab-chev { opacity: 0; }
.eab-arrows { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-around; padding: 0 10px; }
.eab-arrows svg { opacity: 0; transform: translateX(-6px); transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1); }
.eab-arrows svg:nth-child(1) { color: rgb(10 10 10 / 1); }
.eab-arrows svg:nth-child(2) { color: rgb(10 10 10 / 0.78); }
.eab-arrows svg:nth-child(3) { color: rgb(10 10 10 / 0.54); }
.eab-arrows svg:nth-child(4) { color: rgb(10 10 10 / 0.32); }
.eab-arrows svg:nth-child(5) { color: rgb(10 10 10 / 0.16); }
.bh-cta:hover .eab-arrows svg, .bh-cta:focus-visible .eab-arrows svg { opacity: 1; transform: translateX(0); }
.bh-cta:hover .eab-arrows svg:nth-child(1) { transition-delay: 0.04s; }
.bh-cta:hover .eab-arrows svg:nth-child(2) { transition-delay: 0.065s; }
.bh-cta:hover .eab-arrows svg:nth-child(3) { transition-delay: 0.09s; }
.bh-cta:hover .eab-arrows svg:nth-child(4) { transition-delay: 0.115s; }
.bh-cta:hover .eab-arrows svg:nth-child(5) { transition-delay: 0.14s; }
.eab-label { position: relative; z-index: 0; margin: 0 16px 0 50px; white-space: nowrap; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; transition: opacity 0.12s cubic-bezier(0.16, 1, 0.3, 1), transform 0.12s cubic-bezier(0.16, 1, 0.3, 1); }
.bh-cta:hover .eab-label, .bh-cta:focus-visible .eab-label { opacity: 0; transform: translateX(6px); }
@media (prefers-reduced-motion: reduce) { .eab-tile, .eab-chev, .eab-arrows svg, .eab-label { transition: none; } }

/* ── Theme toggle + wipe (js/theme.js), mirrors the app ─────────────── */
.theme-toggle { display: inline-grid; place-items: center; width: 36px; height: 36px; margin-left: 10px; border-radius: 100px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); cursor: pointer; padding: 0; flex: none; }
.theme-toggle:hover { background: var(--hover); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .tt-sun { display: none; }
[data-theme="dark"] .theme-toggle .tt-moon { display: none; }
[data-theme="dark"] .theme-toggle .tt-sun { display: block; }
html[data-vt="rect"]::view-transition-old(root) { animation: none; mix-blend-mode: normal; }
html[data-vt="rect"]::view-transition-new(root) { mix-blend-mode: normal; animation: vt-rect-reveal 400ms ease-out; }
@keyframes vt-rect-reveal { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }

