/* ASK KATE — her screen, and her bubble. Loaded by the shell (src/app.js:
   page()) on every page, the same seam and the same reason as
   /list-preview.css: from 16 September 2026 Kate is reachable from every
   screen in SGE, so her rules are the shell's rather than one page's, and
   public/style.css and its component register are still untouched.
   Everything here leans on the shell's own tokens: rounded rectangles, the
   44px touch floor, no forced capitals. */

.kate-card {
  max-width: 720px;
}

.kate-hello p {
  margin: 0 0 var(--sp-xs);
}

.kate-example {
  color: var(--ink-2);
  font-style: italic;
}

.kate-turn {
  margin: var(--sp-md) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.kate-me {
  align-self: flex-end;
  max-width: 85%;
  margin: 0;
  padding: var(--sp-xs) var(--sp-sm);
  background: var(--accent-soft, var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 10px;
}

.kate-her {
  align-self: flex-start;
  max-width: 85%;
  padding: var(--sp-xs) var(--sp-sm);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  white-space: pre-line;
}

.kate-voice {
  align-self: flex-start;
  max-width: 85%;
}

.kate-notice {
  margin: var(--sp-sm) 0;
  padding: var(--sp-xs) var(--sp-sm);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-2);
}

/* The live-conversation block — text in, text back (Keith, 15 September 2026:
   "text mode only"). It stacks: the state sentences, the transcript, the
   thinking line, the box to type in, and the end control on the right at the
   foot of the block. The state sentences and the transcript are rendered hidden
   by the server and revealed by assistant-kate.js; THE BOX TO TYPE IN IS NOT —
   it is live from the first paint, because there is no "Start a conversation"
   to press first (Keith, 16 September 2026) and typing is what starts one. */
.kate-live {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  margin: var(--sp-sm) 0;
}

/* HIDDEN MEANS HIDDEN, INSIDE THIS BLOCK. Several parts of it carry a display
   rule of their own (the form below is a flex row, the transcript a flex
   column), and an author display rule beats the browser's own
   [hidden] { display: none } — so the box to type in stood on screen before a
   conversation had started, looking usable and swallowing what was typed into
   it. That is the second half of the fault Keith hit on 15 September 2026.
   This rule carries the attribute, so it outranks the class rules below. */
.kate-live [hidden] {
  display: none;
}

.kate-live .kate-notice {
  margin: 0;
}

.kate-live .btn {
  min-height: var(--tap, 44px);
}

/* The running transcript. It scrolls inside its own box rather than growing
   the page — the list rule applied here, so the box to type in stays put and
   the screen does not lengthen with the conversation. */
.kate-transcript {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  max-height: min(46vh, 380px);
  overflow-y: auto;
  padding: var(--sp-xs) 0;
}

.kate-said {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 85%;
}

.kate-said.is-me {
  align-self: flex-end;
  align-items: flex-end;
}

.kate-said.is-kate {
  align-self: flex-start;
}

/* Who said it — small and muted, because the side of the row carries most of
   the message and the label only has to settle it. */
.kate-who {
  margin: 0;
  font-size: var(--fs-caption);
  color: var(--ink-2);
}

.kate-said .kate-me,
.kate-said .kate-her {
  align-self: auto;
  max-width: 100%;
}

.kate-thinking {
  font-style: italic;
}

/* The box to type in, shaped like the form beneath it so the two read as one
   screen and not two. */
.kate-live-form {
  display: flex;
  gap: var(--sp-xs);
  align-items: flex-end;
}

.kate-live-form .btn {
  min-height: var(--tap, 44px);
}

/* Action buttons bottom right. */
.kate-live-controls {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-xs);
}

.kate-form {
  display: flex;
  gap: var(--sp-xs);
  align-items: flex-end;
  margin-top: var(--sp-md);
}

/* THE MESSAGE BOX IS A FIELD LIKE ANY OTHER FIELD. It used to draw its own
   edge — `1px solid var(--line)`, the pale hairline that draws section rules,
   on a 10px corner — which is exactly the "fields are so blended in" Keith
   named on the proposal form, and it outranked the one rule in public/style.css
   that says what a field looks like. The border and the radius come off and it
   takes the house --field-bg inside --field-line, with the hover and the ring
   that come with them. What stays is what is this box's own: it grows in the
   row it shares with Send, and a person may drag it taller. */
.kate-input {
  flex: 1;
  min-height: var(--tap, 44px);
  padding: var(--sp-xs) var(--sp-sm);
  font: inherit;
  resize: vertical;
}

.kate-form .btn {
  min-height: var(--tap, 44px);
}

/* =====================================================================
   THE BUBBLE IS GONE, AND SO IS EVERY RULE THAT DRESSED IT.

   KEITH, 17 September 2026, asked in as many words whether Ask Kate belongs
   in the app bar (that night's decision) or in the floating bubble his 16
   September rule had put in the lower right of every page: "tonight's
   decision". So the ~250 lines that lived here — `.kate-bubble` and its fixed
   corner, its z-index of 45, the opener, the 400px panel, its head, its close
   and the phone rules that made it full screen — are removed rather than left
   for an element that is never rendered.

   WHERE SHE IS NOW: an ordinary control on the app bar beside Showcase
   (src/app.js askKateControlHtml), taking `.nav-showcase`'s own dressing in
   public/style.css, and it is a LINK to /assistant. The conversation surface
   above in this file — `.kate-live` and everything under it — is unchanged and
   is rendered on that page, which is the arrangement that held before the
   bubble and holds again.

   AND THE TWO RESERVES THE BUBBLE NEEDED WENT WITH IT: `--kate-clear` and
   `--kate-corner` in public/style.css, which kept the last row of every list,
   the pager, the column footnotes and every page-level action row out from
   under a control that floated over them.
   ===================================================================== */
