/* The Vix site menu (round 4, rows 21, 22 and 60 of the 11/17 Tella): the condensed side drawer. Markup from
   design-lab/vix-site/menu/menu.mjs, behavior in vix-menu.js. The identity's tokens only (system/tokens.css): Gloock
   for the six rows, Figtree small caps for the rows under them, the purple dot for the page you are on, hairline
   rules, flat paper. Light by default, dark with the theme switch. */

/* ---------------------------------------------------------------- the top bar
   As live v5 has it (Anthony, 11/17: "I just want Case studies and About us in the main nav, hamburger gets the full
   meat and potatoes"): the logo, Case studies, About us, Client login, the button, the dark switch where a page has
   one, the menu button. Three small things only: nothing in it wraps, the menu button's focus ring is the house
   purple, and at 900 and below the dark switch moves into the drawer, so only the logo, the button and the menu
   button show. */
.nav a.l, .nav a.login, .nav .btn { white-space: nowrap; }
.nav .menu:focus-visible { outline: 2px solid var(--orb, #5b2fe6); outline-offset: 3px; }
@media (max-width: 900px) { .nav .theme { display: none; } }

/* ---------------------------------------------------------------- the drawer */
/* the page behind holds still while it is open */
html.menu-open { overflow: hidden; }
html.menu-open body { padding-right: var(--vxd-sbw, 0px); }
dialog.vxd { --pad: var(--s6, 32px); box-sizing: border-box; position: fixed; inset: 0 0 0 auto; width: min(440px, 100vw); height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-left: var(--rule, 2px) solid var(--ink, #121212); border-radius: 0; background: var(--bg, #f8f6f1); color: var(--ink, #121212); font-family: var(--body, system-ui, sans-serif); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
dialog.vxd[open] { display: flex; flex-direction: column; }
dialog.vxd::backdrop { background: rgba(18, 14, 30, .4); }
.vxd ul { list-style: none; margin: 0; padding: 0; }
.vxd a, .vxd button { -webkit-tap-highlight-color: transparent; }
.vxd a:focus-visible, .vxd button:focus-visible { outline: 2px solid var(--orb, #5b2fe6); outline-offset: 2px; }

/* the head: the mark and the close button, on a heavy rule */
.vxd-head { position: sticky; top: 0; z-index: 2; flex: none; display: flex; align-items: center; justify-content: space-between; height: 68px; padding: 0 calc(var(--pad) - 11px) 0 var(--pad); background: var(--bg, #f8f6f1); border-bottom: var(--rule, 2px) solid var(--ink, #121212); }
.vxd-mark { display: block; width: 62px; height: 44px; background: currentColor; -webkit-mask: url(../shared/brand/vix-logo.svg) no-repeat left center / 62px 26px; mask: url(../shared/brand/vix-logo.svg) no-repeat left center / 62px 26px; }
.vxd-x { position: relative; width: 44px; height: 44px; flex: none; border: 0; background: none; color: inherit; cursor: pointer; }
.vxd-x i::before, .vxd-x i::after { content: ""; position: absolute; left: 10px; right: 10px; top: 21px; height: 2px; background: currentColor; transform: rotate(45deg); }
.vxd-x i::after { transform: rotate(-45deg); }

/* the six rows: Gloock, a hairline under each */
.vxd-nav { flex: 1 0 auto; padding: var(--s2, 8px) var(--pad) var(--s6, 32px); }
.vxd-top > li { border-bottom: 1px solid var(--line, #e0dbd0); }
.vxd-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font: 400 clamp(28px, 2.4vw, 32px)/1.1 var(--display, Georgia, serif); letter-spacing: 0; text-align: left; text-transform: none; text-decoration: none; cursor: pointer; }
.vxd-row > span { flex: 1; }
a.vxd-row, .vxd-row > span { transition: transform var(--t-quick, .2s) var(--ease, ease); transform-origin: left center; }
a.vxd-row:hover, .vxd-row:hover > span { transform: translateX(6px); }
/* plus, then minus when it is open */
.vxd-row > i, .vxd-tog > i { position: relative; flex: none; width: 16px; height: 16px; }
.vxd-row > i { margin-right: 14px; }
.vxd-row > i::before, .vxd-row > i::after, .vxd-tog > i::before, .vxd-tog > i::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px; background: currentColor; transition: transform .26s var(--ease, ease); }
.vxd-row > i::after, .vxd-tog > i::after { transform: rotate(90deg); }
[aria-expanded="true"] > i::after { transform: rotate(0deg); }
/* the purple dot: the page you are on (or the section it sits in) */
.vxd [aria-current]::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--orb, #5b2fe6); }

/* a panel: every link is in the page, a closed panel is collapsed by height, out of sight and inert */
.vxd-panel { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .26s var(--ease, ease), visibility 0s; }
.vxd-panel[inert] { grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .26s var(--ease, ease), visibility 0s .26s; }
.vxd-clip { min-height: 0; overflow: hidden; margin-inline: -6px; padding-inline: 6px; }

/* under a row: Figtree small caps, each a link to its page with a toggle to its own pages */
.vxd .vxd-subs { padding-bottom: var(--s4, 16px); }
.vxd-sub { display: flex; align-items: center; min-height: 44px; }
.vxd-sub > a { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 44px; color: inherit; font: 600 var(--label, 13px)/1.2 var(--body, system-ui, sans-serif); letter-spacing: .09em; text-transform: uppercase; text-decoration: none; }
.vxd-sub > a b { min-width: 2.2ch; font-weight: 600; color: var(--muted, #5c5a55); }
.vxd-sub > a:hover span, .vxd-leaves a:hover, .vxd-all a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.vxd-tog { flex: none; width: 44px; height: 44px; display: grid; place-items: center; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; cursor: pointer; }
.vxd-tog > i { width: 12px; height: 12px; }
.vxd-all { margin: 0; }
.vxd-all a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--muted, #5c5a55); font: 500 15px/1.2 var(--body, system-ui, sans-serif); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.vxd-all a:hover, .vxd-all a[aria-current] { color: inherit; }
/* the pages under that: plain Figtree on a thin rule */
.vxd .vxd-leaves { --in: 20px; margin: 0 0 var(--s3, 12px) 8px; padding-left: var(--in); border-left: 1px solid var(--line, #e0dbd0); }
.vxd-leaves a { position: relative; display: flex; align-items: center; min-height: 40px; color: inherit; font: 400 16px/1.25 var(--body, system-ui, sans-serif); text-decoration: none; }
.vxd-leaves a[aria-current] { font-weight: 500; }
.vxd-leaves a[aria-current]::before { position: absolute; left: calc(-1 * var(--in) - 4.5px); top: calc(50% - 4px); }

/* the foot: the one action, the audit, the login */
.vxd-foot { flex: none; display: grid; gap: var(--s2, 8px); padding: var(--s5, 24px) var(--pad) calc(var(--s5, 24px) + env(safe-area-inset-bottom, 0px)); border-top: var(--rule, 2px) solid var(--ink, #121212); }
.vxd-foot .vxd-cta { width: 100%; min-height: 52px; }
.vxd-also { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--s5, 24px); margin: 0; }
.vxd-also a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; font: 500 16px/1.2 var(--body, system-ui, sans-serif); }
.vxd-alt { font-weight: 600; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.vxd-login { color: var(--muted, #5c5a55) !important; text-decoration: none; }
.vxd-login:hover { text-decoration: underline; text-underline-offset: 5px; }
.vxd-theme { display: none; align-items: center; gap: var(--s3, 12px); min-height: 44px; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: 500 15px/1 var(--body, system-ui, sans-serif); cursor: pointer; justify-self: start; }
.vxd-theme i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.vxd-theme[aria-pressed="true"] i { background: linear-gradient(90deg, transparent 50%, currentColor 50%); }
@media (max-width: 900px) { .vxd-theme { display: inline-flex; } }

/* a phone: the drawer is the screen, every row a 44 px target */
@media (max-width: 480px) {
  dialog.vxd { --pad: var(--s5, 24px); width: 100vw; border-left: 0; }
  .vxd-leaves a { min-height: 44px; }
}
@media (pointer: coarse) { .vxd-leaves a { min-height: 44px; } }

/* it opens at once: the panel is whole from the first frame and settles a few pixels, no fade through */
@media (prefers-reduced-motion: no-preference) {
  dialog.vxd[open] { animation: vxd-in .18s var(--ease, ease); }
  dialog.vxd[open]::backdrop { animation: vxd-dim .18s linear; }
  @keyframes vxd-in { from { transform: translateX(28px); } }
  @keyframes vxd-dim { from { opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { .vxd-panel, .vxd-panel[inert], .vxd-row > i::after, .vxd-tog > i::after, a.vxd-row, .vxd-row > span { transition: none; } }

/* ---------------------------------------------------------------- site search (lane 12/02, app/pages/search.vue)
   The header's search door: a glass in the ink beside the dark switch, on wide screens; at 900 and below it steps
   aside like the switch and the drawer's field takes over. The drawer's field: a glass, the field, a hairline, above
   the six rows; a plain form to /search/?q=. */
.nav .find { width: 44px; height: 44px; flex: none; display: grid; place-items: center; color: inherit; text-decoration: none; }
.nav .find:focus-visible { outline: 2px solid var(--orb, #5b2fe6); outline-offset: 3px; }
.nav .find i, .vxd-find > i { position: relative; display: block; flex: none; width: 20px; height: 20px; }
.nav .find i::before, .vxd-find > i::before { content: ""; position: absolute; left: 0; top: 0; width: 15px; height: 15px; box-sizing: border-box; border: 2px solid currentColor; border-radius: 50%; }
.nav .find i::after, .vxd-find > i::after { content: ""; position: absolute; left: 12.5px; top: 13.5px; width: 7px; height: 2px; background: currentColor; transform: rotate(45deg); transform-origin: 0 50%; }
.nav .find[aria-current] { color: var(--orb, #5b2fe6); }
@media (max-width: 900px) { .nav .find { display: none; } }
.vxd-find { flex: none; display: flex; align-items: center; gap: 12px; margin: var(--s3, 12px) var(--pad) 0; border-bottom: 1px solid var(--ink, #121212); }
.vxd-find label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.vxd-find input { flex: 1; min-width: 0; min-height: 52px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font: 400 17px/1.3 var(--body, system-ui, sans-serif); -webkit-appearance: none; appearance: none; }
.vxd-find input::placeholder { color: var(--muted, #5c5a55); opacity: 1; }
.vxd-find input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.vxd-find input:focus-visible { outline: 2px solid var(--orb, #5b2fe6); outline-offset: 4px; }
