/* ============================================================================
   Just in Time — the shared corner (shell.js draws it). Feedback · Docs · Ask (Octi) · bell · who you are.
   ONE kit for every app we make (Alex 2026-10-07: "everything that can be shared is shared"): the share step
   copies this file and shell.js beside tokens.css; no app keeps its own copy. Reads tokens.css names only,
   so a theme (themes/adinkra.css) changes values, never parts. Every class is prefixed `as-` and sets its
   own type, colour and box, so a host page's global button styles cannot bleed in.
   Spec: docs/superpowers/specs/2026-10-07-shared-app-shell-design.md
   ============================================================================ */
.as-bar { position: sticky; top: 0; z-index: 2147482000; display: flex; justify-content: flex-end;
  padding: 10px 16px; background: var(--jit-paper); border-bottom: 1px solid var(--jit-line); }
.as-corner { display: flex; align-items: center; gap: 6px; font: 500 13.5px/1 var(--jit-body); color: var(--jit-ink); }
.as-btn, .as-icon, .as-av { box-sizing: border-box; margin: 0; display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 11px; border: 1px solid var(--jit-line); border-radius: var(--jit-r-m);
  background: var(--jit-surface); color: var(--jit-ink); font: 500 13.5px/1 var(--jit-body); cursor: pointer;
  text-decoration: none; white-space: nowrap; position: relative; -webkit-appearance: none; appearance: none; }
.as-btn:hover, .as-icon:hover, .as-av:hover { border-color: var(--jit-faint); }
.as-btn:focus-visible, .as-icon:focus-visible, .as-av:focus-visible, .as-panel button:focus-visible,
.as-pop button:focus-visible { outline: 2px solid var(--jit-accent); outline-offset: 2px; }
.as-btn[aria-expanded="true"], .as-icon[aria-expanded="true"] { background: var(--jit-tint); }
.as-icon { width: 34px; padding: 0; justify-content: center; }
.as-av { width: 32px; padding: 0; justify-content: center; border-radius: var(--jit-pill); border-color: var(--jit-ink);
  background: var(--jit-tint); font: 500 12px/1 var(--jit-mono); }
.as-count { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box;
  border-radius: var(--jit-pill); background: var(--jit-accent); color: var(--jit-on-accent);
  font: 500 10.5px/17px var(--jit-mono); text-align: center; }
.as-glyph { width: 15px; height: 15px; flex: none; }
.as-small { display: none; }       /* Feedback and Docs show words on a wide screen, an icon on a phone */

/* popovers: Feedback, Docs, the bell, who you are */
.as-pop { position: fixed; z-index: 2147483001; width: 330px; max-width: calc(100vw - 24px); box-sizing: border-box;
  padding: 12px; background: var(--jit-surface); color: var(--jit-ink); border: 1px solid var(--jit-line);
  border-radius: var(--jit-r-l); box-shadow: 0 10px 28px color-mix(in srgb, var(--jit-ink) 12%, transparent); font: 14px/1.45 var(--jit-body); text-align: left; }
.as-pop[hidden], .as-panel[hidden], .as-pf[hidden] { display: none; }
.as-pop textarea, .as-pf textarea, .as-box textarea { box-sizing: border-box; width: 100%; resize: none; outline: 0;
  margin: 0; border: 1px solid var(--jit-line); border-radius: var(--jit-r-m); padding: 9px 10px;
  background: var(--jit-surface); color: var(--jit-ink); font: 14px/1.45 var(--jit-body); }
.as-pop textarea:focus, .as-pf textarea:focus { border-color: var(--jit-faint); }
.as-pop textarea { height: 96px; }
.as-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 9px; }
.as-note { color: var(--jit-mute); font: 12px/1.35 var(--jit-body); }
.as-capture-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.as-capture-row .as-btn { padding: 0 9px; font-size: 12px; }
.as-capture-row .as-btn[disabled] { opacity: .45; cursor: default; }
.as-capture-row [hidden], .as-capture-state [hidden] { display: none; }
.as-capture-state { margin-top: 7px; color: var(--jit-mute); font: 12px/1.4 var(--jit-body); }
.as-capture-mic { display: inline; margin: 0; padding: 0 3px; border: 1px solid var(--jit-line);
  border-radius: var(--jit-r-s); background: var(--jit-surface); color: var(--jit-ink);
  font: inherit; cursor: pointer; }
.as-capture-mic[aria-checked="true"] { background: var(--jit-tint); }
.as-go { box-sizing: border-box; margin: 0; border: 0; border-radius: var(--jit-r-m); padding: 8px 13px; cursor: pointer;
  background: var(--jit-ink); color: var(--jit-on-panel); font: 500 13.5px/1 var(--jit-body); white-space: nowrap; }
.as-go[disabled] { opacity: .45; cursor: default; }
.as-link { margin: 0; padding: 0; border: 0; background: none; cursor: pointer; color: var(--jit-ink);
  font: 500 13.5px/1 var(--jit-body); }
.as-h { margin: 0 0 8px; font: 500 11.5px/1.3 var(--jit-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--jit-mute); }
.as-item { display: block; padding: 9px 0; border-top: 1px solid var(--jit-line); color: var(--jit-ink); text-decoration: none; }
.as-item:first-of-type { border-top: 0; }
.as-item b { display: block; font: 500 11px/1.4 var(--jit-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--jit-accent); }
.as-item.answered b { color: var(--jit-mute); }
.as-item span { display: block; font: 14px/1.4 var(--jit-body); }
.as-item small { display: block; color: var(--jit-mute); font: 12px/1.4 var(--jit-mono); margin-top: 2px; }
.as-handle { font: 500 14px/1.3 var(--jit-mono); }
.as-item .as-reply { display: block; margin-top: 5px; color: var(--jit-ink); font: 14px/1.45 var(--jit-body);
  white-space: pre-wrap; overflow-wrap: anywhere; }

/* the panel: Octi on the side */
.as-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 2147483000; width: 384px; max-width: 100vw;
  box-sizing: border-box; display: flex; flex-direction: column; background: var(--jit-surface); color: var(--jit-ink);
  border-left: 1px solid var(--jit-line); box-shadow: -10px 0 28px color-mix(in srgb, var(--jit-ink) 10%, transparent); font: 14.5px/1.5 var(--jit-body); }
.as-panel.as-wide { width: 640px; }
.as-ph { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 12px 12px 16px;
  border-bottom: 1px solid var(--jit-line); }
.as-ph .as-t { font: 600 15px/1.2 var(--jit-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-tools { display: flex; align-items: center; gap: 2px; }
.as-tool { box-sizing: border-box; margin: 0; height: 30px; min-width: 30px; padding: 0 7px; border: 0; border-radius: var(--jit-r-s);
  background: none; color: var(--jit-mute); cursor: pointer; font: 500 13.5px/1 var(--jit-body); display: inline-flex;
  align-items: center; justify-content: center; }
.as-tool:hover { background: var(--jit-tint); color: var(--jit-ink); }
.as-tool.as-word { color: var(--jit-ink); }
.as-pb { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.as-empty { margin: auto 0; text-align: center; color: var(--jit-mute); }
.as-empty .as-hi { margin-top: 8px; color: var(--jit-ink); font: 600 15px/1.4 var(--jit-body); }
.as-ctx { display: inline-block; max-width: 100%; box-sizing: border-box; margin-top: 12px; padding: 5px 11px;
  border: 1px solid var(--jit-line); border-radius: var(--jit-pill); font: 12.5px/1.35 var(--jit-body); color: var(--jit-mute); }
.as-starts { display: grid; gap: 7px; margin-top: 16px; text-align: left; }
.as-start { box-sizing: border-box; margin: 0; padding: 10px 12px; border: 1px solid var(--jit-line); border-radius: var(--jit-r-l);
  background: var(--jit-surface); color: var(--jit-ink); cursor: pointer; text-align: left; font: 14px/1.4 var(--jit-body); }
.as-start:hover { background: var(--jit-tint); }
.as-you { align-self: flex-end; max-width: 85%; padding: 9px 12px; border-radius: 12px; background: var(--jit-tint);
  white-space: pre-wrap; overflow-wrap: anywhere; }
.as-octi { display: flex; gap: 10px; align-items: flex-start; }
.as-octi .as-glyph { width: 22px; height: 22px; margin-top: 1px; }
.as-empty .as-glyph { width: 40px; height: 40px; }
/* On a wide screen the page makes room for the panel, as ElevenLabs' does, so the page and the corner
   stay visible beside it; on a narrow one the panel covers the page and closes with its own ✕. */
@media (min-width: 1100px) {
  html.as-docked body { margin-right: 384px; }
  html.as-docked.as-docked-wide body { margin-right: 640px; }
  html.as-docked .as-panel { box-shadow: none; }
}
.as-a { white-space: pre-wrap; overflow-wrap: anywhere; }
.as-a.as-quiet { color: var(--jit-mute); }
.as-from { margin-top: 4px; color: var(--jit-mute); font: 11.5px/1.4 var(--jit-mono); }
.as-hist { box-sizing: border-box; width: 100%; margin: 0; padding: 10px 0; border: 0; border-top: 1px solid var(--jit-line);
  background: none; cursor: pointer; text-align: left; color: var(--jit-ink); font: 14px/1.4 var(--jit-body); }
.as-hist small { display: block; color: var(--jit-mute); font: 12px/1.4 var(--jit-mono); }
.as-pfoot { padding: 0 12px 14px; }
.as-pf { margin-bottom: 10px; border: 1px solid var(--jit-line); border-radius: var(--jit-r-l); background: var(--jit-surface); }
.as-pfh { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 8px 12px;
  border-bottom: 1px solid var(--jit-line); color: var(--jit-mute); font: 13px/1.3 var(--jit-body); }
.as-pf textarea { display: block; width: calc(100% - 20px); height: 74px; margin: 10px 10px 0; }
.as-pff { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 10px; }
.as-pff .as-go { padding: 7px 10px; font-size: 13px; }
.as-kbd { margin-left: 5px; opacity: .7; font: 11px/1 var(--jit-body); }
.as-box { border: 1px solid var(--jit-line); border-radius: 16px; padding: 10px 10px 7px; background: var(--jit-surface); }
.as-box textarea { border: 0; padding: 2px 4px; height: 44px; }
.as-boxrow { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.as-voice { color: var(--jit-mute); font: 11.5px/1 var(--jit-mono); }
.as-send { box-sizing: border-box; margin: 0; width: 32px; height: 32px; border: 0; border-radius: var(--jit-pill);
  background: var(--jit-ink); color: var(--jit-on-panel); cursor: pointer; display: grid; place-items: center; }
.as-send[disabled] { opacity: .35; cursor: default; }

/* Frank (cfg.ask.kind "frank"): the same panel floating, Notion's chat window, or docked as the right bar;
   the blue button bottom right opens it; Talk starts a spoken turn in the same conversation. Tokens only. */
.as-panel.as-float { top: auto; right: 22px; bottom: 22px; width: 400px; height: min(640px, calc(100vh - 44px));
  border: 1px solid var(--jit-line); border-radius: var(--jit-r-l);
  box-shadow: 0 18px 48px color-mix(in srgb, var(--jit-ink) 18%, transparent); }
.as-fab { position: fixed; right: 22px; bottom: 22px; z-index: 2147482999; box-sizing: border-box; width: 54px; height: 54px;
  margin: 0; padding: 0; border: 0; border-radius: var(--jit-pill); background: var(--jit-accent); color: var(--jit-on-accent);
  cursor: pointer; display: grid; place-items: center; -webkit-appearance: none; appearance: none;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--jit-accent) 45%, transparent); }
.as-fab:hover { transform: translateY(-1px); }
.as-fab:focus-visible { outline: 2px solid var(--jit-ink); outline-offset: 2px; }
.as-fab .as-glyph { width: 24px; height: 24px; }
.as-fab[hidden] { display: none; }
.as-talk { box-sizing: border-box; margin: 0; height: 32px; padding: 0 12px 0 10px; border: 1px solid var(--jit-line);
  border-radius: var(--jit-pill); background: var(--jit-surface); color: var(--jit-ink); cursor: pointer;
  display: inline-flex; align-items: center; gap: 2px; font: 500 13px/1 var(--jit-body); -webkit-appearance: none; appearance: none; }
.as-talk:hover { background: var(--jit-tint); }
.as-talk.as-live { background: var(--jit-accent); border-color: var(--jit-accent); color: var(--jit-on-accent); }
.as-talk[disabled] { opacity: .5; cursor: default; }
.as-status { padding: 6px 4px 0; color: var(--jit-mute); font: 12px/1.35 var(--jit-mono); }
.as-status[hidden] { display: none; }

@media (max-width: 560px) {
  .as-panel.as-float { right: 0; bottom: 0; width: 100vw; height: 100vh; border: 0; border-radius: 0; }
  .as-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .as-btn { width: 34px; padding: 0; justify-content: center; }
  .as-small { display: block; }
  .as-panel, .as-panel.as-wide { width: 100vw; }
  .as-bar { padding: 8px 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  .as-panel { animation: as-in .18s ease-out; }
  @keyframes as-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ----------------------------------------------------------------------------
   The doors (Alex 2026-10-09 13:46 "thumbnail + two facts"; 15:15 "a little redundant, make sure they are different,
   make sure the navigation makes sense"): the top zone of the DL2 review pages. Two groups, each with a small label:
   on a file page THIS FILE (open · print her folder · download all) and PAGES (the list · the line · the binder);
   on the list, the line and the binder one unlabelled row: the three pages, the one you are on marked "you are here"
   (Alex 15:15: "the binder, the line and the list make sense"), plus Download every file. "A file" and "Her folders"
   are gone from those pages: they went nowhere. A door is a picture of what you land on and two facts from the build.
   The one unprefixed family in this file: page content, not the corner (the portal has no `door`/`doors`/`thumb` of
   its own, checked 2026-10-09).
   Markup: <div class="filebar doors"><nav aria-label="Other pages" class="[one]">
             <div class="group" data-k="This file"><a class="door [dark]">…</a>×3</div>
             <div class="group" data-k="Pages"><a class="door">…</a>×3</div></nav></div>
           or, on the list / line / binder: <nav class="one"><div class="group"><a class="door [here]">…</a>×4</div></nav>
           a "here" door's first child is <span class="here-tag">you are here</span>
   a door = <div|img class="thumb"> <div class="ttl"> <div class="fact">line 1<br>line 2</div>
   ---------------------------------------------------------------------------- */
.doors nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 14px 0 6px; }
.doors nav.one { grid-template-columns: minmax(0, 1fr); }
.doors .group { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.doors .group[data-k] { padding-top: 20px; }
.doors .group[data-k]::before { content: attr(data-k); position: absolute; top: 0; left: 2px; font: 500 11px/1 var(--jit-mono);
  letter-spacing: .08em; text-transform: uppercase; color: var(--jit-mute); }
.doors nav.one .group { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.doors nav.one.three .group { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 880px; }   /* a file page: its own three doors; the map is a text line (Alex 15:17: "they should go away when you are looking at a file") */
.doors .pages { margin: 10px 2px 0; font: 400 14px/1.5 var(--jit-body); color: var(--jit-mute); }   /* a file page: the way to the list, the line and the binder, as words (Alex 15:17) */
.doors .pages a { color: var(--jit-accent); text-decoration: none; }
.doors .pages a:hover { text-decoration: underline; }
.door { box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 44px;
  padding: 10px 10px 12px; position: relative; background: var(--jit-surface); color: var(--jit-ink);
  border: 1.5px solid var(--jit-ink); border-radius: var(--jit-r-l); text-decoration: none; }
.door:hover { box-shadow: 0 0 0 1px var(--jit-ink) inset; color: var(--jit-ink); }
.door:focus-visible { outline: 2px solid var(--jit-accent); outline-offset: 2px; }
.door.here { border-color: var(--jit-accent); box-shadow: 0 0 0 3px var(--jit-accent) inset; }
.door.dark { background: var(--jit-panel); color: var(--jit-on-panel); border-color: var(--jit-panel); }
.door.dark:hover { box-shadow: 0 0 0 1px var(--jit-on-panel-mute) inset; color: var(--jit-on-panel); }
.door .thumb { display: block; box-sizing: border-box; width: 100%; height: 104px; position: relative; overflow: hidden;
  border-radius: var(--jit-r-s); background: var(--jit-paper); border: 1px solid var(--jit-line); }
.door img.thumb { object-fit: cover; object-position: top center; }
.door.dark .thumb { background: var(--jit-paper); border-color: var(--jit-panel-line); }
.door .ttl { font: 600 15px/1.2 var(--jit-body); }
.door .fact { font: 400 11px/1.35 var(--jit-mono); color: var(--jit-mute); }
.door.dark .fact { color: var(--jit-on-panel-mute); }
.door .here-tag { position: absolute; top: -10px; left: 12px; padding: 3px 8px; border-radius: var(--jit-pill);
  background: var(--jit-accent); color: var(--jit-on-accent); font: 500 9.5px/1 var(--jit-mono);
  letter-spacing: .08em; text-transform: uppercase; }
/* the drawn thumbnails (her folder, download, the list, the line, the binder): bars, dots and squares, no picture */
.door .bar { height: 4px; border-radius: 2px; background: var(--jit-faint); }
.door .bar.ink { background: var(--jit-ink); }
.door .mark { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--jit-mute); flex: none; }
.door .sq { width: 9px; height: 9px; border-radius: 2px; background: var(--jit-ink); }
.door .sq.o { background: transparent; border: 1px dashed var(--jit-mute); box-sizing: border-box; }
.door .sheet { position: absolute; background: var(--jit-surface); border: 1px solid var(--jit-ink); border-radius: 3px; }
@media (max-width: 640px) {
  .doors nav, .doors nav.one, .doors nav.one.three { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .doors .group, .doors nav.one .group, .doors nav.one.three .group { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: none; }
  .door { gap: 8px; padding: 9px 9px 11px; }
  .door .thumb { height: 84px; }
  .door .fact { font-size: 10.5px; }
}
