/* Shared project chat pane: fixed entry on every page, right-hand drawer.
 * Scoped selectors only; no shell, rail, topbar or content layout changes. */

/* The corner pair (Moses, 2026-10-05). One fixed dock holds What's Cortex and Cortex Consult (simple-chat-pane.js builds
 * it). What's Cortex is a small tab joined to the launcher's top right, so the corner holds one object 80 px high, where
 * two buttons stood 104 px high. The dock lets clicks through its empty corner; each button takes them again. */
.simple-chat-dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 65;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  pointer-events: none;
}

/* Consult AI, one of the three AI controls (Moses, 2026-09-30 02:2x UTC, item 6). It shares the
 * family with Explain and Explore with LLM Cortex: the same spark mark, the same quiet jade, the
 * same IBM Plex Sans at one weight. The fill is a restrained teal gradient with a low glow, so it
 * reads as a tool rather than a call to action. The Ctrl K key cap is gone; the shortcut itself
 * still works through the pane's own key handler. */
.simple-chat-launch {
  pointer-events: auto;
  min-height: 54px;
  padding: 12px 24px 12px 16px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  /* Moses, 2026-09-30 ~08:00 UTC: more prominent, and the Cortex's blinking mark. The dark
     jade of Explore with LLM Cortex, a jade ring and a soft glow; professional, never playful. */
  border: 2px solid rgba(53, 214, 168, .6);
  border-radius: 14px;
  background: radial-gradient(130% 150% at 14% 50%, rgba(53, 214, 168, .3) 0%, rgba(53, 214, 168, .07) 60%), #0B241F;
  color: #DFF6EC;
  font: 650 16px "IBM Plex Sans", system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(53, 214, 168, .10), 0 10px 28px rgba(11, 61, 51, .30);
}
html body .simple-chat-launch { font-size: 16px !important; }
.simple-chat-launch .net { position: relative; width: 24px; height: 24px; flex: none; display: inline-flex; }
.simple-chat-launch .net::before {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  background: radial-gradient(circle, rgba(53, 214, 168, .5) 0%, rgba(53, 214, 168, 0) 66%);
  animation: cl-breathe 3.2s ease-in-out infinite;
}
.simple-chat-launch svg { flex: none; position: relative; }
.simple-chat-launch .cl-node { animation: cl-twinkle 2.4s ease-in-out infinite; }
.simple-chat-launch .cl-node:nth-of-type(2) { animation-delay: .35s; }
.simple-chat-launch .cl-node:nth-of-type(3) { animation-delay: .7s; }
.simple-chat-launch .cl-node:nth-of-type(4) { animation-delay: 1.05s; }
.simple-chat-launch .cl-node:nth-of-type(5) { animation-delay: 1.4s; }
.simple-chat-launch .cl-edge { animation: cl-pulseline 2.4s ease-in-out infinite; }
.simple-chat-launch .t { line-height: 1.2; }
.simple-chat-launch:hover {
  border-color: #35D6A8;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 0 5px rgba(53, 214, 168, .16), 0 16px 38px rgba(11, 61, 51, .36);
}
@keyframes cl-twinkle { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes cl-pulseline { 0%, 100% { opacity: .3; } 50% { opacity: .85; } }
@keyframes cl-breathe { 0%, 100% { opacity: .4; transform: scale(.88); } 50% { opacity: 1; transform: scale(1.14); } }
@media (prefers-reduced-motion: reduce) {
  .simple-chat-launch .net::before, .simple-chat-launch .cl-node, .simple-chat-launch .cl-edge { animation: none; }
}
.simple-chat-launch:focus-visible { outline: 2px solid #0E8A6E; outline-offset: 2px; }

/* The other two of the three AI controls, brought into the same family (Moses, 02:2x UTC, item 6).
   Explain and Explore with LLM Cortex are both drawn through U.howButton with kind "ai", so they
   share the .how.ai rule, which app.css paints amber. app.css is held by another agent, so the
   family is set here instead: same spark mark (both already draw it), same jade, same type, same
   restrained gradient and glow as Consult AI above. The plain .how (the (i) that opens a section's
   reasoning) is not an AI control and keeps its own quiet look. */
html body .how.ai,
html body .cortex-explain {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #BFDCD3;
  background: linear-gradient(180deg, #F4FAF7 0%, #E2F0EA 100%);
  color: #0B3D33;
  font: 600 12.5px "IBM Plex Sans", system-ui, sans-serif;
  box-shadow: 0 2px 8px rgba(11, 61, 51, .1), inset 0 1px 0 rgba(255, 255, 255, .8);
}
html body .how.ai svg,
html body .cortex-explain svg { color: #0E8A6E; flex: none; }
/* Star offset (measured 2026-10-07 on the Due diligence tab): the star path spans y 3 to 17.5
   inside a 24-unit box, so its drawn centre sits 0.8 px above its box centre; the drawn centre of the
   word Explain (IBM Plex Sans 600, 11.5 px) sits 1.0 px below its box centre. One rule owns the 1.8 px shift. */
html body .how.ai svg,
html body .cortex-explain svg { margin: 0 !important; align-self: center !important; position: static !important; transform: translateY(1.8px) !important; }
html body .how.ai:hover,
html body .cortex-explain:hover {
  background: linear-gradient(180deg, #E9F4EF 0%, #D5E9E0 100%);
  border-color: #0E8A6E;
  color: #0B3D33;
  box-shadow: 0 4px 12px rgba(11, 61, 51, .16), inset 0 1px 0 rgba(255, 255, 255, .8);
}
html body .how.ai:focus-visible,
html body .cortex-explain:focus-visible { outline: 2px solid #0E8A6E; outline-offset: 2px; }

/* One size for the three. type-scale.css pins the launch button at 13px with !important and that
   sheet is held by another agent, so the family takes 13px and the two chips are raised to it.
   The chips sit inside a line of reader text and the launch button is a standalone control;
   13px reads in both, and the family is judged on one size rather than two. */
html body .how.ai,
html body .cortex-explain { font-size: 13px; }

/* Cortex Consult floats above the page. Opening it never changes the page width or top bar. */
.simple-chat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 66;
  border: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
}
.simple-chat-backdrop[hidden] { display: none; }

.simple-chat-drawer {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 67;
  width: min(640px, calc(100vw - 48px));
  height: min(780px, calc(100dvh - 48px));
  min-width: 420px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  color: var(--ink, #071714);
  border: 1px solid var(--line, #D5E0DC);
  border-radius: 14px;
  box-shadow: 0 22px 64px rgba(12, 31, 28, .22), 0 4px 16px rgba(12, 31, 28, .12);
  opacity: 0;
  transform: translateY(8px) scale(.985);
  visibility: hidden;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.simple-chat-drawer.rich .simple-chat-thread {
  background: linear-gradient(180deg, #f7faf9 0%, #fff 120px);
}
.simple-chat-drawer.open {
  opacity: 1;
  transform: none;
  visibility: visible;
}
.simple-chat-drawer[hidden] { display: none; }

@media (max-width: 899px) {
  html body .simple-chat-drawer {
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-width: 0;
    min-height: 0;
    max-width: none !important;
    max-height: none !important;
    border: 0;
    border-radius: 0;
  }
  .simple-chat-move { cursor: default !important; }
}

.simple-chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft, #E7EEEB);
  background: var(--panel-2, #F7FAF9);
}
.simple-chat-move {
  flex: 1 1 auto;
  min-width: 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
  border-radius: 8px;
}
.simple-chat-move:active { cursor: grabbing; }
.simple-chat-move:focus-visible {
  outline: 2px solid var(--jade, #0E8A6E);
  outline-offset: 3px;
}
.simple-chat-head h2 {
  margin: 0;
  font: 600 11px "IBM Plex Sans", sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted, #33473F);
}
.simple-chat-sub {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-2, #0E2621);
}
.simple-chat-close {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--line, #D5E0DC);
  border-radius: 7px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

/* What's Cortex, a tab on Cortex Consult (Moses, 2026-10-05: the solid jade button wore the colour of the page's main
   actions, stood alone over the launcher's centre and had grown from 32 px to 38 px). It now wears the launcher's own dark
   surface and mint ring and joins its top edge 16 px in from the right, clear of the rounded corner, so the two read as
   one control. The label is light mint on dark jade (about 10:1), small beside the launcher's 16 px name. It opens the one
   shared explanation drawer through notices.js, the same drawer the Terminal's About opens. */
.simple-chat-about {
  pointer-events: auto;
  position: relative;
  z-index: 1;                       /* over the launcher's top ring, which the tab's foot covers */
  box-sizing: border-box;
  height: 28px;
  margin: 0 16px -2px 0;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border: 2px solid rgba(53, 214, 168, .6);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: linear-gradient(rgba(53, 214, 168, .07), rgba(53, 214, 168, .07)), #0B241F;   /* the launcher's right-hand tone */
  color: #A9E6D2;
  font: 600 12.5px/1 "IBM Plex Sans", system-ui, sans-serif;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}
html body .simple-chat-about { font-size: 12.5px !important; }
.simple-chat-about:hover {
  color: #fff;
  background: linear-gradient(rgba(53, 214, 168, .18), rgba(53, 214, 168, .18)), #0B241F;
}
/* The launcher rises 2 px and brightens its ring on hover; the tab goes with it, so the join never opens. */
.simple-chat-dock:has(> .simple-chat-launch:hover) > .simple-chat-about { transform: translateY(-2px); border-color: #35D6A8; }
/* The focus ring is ink with a white inner line, so it shows on the pale page and beside the dark launcher. */
.simple-chat-about:focus-visible {
  outline: 3px solid var(--ink, #0C1F1C);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff;
}
.simple-chat-about[hidden] { display: none; }
/* With no launcher under it (a page that hides the launcher, or the button added straight to the page), the tab closes
   into a small button of its own. */
.simple-chat-about:not(:has(+ .simple-chat-launch:not([hidden]))) {
  margin: 0;
  border-bottom: 2px solid rgba(53, 214, 168, .6);
  border-radius: 9px;
  box-shadow: 0 6px 18px rgba(11, 61, 51, .28);
}
body > .simple-chat-about { position: fixed; right: 18px; bottom: 18px; z-index: 65; }
@media (prefers-reduced-motion: reduce) { .simple-chat-about { transition: none; } }

/* The conversation line and the fresh-conversation control sit under the drawer head. The earlier
   conversations this tab keeps fold under them, so a thread that crosses pages and records has one
   place to go back to rather than a control per page. */
.simple-chat-sessions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--line-soft, #E7EEEB);
  background: var(--panel-2, #F7FAF9);
}
.simple-chat-session-note {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted, #33473F);
  overflow-wrap: anywhere;
}
.simple-chat-sessions-row .pill.session {
  flex: none;
  cursor: pointer;
}
.simple-chat-sessions-row .pill.session:focus-visible,
.simple-chat-sessions .pill.session:focus-visible { outline: 2px solid #0E8A6E; outline-offset: 2px; }
.simple-chat-sessions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line-soft, #E7EEEB);
}
.simple-chat-sessions[hidden] { display: none; }
.simple-chat-sessions-label {
  flex: 1 0 100%;
  font: 600 9.5px 'IBM Plex Sans', sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted, #33473F);
}

/* The line under a turn's label naming the page it was asked from, so a thread that crosses pages
   and records shows which question belongs to which selection. */
.simple-chat-where {
  margin: 1px 0 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted, #33473F);
  overflow-wrap: anywhere;
}
/* What this browser cannot carry across navigation, said plainly instead of being discovered later. */
.simple-chat-storagelost { color: #8A5A16; }

.simple-chat-thread {
  flex: 1 1 auto;
  overflow: auto;
  padding: 16px 18px;
}
.simple-chat-answer {
  padding: 0;
}
.simple-chat-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.simple-chat-source {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--panel-2, #F7FAF9);
  border: 1px solid var(--line, #D5E0DC);
  font: 600 10px "IBM Plex Sans", sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted, #33473F);
}
.simple-chat-check {
  font-size: 11.5px;
  color: var(--muted, #33473F);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft, #E7EEEB);
}
.simple-chat-block {
  margin: 10px 0;
}
.simple-chat-block-title {
  font: 600 10.5px "IBM Plex Sans", sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted, #33473F);
  margin-bottom: 6px;
}
.simple-chat-code {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #0c1f1c;
  color: #e8f5f1;
  font: 500 12px "IBM Plex Mono", monospace;
  overflow: auto;
  white-space: pre-wrap;
}
.simple-chat-status {
  font-size: 12.5px;
  color: var(--muted, #33473F);
  margin: 4px 0;
}
.simple-chat-form {
  position: relative;
  padding: 14px 18px 20px;
  border-top: 2px solid var(--jade, #0E8A6E);
  background: var(--jade-soft, #F3FAF7);
  box-shadow: 0 -8px 20px rgba(12, 31, 28, .06);
}
.simple-chat-controls-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--line, #D5E0DC);
  font: 700 12.5px "IBM Plex Sans", sans-serif;
  color: var(--ink-2, #0E2621);
}
.simple-chat-guide-toggle {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--jade, #0E8A6E);
  border-radius: 8px;
  background: #fff;
  color: var(--jade-dark, #075C47);
  font: 700 12.5px "IBM Plex Sans", sans-serif;
  cursor: pointer;
}
.simple-chat-guide-toggle:hover,
.simple-chat-guide-toggle[aria-expanded="true"] { background: var(--jade-soft, #F3FAF7); }
.simple-chat-guide-toggle:focus-visible { outline: 2px solid var(--jade, #0E8A6E); outline-offset: 2px; }
.simple-chat-guide {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(100% + 8px);
  z-index: 9;
  max-height: min(520px, 62vh);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line, #D5E0DC);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(12, 31, 28, .22);
}
.simple-chat-guide[hidden] { display: none; }
.simple-chat-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.simple-chat-guide h3 {
  margin: 0 0 8px;
  font: 700 12.5px "IBM Plex Sans", sans-serif;
  color: var(--jade-dark, #075C47);
}
.simple-chat-guide dl { margin: 0; }
.simple-chat-guide dt {
  margin-top: 7px;
  font: 700 12px "IBM Plex Sans", sans-serif;
  color: var(--ink, #071714);
}
.simple-chat-guide dd {
  margin: 2px 0 0;
  font: 500 12px/1.4 "IBM Plex Sans", sans-serif;
  color: var(--muted, #33473F);
}
.simple-chat-guide-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft, #E7EEEB);
  font: 600 12px/1.4 "IBM Plex Sans", sans-serif;
  color: var(--ink-2, #0E2621);
}
.simple-chat-controls {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}
/* The question box: labelled, framed in jade with a halo, Send inside it (FIXES.md line 54). */
.simple-chat-form label.simple-chat-ask {
  margin-bottom: 7px;
  font: 700 14px "IBM Plex Sans", sans-serif;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink, #071714);
}
.simple-chat-box {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  border: 3px solid var(--jade, #0E8A6E);   /* 3 px draws 2 px on screen under the 87.5 percent page zoom */
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(14, 138, 110, .14);
}
.simple-chat-box:focus-within {
  border-color: var(--jade-dark, #075C47);
  box-shadow: 0 0 0 4px rgba(14, 138, 110, .26);
}
.simple-chat-send {
  flex: none;
  min-height: 40px;
  padding: 8px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--jade, #0E8A6E);
  color: #fff;
  font: 700 14px "IBM Plex Sans", sans-serif;
  cursor: pointer;
}
.simple-chat-send:hover { background: var(--jade-dark, #075C47); }
.simple-chat-send:disabled { opacity: .5; cursor: default; }
.simple-chat-form label {
  display: block;
  margin-bottom: 6px;
  font: 600 10px "IBM Plex Sans", sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2, #0E2621);
}
.simple-chat-form textarea.simple-chat-input {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 112px;
  max-height: 260px;
  margin: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: 500 15px "IBM Plex Sans", sans-serif;
  color: var(--ink, #071714);
  resize: vertical;
  line-height: 1.45;
}
.simple-chat-form textarea.simple-chat-input:focus { outline: none; }
.simple-chat-form textarea.simple-chat-input::placeholder { color: #5E736E; opacity: 1; }
.simple-chat-modes .pill.source[aria-pressed="true"] {
  background: var(--jade-soft, #F3FAF7);
  border-color: var(--jade, #0E8A6E);
  color: var(--jade-dark, #075C47);
}
.simple-chat-turn-wrap { margin: 10px 0 14px; }
.simple-chat-meta {
  font-size: 11.5px;
  color: var(--muted, #33473F);
  margin: 0 0 4px;
}
.simple-chat-bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.simple-chat-bubble.user {
  margin-left: auto;
  background: var(--dark, #164034);
  color: var(--on-dark, #F2FAF7);
  font: 500 14.5px Newsreader, Georgia, serif;
}
.simple-chat-bubble.assistant {
  background: #fff;
  border: 1px solid var(--line-soft, #E7EEEB);
  color: var(--ink, #071714);
}
.simple-chat-bubble.assistant .simple-chat-answer {
  font-size: 13.5px;
  line-height: 1.55;
}
.simple-chat-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.simple-chat-hint {
  font-size: 11px;
  color: var(--muted, #33473F);
  margin: 8px 0 10px;
}
.simple-chat-modes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
  align-items: center;
}
.simple-chat-modes > span {
  font-size: 11px;
  color: var(--muted, #33473F);
  margin-right: 2px;
}
.simple-chat-sug {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--ink-2, #0E2621);
}
.simple-chat-sug:hover { background: var(--jade-soft, #F3FAF7); }
/* The rich chat (K8): the answer-type switch, suggestion tags, the schema line and the query behind an analysis. */
.simple-chat-modes .pill.kind[aria-pressed="true"] {
  background: var(--jade-soft, #F3FAF7);
  border-color: var(--jade, #0E8A6E);
  color: var(--jade-dark, #075C47);
}
.simple-chat-sugbox { margin: 4px 0 6px; }
.simple-chat-sug-type {
  display: inline-block;
  margin-right: 7px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--line, #D5E0DC);
  background: #fff;
  font: 600 9.5px "IBM Plex Sans", sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--jade-dark, #075C47);
  vertical-align: 1px;
}
.simple-chat-sug-note { font-size: 11px; color: var(--muted, #33473F); margin: 2px 10px 0; }
.simple-chat-schema {
  margin: 0 0 8px;
  font: 600 11px "IBM Plex Sans", sans-serif;
  color: var(--jade-dark, #075C47);
}
.simple-chat-schema.short { color: #8A4B06; }
.simple-chat-route { margin: 0 0 9px; color: var(--muted); font-size: 11.5px; line-height: 1.45; overflow-wrap: anywhere; }
.simple-chat-advanced { margin: 6px 0; }
.simple-chat-advanced > summary { cursor: pointer; font-weight: 600; }
.simple-chat-feature-links { display: flex; flex-wrap: wrap; gap: 4px 9px; margin: 8px 0; font-size: 12px; }
.simple-chat-feature-links a { color: var(--jade-dark, #075C47); text-decoration: underline; text-underline-offset: 2px; }
.simple-chat-feature-links a:focus-visible { outline: 2px solid var(--jade, #0E8A6E); outline-offset: 3px; }
.simple-chat-analysis { margin: 8px 0 4px; font-size: 12px; color: var(--muted, #33473F); }
.simple-chat-analysis summary { cursor: pointer; font-weight: 600; }
.simple-chat-analysis .simple-chat-code { margin-top: 6px; font-size: 11.5px; }
.simple-chat-analysis-tables { margin-top: 4px; font-size: 11.5px; }
.simple-chat-grid-wrap { overflow-x: auto; }
.simple-chat-grid { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.35; }
.simple-chat-grid th {
  padding: 5px 6px;
  border-bottom: 1px solid var(--line, #D5E0DC);
  font: 600 10px "IBM Plex Sans", sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  /* No colour here: the page's own table-head rule sets it. A muted colour on the site's dark head read at about
     2:1 in the tables of an opened tag (Moses's phone, 2026-10-13). */
  text-align: left;
  vertical-align: bottom;
}
.simple-chat-grid td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--line-soft, #E7EEEB);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.simple-chat-grid .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.simple-chat-chart-canvas { width: 100%; }
.simple-chat-chart-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 8px; color: var(--muted, #33473F); font-size: var(--text-small, 12.5px); }
.simple-chat-cards { display: grid; gap: 6px; }
.simple-chat-rowcard {
  padding: 7px 9px;
  border: 1px solid var(--line-soft, #E7EEEB);
  border-radius: 8px;
  background: var(--panel-2, #F7FAF9);
  font-size: 12px;
}
.simple-chat-rowcard .t { font-weight: 600; margin-bottom: 4px; color: var(--ink, #071714); }
.simple-chat-rowcard dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 0; }
.simple-chat-rowcard dt { color: var(--muted, #33473F); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.simple-chat-rowcard dd { margin: 0; overflow-wrap: anywhere; }
.simple-chat-rowcard dd.r { font-variant-numeric: tabular-nums; }
.simple-chat-thread .footer-note { margin: 12px 0 0; padding-top: 8px; border-top: 1px solid var(--line-soft, #E7EEEB);
  font-size: 12px; color: var(--muted, #33473F); }

@media (max-width: 1024px) {
  /* Touch widths (mobile.css gives every button a 44 px minimum there): the What's Cortex tab keeps its 28 px look on
     Cortex Consult, and an unseen pad above it brings its touch area to 46 px. */
  .simple-chat-dock > .simple-chat-about { min-height: 0; }
  .simple-chat-dock > .simple-chat-about::before { content: ""; position: absolute; inset: -18px -4px 0; }
}
@media (max-width: 480px) {
  .simple-chat-drawer { width: 100vw; }
  .simple-chat-dock { right: 12px; bottom: 14px; }
}

@media print {
  .simple-chat-dock, .simple-chat-launch, .simple-chat-about, .simple-chat-drawer, .simple-chat-backdrop { display: none !important; }
}

/* formatting pass, 2026-09-24 */
:root {
  --text-body: 15px;
  --text-answer: 15.5px;
  --text-small: 13px;
  --text-label: 13px;
  --lh-body: 1.5;
}
/* T012: the chat is an overlay. Opening it does not reflow the page or top navigation. */
.simple-chat-head h2,
.simple-chat-close,
.simple-chat-sub,
.simple-chat-meta,
.simple-chat-status,
.simple-chat-hint,
.simple-chat-modes > span,
.simple-chat-check,
.simple-chat-block-title,
.simple-chat-schema,
.simple-chat-sug-note,
.simple-chat-form label,
.simple-chat-analysis,
.simple-chat-analysis-tables,
.simple-chat-thread .footer-note {
  font-size: var(--text-label);
  line-height: var(--lh-body);
  color: var(--ink-2, #12302B);
}
.simple-chat-bubble,
.simple-chat-bubble.user,
.simple-chat-bubble.assistant,
.simple-chat-bubble.assistant .simple-chat-answer,
.simple-chat-answer,
.simple-chat-sug {
  font-size: var(--text-answer);
  line-height: var(--lh-body);
  color: inherit;
  max-height: none;
  overflow: visible;
  height: auto;
}
.simple-chat-bubble.assistant {
  max-width: 80ch;
  overflow: visible;
}
.simple-chat-thread { overflow: auto; }
.simple-chat-form textarea.simple-chat-input {
  font-size: var(--text-body);
  line-height: var(--lh-body);
  min-height: 112px;
  max-height: 260px;
  field-sizing: fixed;
  resize: vertical;
}
.simple-chat-ask { font-size: var(--text-label) !important; }
.simple-chat-grid, .simple-chat-rowcard, .simple-chat-code {
  font-size: var(--text-small);
  line-height: var(--lh-body);
}
.simple-chat-grid th {
  font-size: var(--text-label);
  text-align: left;
  padding: 8px 10px;
}
.simple-chat-grid td { padding: 8px 10px; font-size: var(--text-small); }
.simple-chat-grid .r { text-align: right; font-variant-numeric: tabular-nums; }
.simple-chat-rowcard dt { font-size: var(--text-label); }
.simple-chat-source, .simple-chat-sug-type {
  /* named badges stay compact */
  font-size: 11px;
}

/* Moses, 2026-09-24 (fork 2, on Alts ETL 2's order): every text in the right-side AI chat reads at 12.5px or more,
 * on the site's type tokens from app.css (Task 1861): small labels at --text-label, notes, code and tables at --text-small. */
body .simple-chat-head h2, body .simple-chat-source, body .simple-chat-block-title, body .simple-chat-form label,
body .simple-chat-sug-type, body .simple-chat-schema, body .simple-chat-grid th, body .simple-chat-rowcard dt,
body .simple-chat-modes > span, body [class*="simple-chat"] .pill { font-size: var(--text-label, 13.5px); }
body .simple-chat-sub, body .simple-chat-close, body .simple-chat-check, body .simple-chat-meta, body .simple-chat-hint,
body .simple-chat-sug-note, body .simple-chat-analysis, body .simple-chat-analysis .simple-chat-code,
body .simple-chat-analysis-tables, body .simple-chat-code, body .simple-chat-grid, body .simple-chat-rowcard,
body .simple-chat-thread .footer-note { font-size: var(--text-small, 14px); }
/* The chat scripts set a few sizes inline (section labels at 9.5px, source pills at 10.5px, notes at 12px); these lift them. */
body [class*="simple-chat"] [style*="600 9.5px"] { font-size: var(--text-label, 13.5px) !important; }
body [class*="simple-chat"] [style*="font-size:10.5px"], body [class*="simple-chat"] [style*="font-size:12px"] { font-size: var(--text-small, 14px) !important; }

/* The fact tag (Moses, 2026-10-02): one small green tag for every cited fact, in a chat answer and in the page's own
 * AI notes, in place of the white pill. Its look is the manager record's tag (live.css .dd-tag). An opened tag stays
 * dark green with a white label, so the reader sees which tag the line below belongs to. */
.factchip.fact-inline { display: inline-block; margin: 0 0 0 4px; padding: 0 5px; border-radius: 4px;
  border: 1px solid var(--jade-pale, #AFCFC6); background: var(--good-soft, #E6F4EE); color: var(--jade-dark, #0a6b55);
  font: 500 11.5px/1.5 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .02em; cursor: pointer;
  vertical-align: baseline; white-space: nowrap; text-decoration: none; }
.factchip.fact-inline:hover, .factchip.fact-inline:focus-visible,
.factchip.fact-inline[aria-expanded="true"] { background: var(--jade, #0E8A6E); color: #fff;
  border-color: var(--jade, #0E8A6E); outline: none; }

/* The asked question sits on dark green: keep its text white (a later 'color: inherit' made it dark). */
body .simple-chat-bubble.user { color: var(--on-dark, #F2FAF7); }

/* Comparison rows stay in a table; technical details open only on request. */
.simple-chat-table .simple-chat-grid-wrap { max-width: 100%; overflow-x: auto; }
.simple-chat-table .simple-chat-grid { min-width: 440px; width: 100%; table-layout: auto; }
.simple-chat-table .simple-chat-grid th,
.simple-chat-table .simple-chat-grid td { vertical-align: top; padding: 7px 9px; }
.simple-chat-table .simple-chat-grid th { background: #edf5f2; color: #163e34; white-space: normal; }
.simple-chat-table .simple-chat-grid td:first-child { min-width: 150px; max-width: 220px; white-space: normal; }
.simple-chat-table .simple-chat-grid th:first-child,
.simple-chat-table .simple-chat-grid td:first-child { position: sticky; left: 0; z-index: 1; }
.simple-chat-table .simple-chat-grid td:first-child { background: #fff; }
.simple-chat-counterparty { margin-top: 4px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.simple-chat-table-context { margin: 4px 0 8px; font-size: 12.5px; color: var(--muted); }
.simple-chat-analysis { margin-top: 12px; border-top: 1px solid var(--line-soft, #dce8e3); padding-top: 8px; }
.simple-chat-analysis summary { cursor: pointer; font-weight: 600; color: var(--jade-dark, #0a6b55); }
.simple-chat-analysis .simple-chat-code { max-height: 220px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.simple-chat-removed[open] { max-height: 240px; overflow: auto; }
.simple-chat-table .factchip.fact-inline { max-width: 100%; }
/* a fact tag inside a column header drops its box and flows with the header words (a button cannot be display:inline),
 * so a long header takes two lines and not five */
.simple-chat-grid th .factchip.fact-inline { display: contents; }
/* With no box of its own the tag's text still takes the tag's type: IBM Plex Mono, lowercase, centred, in the tag's green, so a header read
 * "THE" in capitals followed by "audited financial statements, 2026" in a different face. It takes the header's own type (2026-10-06). */
html body .simple-chat-grid th .factchip.fact-inline {
  font: inherit !important; letter-spacing: inherit !important; text-transform: inherit !important; text-align: inherit;
  color: inherit !important; background: none !important; border: 0 !important; white-space: inherit; }

/* T012 answer presentation: one readable hierarchy and one diagnostics disclosure. */
.simple-chat-answer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 10px;
  margin: 0 0 12px;
  padding: 0 0 9px;
  border-bottom: 1px solid var(--line-soft, #E7EEEB);
}
.simple-chat-answer-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--jade-soft, #F3FAF7);
  border: 1px solid var(--jade-pale, #AFCFC6);
  color: var(--jade-dark, #075C47);
  font: 500 13px "IBM Plex Sans", sans-serif;
  letter-spacing: .01em;
}
.simple-chat-answer-meta .simple-chat-sources { margin: 0; gap: 5px; }
.simple-chat-answer-meta .simple-chat-source {
  padding: 3px 8px;
  background: #fff;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}
.simple-chat-section-label {
  margin: 16px 0 6px;
  padding-left: 8px;
  border-left: 3px solid var(--jade, #0E8A6E);
  font: 600 13.5px/1.35 "IBM Plex Sans", sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted, #33473F);
}
.simple-chat-section-label:first-of-type { margin-top: 4px; }
.simple-chat-prose {
  margin: 4px 0;
  font: 400 14.5px/1.58 "IBM Plex Sans", sans-serif;
  color: var(--ink-2, #0E2621);
}
body .simple-chat-answer .simple-chat-prose {
  font-size: 14.5px !important;
  line-height: 1.58 !important;
}
.simple-chat-prose-bullet {
  padding-left: 15px;
  text-indent: -10px;
  margin: 4px 0;
}
.simple-chat-repeat-note {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel-2, #F7FAF9);
  color: var(--muted, #33473F);
  font: 500 12.5px/1.45 "IBM Plex Sans", sans-serif;
}
.simple-chat-checks-fold {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft, #E7EEEB);
}
.simple-chat-checks-summary {
  cursor: pointer;
  color: var(--jade-dark, #075C47);
  font: 650 13.5px/1.45 "IBM Plex Sans", sans-serif;
}
.simple-chat-checks-summary:focus-visible {
  outline: 2px solid var(--jade, #0E8A6E);
  outline-offset: 2px;
}
.simple-chat-checks-fold[open] .simple-chat-checks-summary { margin-bottom: 8px; }
.simple-chat-check-block {
  padding: 8px 0;
  border-top: 1px solid var(--line-soft, #E7EEEB);
}
.simple-chat-check-block:first-of-type { border-top: 0; }
.simple-chat-check-heading {
  margin-bottom: 3px;
  color: var(--muted, #33473F);
  font: 600 13px/1.4 "IBM Plex Sans", sans-serif;
  text-transform: none;
  letter-spacing: .06em;
}
.simple-chat-check-copy,
.simple-chat-excluded-claim,
.simple-chat-check-foot {
  color: var(--ink-2, #0E2621);
  font: 400 14px/1.5 "IBM Plex Sans", sans-serif;
}
.simple-chat-excluded-claim { margin: 4px 0; }
.simple-chat-check-foot { margin-top: 6px; }
.simple-chat-checks-fold .simple-chat-code {
  margin-top: 6px;
  max-height: 180px;
  overflow: auto;
  font-size: 13px;
}
.simple-chat-table .simple-chat-grid { min-width: 520px; }
.simple-chat-table .simple-chat-grid th {
  background: #edf5f2;
  font-size: 13.5px;
}
.simple-chat-table .simple-chat-grid td {
  font-size: 14px;
  line-height: 1.5;
}

/* The question box and the response controls share the panel with the answer. The box starts at two lines (a longer
 * question grows it by hand: resize is vertical) and the controls sit closer, so the answer keeps most of the height. */
html body .simple-chat-form { padding: 10px 16px 12px; }
html body .simple-chat-form textarea.simple-chat-input { height: 58px; min-height: 58px; }
html body .simple-chat-controls-head { margin-top: 10px; padding-top: 8px; }
html body .simple-chat-controls { gap: 5px; margin-top: 6px; }

/* A clear frame, so the chat stands apart from the page behind it (Moses, 2026-10-05). A phone shows the chat full screen: no frame. */
@media (min-width: 900px) {
  html body .simple-chat-drawer { border: 2px solid var(--jade, #0E8A6E); min-width: 340px; }
}

/* mobile.css pins every role="dialog" box to inset 12px and width auto at 1024 px and below, which held the pane full width
 * between 900 and 1024 px and left every resize handle with nothing to move. The pane takes the place the person set back
 * there; the script writes it as --chat-x, --chat-y, --chat-w and --chat-h. */
@media (min-width: 900px) and (max-width: 1024px) {
  html body #simple-chat-drawer {
    inset: var(--chat-y, 12px) auto auto var(--chat-x, 12px) !important;
    width: var(--chat-w, calc(100vw - 24px)) !important;
    height: var(--chat-h, min(780px, calc(100dvh - 48px))) !important;
  }
}

/* The eight resize handles (Moses, 2026-10-06): four edges and four corners, each an invisible hit zone just inside the pane's own
 * border, 8 px along an edge and 14 px square at a corner. Nothing is drawn at rest. A 2 px jade line shows along the edge while
 * the pointer is over its handle or the handle has keyboard focus, and a corner lights the two edges it moves. */
.simple-chat-edge {
  position: absolute;
  z-index: 8;
  margin: 0;
  padding: 0;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.simple-chat-edge:focus-visible { outline: none; }
.simple-chat-edge::after { content: ""; position: absolute; background: var(--jade, #0E8A6E); opacity: 0; pointer-events: none; }
.simple-chat-edge-top { top: 0; left: 14px; right: 14px; height: 8px; cursor: ns-resize; }
.simple-chat-edge-bottom { bottom: 0; left: 14px; right: 14px; height: 8px; cursor: ns-resize; }
.simple-chat-edge-left { left: 0; top: 14px; bottom: 14px; width: 8px; cursor: ew-resize; }
.simple-chat-edge-right { right: 0; top: 14px; bottom: 14px; width: 8px; cursor: ew-resize; }
.simple-chat-edge-top-left { top: 0; left: 0; width: 14px; height: 14px; z-index: 9; cursor: nwse-resize; }
.simple-chat-edge-top-right { top: 0; right: 0; width: 14px; height: 14px; z-index: 9; cursor: nesw-resize; }
.simple-chat-edge-bottom-right { bottom: 0; right: 0; width: 14px; height: 14px; z-index: 9; cursor: nwse-resize; }
.simple-chat-edge-bottom-left { bottom: 0; left: 0; width: 14px; height: 14px; z-index: 9; cursor: nesw-resize; }
/* The line runs the whole side, corner zones included. */
.simple-chat-edge-top::after { top: 0; left: -14px; right: -14px; height: 2px; }
.simple-chat-edge-bottom::after { bottom: 0; left: -14px; right: -14px; height: 2px; }
.simple-chat-edge-left::after { left: 0; top: -14px; bottom: -14px; width: 2px; }
.simple-chat-edge-right::after { right: 0; top: -14px; bottom: -14px; width: 2px; }
.simple-chat-edge:is(:hover, :focus-visible)::after { opacity: 1; }
.simple-chat-drawer:has(.simple-chat-edge-top-left:is(:hover, :focus-visible)) :is(.simple-chat-edge-top, .simple-chat-edge-left)::after,
.simple-chat-drawer:has(.simple-chat-edge-top-right:is(:hover, :focus-visible)) :is(.simple-chat-edge-top, .simple-chat-edge-right)::after,
.simple-chat-drawer:has(.simple-chat-edge-bottom-right:is(:hover, :focus-visible)) :is(.simple-chat-edge-bottom, .simple-chat-edge-right)::after,
.simple-chat-drawer:has(.simple-chat-edge-bottom-left:is(:hover, :focus-visible)) :is(.simple-chat-edge-bottom, .simple-chat-edge-left)::after { opacity: 1; }
/* The right zone lies where the thread's scrollbar sits, so the thread keeps 8 px clear of it and the scrollbar stays grabbable. */
@media (min-width: 900px) { html:not(.chat-window) .simple-chat-thread { margin-right: 8px; } }
@media (max-width: 899px) { .simple-chat-edge, .simple-chat-popout { display: none !important; } }

/* Pop out: the chat in a window of its own, off the figures. */
.simple-chat-popout {
  flex: none;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--line, #D5E0DC);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2, #0E2621);
  font: 500 13px "IBM Plex Sans", sans-serif;
  cursor: pointer;
}
.simple-chat-popout:hover { border-color: var(--jade, #0E8A6E); background: var(--jade-soft, #F3FAF7); }
.simple-chat-popout:focus-visible { outline: 2px solid var(--jade, #0E8A6E); outline-offset: 2px; }
html.chat-window body { overflow: hidden; background: #fff; }
html.chat-window body > *:not(#simple-chat-drawer):not(#overlay):not(script):not(style):not(link) { display: none !important; }
html.chat-window body #simple-chat-drawer {
  inset: 0 !important; width: 100vw !important; height: 100dvh !important; max-width: none !important; max-height: none !important;
  min-width: 0 !important; min-height: 0 !important; border: 0 !important; border-radius: 0 !important; transform: none !important;
}
html.chat-window :is(.simple-chat-edge, .simple-chat-popout) { display: none !important; }
html.chat-window .simple-chat-move { cursor: default !important; }
/* What's Cortex in the pop-out window. The corner dock that holds it on the page is hidden there, so the header control shows at
 * every width of the window, in the look and size of Close. */
html.chat-window body #simple-chat-drawer .simple-chat-about-inner {
  display: inline-flex; align-items: center; flex: none; min-height: 28px !important; padding: 3px 11px !important;
  border: 1px solid var(--line, #D5E0DC); border-radius: 7px; background: #fff; color: var(--ink-2, #0E2621);
  font: 500 12.5px "IBM Plex Sans", system-ui, sans-serif !important; cursor: pointer;
}
html.chat-window body #simple-chat-drawer .simple-chat-about-inner:hover { border-color: var(--jade, #0E8A6E); background: var(--jade-soft, #F3FAF7); }
html.chat-window body #simple-chat-drawer .simple-chat-about-inner:focus-visible { outline: 2px solid var(--jade, #0E8A6E); outline-offset: 2px; }
html.chat-window body #simple-chat-drawer .simple-chat-about-inner[hidden] { display: none; }

/* Full-window chat (a pop-out window or a phone): the site's phone rules make every button 44 px tall, which tripled the
 * response controls and left the thread little room (Moses, 2026-10-05). The controls take desktop sizes again. */
html body #simple-chat-drawer.simple-chat-compact :is(button, select, summary) { min-height: 0 !important; }
html body #simple-chat-drawer.simple-chat-compact .pill { min-height: 26px !important; height: auto !important; padding: 3px 10px !important; font-size: 12px !important; line-height: 1.25 !important; }
html body #simple-chat-drawer.simple-chat-compact .simple-chat-modes { gap: 5px !important; }
html body #simple-chat-drawer.simple-chat-compact .simple-chat-controls { gap: 4px !important; margin-top: 4px !important; }
html body #simple-chat-drawer.simple-chat-compact .simple-chat-controls-head { margin-top: 6px !important; padding-top: 6px !important; }
html body #simple-chat-drawer.simple-chat-compact .simple-chat-form { padding: 8px 14px 10px !important; }
html body #simple-chat-drawer.simple-chat-compact textarea.simple-chat-input { height: 48px !important; min-height: 48px !important; }
html body #simple-chat-drawer.simple-chat-compact .simple-chat-box { padding: 5px 6px 5px 10px !important; }
html body #simple-chat-drawer.simple-chat-compact .simple-chat-send { min-height: 32px !important; padding: 5px 14px !important; }
html body #simple-chat-drawer.simple-chat-compact :is(.simple-chat-close, .simple-chat-popout, .simple-chat-guide-toggle, .pill.session) { min-height: 28px !important; padding: 3px 11px !important; font-size: 12.5px !important; }
html body #simple-chat-drawer.simple-chat-compact .simple-chat-head { padding: 9px 12px; }
html body #simple-chat-drawer.simple-chat-compact .simple-chat-sessions-row { padding: 5px 12px; }

/* The guide closes from its own top left corner. */
.simple-chat-guide-head {
  position: sticky;
  top: -14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -14px -14px 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft, #E7EEEB);
  background: #fff;
  font: 600 12.5px "IBM Plex Sans", sans-serif;
  color: var(--jade-dark, #075C47);
}
.simple-chat-guide-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line, #D5E0DC);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2, #0E2621);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.simple-chat-guide-close:hover { border-color: var(--jade, #0E8A6E); background: var(--jade-soft, #F3FAF7); }
.simple-chat-guide-close:focus-visible { outline: 2px solid var(--jade, #0E8A6E); outline-offset: 2px; }

/* Chat type, lighter and smaller (Moses, 2026-10-05): answers at 13 px in regular weight; only labels and tags carry
 * weight, and the line naming the fund is no longer bold. The id keeps these ahead of the site-wide type sheet. */
html body #simple-chat-drawer .simple-chat-thread .simple-chat-bubble.user { font-size: 13px !important; font-weight: 400 !important; line-height: 1.5 !important; }
html body #simple-chat-drawer .simple-chat-thread .simple-chat-answer .simple-chat-prose { font-size: 13px !important; font-weight: 400 !important; line-height: 1.5 !important; }
html body #simple-chat-drawer .simple-chat-thread .simple-chat-answer .simple-chat-section-label { font-size: 11.5px !important; font-weight: 600 !important; letter-spacing: .06em; margin: 12px 0 4px; }
html body #simple-chat-drawer .simple-chat-thread .simple-chat-answer-type { font-size: 11.5px !important; font-weight: 600 !important; }
html body #simple-chat-drawer .simple-chat-thread .simple-chat-answer-meta .simple-chat-source { font-size: 11.5px !important; font-weight: 400 !important; }
html body #simple-chat-drawer .simple-chat-thread .simple-chat-meta,
html body #simple-chat-drawer .simple-chat-thread .simple-chat-where { font-size: 12px !important; font-weight: 400 !important; }
html body #simple-chat-drawer .simple-chat-thread .simple-chat-sugbox > div[style*="uppercase"] { font-size: 12px !important; font-weight: 500 !important; }
html body #simple-chat-drawer .simple-chat-thread .simple-chat-sug { font-size: 12.5px !important; font-weight: 400 !important; line-height: 1.45 !important; }
html body #simple-chat-drawer .simple-chat-thread .simple-chat-sug-type { font-size: 10.5px !important; font-weight: 600 !important; }
html body #simple-chat-drawer .simple-chat-thread .factchip.fact-inline { font-size: 11px !important; font-weight: 500 !important; }
html body #simple-chat-drawer .simple-chat-thread .simple-chat-checks-summary { font-size: 12.5px !important; font-weight: 500 !important; }
html body #simple-chat-drawer .simple-chat-thread .simple-chat-check-heading { font-size: 12px !important; font-weight: 600 !important; }
html body #simple-chat-drawer .simple-chat-thread :is(.simple-chat-check-copy, .simple-chat-excluded-claim, .simple-chat-check-foot) { font-size: 12.5px !important; font-weight: 400 !important; line-height: 1.5 !important; }
html body #simple-chat-drawer .simple-chat-thread .simple-chat-grid td { font-size: 12.5px !important; font-weight: 400 !important; }
html body #simple-chat-drawer .simple-chat-thread .simple-chat-grid th { font-size: 12px !important; font-weight: 600 !important; }
html body #simple-chat-drawer .simple-chat-form textarea.simple-chat-input,
html body #simple-chat-drawer .simple-chat-form textarea.simple-chat-input::placeholder { font-weight: 400 !important; }

/* Phone layer (2026-10-13, 600 px and under). The corner pair becomes one round 56 px icon button whose name screen readers
 * read; the page keeps bottom room for it. The chat is full screen: controls take 44 px, the question box and Send sit
 * above the on-screen keyboard (the script writes --chat-vvh and --chat-vvt from the visual viewport), suggested questions
 * and tags wrap, and the three response rows fold behind one Options control. What's Cortex moves into the chat header,
 * because the tab on the round button would cover page content again. Desktop is untouched. */
.simple-chat-options-toggle, .simple-chat-about-inner { display: none; }
@media (max-width: 600px) {
  html body .simple-chat-dock {
    position: fixed !important;
    inset: auto 14px calc(14px + env(safe-area-inset-bottom, 0px)) auto !important;
    width: 56px; height: 56px; margin: 0 !important; max-width: none;
  }
  html body .simple-chat-dock > .simple-chat-about { display: none !important; }
  html body .simple-chat-dock > .simple-chat-launch {
    box-sizing: border-box; width: 56px; height: 56px; min-width: 56px; min-height: 56px; padding: 0;
    justify-content: center; gap: 0; border-radius: 50%;
  }
  html body .simple-chat-dock > .simple-chat-launch .t {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  html body .simple-chat-dock > .simple-chat-launch:hover { transform: none; }
  /* Bottom room equal to the button's height plus its margin, so the last section reads in full above it. */
  html body:has(.simple-chat-dock > .simple-chat-launch:not([hidden])) {
    padding-bottom: calc(56px + 14px + 16px + env(safe-area-inset-bottom, 0px));
  }
  /* The page behind a full-screen chat does not scroll with it. */
  html body:has(#simple-chat-drawer.open) { overflow: hidden; }

  /* Full screen, sized to the part of the screen the keyboard leaves. */
  html body #simple-chat-drawer, html.chat-window body #simple-chat-drawer {
    top: var(--chat-vvt, 0px) !important; bottom: auto !important;
    height: var(--chat-vvh, 100dvh) !important; max-height: none !important;
  }
  /* Every rule from here to the end of the folded controls, and the touch sizes of the text, stands behind
     html:where(:not(.chat-window)). The pop-out window is 360 to 560 px wide and falls under this phone width, yet it is a
     desktop window: it keeps the pane's own design, with Response controls, Guide and the three rows of small chips always in
     view, and no Options fold. :where() adds no specificity, so every other window cascades as it did before this prefix. */
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-thread { overscroll-behavior: contain; min-height: 0; padding: 14px; }

  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-head {
    flex-wrap: wrap; gap: 6px 8px; padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
  }
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-move { flex: 1 1 150px; }
  html:where(:not(.chat-window)) body #simple-chat-drawer.simple-chat-compact :is(.simple-chat-close, .simple-chat-guide-toggle, .simple-chat-options-toggle, .simple-chat-about-inner),
  html:where(:not(.chat-window)) body #simple-chat-drawer.simple-chat-compact .pill,
  html:where(:not(.chat-window)) body #simple-chat-drawer.simple-chat-compact .pill.session,
  html:where(:not(.chat-window)) body #simple-chat-drawer.simple-chat-compact .simple-chat-send,
  html:where(:not(.chat-window)) body #simple-chat-drawer.simple-chat-compact .simple-chat-guide-close,
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-sug {
    min-height: 44px !important; min-width: 44px; box-sizing: border-box;
  }
  html:where(:not(.chat-window)) body #simple-chat-drawer.simple-chat-compact .pill { padding: 8px 14px !important; font-size: 13px !important; }
  html:where(:not(.chat-window)) body #simple-chat-drawer.simple-chat-compact :is(.simple-chat-close, .simple-chat-guide-toggle, .simple-chat-options-toggle, .simple-chat-about-inner, .pill.session) {
    padding: 8px 14px !important; font-size: 14px !important;
  }
  html body #simple-chat-drawer .simple-chat-about-inner {
    display: inline-flex; align-items: center; border: 1px solid var(--line, #D5E0DC); border-radius: 8px;
    background: #fff; color: var(--ink-2, #0E2621); font: 500 14px "IBM Plex Sans", system-ui, sans-serif; cursor: pointer;
  }
  html body #simple-chat-drawer .simple-chat-about-inner:focus-visible,
  html body #simple-chat-drawer .simple-chat-options-toggle:focus-visible { outline: 2px solid var(--jade, #0E8A6E); outline-offset: 2px; }
  html body #simple-chat-drawer .simple-chat-about-inner[hidden] { display: none; }
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-guide-close { width: 44px; height: 44px; }
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-sessions-row { flex-wrap: wrap; padding: 6px 12px; }
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-sessions { padding: 6px 12px; }

  /* The question box and Send stay in view; the response controls fold behind Options. */
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-form,
  html:where(:not(.chat-window)) body #simple-chat-drawer.simple-chat-compact .simple-chat-form {
    flex: none; padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-form textarea.simple-chat-input,
  html:where(:not(.chat-window)) body #simple-chat-drawer.simple-chat-compact textarea.simple-chat-input { font-size: 16px !important; }
  html:where(:not(.chat-window)) body #simple-chat-drawer.simple-chat-compact .simple-chat-box { align-items: stretch; }
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-controls-head > span { display: none; }
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-controls-head { justify-content: flex-start; margin-top: 8px; padding-top: 8px; }
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-options-toggle {
    display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--jade, #0E8A6E); border-radius: 8px;
    background: #fff; color: var(--jade-dark, #075C47); font: 600 14px "IBM Plex Sans", system-ui, sans-serif; cursor: pointer;
  }
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-options-toggle::after {
    content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg); transition: transform .16s;
  }
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-options-toggle[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-form:not(.opts-open) :is(.simple-chat-controls, .simple-chat-guide, .simple-chat-guide-toggle) { display: none !important; }
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-form.opts-open .simple-chat-controls { max-height: 38dvh; overflow-y: auto; overscroll-behavior: contain; }
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-guide { position: static; max-height: 38dvh !important; margin-top: 8px; }

  /* Text wraps and reads at phone size. The sizes stay behind the pop-out exclusion; the wrapping below also serves a narrow pop-out. */
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-thread .simple-chat-bubble.user,
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-thread .simple-chat-answer .simple-chat-prose { font-size: 15px !important; line-height: 1.5 !important; }
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-thread .simple-chat-sug { font-size: 14px !important; }
  html body #simple-chat-drawer .simple-chat-thread .simple-chat-sug {
    white-space: normal; overflow-wrap: anywhere; text-align: left; display: block;
  }
  html body #simple-chat-drawer .simple-chat-thread :is(.simple-chat-sug-type, .simple-chat-answer-type, .simple-chat-source, .simple-chat-section-label) {
    white-space: normal; overflow-wrap: anywhere; max-width: 100%;
  }
  html body #simple-chat-drawer .simple-chat-thread .simple-chat-answer-meta { gap: 6px 8px; }
  html body #simple-chat-drawer .simple-chat-thread .factchip.fact-inline { white-space: normal; overflow-wrap: anywhere; max-width: 100%; text-align: left; }
  html body #simple-chat-drawer .simple-chat-thread .simple-chat-bubble { max-width: 100%; overflow-wrap: anywhere; }
}
@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
  html:where(:not(.chat-window)) body #simple-chat-drawer .simple-chat-options-toggle::after { transition: none; }
}
