/* What the Ask panel holds: the question box, one answer, its chart. SPDX-License-Identifier: Apache-2.0 */

@layer components {
  /* The panel's body is a column of a fixed height (askpanel.css) and nothing in it scrolls: the
     box keeps its height, the answer under it takes the rest. */
  /* The box: one line, with the arrow on it, growing a line at a time with the question to five
     lines (ask.js sets its height), the arrow staying at its foot. */
  .oa-ask-box {
    --ask-send: 32px;
    --ask-line: calc(1.4 * var(--text-row));
    display: flex;
    flex: none;
    align-items: flex-end;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-3) var(--space-3) var(--space-6);
    border: var(--hairline) solid var(--line);
    border-radius: var(--radius);
  }
  @media (pointer: coarse) { .oa-ask-box { --ask-send: 44px; } }
  .oa-ask-box:focus-within { border-color: var(--accent); }
  .oa-ask-input {
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
    height: var(--ask-send);
    max-height: calc(5 * var(--ask-line) + var(--ask-send) - var(--ask-line));
    padding: calc((var(--ask-send) - var(--ask-line)) / 2) 0;
    border: 0;
    outline: none;
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: var(--text-row);
    line-height: var(--ask-line);
    overflow-y: auto;
    scrollbar-width: thin;
    resize: none;
  }
  .oa-ask-input::placeholder { color: var(--ink-faint); }
  .oa-ask-send { --icon-btn-ink: var(--accent); flex: none; min-width: var(--ask-send); min-height: var(--ask-send); }
  .oa-ask-send[disabled] { --icon-btn-ink: var(--ink-faint); }

  .oa-ask-answer {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: var(--space-4);
    min-height: 0;
    margin-top: var(--space-6);
    overflow: hidden;
  }

  /* the questions to ask, under the box until the first is asked */
  .oa-ask-offer { display: flex; flex-direction: column; gap: var(--space-1); }
  .oa-ask-offer .section-head { padding: 0 0 var(--space-2); }
  .oa-ask-eg { --row-ink: var(--accent); --row-font: var(--text-md); align-items: flex-start; }
  .oa-ask-eg > span:last-child { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .oa-ask-eg .icon, .oa-ask-eg .icon svg { flex: none; width: 14px; height: 14px; margin-top: 3px; }

  /* what a button in the panel's head opens: no wider than a phone, scrolling inside itself */
  .menu.oa-ask-pop:popover-open {
    width: min(340px, calc(100vw - 2 * var(--space-6)));
    max-height: min(520px, calc(100vh - 96px));
    overflow-y: auto;
  }
  .oa-ask-pop-body, .oa-ask-recents-list, .oa-ask-help-pane:not([hidden]) { display: flex; flex-direction: column; }
  /* Help: its two tabs on one line, and a pop-up as tall on either, so the tabs stay where they are */
  .menu.oa-ask-help:popover-open { width: min(380px, calc(100vw - 2 * var(--space-6))); height: min(520px, calc(100vh - 96px)); }
  /* Help's heading and tabs stay; the pane under them scrolls */
  .menu.oa-ask-help:popover-open { overflow: hidden; }
  .oa-ask-help .oa-ask-pop-body, .oa-ask-help .oa-ask-help-pane:not([hidden]) { flex: 1 1 0; min-height: 0; }
  .oa-ask-help .oa-ask-help-pane { overflow-y: auto; scrollbar-width: thin; }
  .oa-ask-help-pane > * { flex: none; }
  /* a sample: its question, and under it the chart its answer drew, the picture for the theme */
  .menu-item.oa-ask-sample { flex-direction: column; align-items: stretch; gap: var(--space-3); padding-bottom: var(--space-5); }
  .oa-ask-sample-pic { display: block; }
  .oa-ask-sample-img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
  .oa-ask-sample-img[data-for="dark"], :root[data-theme="dark"] .oa-ask-sample-img[data-for="light"] { display: none; }
  :root[data-theme="dark"] .oa-ask-sample-img[data-for="dark"] { display: block; }
  .menu .menu-note.oa-ask-samples-note { max-width: none; font-size: var(--text-xs); }
  .oa-ask-help-tabs { flex: none; gap: var(--space-6); margin: 0 var(--space-5) var(--space-3); }
  .oa-ask-help-tabs .tabs-line-tab { min-width: 0; font-size: var(--text-sm); }
  .oa-ask-pop .menu-item { flex: none; white-space: normal; overflow-wrap: anywhere; }
  /* History's head: its heading, and Clear as an icon at the right */
  .oa-ask-pop-head { display: flex; flex: none; align-items: center; justify-content: space-between; gap: var(--space-3); }
  .oa-ask-pop-head .oa-ask-recents-clear { flex: none; margin: var(--space-2) var(--space-3) 0 0; }
  .oa-ask-pop-head .oa-ask-recents-clear[data-none] { visibility: hidden; }

  /* the Model tab: the model's plain name over its parts, and its label in small print under them */
  .oa-ask-model-title { margin: 0 0 var(--space-2); font-size: var(--text-base); font-weight: var(--weight-medium); color: var(--ink); }
  .oa-ask-model-name { margin-top: var(--space-4); font-size: var(--text-xs); overflow-wrap: anywhere; }

  /* the dictionary: how Ask reads your words */
  .oa-ask-dict { padding: var(--space-2) var(--space-5) var(--space-4); }
  .oa-dict-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }
  .oa-dict-counts { margin: 0; color: var(--ink-soft); font-size: var(--text-sm); }
  .oa-dict-h {
    margin: 0 0 var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink);
  }
  .oa-dict-note {
    margin: 0 0 var(--space-2);
    font-size: var(--text-xs);
    color: var(--ink-faint);
    max-width: 60ch;
  }
  .oa-dict-rows {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-1) var(--space-3);
  }
  .oa-dict-row { display: contents; }
  .oa-dict-row dt {
    color: var(--ink-soft);
    font-size: var(--text-sm);
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .oa-dict-row dd {
    margin: 0;
    color: var(--ink);
    font-size: var(--text-sm);
    overflow-wrap: anywhere;
  }
  .oa-dict-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  .oa-dict-list li {
    padding: var(--space-1) var(--space-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    color: var(--ink-soft);
  }

  /* The answer: the question echoed, the headline number, the sentence, the chart, the parts kept
     shut and the feedback. Every part keeps its height but the chart, which takes what is left. */
  .oa-ask-card {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: var(--space-4);
    min-height: 0;
    overflow: hidden;
  }
  .oa-ask-card > * { flex: none; }
  .oa-ask-q {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: var(--text-md);
  }
  .oa-ask-count {
    font-size: var(--text-md);
  }
  .oa-ask-count strong {
    margin-right: var(--space-2);
    color: var(--accent-deep);
    font-family: var(--font-display);
    font-size: var(--text-display);
    font-weight: var(--weight-medium);
    line-height: 1.1;
  }
  .oa-ask-matched { font-size: var(--text-sm); }
  .oa-ask-problem p { color: var(--ink-soft); }

  /* the answer in words: a slot three lines tall whatever it holds, so the planner's words taking
     the engine's place move nothing under them */
  .oa-ask-said {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-height: calc(3 * 1.45 * var(--text-md) + var(--space-1) + var(--text-xs) * 1.5);
  }
  .oa-ask-sentence {
    font-size: var(--text-md);
    line-height: 1.45;
  }
  /* a short window: the slot keeps two lines, and the chart has the third */
  @media (max-height: 800px) {
    .oa-ask-said { min-height: calc(2 * 1.45 * var(--text-md) + var(--space-1) + var(--text-xs) * 1.5); }
  }
  .oa-ask-by { font-size: var(--text-xs); }

  /* The one chart under the number: the Overview's own chart tiles, reading only, in the height
     the panel has left. Each form's drawing is sized from that height (container units), so it
     grows and shrinks with the panel. The card's name is in every selector, so these outweigh the
     tiles' own rules whichever sheet comes later. */
  .oa-ask-card .oa-ask-chart {
    flex: 1 1 0;
    gap: var(--space-4);
    min-height: 0;
    padding: var(--space-5) var(--space-6);
    overflow: hidden;
    container: oa-ask-chart / size;
  }
  /* the notes opened, or the why of a thumbs-down, take the chart's place */
  .oa-ask-card:not([data-fold='']) .oa-ask-chart,
  .oa-ask-card[data-fb='why'] .oa-ask-chart { display: none; }
  .oa-ask-card .oa-ask-chart > * { flex: none; }
  .oa-ask-card .oa-ask-chart .chart-sentence { font-size: var(--text-sm); }
  .oa-ask-card .oa-ask-chart .oa-chart-note { margin: 0; font-size: var(--text-xs); }
  @container oa-ask-chart (max-height: 300px) {
    .oa-ask-card .oa-ask-chart .oa-chart-note {
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
    }
  }
  .oa-ask-card .oa-ask-chart .oa-col-bar, .oa-ask-card .oa-ask-chart .chart-track { cursor: default; }
  .oa-ask-card .oa-ask-chart .oa-col-bar:hover,
  .oa-ask-card .oa-ask-chart .chart-track:hover .chart-fill { background: var(--accent); }
  .oa-ask-card .oa-ask-chart .oa-col-bar.oa-ask-part {
    background: color-mix(in srgb, var(--accent) 40%, var(--panel));
    border: var(--hairline) dashed var(--accent);
  }

  /* bars in rows: each row thins as the chart does; under the least a row can be read at, the rows
     scroll inside the chart */
  .oa-ask-card .oa-ask-chart .chart-rows {
    flex: 0 1 auto;
    gap: 0;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    font-size: var(--text-sm);
  }
  .oa-ask-card .oa-ask-chart .chart-rows li {
    flex: 1 1 22px;
    min-height: 14px;
    max-height: 24px;
    grid-template-columns: minmax(0, 36%) 1fr 64px;
    line-height: 1.1;
  }
  .oa-ask-card .oa-ask-chart .chart-track { height: 8px; }
  .oa-ask-card .oa-ask-chart .oa-chart-none { flex: none; margin-top: var(--space-2); padding-top: var(--space-2); }

  /* columns: as tall as the chart has room for, each bar its share of that less its name */
  .oa-ask-card .oa-ask-chart .oa-cols-scroll {
    flex: 1 1 0;
    min-height: 0;
    padding-bottom: 0;
    overflow: hidden;
    container-type: size;
  }
  .oa-ask-card .oa-ask-chart .oa-cols { --name: 22px; height: 100cqh; padding-top: 0; gap: var(--space-1); }
  .oa-ask-card .oa-ask-chart .oa-col-slot { gap: var(--space-2); }
  /* each name has a line of its own under its bar, whole: the chart is cut at its foot, so the
     name's box holds all of its words and never gives its height to the bar */
  .oa-ask-card .oa-ask-chart .oa-col-label { flex: none; box-sizing: content-box; height: 16px; line-height: 16px; }
  .oa-ask-card .oa-ask-chart .oa-col-bar { height: calc(var(--share) * (100cqh - var(--name) - var(--space-2))); }
  /* a long run of years: each name upright under its own column, reading upwards and ending at
     the axis, where a level name would run into the next or off the chart's edge */
  .oa-ask-card .oa-ask-chart .oa-cols[data-upright] { --name: 42px; padding-inline: var(--space-2); }
  .oa-ask-card .oa-ask-chart .oa-cols[data-upright] .oa-col-label {
    display: flex; align-items: center; justify-content: flex-end; flex: 0 0 auto;
    box-sizing: border-box; height: 42px; padding: 0 0 var(--space-2); border-top: 0;
    border-bottom: var(--hairline) solid var(--line);
    writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; line-height: 1;
  }

  /* parts of one whole: a pie or donut beside its legend, the pie as wide as the chart is tall.
     The slices are separated by a hairline gap of the card behind them, so each reads apart. */
  .oa-ask-card .oa-ask-chart .oa-pie-wrap {
    display: flex; flex: 1 1 0; align-items: center; gap: var(--space-6);
    min-height: 0; overflow: hidden; container-type: size;
  }
  .oa-ask-card .oa-ask-chart .oa-pie {
    flex: none; width: min(220px, 100cqh, 42cqw); height: min(220px, 100cqh, 42cqw);
  }
  .oa-ask-card .oa-ask-chart .oa-pie-arc {
    stroke: var(--panel);
    stroke-width: 0.4;
    stroke-linejoin: round;
    transition: fill-opacity 0.1s ease;
  }
  .oa-ask-card .oa-ask-chart .oa-pie-arc:hover { fill-opacity: 0.82; }
  /* the donut's centre text: stroke none, because the chart SVG carries a stroke (for lines) that
     SVG text would otherwise inherit, outlining the glyphs until they are unreadable */
  .oa-ask-card .oa-ask-chart .oa-pie-total {
    text-anchor: middle; fill: var(--ink); stroke: none; font-size: 5px;
    font-weight: var(--weight-strong); font-variant-numeric: tabular-nums;
  }
  .oa-ask-card .oa-ask-chart .oa-pie-sub {
    text-anchor: middle; fill: var(--ink-faint); stroke: none; font-size: 2.6px;
  }
  .oa-ask-card .oa-ask-chart .oa-pie-legend {
    display: flex; flex: 1 1 0; flex-direction: column; justify-content: safe center;
    align-self: stretch; margin: 0; padding: 0; min-width: 0; max-height: 100cqh;
    overflow-y: auto; scrollbar-width: thin; list-style: none; font-size: var(--text-sm);
  }
  .oa-ask-card .oa-ask-chart .oa-pie-legend li {
    display: grid; flex: 0 1 22px; grid-template-columns: auto 1fr auto; align-items: center;
    gap: var(--space-3); min-height: 14px; line-height: 1.1;
  }
  .oa-ask-card .oa-ask-chart .oa-pie-key {
    width: 12px; height: 12px; border-radius: 3px; background: var(--c); flex: none;
  }
  .oa-ask-card .oa-ask-chart .oa-pie-name { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .oa-ask-card .oa-ask-chart .oa-pie-n { color: var(--ink-soft); font-variant-numeric: tabular-nums; }

  /* a line for an ordered breakdown: the value at each step, the steps named below, both as wide
     as the chart's height lets the drawing be. The stroke stays 2px at any size (non-scaling). */
  .oa-ask-card .oa-ask-chart .oa-line-wrap { flex: 1 1 0; min-height: 0; container-type: size; }
  .oa-ask-card .oa-ask-chart .oa-line,
  .oa-ask-card .oa-ask-chart .oa-line-ticks {
    width: min(100%, calc((100cqh - 26px) * 10 / 3));
    margin-inline: auto;
  }
  .oa-ask-card .oa-ask-chart .oa-line { height: auto; display: block; overflow: visible; }
  .oa-ask-card .oa-ask-chart .oa-line-base { stroke: var(--line); stroke-width: 1px; vector-effect: non-scaling-stroke; }
  .oa-ask-card .oa-ask-chart .oa-line-path {
    fill: none; stroke: var(--accent); stroke-width: 2px; stroke-linejoin: round;
    stroke-linecap: round; vector-effect: non-scaling-stroke;
  }
  .oa-ask-card .oa-ask-chart .oa-line-dot { fill: var(--accent); stroke: var(--panel); stroke-width: 0.5; }
  .oa-ask-card .oa-ask-chart .oa-line-ticks { position: relative; height: 18px; margin-top: var(--space-2); }
  .oa-ask-card .oa-ask-chart .oa-line-tick {
    position: absolute; left: var(--x); transform: translateX(-50%); color: var(--ink-faint);
    font-size: var(--text-tag); font-variant-numeric: tabular-nums; white-space: nowrap;
  }
  /* the end steps sit at the chart's edges, so anchor them inward or they spill past the box */
  .oa-ask-card .oa-ask-chart .oa-line-tick:first-child { transform: translateX(0); }
  .oa-ask-card .oa-ask-chart .oa-line-tick:last-child { transform: translateX(-100%); }

  /* a statistic's measures: a track per ratio on one doubling scale, its interval as a bar, its
     value as a mark, and 1 as a line through every row */
  .oa-ask-card .oa-ask-chart .chart-rows.oa-ask-measures li {
    grid-template-columns: minmax(0, 18%) 1fr minmax(0, 38%);
  }
  .oa-ask-measure {
    position: relative;
    display: block;
    height: var(--space-6);
    border-radius: 2px;
    background: var(--mist);
  }
  .oa-ask-span {
    position: absolute;
    top: 25%;
    height: 50%;
    left: var(--lo);
    width: calc(var(--hi) - var(--lo));
    border-radius: 2px;
    background: color-mix(in srgb, var(--accent) 35%, var(--panel));
  }
  .oa-ask-at {
    position: absolute;
    top: 0;
    height: 100%;
    width: 3px;
    left: calc(var(--at) - 1.5px);
    border-radius: 1px;
    background: var(--accent);
  }
  .oa-ask-one {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 1px;
    left: var(--one);
    background: var(--ink-faint);
  }
  .oa-ask-measure-words { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* Under the chart, one row: the notes, kept shut, and what a reader takes away (asktake.js). The
     notes open in the chart's place, and scroll inside themselves when they hold more than that.
     The why of a thumbs-down takes the row's place too. */
  .oa-ask-folds { display: flex; flex-flow: row wrap; align-items: center; gap: var(--space-1) var(--space-7); min-height: 0; }
  .oa-ask-card:not([data-fold='']) .oa-ask-folds { flex: 1 1 0; flex-flow: column nowrap; align-items: stretch; gap: var(--space-2); }
  .oa-ask-card[data-fb='why'] .oa-ask-folds { display: none; }
  .oa-ask-fold { flex: none; }
  .oa-ask-fold[open] { flex: 1 1 0; min-height: 0; overflow: auto; scrollbar-width: thin; }
  .oa-ask-fold summary {
    position: sticky;
    top: 0;
    background: var(--panel);
    color: var(--ink-soft);
    font-size: var(--text-sm);
    cursor: pointer;
  }

  /* the Excel file and the hand-off to Tables and SQL, at the row's end: small, so the row of
     shut parts is no taller for them */
  .oa-ask-take { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-left: auto; }
  .oa-ask-card:not([data-fold='']) .oa-ask-take { margin-left: 0; }
  .oa-ask-take .btn { min-height: 0; padding: var(--space-2) var(--space-4); gap: var(--space-2); font-size: var(--text-sm); }
  .oa-ask-take :is(.icon, .icon svg) { width: 14px; height: 14px; }

  .oa-ask-notes {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    list-style: none;
    margin: var(--space-3) 0 0;
    padding: 0;
  }

  .oa-ask-feedback {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
  }
  .oa-ask-feedback > p, .oa-ask-fb-chips { flex: 1 1 100%; }
  .oa-ask-fb-q {
    color: var(--ink-soft);
    font-size: var(--text-sm);
  }
  .oa-ask-fb-btn {
    font-size: var(--text-sm);
  }
  .oa-ask-fb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin: var(--space-2) 0;
  }
  .oa-ask-fb-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--ink-soft);
  }
  .oa-ask-fb-note {
    display: block;
    width: 100%;
    margin-bottom: var(--space-2);
  }
  .oa-ask-fb-done {
    color: var(--ink-soft);
    font-size: var(--text-sm);
  }

  .oa-xtab-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    list-style: none;
    padding: 0;
    margin: var(--space-2) 0 0;
    font-size: var(--text-xs);
    color: var(--ink-soft);
  }

  .oa-xtab-legend li { display: flex; align-items: center; gap: var(--space-1); }

  .oa-xtab-key {
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    border-radius: 2px;
    background: var(--c);
  }

  .oa-xtab {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-4);
    margin-top: var(--space-3);
  }

  .oa-xtab-group { flex: 1 1 160px; min-width: 0; }

  .oa-xtab-x { font-size: var(--text-xs); font-weight: 600; color: var(--ink-soft); }

  .oa-xtab-bars {
    list-style: none;
    padding: 0;
    margin: var(--space-1) 0 0;
    display: grid;
    gap: 2px;
  }

  .oa-xtab-bars li {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--space-2);
  }

  .oa-xtab-track {
    height: 0.7rem;
    border-radius: var(--radius-sm);
    background: var(--mist);
    overflow: hidden;
  }

  .oa-xtab-fill { display: block; height: 100%; width: calc(var(--share) * 100%); background: var(--c); }

  /* a comparison: one bar per side, each its own colour, over the shared row track */
  .oa-cmp-bars .chart-fill { background: var(--c); }
  .oa-ask-card .oa-ask-chart .oa-cmp-bars .chart-track:hover .chart-fill { background: var(--c); }

  .oa-xtab-n {
    font-size: var(--text-xs);
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
  }

  /* a cross-tab holds a group for every value of one split and a bar in each for every value of
     the other: more than a short panel has room for, so its groups scroll inside the chart */
  .oa-ask-card .oa-ask-chart .oa-xtab-legend { margin: 0; }
  .oa-ask-card .oa-ask-chart .oa-xtab {
    flex: 1 1 0; align-content: flex-start; min-height: 0; margin-top: 0;
    overflow-y: auto; scrollbar-width: thin;
  }
  .oa-ask-card .oa-ask-chart .oa-xtab-group { flex: 1 1 140px; }

  /* the progress indicator shown in the answer area while a question is planned, searched and
     written (ask.js): named steps, so the wait reads as the pipeline it is, not a bare spinner.
     Only the opacity of the active dot changes, so nothing in the panel moves while it waits. */
  .oa-ask-progress { padding: var(--space-3) 0; }
  .oa-ask-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
  }
  .oa-ask-step {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--ink-faint);
    font-size: var(--text-md);
  }
  .oa-ask-step[data-state='doing'] { color: var(--ink-soft); font-weight: var(--weight-medium); }
  .oa-ask-step[data-state='done'] { color: var(--ink-soft); }
  .oa-ask-step-dot {
    flex: none;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: var(--radius-pill);
    border: 2px solid var(--line);
    background: transparent;
  }
  .oa-ask-step[data-state='doing'] .oa-ask-step-dot {
    border-color: var(--accent);
    background: var(--accent);
    animation: oa-ask-pulse 1.1s ease-in-out infinite;
  }
  .oa-ask-step[data-state='done'] .oa-ask-step-dot {
    border-color: var(--ok);
    background: var(--ok);
    animation: none;
  }
  @keyframes oa-ask-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }
  /* the final phase, named in the sentence slot while the planner writes (ask.js data-writing) */
  .oa-ask-said[data-writing] .oa-ask-by { color: var(--accent-deep); }

  @media (prefers-reduced-motion: reduce) {
    .oa-ask-step[data-state='doing'] .oa-ask-step-dot { animation: none; }
  }
}
