/* Aquila portal shell (2026-10-15, Luke): the sidebar with every part of the hub on the left, the page on the right. Layout after Tim de Greeuw's
   Business OS, skin from base.css. From 1024px the sidebar stands fixed and the body moves right; narrower it is a drawer behind the menu button
   in the bar that replaced the old top bar. The fixed docks and fades of the pages shift with it so they stay centred on the page. */
:root { --aq-side-w: 248px; }

.aqs { position: fixed; z-index: 26; left: 0; top: 0; bottom: 0; width: var(--aq-side-w); display: flex; flex-direction: column; padding: calc(18px + env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px)); background: #010612; border-right: 0.5px solid var(--line-soft); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.aqs::-webkit-scrollbar { display: none; }
.aqs-brand { display: grid; gap: 6px; padding: 4px 10px 16px; text-decoration: none; overflow: hidden; }
.aqs-brand img { display: block; height: 26px; width: auto; }
.aqs-brand span { white-space: nowrap; font: 600 10.5px/1.3 var(--body); text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-3); }
.aqs-find { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0.5px solid var(--line); border-radius: 10px; background: var(--block); color: var(--ink-3); font: 500 13px/1.2 var(--body); white-space: nowrap; overflow: hidden; cursor: pointer; text-align: left; transition: background-color 0.15s, color 0.15s; }
.aqs-find:hover { background: rgba(255,255,255,0.07); color: var(--ink-2); }
.aqs-find svg { width: 14px; height: 14px; flex: none; }
.aqs-find kbd { margin-left: auto; font: 600 11px/1 var(--body); color: var(--ink-3); border: 0.5px solid var(--line); border-radius: 6px; padding: 3px 5px; }
.aqs-grp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; margin-top: 16px; }
.aqs-grp > span { white-space: nowrap; overflow: hidden; padding: 0 10px 6px; font: 600 10.5px/1.3 var(--body); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); }
.aqs-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; font: 500 13.5px/1.2 var(--body); color: var(--ink-2); white-space: nowrap; overflow: hidden; transition: background-color 0.15s, color 0.15s; }
.aqs-item svg { flex: none; width: 16px; height: 16px; color: var(--ink-3); transition: color 0.15s; }
.aqs-item:hover { background: var(--block); color: var(--ink); }
.aqs-item[aria-current="page"] { background: rgba(255,255,255,0.08); color: var(--ink); }
.aqs-item[aria-current="page"] svg { color: var(--gold); }
.aqs-item .aqs-ext { margin-left: auto; width: 12px; height: 12px; opacity: 0.6; }
.aqs-fold { margin-top: auto; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--ink-3); font: 500 13.5px/1.2 var(--body); white-space: nowrap; overflow: hidden; text-align: left; cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.aqs-fold:hover { background: var(--block); color: var(--ink); }
.aqs-fold svg { flex: none; width: 16px; height: 16px; }
.aqs-fold kbd { margin-left: auto; font: 600 11px/1 var(--body); color: var(--ink-3); border: 0.5px solid var(--line); border-radius: 6px; padding: 3px 5px; }
.aqs-me { margin-top: 8px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 0.5px solid var(--line-soft); }
.aqs-av { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.08); border: 0.5px solid var(--line); color: var(--ink); font: 600 12px/1 var(--body); }
.aqs-who { min-width: 0; }
.aqs-who b, .aqs-who small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aqs-who b { font: 600 13px/1.3 var(--body); color: var(--ink); }
.aqs-who small { font: 500 12px/1.3 var(--body); color: var(--ink-3); }
.aqs-out { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--ink-3); cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.aqs-out:hover { background: var(--block); color: var(--ink); }
.aqs-out svg { width: 16px; height: 16px; }

/* narrow screens: the bar where the old top bar stood, with the menu button */
.aqs-bar { margin: 16px 0 0; display: none; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 0.5px solid var(--line); border-radius: var(--r-block); background: rgba(2,9,24,0.82); }
.aqs-bar img { display: block; height: 24px; width: auto; }
.aqs-menu { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--ink); cursor: pointer; transition: background-color 0.15s; }
.aqs-menu:hover { background: var(--block); }
.aqs-menu svg { width: 18px; height: 18px; }
.aqs-bar .aqs-find { width: auto; margin-left: auto; padding: 8px; border-radius: 50px; }
.aqs-bar .aqs-find span, .aqs-bar .aqs-find kbd { display: none; }
/* folded (Luke, 2026-10-15): a 60px strip of icons; the icons keep their place, the words fade and the edge clips them, the names show
   beside the icons on hover (shell.js tipFor). Width and page move 1.2 s, only while aqs-anim is on (a fold, never a page load). */
.aqs-tip { position: fixed; z-index: 61; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 0.5px solid var(--line); border-radius: 8px; background: #071022; box-shadow: 0 12px 32px rgba(0,0,0,0.5); color: var(--ink); font: 500 12.5px/1.2 var(--body); white-space: nowrap; pointer-events: none; opacity: 0; transform: translateY(-50%); transition: opacity 0.15s; }
.aqs-tip.on { opacity: 1; }
.aqs-tip kbd { font: 600 11px/1 var(--body); color: var(--ink-3); border: 0.5px solid var(--line); border-radius: 6px; padding: 3px 5px; }
@media (min-width: 1024px) {
  :root.aqs-mini { --aq-side-w: 60px; }
  .aqs-l, .aqs-grp > span, .aqs-brand span, .aqs-find span, .aqs-find kbd, .aqs-fold kbd, .aqs-who, .aqs-ext { transition: opacity 1.2s var(--ease); }
  .aqs-brand img { transition: clip-path 1.2s var(--ease), transform 1.2s var(--ease); }
  .aqs-mini .aqs-l, .aqs-mini .aqs-grp > span, .aqs-mini .aqs-brand span, .aqs-mini .aqs-find span, .aqs-mini .aqs-find kbd, .aqs-mini .aqs-fold kbd, .aqs-mini .aqs-ext { opacity: 0; pointer-events: none; }
  .aqs-mini .aqs-brand img { clip-path: inset(0 calc(100% - 28px) 0 0); transform: translateX(-6px); }
  .aqs-mini .aqs-me { grid-template-columns: 1fr; justify-items: center; gap: 6px; padding-inline: 0; }
  .aqs-mini .aqs-who { display: none; }
}
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .aqs-anim .aqs { transition: width 1.2s var(--ease); }
  .aqs-anim body.aq-shell { transition: padding-left 1.2s var(--ease); }
  .aqs-anim .aqs-as { transition: left 1.2s var(--ease); }
}
@media (max-width: 1023px) { .aqs-fold { display: none; } .aqs-me { margin-top: auto; } }
.aqs-scrim { position: fixed; inset: 0; z-index: 48; background: rgba(1,6,15,0.6); opacity: 0; pointer-events: none; transition: opacity 0.45s var(--ease); }

@media (min-width: 1024px) {
  body.aq-shell { padding-left: calc(var(--aq-side-w) + 16px); }
  /* fixed elements of the pages: centred on the page, not on the window */
  body.aq-shell .dock, body.aq-shell .selbar, body.aq-shell .notice, body.aq-shell .backdock { left: calc(50% + var(--aq-side-w) / 2); max-width: calc(100vw - var(--aq-side-w) - 32px); }
  body.aq-shell .bottom-fade { left: var(--aq-side-w); }
  body.aq-shell .nf-panel { left: calc(var(--aq-side-w) + 16px); }
}
/* Q4 Projects: the contents card on the right needs the window minus the sidebar to be as wide as 1300px was without it */
@media (min-width: 1024px) and (max-width: 1567px) {
  body.aq-shell .layout { display: block; }
  body.aq-shell .layout > .wrap { max-width: 960px; margin: 0 auto; }
  body.aq-shell .toc-col { display: none; }
}
@media (hover: hover) and (min-width: 1024px) and (max-width: 1567px) { body.aq-shell .layout { padding-left: 40px; } }
@media (max-width: 1023px) {
  .aqs { z-index: 50; width: min(var(--aq-side-w), 84vw); transform: translateX(-102%); transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); }
  .aqs-open .aqs { transform: none; box-shadow: 30px 0 80px rgba(0,0,0,0.6); }
  .aqs-open .aqs-scrim { opacity: 1; pointer-events: auto; }
  .aqs-bar { display: flex; }
}
@media (prefers-reduced-motion: reduce) { .aqs, .aqs-scrim, .aqs-l, .aqs-grp > span, .aqs-brand span, .aqs-brand img, .aqs-find span, .aqs-find kbd, .aqs-fold kbd, .aqs-who, .aqs-ext { transition: none; } }

/* search: go to any part of the hub (Cmd K or Ctrl K) */
.aqk { position: fixed; inset: 0; z-index: 60; display: grid; align-items: start; justify-items: center; padding: 12vh 16px 16px; background: rgba(1,6,15,0.66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.aqk[hidden] { display: none; }
.aqk-in { width: min(520px, 100%); border: 0.5px solid var(--line); border-radius: 18px; background: #071022; box-shadow: 0 30px 80px rgba(0,0,0,0.6); overflow: hidden; animation: aq-reveal 1.2s var(--ease); }
.aqk input { width: 100%; height: 52px; padding: 0 18px; border: 0; border-bottom: 0.5px solid var(--line-soft); background: transparent; color: var(--ink); font: 500 15px/1 var(--body); outline: none; }
.aqk input::placeholder { color: var(--ink-3); }
.aqk ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.aqk li a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; font: 500 14px/1.2 var(--body); color: var(--ink-2); }
.aqk li a svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.aqk li a small { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.aqk li a.on { background: rgba(255,255,255,0.08); color: var(--ink); }
.aqk li a.on svg { color: var(--gold); }
.aqk-none { padding: 14px 12px; font-size: 13.5px; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .aqk-in { animation: none; } }

/* a page this person may not open (shell.js deny): the page goes, a card says so */
.aqs-denied .aq-gate { display: none !important; }
.aqs-deny { position: relative; min-height: 80vh; display: grid; place-items: center; padding-block: 64px; }
.aqs-deny > .aqs-menu { position: absolute; top: 16px; left: 0; display: none; }
.aqs-deny-in { max-width: 460px; display: grid; gap: 12px; justify-items: start; padding: 28px; border-radius: var(--r-card); border: 0.5px solid var(--line); background: #071022; background-image: var(--card); animation: aq-reveal 1.2s var(--ease); }
.aqs-deny-in h2 { margin: 0; font: 500 24px/1.2 var(--display); font-stretch: 118%; color: var(--ink); text-wrap: balance; }
.aqs-deny-in p { margin: 0; font: 400 14.5px/1.55 var(--body); color: var(--ink-2); }
.aqs-deny-in .btn { text-decoration: none; }
@media (max-width: 1023px) { .aqs-deny > .aqs-menu { display: inline-grid; } }
@media (prefers-reduced-motion: reduce) { .aqs-deny-in { animation: none; } }

/* the Toegang page previews another person's menu (AQ.shellPreview). No yellow text anywhere in the portal (Luke, 2026-10-15): gold only for lines, icons and filled badges with dark text */
.aqs-as { position: fixed; z-index: 27; top: 0; left: var(--aq-side-w); right: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: calc(10px + env(safe-area-inset-top, 0px)) 24px 10px; background: rgba(10,20,44,0.94); backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%); border-bottom: 0.5px solid var(--gold-line); color: var(--ink); font: 500 13px/1.4 var(--body); }
.aqs-as b { color: var(--ink); font-weight: 600; }
.aqs-as button { margin-left: auto; cursor: pointer; border: 0.5px solid var(--gold-line); background: none; color: var(--ink); border-radius: 50px; padding: 6px 12px; font: 600 12.5px/1 var(--body); white-space: nowrap; transition: background-color 0.15s; }
.aqs-as button:hover { background: var(--gold-tint); }
.aqs-previewing .aqs { box-shadow: inset -1px 0 0 var(--gold-line); }
@media (max-width: 1023px) { .aqs-as { left: 0; padding-inline: 16px; } }

/* parts this person may only read (shell.js sets aqs-ro-<part> on <html>) */
.aqs-ro-icp [data-star] { pointer-events: none; cursor: default; }
