/* ==========================================================================
   Orcheum · CONVERSATION RESPONSE — the COMPLETED assistant turn
   Source of truth: Orcheum Component System Specification v1,
   SECTION 8 "Conversational Message Blocks" — Figma rMEk1pvm3hlrn2JuW5Sw34,
   node 158:1053 (section-chat-bubbles).

   BUILD 03B. Build 03A drew the conversation at its first breath: the band, the
   field, the reader's plate and "Thinking...". This sheet draws what comes
   next and nothing else — the finished answer, the mark that stands beside it,
   and the three controls under it.

   WHAT THIS OWNS (the RESPONSE RENDERER's half of the boundary in §12)
     - the assistant mark beside the answer (166:2999)
     - the response body's typography and measure (166:2967 / 166:2970)
     - the response action row (166:2971 / 166:2986)
     - response-content spacing (166:2966's 16 between body and actions, and
       the 16 between paragraphs)

   WHAT THIS DOES NOT OWN — deliberately
     - the turn's LAYOUT. `.orch-turn`, the 800 column, the field's padding and
       the composer's dock are conversation-workspace.css's (Build 03A) and are
       not restated here.
     - the answer RENDERER. `window.OrcheumMarkdown` still emits the same
       `.msg-md__*` blocks, `window.MessageActions` still builds the same row
       with the same wiring, and `renderConductorAnswer()` still assembles them
       in the same order. Every rule below is presentation over structure that
       already exists — there is no second renderer and no second action row.
     - the CITATION system. §10: Section 8 draws no citation design, so none is
       invented. The pills, the References toggle and the aggregate disclosure
       keep their own component paint and their own behaviour; all that reaches
       them here is the row they sit in.
     - the RUN's metadata. `.orch.is-done` is response metadata, not a second
       message. §11 asks for no visual expansion of it, so this file only stops
       it fighting the new 16 rhythm.

   SCOPING, as in Build 03A and Build 02. Every selector is written under
   `.ws-main.is-conversation .orch-turn > .msg-answer` — a completed answer IN
   A CONVERSATION TURN. That excludes, by construction:
     · `.ws-surface__doc`   the working panel's document (execution-surface.js)
     · `.sroom-finding`     a Studio room's finding (studio-room.js)
     · Home, Projects, Artifacts, Customize and the Studios entirely
   all of which mount `.msg-answer` and must keep the treatment they have.

   LOADED AFTER conversation-workspace.css, and therefore after
   workspace-home-figma.css, markdown.css, orchestration.css and
   message-actions.css — the sheets that describe the answer this one replaces.
   Where they disagree with Section 8, this file is right.
   ========================================================================== */

/* ==========================================================================
   THE RESPONSE BLOCK — 158:1061
   A 20 mark, 12 of air, then the answer. The frame lays the row out with
   `items-start`, so the mark sits against the first line's own top rather than
   on its optical centre.

   It is drawn as the block's OWN mark — absolutely placed against the block's
   padding — rather than as an element in the flow, which is how the surface it
   replaces drew it too (workspace-home-figma.css, 905:13792). Keeping that
   shape means the answer's measure, the reveal stagger and the persisted body
   are all untouched by the mark's arrival.
   ========================================================================== */
.ws-main.is-conversation .orch-turn > .msg-answer {
  /* Section 8's response treatment, stated once. Everything below reads these
     rather than restating literals, so the response has ONE type and ONE ink
     and the heading, the list and the paragraph cannot drift apart. */
  --oc-resp-face: var(--font-serif);
  --oc-resp-size: 16px;
  --oc-resp-leading: 1.2;        /* 166:2970 — leading-[1.2] */
  --oc-resp-tracking: 0.64px;    /* 166:2970 — tracking-[0.64px] */
  --oc-resp-ink: #141413;        /* 166:2970 */
  /* 166:2967's own 748, which is what fixes the reading measure at the frame's
     732 once the 8 of padding is taken off each side. */
  --oc-resp-measure: 748px;

  position: relative;
  /* 20 (the mark) + 12 (158:1061's gap) = 32. It was 43 — the retired frame's
     24 mark at x=8 — and that is the value being replaced here. */
  padding-left: 32px;
  /* 166:2966 — gap-16 between the body and the action row. `.msg-answer--md`
     carries 15 and `.msg-answer` 23; both are the previous frame's rhythm. */
  gap: 16px;
  /* The measure is set on the CHILDREN, at the frame's own 748, not on the
     block: the block is the full column so the mark has somewhere to stand.
     `.msg-answer--md`'s 720 would otherwise cap the row 28 short of the
     frame's own and pull the actions in with it. */
  max-width: none;
  color: var(--oc-resp-ink);
}

/* 166:2999 — the Orcheum mark, 20 square, on the column's left edge.

   THE ASSET IS THE REPOSITORY'S OWN. `assets/brand/orcheum-mark-spectrum.svg`
   is the same node this section exports (both are named "14"): the locked
   curve set in the spectrum finish, at the 80% opacity and with the flip the
   frame places it with. It is not approximated and it is not redrawn. The one
   thing the file deliberately does not carry is the export's drop shadow,
   which is why its box is a clean 24 where Figma's is 52.6 — see the note in
   the asset itself.

   `top: 0` is the frame's `items-start`, not an optical adjustment: the first
   line box of 16/1.2 copy is 19.2 tall, so a 20 mark against the block's top
   already sits on that line. */
.ws-main.is-conversation .orch-turn > .msg-answer::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  background: url("../../assets/brand/orcheum-mark-spectrum.svg") no-repeat center / contain;
  pointer-events: none;
}

/* ==========================================================================
   THE RESPONSE BODY — 166:2967 / 166:2970
   748 wide with 8 of padding either side, which is the frame's 732 of copy.
   The 16 between paragraphs is 166:2970's own `mb-[16px]`, and it is stated
   as the container's gap because every block the renderer emits — paragraph,
   heading, list, figure, table, rule — sits in the same flow and must keep the
   same rhythm. §9: no Markdown default may leak in beside it.
   ========================================================================== */
.ws-main.is-conversation .orch-turn > .msg-answer > .msg-answer__content {
  max-width: var(--oc-resp-measure);
  padding: 0 8px;
  gap: 16px;
}

/* ---- the copy itself ----------------------------------------------------
   Paragraphs, list items and quoted prose are ONE treatment, because Section 8
   draws one. `--oc-resp-face` resolves to the repository's editorial serif
   token; see the note at the foot of this file for why it is the token rather
   than the family name the export carries. */
.ws-main.is-conversation .orch-turn > .msg-answer .msg-md__p,
.ws-main.is-conversation .orch-turn > .msg-answer .msg-answer__lede,
.ws-main.is-conversation .orch-turn > .msg-answer .msg-md__list li,
.ws-main.is-conversation .orch-turn > .msg-answer .msg-answer__list li,
.ws-main.is-conversation .orch-turn > .msg-answer .msg-md__quote {
  margin: 0;
  /* The measure is the container's 732. `max-width: 68ch` is markdown.css's
     own reading measure for 14.5 Geist and would cut the frame's column short
     at this size. */
  max-width: none;
  font-family: var(--oc-resp-face);
  font-size: var(--oc-resp-size);
  line-height: var(--oc-resp-leading);
  letter-spacing: var(--oc-resp-tracking);
  color: var(--oc-resp-ink);
}

/* A list keeps the indentation markdown.css already authored (24) — Section 8
   draws no list, and §10's rule holds for every element it is silent about:
   what exists is preserved, not redesigned. Only the item rhythm is restated,
   because 1.2 leading needs its items separated where 1.6 did not. */
.ws-main.is-conversation .orch-turn > .msg-answer .msg-md__list {
  max-width: none;
}
.ws-main.is-conversation .orch-turn > .msg-answer .msg-md__list li {
  margin: 6px 0;
}
.ws-main.is-conversation .orch-turn > .msg-answer .msg-md__list li:first-child { margin-top: 0; }
.ws-main.is-conversation .orch-turn > .msg-answer .msg-md__list li:last-child { margin-bottom: 0; }

/* Headings keep the hierarchy markdown.css authored and the serif they were
   always set in; what changes is only that they take the response's own ink,
   so a heading and the paragraph under it are one colour rather than two. */
.ws-main.is-conversation .orch-turn > .msg-answer .msg-md__h,
.ws-main.is-conversation .orch-turn > .msg-answer .msg-answer__h {
  color: var(--oc-resp-ink);
}

/* Emphasis, links, inline code and fenced code are the renderer's own and are
   NOT restyled — Section 8 defines none of them. Inline code stays on the
   monospace family Section 2 authors for Label / Code; it only follows the
   body's size, which its own `0.86em` already does. */

/* A quoted block is prose, so it is prose measure; its inner paragraph is
   already covered above and must not inherit a second margin. */
.ws-main.is-conversation .orch-turn > .msg-answer .msg-md__quote .msg-md__p {
  color: inherit;
}

/* ==========================================================================
   THE ACTION ROW — 166:2971 / 166:2986
   Three controls, 16 apart, 16 square, pinned to the right of the same 748 the
   body sits in — which puts them under the copy's own right edge at 732.

   The row is `window.MessageActions`'s, unchanged: the same buttons, the same
   copy/feedback wiring, the same "copied" affordance. What is set here is the
   geometry Section 8 draws and the ORDER it draws it in.
   ========================================================================== */
.ws-main.is-conversation .orch-turn > .msg-answer > .oc-msg-actions {
  width: 100%;
  max-width: var(--oc-resp-measure);
  /* 166:2971 — px-[16px] in a 748 box, right aligned: the icons' right edge
     lands at 732, level with the last character of the copy above them. */
  padding: 0 16px;
  justify-content: flex-end;
  gap: 16px;
}
.ws-main.is-conversation .orch-turn > .msg-answer > .oc-msg-actions .oc-msg-actions__group {
  gap: 16px;                       /* 166:2987 — gap-[16px] */
}

/* 166:2988 / 166:2992 / 166:2994 — 16 square. The glyphs are already the exact
   Lucide copy / thumbs-up / thumbs-down the section exports, so nothing is
   swapped; they are drawn at the frame's size and at the frame's weight.

   STROKE. The section's icons are Lucide at a 16 viewBox with a 1 stroke — one
   drawn pixel. The component's are the same glyphs on a 24 viewBox at 1.8,
   which at 16 draws 1.2. 1.5 on 24 is exactly 1 at 16, and it is set here
   rather than in the component because the component is shared with the
   working panel and the Studio rooms. */
.ws-main.is-conversation .orch-turn > .msg-answer .oc-actbtn {
  width: 16px;
  height: 16px;
}
.ws-main.is-conversation .orch-turn > .msg-answer .oc-actbtn svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.5;
}

/* 166:2987 draws copy FIRST, then the two thumbs. The row is built feedback
   first, so the order is stated as a layout fact rather than by forking the
   component — the buttons, their handlers and their state are untouched.
   `data-icon` survives the copy button's swap to the check glyph, which is
   what keeps the control in place while it says "copied". */
.ws-main.is-conversation .orch-turn > .msg-answer .oc-actbtn[data-icon="copy"] { order: 1; }
.ws-main.is-conversation .orch-turn > .msg-answer .oc-actbtn[data-icon="thumbsUp"] { order: 2; }
.ws-main.is-conversation .orch-turn > .msg-answer .oc-actbtn[data-icon="thumbsDown"] { order: 3; }

/* REGENERATE IS KEPT, AND THIS IS THE ONE PLACE THE ROW EXCEEDS THE DRAWING.
   166:2987 draws three controls; the section's fourth slot (166:2996 "Draw")
   and its disclaimer (166:2997) are both `hidden`, and §5 lists regenerate
   among the controls not to ADD.

   It is not being added. It is already there, it is already wired to
   `regenerateTurn()`, §5's own next sentence asks that existing functional
   actions be preserved, and conversation-citations.test.ts:329 asserts by name
   that a replayed conversation answer exposes "Regenerate response". Removing
   it — or hiding it, which takes it out of the accessibility tree just as
   surely — would break that locked contract to satisfy an inference about a
   hidden node that is not even named for it.

   So it stays, and it stays LAST, after the three the section draws, which is
   the smallest possible departure from 166:2987. To match the drawing exactly,
   change `order: 4` to `display: none` here — and expect that test to fail. */
.ws-main.is-conversation .orch-turn > .msg-answer .oc-actbtn[data-icon="regenerate"] {
  order: 4;
}

/* ==========================================================================
   THE RUN'S OWN METADATA — `.orch.is-done`
   Reparented between the body and the actions by renderConductorAnswer(), and
   left as it is: §11 asks for no visual expansion of orchestration detail in
   this build. The two rules below only stop it fighting the new rhythm — the
   -11 margins were cut against the 23 gap this block no longer has — and put
   it on the same 748 as everything else so the response reads as one column.
   ========================================================================== */
.ws-main.is-conversation .orch-turn > .msg-answer > .orch.is-done,
.ws-main.is-conversation .orch-turn > .msg-answer > .orch.is-done + .oc-msg-actions {
  margin-top: 0;
}
.ws-main.is-conversation .orch-turn > .msg-answer > .orch.is-done {
  max-width: var(--oc-resp-measure);
  padding: 0 16px;
}

/* Provenance, when a run produced it, sits on the same column for the same
   reason. Its own paint is orchestration.css's and is untouched. */
.ws-main.is-conversation .orch-turn > .msg-answer > .orch-provenance {
  max-width: var(--oc-resp-measure);
  padding: 0 16px;
  margin-top: 0;
}

/* ==========================================================================
   RESPONSIVE
   The reference defines desktop only. Below the column's own breakpoint the
   748 becomes the available width and nothing is re-proportioned — the mark
   keeps its 20 and its 12, and the copy keeps its size, its leading and its
   tracking. This mirrors conversation-workspace.css's own responsive rule.
   ========================================================================== */
@media (max-width: 820px) {
  .ws-main.is-conversation .orch-turn > .msg-answer {
    --oc-resp-measure: 100%;
  }
}

/* ==========================================================================
   ONE DEVIATION, STATED RATHER THAN HIDDEN
   166:2970 names Times New Roman. Section 2 — the authored type system —
   declares no serif body face at all: its serifs are Newsreader (Display) and
   Platypi (User name), and Body is Geist 16 on #3d3d3a. Times New Roman is
   Figma's fallback for an unset face, and a Figma export naming a family is
   not authority to introduce it as a brand face.

   `--oc-resp-face` therefore resolves to `--font-serif`, the repository's
   established editorial serif token (Playfair Display, Georgia, Times New
   Roman, serif) — which is both the face the answer's headings have always
   been set in and a stack that ends at the family the export names. Every
   other measurement in 166:2970 — 16, 1.2, 0.64, #141413 — is the frame's own,
   unaltered. Ratified with the author on 2026-08-30; changing the face is a
   one-line change to the token above.
   ========================================================================== */
