/* bot.css - Ally's window. Ported from the OPS-06 console's bot/ui/bot.css,
 * which was itself the panel's ask.css. This is a PORT, not a restyling: the
 * layout, the grip strip, the two zones, the answer cards, the 380px starting
 * width, the fold behaviour and every rule below are the file's own. What
 * changed is stated here in full, so the two can be diffed years from now.
 *
 * 1. THE TOKENS READ PAPERALLY'S DESIGN SYSTEM. Each --bot-* name reads the
 *    site's own token with the panel's original value as the fallback, exactly
 *    as the source file did for the console. Inside PaperAlly they resolve to
 *    app.css; copied into a host that declares nothing they still look like
 *    themselves. Fitting in and being copyable are one mechanism.
 *
 *      --ink       --bot-ink        --line       --bot-line
 *      --ink-soft  --bot-ink2, --bot-muted       --line-soft  --bot-wash
 *      --paper     --bot-paper      --red/-wash  --bot-accent/--bot-errbg
 *      --brand     --bot-ok, --bot-z2, --bot-cta (the green of the warrant)
 *      --blue      --bot-z1         --amber      --bot-mark
 *
 * 2. --bot-serif BECAME --bot-face. The console's window was set in a serif
 *    because the panel was. PaperAlly's design system names one face, --font,
 *    and a token called "serif" holding a sans would be a lie a later reader
 *    has to untangle. Same six usages, one honest name.
 *
 * 3. color-mix() IS GONE. The source derived its washes by mixing; PaperAlly
 *    already publishes --brand-wash, --blue-wash, --amber-wash and --red-wash,
 *    so the washes are read rather than computed. One less thing that can fail
 *    at computed-value time and take a whole rule down with it.
 *
 * 4. z-index 20 BECAME 60. PaperAlly's sticky top bar sits at 40, and a helper
 *    window that slides underneath the site's own header is a window nobody can
 *    use. A value adapted to the host, which is the only kind of change a port
 *    is allowed to make.
 *
 * Left behind with the console, as it left them behind with the panel: the
 * dashboard iframe's zone 3, the settings dialog, the design and agent modes.
 *
 * THE SELECTOR MAP IS UNCHANGED FROM THE SOURCE:
 *     #panel -> .botwin      #q    -> #bot-q      #out  -> .bot-out
 *     #zone1/2 -> .zone1/2   #send -> .bot-send   #fold -> [data-fold]
 *     #askForm -> .bot-ask   #grow -> .grow
 */

.botwin{
  --bot-ink:    var(--ink,       #16212b);
  --bot-ink2:   var(--ink-soft,  #55646f);
  --bot-muted:  var(--ink-soft,  #55646f);
  --bot-line:   var(--line,      #e2e8ec);
  --bot-paper:  var(--paper,     #ffffff);
  --bot-wash:   var(--line-soft, #eef2f5);

  /* THE WARM ACCENT IS THE PANEL'S ERROR RED - it draws .err, the t-err tag and
     the fan heading, and nothing else. PaperAlly names that role --red, so this
     is a mapping rather than a guess. */
  --bot-accent:  var(--red,      #b3261e);
  --bot-errbg:   var(--red-wash, #fdecea);
  --bot-errline: var(--red,      #b3261e);

  /* THE PANEL'S GREEN, ONCE. --bot-ok (a source Ally read) and --bot-z2 (the
     answers zone) were the same colour in the source and must stay the same
     here; in PaperAlly that role is --brand, the green of the warrant. */
  --bot-ok:      var(--brand,      #0b6e4f);
  --bot-z2:      var(--brand,      #0b6e4f);
  --bot-z2-wash: var(--brand-wash, #eaf5f0);

  /* THE ASK ZONE. In the console this navy was the one colour with no host
     counterpart and kept the panel's own value. PaperAlly does name a blue, so
     the zone reads it and the pair of zones stays the pair of zones. */
  --bot-z1:      var(--blue,      #1d5fa8);
  --bot-z1-wash: var(--blue-wash, #eaf1fa);

  /* THE ONE THING ON AN ANSWER THAT LEADS SOMEWHERE, kept separate from the
     error red. In the console a door drawn in the error colour read as a
     warning and could not be found at all. */
  --bot-cta:      var(--brand,      #0b6e4f);
  --bot-cta-wash: var(--brand-wash, #eaf5f0);

  /* YOU AND ALLY, TOLD APART BY COLOUR RATHER THAN BY POSITION. The question
     takes the ask zone's blue, which is already the colour of the box it was
     typed into; the answer stays the window's own ink on the answers zone. */
  --bot-you:      var(--bot-z1);
  --bot-you-wash: var(--blue-wash, #eaf1fa);

  /* HIGHLIGHT. A <mark> the text asked for with ==this==. Amber, because
     nothing else in this window is amber, so a highlight cannot be misread as a
     warrant state. */
  --bot-mark:      var(--ink,        #16212b);
  --bot-mark-wash: var(--amber-wash, #fdf3e4);

  --bot-face:   var(--font, "Segoe UI", system-ui, -apple-system, sans-serif);
  --bot-mono:   var(--mono, "Cascadia Mono", "SF Mono", Consolas, monospace);

  --panel-w: 380px;
  --panel-h: 66vh;
}

.botwin{position: fixed; z-index: 60; width: var(--panel-w); height: var(--panel-h); right: 22px; bottom: 22px; display: flex; flex-direction: column; background: var(--bot-paper); border: 1px solid var(--bot-line); border-radius: 12px; box-shadow: 0 10px 34px rgba(20, 22, 26, .17); overflow: hidden; min-width: 260px; min-height: 200px;}
.botwin .grow{position: absolute; right: 0; bottom: 0; z-index: 3; width: 18px; height: 18px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 0 46%, var(--bot-muted) 46% 54%, transparent 54%) no-repeat, linear-gradient(135deg, transparent 0 70%, var(--bot-muted) 70% 78%, transparent 78%) no-repeat; background-size: 100% 100%; opacity: .5;}
.botwin .grow:hover{opacity: 1;}
.botwin .redge{position: absolute; z-index: 2;}
.botwin .redge-n{top: 0; left: 0; right: 0; height: 6px; cursor: ns-resize;}
.botwin .redge-s{bottom: 0; left: 0; right: 0; height: 6px; cursor: ns-resize;}
.botwin .redge-w{left: 0; top: 0; bottom: 0; width: 6px; cursor: ew-resize;}
.botwin .redge-e{right: 0; top: 0; bottom: 0; width: 6px; cursor: ew-resize;}
.botwin.folded .redge{display: none;}
.botwin header{flex: 0 0 auto; position: relative; height: 28px; padding: 0 8px; display: flex; align-items: center; gap: 8px; background: var(--bot-wash); border-bottom: 1px solid var(--bot-line); cursor: grab; user-select: none;}
body.dragging .botwin header{cursor: grabbing;}
.botwin .grip{flex: 1; height: 10px; background-image: radial-gradient(var(--bot-line) 1.1px, transparent 1.2px); background-size: 5px 5px; background-position: center;}
.botwin .folded-label{display: none; font: 600 11.5px/1 var(--bot-face); color: var(--bot-ink2); letter-spacing: .01em;}
.botwin.folded .folded-label{display: block;}
.botwin.folded .grip{flex: 0 0 22px;}
.botwin [data-fold]{flex: 0 0 auto; width: 20px; height: 20px; padding: 0; display: flex; align-items: center; justify-content: center; font: 600 10px/1 var(--bot-mono); color: var(--bot-ink2); background: transparent; border: 1px solid transparent; border-radius: 4px; cursor: pointer;}
.botwin [data-fold]:hover{color: var(--bot-paper); background: var(--bot-ink); border-color: var(--bot-ink);}
.botwin .bot-ask{padding: 10px 12px 12px; display: flex; align-items: end; gap: 7px;}
.botwin #bot-q{flex: 1; min-width: 0; resize: vertical; height: 38px; min-height: 38px; max-height: 40vh; padding: 8px 10px; font: inherit; font-size: 13.5px; color: var(--bot-ink); background: var(--bot-paper); border: 1px solid var(--bot-line); border-radius: 7px;}
.botwin #bot-q:focus{outline: 2px solid var(--bot-z1); outline-offset: -1px;}
/* THE SEND BUTTON'S LABEL IS THE PAPER TOKEN, NOT #fff. Its ground is
   --bot-ink, which in dark is near-white; white on near-white is a button with
   no writing on it. The label is always the opposite of whatever the button is
   painted with. Identical in light. */
.botwin .bot-send{flex: 0 0 auto; height: 38px; padding: 0 12px; font: 600 13px/1 inherit; color: var(--bot-paper); background: var(--bot-ink); border: 0; border-radius: 7px; cursor: pointer;}
.botwin .bot-send:hover:not(:disabled){background: var(--bot-z1);}
.botwin .bot-send:disabled{opacity: .5; cursor: default;}
.botwin .zone1, .botwin .zone2{position: relative;}
.botwin .zone2{flex: 1; min-height: 0; display: flex; background: var(--bot-z2-wash); border-left: 3px solid var(--bot-z2);}
.botwin .zone1{flex: 0 0 auto; background: var(--bot-z1-wash); border-left: 3px solid var(--bot-z1); border-top: 1px solid var(--bot-line);}
.botwin .zone{position: absolute; top: 7px; right: 8px; z-index: 4; width: 19px; height: 19px; display: flex; align-items: center; justify-content: center; font: 600 11px/1 var(--bot-mono); color: var(--bot-paper); background: var(--bot-ink); border-radius: 50%; pointer-events: none; user-select: none;}
.botwin .zone1 > .zone{background: var(--bot-z1);}
.botwin .zone2 > .zone{background: var(--bot-z2);}
.botwin #bot-q{background: var(--bot-paper);}
.botwin .bot-out{flex: 1; min-height: 0; overflow-y: auto; padding: 4px 18px 18px;}
.botwin .a{border-top: 1px solid var(--bot-line); padding-top: 14px; margin-top: 14px;}
.botwin .a:first-child{border-top: 0; margin-top: 0;}
.botwin .a .body code{background: var(--bot-paper);}
.botwin .a .body{font-size: 14px;}
.botwin .a .body p{margin: 0 0 9px;}
.botwin .a .body ul, .botwin .a .body ol{margin: 0 0 9px; padding-left: 19px;}
.botwin .a .body li{margin: 0 0 3px;}
.botwin .a .body strong{font-weight: 650;}
.botwin .a .body code{font: 12.5px var(--bot-mono); background: var(--bot-wash); padding: 1px 4px; border-radius: 3px;}
.botwin .thinking{color: var(--bot-muted); font-style: italic;}
.botwin .err{color: var(--bot-accent); background: var(--bot-errbg); border: 1px solid var(--bot-errline); border-radius: 6px; padding: 9px 11px; font-size: 13.5px;}
.botwin .prov{margin-top: 9px; font-size: 12px; color: var(--bot-muted);}
.botwin .prov summary{cursor: pointer;}
.botwin .prov .read{display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px;}
.botwin .src{font: 11px/1.35 var(--bot-mono); background: var(--bot-wash); border: 1px solid var(--bot-line); border-radius: 4px; padding: 4px 6px;}
.botwin .src.mine{border-color: var(--bot-ok); color: var(--bot-ok);}
.botwin .stamp{margin-top: 6px; font: 11px var(--bot-mono);}
/* AN EARLIER TURN IS MARKED, NOT DIMMED. The source had this at opacity .72 and
   measured the question line at 3.91:1 - under 4.5, and invisible to an audit
   that reads the colour a rule sets and knows nothing about an ancestor's
   opacity. The timestamp tag already says when it was said, so the dimming was
   carrying no information the words did not. */
.botwin .a.restored{
  border-left: 2px dotted var(--bot-line);
  padding-left: 10px;
  margin-left: -12px;
}
.botwin .fan{display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-top: 6px;}
.botwin .fanone{min-width: 0;}
.botwin .fanhead{font-size: 11px; letter-spacing: .02em; color: var(--bot-accent); border-bottom: 1px solid var(--bot-line); padding-bottom: 3px; margin-bottom: 5px;}
.botwin .fanmodel, .botwin .fanms{color: var(--bot-muted);}
.botwin [data-fold]{transition: transform .15s ease;}

/* --------------------------------------------------- what the extractor could
   not reach. The source states these once at the end rather than inside the
   lifted rules, and so does this. Values are still the panel's. */
.botwin .zone2{flex:1 1 auto;overflow:auto;min-height:0}
.botwin .zone1{flex:0 0 auto;border-top:1px solid var(--bot-line)}
.botwin .bot-out{padding:10px 12px}
.botwin.folded{height:28px!important;min-height:0}
.botwin.folded .zone1,.botwin.folded .zone2{display:none}
/* THE SOURCE'S THREE FOLDED RULES THAT NEVER MATCHED, corrected here rather
   than edited above, which is how the source file itself handles a rule it has
   to override. `.botwin.folded .botwin .grow` looks for a window inside a
   window: there is none, so the resize grip stayed on a folded bar and the fold
   arrow never turned. Stated the way the zones already are, one line each. */
.botwin.folded .grow{display:none}
.botwin.folded [data-fold]{transform:rotate(-90deg)}
.botwin .bot-note{margin:0;padding:0 12px 9px;
  font:11.5px/1.45 var(--bot-face);color:var(--bot-muted)}

/* The three states an answer can be in, in the panel's own vocabulary. */
.botwin .tag{display:inline-block;font:10.5px/1 var(--bot-mono);letter-spacing:.04em;
  text-transform:uppercase;color:var(--bot-muted);border:1px solid var(--bot-line);
  border-radius:3px;padding:2px 5px;vertical-align:2px}
.botwin .tag.t-ok{color:var(--bot-ok);border-color:var(--bot-ok)}
.botwin .tag.t-err{color:var(--bot-accent);border-color:var(--bot-accent)}
.botwin .hint{margin:0 0 7px;font:12px/1.5 var(--bot-face);color:var(--bot-muted)}

/* NARROW SCREENS, WRITTEN HERE ON PURPOSE. One place, one query, legible. */
@media(max-width:640px){
  .botwin{left:0!important;right:0!important;bottom:0!important;top:auto!important;
    width:auto!important;height:min(60vh,420px)!important;
    border-radius:12px 12px 0 0;border-left:0;border-right:0;border-bottom:0}
  .botwin .redge-w,.botwin .redge-e,.botwin .grow{display:none}
}

/* THE GRIP STRIP'S WASH, PINNED LAST. Two of the lifted rules also set
   `.botwin header` - one from the folded state, one from the drag state - and
   whichever landed later won, leaving the strip transparent. The wanted values
   are stated at the end where the cascade cannot lose them. */
.botwin header{background:var(--bot-wash);border-bottom:1px solid var(--bot-line);
  cursor:grab}
body.dragging .botwin header{cursor:grabbing}
.botwin.folded header{border-bottom:0}

/* A COMPONENT THAT INHERITS ITS COLOUR CANNOT CARRY ITS OWN DESIGN.
   The window paints its own paper and would otherwise inherit the site's text
   colour from <body>. In light both are dark and nothing looks wrong; in dark
   the site's ink is near-white, so the answer text would be near-white on white
   - 1.13:1, invisible, on every page. Both halves of the pair are stated right
   here and they are stated in tokens that MOVE TOGETHER. */
.botwin{color:var(--bot-ink);font-family:var(--bot-face);font-size:14px;line-height:1.6}
.botwin #bot-q,.botwin .bot-send,.botwin .bot-note,.botwin .zone,
.botwin .prov,.botwin .tag,.botwin .hint{font-family:var(--bot-face)}
.botwin .body,.botwin .a .q{color:var(--bot-ink)}
.botwin .prov,.botwin .prov summary,.botwin .stamp{color:var(--bot-muted)}

/* ============================================================ the dark half
   INSIDE PAPERALLY THESE BLOCKS CHANGE NOTHING, and that is the honest thing to
   say about them: every --bot-* token above reads a site token that app.css
   already redefines for dark, so the window has flipped before these are read.
   They earn their place the day this file is copied into a host that declares
   no tokens at all, which is what makes the window portable - and only the
   FALLBACK halves move.

   WRITTEN TWICE, AND THAT IS NOT REDUNDANCY. The theme switch has three states.
   A bare prefers-color-scheme query serves only System, so choosing Dark on a
   light machine would leave this window light while the page behind it went
   dark. So: the light list on the bare block above, never only in a query; the
   media query GUARDED with :root:not([data-theme="light"]) so an explicit Light
   beats a dark machine; and the same list again under :root[data-theme="dark"],
   AFTER the media block, because equal specificity means source order decides. */
@media(prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .botwin{
    --bot-ink:    var(--ink,       #e6edf3);
    --bot-ink2:   var(--ink-soft,  #a9b6c1);
    --bot-muted:  var(--ink-soft,  #a9b6c1);
    --bot-line:   var(--line,      #2a333c);
    --bot-paper:  var(--paper,     #171d23);
    --bot-wash:   var(--line-soft, #222a32);
    --bot-accent:  var(--red,      #f07a72);
    --bot-errbg:   var(--red-wash, #3a1f1d);
    --bot-errline: var(--red,      #f07a72);
    --bot-ok:      var(--brand,      #4cc38a);
    --bot-z2:      var(--brand,      #4cc38a);
    --bot-z2-wash: var(--brand-wash, #16302a);
    --bot-z1:      var(--blue,       #7fb0e8);
    --bot-z1-wash: var(--blue-wash,  #17263a);
    --bot-cta:      var(--brand,      #4cc38a);
    --bot-cta-wash: var(--brand-wash, #16302a);
    --bot-you:      var(--bot-z1);
    --bot-you-wash: var(--blue-wash,  #17263a);
    --bot-mark:      var(--ink,        #e6edf3);
    --bot-mark-wash: var(--amber-wash, #33280f);
  }
}

:root[data-theme="dark"] .botwin{
  --bot-ink:    var(--ink,       #e6edf3);
  --bot-ink2:   var(--ink-soft,  #a9b6c1);
  --bot-muted:  var(--ink-soft,  #a9b6c1);
  --bot-line:   var(--line,      #2a333c);
  --bot-paper:  var(--paper,     #171d23);
  --bot-wash:   var(--line-soft, #222a32);
  --bot-accent:  var(--red,      #f07a72);
  --bot-errbg:   var(--red-wash, #3a1f1d);
  --bot-errline: var(--red,      #f07a72);
  --bot-ok:      var(--brand,      #4cc38a);
  --bot-z2:      var(--brand,      #4cc38a);
  --bot-z2-wash: var(--brand-wash, #16302a);
  --bot-z1:      var(--blue,       #7fb0e8);
  --bot-z1-wash: var(--blue-wash,  #17263a);
  --bot-cta:      var(--brand,      #4cc38a);
  --bot-cta-wash: var(--brand-wash, #16302a);
  --bot-you:      var(--bot-z1);
  --bot-you-wash: var(--blue-wash,  #17263a);
  --bot-mark:      var(--ink,        #e6edf3);
  --bot-mark-wash: var(--amber-wash, #33280f);
}

/* AND NO LIGHT VALUE LIVES ONLY INSIDE A MEDIA QUERY. Every token above is
   declared on the bare .botwin block at the top of this file, where an explicit
   Light on a dark machine can still reach it - a value that exists only inside
   a query the browser has decided is false is a value nobody can choose. */

/* ---------------------------------------- WHAT IS ATTACHED TO THE QUESTION
   The chip row and the attachment machinery port with the module and sit
   dormant: Ally is given no `pointer`, so nothing is ever attached and the row
   is empty. Kept rather than deleted because the day a page wants to hand Ally
   what is on screen, the surface is already here and already argued for.

   `cut` APPEARS WHEN AN ATTACHMENT DID NOT FIT, with what was dropped in its
   title. A pack that quietly sent eleven of thirty-four items would be worse
   than one that sent none. */
.botwin .bot-chips{
  display:flex;
  flex-wrap:wrap;
  gap:0.3rem;
  padding:0 0.6rem 0.4rem;
}
.botwin .bot-chips:empty{ display:none }

.bot-chip{
  display:inline-flex;
  align-items:center;
  gap:0.3rem;
  min-height:24px;
  padding:0.1rem 0.2rem 0.1rem 0.5rem;
  font:0.6875rem/1.4 var(--bot-face);
  color:var(--bot-ink2);
  background:var(--bot-wash);
  border:1px solid var(--bot-line);
  border-radius:0.75rem;
  max-width:100%;
}
.bot-chip b{ font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.bot-chip i{ font-style:normal; color:var(--bot-muted) }
/* THE CUT MARK IS AMBER, not red: an attachment that was trimmed is still
   useful, and painting it as an error would teach people to distrust every
   chip. */
.bot-chip u{
  text-decoration:none;
  padding:0 0.25rem;
  border-radius:0.25rem;
  color:var(--amber, #b26a00);
  background:var(--amber-wash, #fdf3e4);
}
.bot-chip-x{
  min-width:24px;
  min-height:24px;
  padding:0;
  font:1rem/1 var(--bot-face);
  color:var(--bot-muted);
  background:none;
  border:0;
  border-radius:50%;
  cursor:pointer;
}
.bot-chip-x:hover,
.bot-chip-x:focus-visible{
  color:var(--bot-accent);
  background:var(--bot-line);
}

/* WHAT WENT WITH THE QUESTION, printed on the answer. Quiet - a fact to check
   when something reads oddly, not a thing to read every time. `Not sent` is the
   exception and is coloured, because an attachment that did not arrive changes
   what an answer is worth. */
.bot-gave{
  margin:0.15rem 0 0.35rem;
  font-size:0.6875rem;
  color:var(--bot-muted);
}
.bot-gave.is-refused{ color:var(--amber, #b26a00) }

/* THE INLINE HOST'S FALLBACK for the review link, and nothing more. The
   window's own version is at the foot of this file. */
.bot-propose{ display:block; margin:0.2rem 0 0.5rem; font-weight:600;
  color:var(--bot-cta) }
.bot-propose span{ font-weight:400; color:var(--bot-muted) }

/* ================================================== WHO SAID IT, AND WHAT IT SAID
   Before this the question and the answer were the same ink in the same column,
   told apart only by one being above the other - which stops working the moment
   a conversation is more than two turns long or an answer is longer than the
   window.

   THE QUESTION TAKES THE ASK ZONE'S COLOUR, which is the colour of the box it
   was typed into and of the badge on that zone. The answer keeps the window's
   own ink. Nothing new is invented: the pairing already existed as the two
   zones. */
.botwin .a .q{
  font:600 13px/1.45 var(--bot-mono);
  color:var(--bot-you);
  background:var(--bot-you-wash);
  border-left:3px solid var(--bot-you);
  border-radius:0 6px 6px 0;
  padding:6px 9px;
  margin:0 0 10px;
  word-break:break-word;
}
/* COLOUR IS NOT THE ONLY SIGNAL (1.4.1): the question is monospace, indented
   behind a rule and set in a tinted block; the answer is the window's own face
   on its own ground. Turn the colour off and they are still two different
   things. */
.botwin .a .body{color:var(--bot-ink)}

/* A TAG INSIDE THE QUESTION KEEPS ITS OWN GROUND. The state tags are calibrated
   against the window's paper; drawn straight onto the question's tint the green
   one measured 4.31:1. Giving them the paper back is one declaration. */
.botwin .a .q .tag{background:var(--bot-paper)}

/* WHICH MODEL WAS ASKED FOR, on the question that asked for it. Dormant in
   PaperAlly: the provider-word table in bot.js is empty, so nothing is ever
   drawn here. Kept because the rule is part of the window's design and a page
   that one day names a model should not have to reinvent its badge. */
.botwin .bot-via{
  display:inline-block;
  margin:0 4px;
  font:10.5px/1 var(--bot-mono);
  letter-spacing:.04em;
  text-transform:lowercase;
  color:var(--bot-paper);
  background:var(--bot-you);
  border-radius:3px;
  padding:3px 5px;
  vertical-align:2px;
}

/* ------------------------------------------------------- markdown in an answer */
.botwin .a .body .bot-h{
  margin:12px 0 5px;
  font:650 13px/1.35 var(--bot-face);
  color:var(--bot-ink);
}
.botwin .a .body .bot-h:first-child{margin-top:0}
.botwin .a .body em{font-style:italic}
.botwin .a .body s{color:var(--bot-muted)}
.botwin .a .body mark{
  color:var(--bot-mark);
  background:var(--bot-mark-wash);
  border-radius:2px;
  padding:0 2px;
}
/* A FENCED BLOCK SCROLLS RATHER THAN WIDENING THE WINDOW. The window is 380px
   and resizable; a code line that pushed it wider would move the whole window
   off the edge of the screen. */
.botwin .a .body .bot-pre{
  margin:0 0 9px;
  padding:8px 10px;
  overflow-x:auto;
  background:var(--bot-wash);
  border:1px solid var(--bot-line);
  border-radius:6px;
}
.botwin .a .body .bot-pre code{
  display:block;
  background:transparent;
  padding:0;
  font:12px/1.5 var(--bot-mono);
  white-space:pre;
}

/* ------------------------------------------------------------- the review link
   A BLOCK, NOT A FOOTNOTE. Dormant in PaperAlly, kept whole. */
.botwin .bot-propose{
  display:flex;
  align-items:center;
  gap:10px;
  margin:2px 0 10px;
  padding:9px 11px;
  text-decoration:none;
  color:var(--bot-cta);
  background:var(--bot-cta-wash);
  border:1px solid var(--bot-cta);
  border-left-width:4px;
  border-radius:7px;
  min-height:24px;
}
.botwin .bot-propose::after{
  content:"\2192";
  margin-left:auto;
  font-size:15px;
  flex:0 0 auto;
}
.botwin .bot-propose b{
  font:650 13px/1.3 var(--bot-face);
  letter-spacing:.01em;
}
.botwin .bot-propose span{
  font:11.5px/1.3 var(--bot-face);
  color:var(--bot-ink2);
}
.botwin .bot-propose:hover,
.botwin .bot-propose:focus-visible{
  color:var(--bot-paper);
  background:var(--bot-cta);
}
.botwin .bot-propose:hover span,
.botwin .bot-propose:focus-visible span{color:var(--bot-paper)}

/* ---------------------------------------- what the question can see
   The tip opens upwards and to the left, because the Ask button sits at the
   bottom-right corner of the window: the standard tip position would put it off
   both edges. Dormant here for the same reason the chips are. */
.bot-chips{ display:none }
.bot-send{ position:relative }
.bot-asktip{
  position:absolute;
  top:auto; bottom:100%; left:auto; right:0;
  margin-bottom:0.35rem;
  padding:0.4rem 0.55rem;
  white-space:pre-line; width:max-content; max-width:30ch;
  text-align:left; font:400 11.5px/1.45 var(--bot-face);
  color:var(--bot-paper); background:var(--bot-ink);
  border-radius:6px; pointer-events:none; z-index:5;
}

/* ------------------------------------------------- ALLY'S OWN TWO ADDITIONS
   Declared as additions rather than slipped in among the ported rules.

   1. THE EMPTY WINDOW HAD TO SAY SOMETHING. In the console the window opens
      into a conversation somebody is already having with their own records. A
      visitor here opens it having never heard of a delegation warrant, and a
      blank box teaches nothing about what it will answer. So the first thing in
      an empty window is three questions it can answer, and clicking one asks
      it.
   2. THE BOUNDARY LINE under the box, which doc 06 requires on first sight:
      Ally explains, locates and quotes. It does not decide. */
.botwin .bot-empty{padding:10px 2px 4px;font-size:13px;color:var(--bot-ink)}
.botwin .bot-empty p{margin:0 0 8px}
.botwin .bot-try{
  display:block; width:100%; margin:0 0 6px; padding:7px 9px;
  font:500 12.5px/1.4 var(--bot-face); text-align:left;
  color:var(--bot-z1); background:var(--bot-paper);
  border:1px solid var(--bot-line); border-radius:7px; cursor:pointer;
}
.botwin .bot-try:hover,.botwin .bot-try:focus-visible{
  border-color:var(--bot-z1); background:var(--bot-you-wash);
}
