/*
  Caelion workspace · v5 · the agent window

  A second sheet beside your work, or the whole screen. On the left a sidebar that folds
  away; in the middle the conversation; at the bottom the message box. The agent's own work
  (thinking, tools, its plan) is drawn in quiet ink. Gold is kept for what you decide: an
  approval, and the one dot that says a Moon is waiting for your word.

  v5 does not load static/assistant.css: everything the window needs is here.
*/

:root[data-layout="v5"] {
  /* ---------- The mark, wherever it is mounted ---------- */

  .trigger-mark {
    position: relative;
    display: inline-block;
    flex: none;
    width: 21px;
    height: 21px;
  }

  :is(.trigger-mark, .assistant-face, .welcome-mark) :is(svg, canvas) {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
  }

  /* ---------- The window ---------- */

  .a6 {
    --gut: clamp(14px, 1.5vw, 22px);
    --side-w: 264px;
    position: sticky;
    top: 0;
    z-index: 14;
    display: flex;
    align-self: start;
    min-width: 0;
    height: 100dvh;
    padding: 0;
    overflow: clip;
    background: var(--s-base);
    color: var(--t-1);
  }

  .a6[hidden],
  .a6 [hidden] {
    display: none !important;
  }

  .assistant-divider {
    display: none;
  }

  .a6 .assistant-column {
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
  }

  .a6-main {
    position: relative;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--s-base);
  }

  .a6 .icon-btn {
    width: 30px;
    height: 30px;
  }

  /* ---------- The sidebar ---------- */

  .a6-side {
    display: flex;
    flex: none;
    flex-direction: column;
    width: var(--side-w);
    min-height: 0;
    padding: 8px;
    background: var(--s-frame);
  }

  .a6[data-side="closed"] .a6-side {
    display: none;
  }

  /* beside the conversation: the conversation becomes a sheet on the sidebar's ground */
  .a6[data-side="beside"] .a6-main {
    margin: 8px 8px 8px 0;
    border: 1px solid var(--b-1);
    border-radius: var(--r-pane);
    box-shadow: var(--sh-1);
    overflow: clip;
  }

  .a6[data-side="beside"] {
    background: var(--s-frame);
  }

  /* over it, when the window is narrow: a drawer, with the conversation dimmed behind */
  .a6[data-side="over"] .a6-side {
    position: absolute;
    z-index: 6;
    inset: 0 auto 0 0;
    width: min(var(--side-w), 82%);
    border-right: 1px solid var(--b-1);
    box-shadow: var(--sh-4);
    animation: a6-drawer var(--d-3) var(--e-drawer) both;
  }

  .a6-side-veil {
    display: none;
    position: absolute;
    z-index: 5;
    inset: 0;
    padding: 0;
    border: 0;
    background: oklch(.15 .02 var(--n-h) / .32);
    cursor: default;
    animation: a6-fade var(--d-2) ease both;
  }

  .a6[data-side="over"] .a6-side-veil {
    display: block;
  }

  .a6-side-top,
  .a6-side-foot {
    display: grid;
    gap: 1px;
  }

  .a6-side-foot {
    padding-top: 8px;
    border-top: 1px solid var(--b-0);
  }

  .a6-side-scroll {
    flex: 1 1 0;
    min-height: 0;
    margin: 0 -8px;
    padding: 0 8px 8px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .a6-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 32px;
    padding: 0 9px;
    border: 0;
    border-radius: var(--r-item);
    background: transparent;
    color: var(--t-2);
    font-size: .88rem;
    font-weight: 540;
    text-align: left;
    transition: background-color var(--d-1) ease, color var(--d-1) ease;
  }

  .a6-nav > span:not(.icon) {
    flex: 1 1 auto;
    min-width: 0;
  }

  .a6-nav .icon {
    width: 16px;
    height: 16px;
    color: var(--t-3);
  }

  .a6-nav[aria-current] {
    background: var(--f-selected);
    color: var(--t-1);
  }

  .a6-nav[aria-current] .icon {
    color: var(--t-1);
  }

  .a6-nav-n {
    display: grid;
    flex: none;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--f-press);
    font-size: .72rem;
    font-style: normal;
    font-weight: 620;
    color: var(--t-2);
  }

  .a6-nav-n.is-gold {
    background: var(--a-fill);
    color: var(--a-on);
  }

  .a6-side-label {
    margin: 0;
    padding: 16px 9px 5px;
    font-size: .74rem;
    font-weight: 560;
    color: var(--t-4);
  }

  .a6-agents,
  .a6-recents {
    display: grid;
    gap: 1px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .a6-agent {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 5px 9px 5px 7px;
    border: 0;
    border-radius: var(--r-item);
    background: transparent;
    color: var(--t-1);
    text-align: left;
    transition: background-color var(--d-1) ease;
  }

  .a6-agent[aria-current] {
    background: var(--f-selected);
  }

  .a6-agent-face {
    display: grid;
    flex: none;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--t-1);
    color: var(--s-1);
  }

  .a6-agent-face .icon {
    width: 20px;
    height: 20px;
  }

  .a6-agent-face.is-caelion {
    background: none;
  }

  .a6-agent-face.is-caelion img {
    width: 24px;
    height: 24px;
  }

  .a6-agent-face.is-add {
    background: none;
    color: var(--t-3);
    box-shadow: inset 0 0 0 1px var(--b-2);
  }

  .a6-agent-face.is-add .icon {
    width: 14px;
    height: 14px;
  }

  .a6-agent.is-add b {
    font-weight: 540;
    color: var(--t-2);
  }

  .a6-row-text {
    display: grid;
    flex: 1 1 auto;
    gap: 1px;
    min-width: 0;
  }

  .a6-row-text b {
    overflow: hidden;
    font-size: .89rem;
    font-weight: 590;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .a6-row-text small {
    font-size: .8rem;
    line-height: 1.4;
    color: var(--t-3);
  }

  .a6-agent .a6-row-text small {
    overflow: hidden;
    font-size: .76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .a6-recent {
    display: block;
    width: 100%;
    height: 30px;
    padding: 0 9px;
    overflow: hidden;
    border: 0;
    border-radius: var(--r-item);
    background: transparent;
    color: var(--t-2);
    font-size: .86rem;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background-color var(--d-1) ease, color var(--d-1) ease;
  }

  .a6-recent[aria-current] {
    background: var(--f-selected);
    color: var(--t-1);
  }

  /* ---------- The head ---------- */

  .a6-head {
    position: relative;
    display: flex;
    flex: none;
    align-items: center;
    gap: 4px;
    min-height: 52px;
    padding: 0 10px 0 8px;
    border-bottom: 1px solid var(--b-0);
  }

  .a6[data-agent="caelion"] .a6-who {
    display: none;
  }

  .a6-who {
    display: grid;
    flex: none;
    place-items: center;
    width: 26px;
    height: 26px;
    margin-left: 4px;
  }

  .a6-who .assistant-face {
    display: block;
    width: 24px;
    height: 24px;
  }

  .a6-who-moon {
    display: none;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--t-1);
    color: var(--s-1);
  }

  .a6-who-moon .icon {
    width: 19px;
    height: 19px;
  }

  .a6[data-agent="moon"] .a6-who .assistant-face,
  .a6[data-agent="new-moon"] .a6-who .assistant-face {
    display: none;
  }

  .a6[data-agent="moon"] .a6-who-moon,
  .a6[data-agent="new-moon"] .a6-who-moon {
    display: grid;
  }

  .a6:not([data-view="chat"]) .a6-who {
    display: none;
  }

  .a6 .assistant-heading {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 6px;
  }

  .a6:not([data-view="chat"]) .assistant-heading {
    margin-left: 4px;
  }

  /* with Caelion in front of you the head names nothing: the model is in the message box, and the
     title is kept only for whoever has the page read to them */
  .a6[data-agent="caelion"][data-view="chat"] .assistant-heading h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .a6 .assistant-heading h2 {
    overflow: hidden;
    font-size: .92rem;
    font-weight: 620;
    line-height: 1.3;
    letter-spacing: -.008em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .a6 .assistant-heading small {
    overflow: hidden;
    font-size: .76rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--t-3);
  }

  .a6 .assistant-tools {
    display: flex;
    flex: none;
    align-items: center;
    gap: 1px;
  }

  .a6 [data-fullscreen] .leave-full,
  .a6 [data-fullscreen][aria-pressed="true"] .go-full {
    display: none;
  }

  .a6 [data-fullscreen][aria-pressed="true"] .leave-full {
    display: grid;
  }

  /* ---------- Panes ---------- */

  .a6-pane {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-height: 0;
  }

  .a6 .assistant-scroll {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    padding: 20px var(--gut) 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .a6 .assistant-scroll > .assistant-column {
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }

  /* ---------- Before the first message ---------- */

  /*
    Nothing but the mark: flat, one colour, in the middle of the pane, the same drawing in light
    and in dark (templates/v5/mark_flat.html takes the colour set here). What to ask is offered
    in a few quiet lines just over the message box.
  */
  .a6 .assistant-welcome {
    display: grid;
    flex: 1 1 auto;
    place-items: center;
    min-height: 168px;
    padding-bottom: 1vh;
    pointer-events: none;
    user-select: none;
  }

  .a6 .welcome-mark {
    display: block;
    width: clamp(96px, 28%, 136px);
    aspect-ratio: 1;
    /* the window's ink, thinned as one piece: it holds on whatever the sheet is made of (a sheet of
       glass is not the page's base), and where its bands cross they do not darken */
    color: var(--t-1);
    opacity: .15;
  }

  &[data-theme="dark"] .a6 .welcome-mark {
    opacity: .2;
  }

  .a6-starters {
    display: grid;
    gap: 1px;
    margin: 0 -4px 8px;
  }

  .a6-starters button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: var(--r-ctl);
    background: transparent;
    color: var(--t-2);
    font-size: .88rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    transition: background-color var(--d-1) ease, color var(--d-1) ease;
  }

  .a6-starters .icon {
    flex: none;
    width: 15px;
    height: 15px;
    color: var(--t-4);
  }

  .a6-starters button:disabled {
    opacity: .5;
  }

  /* ---------- The conversation ---------- */

  .a6 .assistant-thread {
    display: grid;
    gap: 26px;
    margin-top: auto;
    padding-bottom: 8px;
  }

  .a6 .assistant-thread:empty {
    display: none;
  }

  .a6 .turn {
    display: grid;
    gap: 12px;
    min-width: 0;
  }

  .a6 .turn-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

  .a6 .bubble {
    display: flex;
    gap: 8px;
    max-width: min(86%, 560px);
    padding: 9px 13px;
    border-radius: 16px 16px 5px 16px;
    background: var(--s-2);
    box-shadow: inset 0 0 0 1px var(--b-0);
    font-size: .93rem;
    line-height: 1.5;
  }

  .a6 .bubble p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .a6 .bubble .icon {
    width: 15px;
    height: 15px;
    margin-top: 3px;
    color: var(--t-3);
  }

  .a6 .turn-files,
  .a6 .assistant-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .a6 .turn-files {
    justify-content: flex-end;
  }

  .a6 .turn-files li,
  .a6 .assistant-attachments li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    height: 28px;
    padding: 0 9px 0 8px;
    border: 1px solid var(--b-1);
    border-radius: 8px;
    background: var(--s-1);
    font-size: .8rem;
    font-weight: 540;
    color: var(--t-2);
  }

  .a6 .turn-files li span,
  .a6 .chip-name {
    max-width: 22ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .a6 :is(.turn-files, .assistant-attachments) .icon {
    width: 14px;
    height: 14px;
    color: var(--t-3);
  }

  .a6 .turn-agent {
    display: grid;
    gap: 8px;
    min-width: 0;
  }

  /* the line that says what the agent is doing; it opens the steps behind it */
  .a6 .work-toggle {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 7px;
    max-width: 100%;
    margin-left: -7px;
    padding: 4px 6px 4px 7px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--t-3);
    font-size: .86rem;
    font-weight: 540;
    text-align: left;
    transition: background-color var(--d-1) ease, color var(--d-1) ease;
  }

  .a6 .work-toggle:disabled {
    cursor: default;
  }

  .a6 .work-toggle > .icon {
    width: 14px;
    height: 14px;
    color: var(--t-4);
    transition: transform var(--d-2) var(--e-out);
  }

  .a6 .work-toggle[aria-expanded="true"] > .icon {
    transform: rotate(90deg);
  }

  .a6 .work-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .a6 .work-time {
    flex: none;
    font-size: .8rem;
    color: var(--t-4);
  }

  /* three dots that breathe while it thinks */
  .a6 .work-pulse {
    display: none;
    flex: none;
    align-items: center;
    gap: 3px;
    height: 14px;
  }

  .a6 .work-toggle.is-live .work-pulse,
  .a6 .a6-said .work-pulse {
    display: inline-flex;
  }

  .a6 .work-pulse i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: .35;
  }

  /* live, the words catch a passing light */
  .a6 .work-toggle.is-live .work-label,
  .a6 .step[data-state="running"] .step-label {
    background: linear-gradient(100deg, var(--t-3) 30%, var(--t-1) 50%, var(--t-3) 70%) 0 0 / 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  /* the steps: a rail down the left, one mark per step */
  .a6 .work-log {
    margin: 0 0 4px 3px;
    padding: 2px 0 2px 16px;
    border-left: 1px solid var(--b-1);
  }

  .a6 .steps {
    display: grid;
    gap: 1px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .a6 .step {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: start;
    gap: 9px;
    padding: 4px 0;
    font-size: .86rem;
  }

  .a6 .step-mark {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--s-2);
    color: var(--t-3);
    box-shadow: inset 0 0 0 1px var(--b-0);
  }

  .a6 .step-mark .icon {
    width: 12.5px;
    height: 12.5px;
  }

  .a6 .step-text {
    display: grid;
    gap: 1px;
    min-width: 0;
    padding-top: 1px;
  }

  .a6 .step-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 7px;
  }

  .a6 .step-label {
    color: var(--t-2);
    font-weight: 520;
  }

  .a6 .step-detail {
    max-width: 100%;
    padding: 0 6px;
    overflow: hidden;
    border-radius: 5px;
    background: var(--f-hover);
    font-size: .79rem;
    font-weight: 520;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--t-2);
  }

  .a6 .step-summary {
    font-size: .8rem;
    line-height: 1.45;
    color: var(--t-3);
  }

  .a6 .step-ms {
    padding-top: 2px;
    font-size: .76rem;
    color: var(--t-4);
  }

  .a6 .step-flag {
    align-self: center;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--a-fill);
    font-size: .72rem;
    font-weight: 620;
    color: var(--a-on);
  }

  /* running: a ring turns round the mark */
  .a6 .step[data-state="running"] .step-mark {
    color: var(--t-1);
    box-shadow: none;
  }

  .a6 .step[data-state="running"] .step-mark::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 55%, var(--t-2));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px));
  }

  .a6 .step[data-state="waits"] .step-mark {
    background: var(--a-soft);
    color: var(--a-ink);
    box-shadow: inset 0 0 0 1px var(--a-line);
  }

  .a6 .step[data-state="warn"] .step-mark {
    background: var(--warn-soft);
    color: var(--warn);
    box-shadow: none;
  }

  .a6 .step[data-state="error"] .step-mark {
    background: var(--bad-soft);
    color: var(--bad);
    box-shadow: none;
  }

  /* the plan, when the agent made one */
  .a6 .plan {
    display: grid;
    gap: 3px;
    margin: 0 0 8px;
    padding: 9px 11px 10px;
    border: 1px solid var(--b-0);
    border-radius: 10px;
    background: var(--s-1);
    list-style: none;
    font-size: .86rem;
  }

  .a6 .plan-head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-bottom: 3px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--t-2);
  }

  .a6 .plan-head .icon {
    width: 14px;
    height: 14px;
    color: var(--t-3);
  }

  .a6 .plan-count {
    margin-left: auto;
    font-weight: 500;
    color: var(--t-4);
  }

  .a6 .plan-step {
    display: grid;
    grid-template-columns: 15px minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    color: var(--t-2);
  }

  .a6 .plan-box {
    width: 15px;
    height: 15px;
    margin-top: 3px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px var(--b-2);
  }

  .a6 .plan-step[data-state="in_progress"] {
    color: var(--t-1);
    font-weight: 560;
  }

  .a6 .plan-step[data-state="in_progress"] .plan-box {
    box-shadow: inset 0 0 0 1.5px var(--t-1), inset 0 0 0 4px var(--s-1), inset 0 0 0 8px var(--t-1);
  }

  .a6 .plan-step[data-state="completed"] {
    color: var(--t-3);
    text-decoration: line-through;
    text-decoration-color: var(--b-2);
  }

  .a6 .plan-step[data-state="completed"] .plan-box {
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.3 7.8 2.2 2.1 4.2-4.6'/%3E%3C/svg%3E") center / 15px no-repeat,
      var(--ok);
    box-shadow: none;
  }

  /* where the agent's context begins, once a conversation is longer than what the model is sent */
  .a6-boundary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: -8px 0;
    font-size: .78rem;
    color: var(--t-4);
  }

  .a6-boundary::before,
  .a6-boundary::after {
    content: "";
    flex: 1 1 0;
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--b-2) 0 4px, transparent 4px 8px);
  }

  .a6-boundary-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .a6-boundary .icon {
    width: 13px;
    height: 13px;
  }

  /* ---------- The answer ---------- */

  .a6 .answer {
    min-width: 0;
    font-size: .94rem;
    line-height: 1.62;
    overflow-wrap: anywhere;
  }

  .a6 .answer:empty {
    display: none;
  }

  .a6 .answer > :first-child {
    margin-top: 0;
  }

  .a6 .answer > :last-child {
    margin-bottom: 0;
  }

  .a6 .answer :is(p, ul, ol, pre, .a6-table) {
    margin: 0 0 .72em;
  }

  .a6 .answer :is(ul, ol) {
    padding-left: 1.3em;
  }

  .a6 .answer li + li {
    margin-top: .25em;
  }

  .a6 .answer li::marker {
    color: var(--t-4);
  }

  .a6 .answer :is(h3, h4, h5) {
    margin: 1.15em 0 .4em;
    font-size: .98rem;
    font-weight: 640;
    line-height: 1.35;
    letter-spacing: -.01em;
  }

  .a6 .answer :is(b, strong) {
    font-weight: 620;
  }

  .a6 .answer a {
    color: var(--t-1);
    font-weight: 560;
    text-decoration: underline;
    text-decoration-color: var(--b-2);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }

  .a6 .answer code {
    padding: 1px 5px;
    border-radius: 5px;
    background: var(--f-hover);
    font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
    font-size: .86em;
  }

  .a6 .answer pre {
    padding: 12px 14px;
    overflow-x: auto;
    border: 1px solid var(--b-0);
    border-radius: 10px;
    background: var(--s-well);
    font-size: .84rem;
    line-height: 1.55;
  }

  .a6 .answer pre code {
    padding: 0;
    background: none;
    font-size: inherit;
  }

  .a6-table {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--b-1);
    border-radius: 10px;
    background: var(--s-1);
    scrollbar-width: thin;
  }

  .a6-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: .86rem;
    line-height: 1.4;
    white-space: nowrap;
  }

  .a6-table :is(th, td) {
    padding: 7px 12px;
    border-bottom: 1px solid var(--b-0);
    text-align: left;
  }

  .a6-table th {
    background: var(--s-2);
    font-size: .76rem;
    font-weight: 560;
    color: var(--t-3);
  }

  .a6-table tbody tr:last-child td {
    border-bottom: 0;
  }

  .a6-table .num {
    text-align: right;
  }

  /* ---------- After the answer: links, decisions, what went wrong ---------- */

  .a6 .turn-extras {
    display: grid;
    gap: 10px;
  }

  .a6 .turn-extras:empty,
  .a6 .turn-foot:empty {
    display: none;
  }

  .a6 .turn-error {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--bad-soft);
    font-size: .86rem;
    line-height: 1.45;
    color: var(--bad);
  }

  .a6 .turn-error[data-kind="stopped"] {
    background: var(--f-hover);
    color: var(--t-2);
  }

  .a6 .turn-error .icon {
    width: 15px;
    height: 15px;
    margin-top: 2px;
  }

  .a6 .record-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .a6 .record-links .record-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 9px 0 11px;
    border: 1px solid var(--b-1);
    border-radius: 999px;
    background: var(--s-1);
    font-size: .82rem;
    font-weight: 560;
    color: var(--t-1);
    text-decoration: none;
    transition: border-color var(--d-1) ease;
  }

  .a6 .record-links .icon {
    width: 13px;
    height: 13px;
    color: var(--t-3);
  }

  /* a decision that is yours: the one gold thing in a conversation */
  .a6 .approval {
    overflow: hidden;
    border: 1px solid color-mix(in oklch, var(--a-fill) 42%, var(--b-1));
    border-radius: 12px;
    background: color-mix(in oklch, var(--a-fill) 7%, var(--s-1));
  }

  .a6 .approval-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 12px 6px 13px;
  }

  .a6 .approval-head > .icon {
    width: 17px;
    height: 17px;
    color: var(--a-ink);
  }

  .a6 .approval-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .89rem;
    font-weight: 620;
    line-height: 1.35;
  }

  .a6 .approval-pill {
    flex: none;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--a-fill);
    font-size: .72rem;
    font-weight: 620;
    color: var(--a-on);
  }

  .a6 .approval-body {
    display: grid;
    gap: 2px;
    padding: 0 13px 11px 39px;
    font-size: .88rem;
  }

  .a6 .approval-body:empty {
    display: none;
  }

  .a6 .approval-body b {
    font-weight: 590;
  }

  .a6 .approval-body small {
    font-size: .82rem;
    line-height: 1.45;
    color: var(--t-2);
  }

  .a6 .approval-figure {
    margin: 3px 0 1px;
    font-size: 1.16rem;
    font-weight: 640;
    letter-spacing: -.02em;
  }

  .a6 .approval-list {
    display: grid;
    gap: 3px;
    margin: 0;
    padding: 0 13px 10px 39px;
    list-style: none;
    font-size: .86rem;
    color: var(--t-2);
  }

  .a6 .approval-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 12px 12px 39px;
  }

  .a6 .approval-btn {
    height: 30px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--t-2);
    font-size: .84rem;
    font-weight: 590;
    transition: background-color var(--d-1) ease, filter var(--d-1) ease, transform var(--d-1) var(--e-out);
  }

  .a6 .approval-btn:active {
    transform: scale(.97);
  }

  .a6 .approval-btn.primary {
    border-color: color-mix(in oklch, var(--a-fill-2) 70%, oklch(.3 .05 var(--acc-h)));
    background: linear-gradient(180deg, color-mix(in oklch, var(--a-fill) 92%, white), var(--a-fill) 45%, var(--a-fill-2));
    color: var(--a-on);
    box-shadow: inset 0 1px 0 oklch(1 0 0 / .45), 0 1px 2px color-mix(in oklch, var(--a-fill-2) 40%, transparent);
  }

  .a6 .approval-btn.quiet {
    border-color: var(--b-1);
    background: var(--s-1);
    color: var(--t-1);
  }

  .a6 .approval-btn:disabled {
    opacity: .55;
  }

  .a6 .approval[data-decision] {
    border-color: var(--b-1);
    background: var(--s-1);
  }

  .a6 .approval[data-decision] .approval-head > .icon {
    color: var(--t-3);
  }

  .a6 .approval-outcome {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 9px 13px 10px;
    border-top: 1px solid var(--b-0);
    font-size: .84rem;
    color: var(--t-2);
  }

  .a6 .approval-outcome .icon {
    width: 15px;
    height: 15px;
    color: var(--t-3);
  }

  .a6 .approval[data-decision="approved"] .approval-outcome .icon {
    color: var(--ok);
  }

  .a6 .approval-open {
    margin-left: auto;
    font-weight: 590;
    color: var(--t-1);
    text-decoration: underline;
    text-decoration-color: var(--b-2);
    text-underline-offset: 3px;
  }

  .a6 .assistant-journal-lines {
    margin-top: 4px;
    font-size: .82rem;
  }

  .a6 .assistant-journal-lines summary {
    font-weight: 570;
    color: var(--t-2);
    text-decoration: underline;
    text-decoration-color: var(--b-2);
    text-underline-offset: 3px;
  }

  .a6 .assistant-journal-lines ul {
    display: grid;
    gap: 4px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
  }

  .a6 .assistant-journal-lines li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 10px;
  }

  .a6 .assistant-journal-lines li small {
    grid-column: 1 / -1;
  }

  .a6 .turn-foot {
    display: flex;
    align-items: center;
    gap: 1px;
    margin-left: -6px;
  }

  .a6 .foot-btn {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--t-4);
    transition: background-color var(--d-1) ease, color var(--d-1) ease;
  }

  .a6 .foot-btn .icon {
    width: 14px;
    height: 14px;
  }

  .a6 .foot-btn.is-done {
    color: var(--ok);
  }

  .a6 .foot-meta {
    margin-left: auto;
    overflow: hidden;
    font-size: .74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--t-4);
  }

  /* ---------- A Moon in the same window ---------- */

  .a6-moon {
    display: grid;
    gap: 14px;
    margin-top: auto;
    padding-bottom: 8px;
  }

  .a6-day {
    margin: 6px 0 -2px;
    font-size: .76rem;
    text-align: center;
    color: var(--t-4);
  }

  .a6-said {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .a6-said-face {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--t-1);
    color: var(--s-1);
  }

  .a6-said-face .icon {
    width: 19px;
    height: 19px;
  }

  .a6-said-body {
    display: grid;
    gap: .6em;
    padding-top: 2px;
    font-size: .94rem;
    line-height: 1.58;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .a6-said.is-thinking .work-pulse {
    height: 26px;
    color: var(--t-3);
  }

  .a6-meet {
    display: grid;
    justify-items: center;
    gap: 10px;
    max-width: 40ch;
    margin: 8vh auto;
    text-align: center;
  }

  .a6-meet-face {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: var(--t-1);
    color: var(--s-1);
  }

  .a6-meet-face .icon {
    width: 46px;
    height: 46px;
  }

  .a6-meet h3 {
    font-size: 1.2rem;
    font-weight: 640;
    font-stretch: 105%;
    letter-spacing: -.02em;
  }

  .a6-meet p {
    font-size: .9rem;
    line-height: 1.55;
    color: var(--t-3);
  }

  .a6-meet .btn {
    margin-top: 8px;
  }

  .a6-quick {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    padding-right: 28px;
    overflow-x: auto;
    scrollbar-width: none;
    /* the row runs on: its last chip fades out rather than being cut */
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  }

  .a6-chip {
    flex: none;
    height: 28px;
    padding: 0 11px;
    border: 1px solid var(--b-1);
    border-radius: 999px;
    background: var(--s-1);
    color: var(--t-2);
    font-size: .82rem;
    font-weight: 540;
    transition: border-color var(--d-1) ease, color var(--d-1) ease;
  }

  /* ---------- The message box ---------- */

  .a6-jump {
    position: absolute;
    z-index: 3;
    bottom: 132px;
    left: 50%;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-left: -16px;
    padding: 0;
    border: 1px solid var(--b-1);
    border-radius: 50%;
    background: var(--s-3);
    color: var(--t-2);
    box-shadow: var(--sh-2);
    animation: a6-rise var(--d-2) var(--e-out) both;
  }

  .a6-jump .icon {
    width: 16px;
    height: 16px;
  }

  .a6-chat {
    position: relative;
  }

  .a6 .assistant-controls {
    flex: none;
    padding: 0 var(--gut) 10px;
  }

  .a6 .assistant-status {
    min-height: 0;
    margin: 0;
    font-size: .8rem;
    line-height: 1.45;
    color: var(--t-3);
  }

  .a6 .assistant-status:not(:empty) {
    padding: 0 4px 8px;
  }

  .a6 .assistant-compose {
    position: relative;
    display: grid;
    gap: 2px;
    padding: 8px 8px 7px;
    border: 1px solid var(--b-1);
    border-radius: 18px;
    background: var(--s-1);
    box-shadow: var(--sh-2);
    transition: border-color var(--d-1) ease, box-shadow var(--d-2) ease;
  }

  .a6 .assistant-compose:focus-within {
    border-color: var(--b-2);
    box-shadow: var(--sh-2), 0 0 0 3px color-mix(in oklch, var(--t-3) 14%, transparent);
  }

  .a6 .assistant-compose.drag-active {
    border-style: dashed;
    border-color: var(--a-ring);
    background: color-mix(in oklch, var(--a-soft) 40%, var(--s-1));
  }

  .a6 .assistant-compose textarea {
    display: block;
    width: 100%;
    min-height: 26px;
    max-height: 32vh;
    padding: 5px 8px 4px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--t-1);
    font-size: .95rem;
    line-height: 1.5;
    resize: none;
    scrollbar-width: thin;
  }

  .a6 .assistant-compose textarea::placeholder {
    color: var(--t-3);
  }

  .a6 .assistant-compose textarea:disabled {
    cursor: not-allowed;
  }

  .a6 .assistant-attachments {
    padding: 2px 4px 6px;
  }

  .a6 .assistant-attachments small {
    font-size: .74rem;
    font-weight: 450;
    color: var(--t-4);
  }

  .a6 .assistant-attachments button {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-right: -4px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--t-3);
  }

  .a6 .assistant-attachments button .icon {
    width: 12px;
    height: 12px;
  }

  .a6 .assistant-compose-actions {
    display: flex;
    align-items: center;
    gap: 1px;
    min-width: 0;
    min-height: 32px;
  }

  .a6 .compose-spacer {
    flex: 1 1 0;
  }

  .a6 .assistant-compose-actions .icon-btn {
    flex: none;
    border-radius: 9px;
  }

  .a6 .assistant-compose-actions .icon-btn .icon {
    width: 17px;
    height: 17px;
  }

  .a6 .mode-chip {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 6px;
    min-width: 0;
    height: 30px;
    padding: 0 7px 0 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--t-2);
    font-size: .82rem;
    font-weight: 560;
    white-space: nowrap;
    transition: background-color var(--d-1) ease, color var(--d-1) ease;
  }

  .a6 .mode-chip [data-mode-label] {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .a6 .mode-chip .mode-icon,
  .a6 .mode-chip .mode-icon .icon {
    display: grid;
    width: 15px;
    height: 15px;
  }

  .a6 .mode-chip > .icon {
    width: 13px;
    height: 13px;
    color: var(--t-4);
  }

  .a6 .mode-chip[data-mode="auto"] {
    color: var(--warn);
  }

  .a6 .mode-chip:disabled {
    opacity: .6;
  }

  /* whose model answers and how hard it thinks: in the message box, after permissions.
     The name gives way before the effort does (agent-composer.js fits it to the room there is). */
  .a6 .a6-model {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 6px;
    min-width: 0;
    height: 30px;
    padding: 0 6px 0 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--t-3);
    font-size: .82rem;
    font-weight: 520;
    white-space: nowrap;
    transition: background-color var(--d-1) ease, color var(--d-1) ease, scale var(--d-1) var(--e-out);
  }

  .a6 .a6-model:disabled {
    cursor: default;
  }

  .a6 .a6-model:not(:disabled):active {
    scale: .98;
  }

  .a6 .a6-model[aria-expanded="true"] {
    background: var(--f-hover);
    color: var(--t-1);
  }

  .a6 .a6-model-logo {
    display: grid;
    flex: none;
    place-items: center;
    width: 15px;
    height: 15px;
    color: var(--t-2);
  }

  .a6 .a6-model-logo:empty {
    display: none;
  }

  .a6 .a6-model-logo svg {
    display: block;
    width: 14px;
    height: 14px;
  }

  .a6 .a6-model-name {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    color: var(--t-1);
    font-weight: 590;
    letter-spacing: -.005em;
    text-overflow: ellipsis;
  }

  .a6 .a6-model:disabled .a6-model-name {
    color: var(--t-2);
  }

  .a6 .a6-model-name .is-short,
  .a6 .a6-model[data-fit="short"] .a6-model-name .is-full,
  .a6 .a6-model[data-fit="bare"] .a6-model-name,
  .a6 .a6-model:not([data-fit="full"]) .a6-model-extra {
    display: none;
  }

  .a6 .a6-model[data-fit="short"] .a6-model-name .is-short {
    display: inline;
  }

  .a6 .a6-model-effort,
  .a6 .a6-model-extra {
    flex: none;
  }

  /* Ultra is several agents at once: three dots before its name, in the accent's ink */
  .a6 .a6-model[data-effort="ultra"] .a6-model-effort {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--a-ink);
    font-weight: 600;
  }

  .a6 .a6-model[data-effort="ultra"] .a6-model-effort::before {
    content: "";
    flex: none;
    width: 9px;
    height: 8px;
    background:
      radial-gradient(circle closest-side, currentColor 78%, transparent) 50% 0 / 3px 3px no-repeat,
      radial-gradient(circle closest-side, currentColor 78%, transparent) 0 100% / 3px 3px no-repeat,
      radial-gradient(circle closest-side, currentColor 78%, transparent) 100% 100% / 3px 3px no-repeat;
  }

  .a6 .a6-model > .icon {
    flex: none;
    width: 13px;
    height: 13px;
    margin-left: -2px;
    color: var(--t-4);
    transition: rotate var(--d-2) var(--e-out);
  }

  .a6 .a6-model[aria-expanded="true"] > .icon {
    rotate: 180deg;
  }

  /* the Moon: one flat face; pressed in, it is whom you are talking to */
  .a6 .a6-moon-btn {
    position: relative;
  }

  .a6 .a6-moon-btn .icon {
    width: 20px;
    height: 20px;
  }

  .a6 .a6-moon-btn[aria-pressed="true"] {
    background: var(--t-1);
    color: var(--s-1);
  }

  .a6-dot {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--a-fill);
    box-shadow: 0 0 0 2px var(--s-1);
  }

  .a6 .usage-ring {
    display: grid;
    flex: none;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    transition: background-color var(--d-1) ease;
  }

  .a6 .usage-ring svg {
    width: 17px;
    height: 17px;
    transform: rotate(-90deg);
  }

  .a6 .usage-ring circle {
    fill: none;
    stroke: var(--b-2);
    stroke-width: 2;
  }

  .a6 .usage-ring .usage-fill {
    stroke: var(--t-3);
    stroke-dasharray: var(--used, 0) 100;
    stroke-linecap: round;
  }

  .a6 .usage-ring[data-level="mid"] .usage-fill {
    stroke: var(--warn);
  }

  .a6 .usage-ring[data-level="high"] .usage-fill {
    stroke: var(--bad);
  }

  .a6 .assistant-send {
    display: grid;
    flex: none;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-left: 4px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--t-1);
    color: var(--s-base);
    transition: background-color var(--d-1) ease, color var(--d-1) ease, transform var(--d-1) var(--e-out);
  }

  .a6 .assistant-send:active {
    transform: scale(.94);
  }

  .a6 .assistant-send .icon {
    width: 17px;
    height: 17px;
  }

  .a6 .assistant-send .stop-glyph,
  .a6 .assistant-send[data-mode="stop"] .send-glyph {
    display: none;
  }

  .a6 .assistant-send[data-mode="stop"] .stop-glyph {
    display: grid;
  }

  .a6 .assistant-send[data-mode="stop"] .stop-glyph .icon {
    width: 13px;
    height: 13px;
  }

  .a6 .assistant-send[data-mode="stop"] .stop-glyph svg {
    fill: currentColor;
  }

  .a6 .assistant-send:is([data-empty="true"], :disabled) {
    background: var(--f-press);
    color: var(--t-4);
  }

  /* talking to a Moon: the things that belong to Caelion's requests step aside */
  .a6:not([data-agent="caelion"]) :is([data-attach], [data-mode-button], [data-a6-model], [data-usage], [data-voice-start]) {
    display: none;
  }

  /* dictation takes the box over: your voice across its whole width */
  .a6 .dictation-chip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 2px;
  }

  .a6 .assistant-compose.dictating textarea {
    display: none;
  }

  .a6 .rec-wave {
    display: block;
    width: 100%;
    height: 30px;
    color: var(--t-1);
  }

  .a6 .rec-time {
    font-size: .82rem;
    font-weight: 540;
    color: var(--t-3);
  }

  .a6 .rec-note {
    display: none;
    font-size: .82rem;
    color: var(--t-3);
  }

  .a6 .dictation-chip[data-state="transcribing"] .rec-note {
    display: block;
  }

  .a6 .dictation-chip[data-state="transcribing"] .rec-time {
    display: none;
  }

  .a6 .dictation-chip[data-state="transcribing"] .rec-wave {
    color: var(--t-3);
  }

  .a6 .rec-done {
    border-radius: 50%;
    background: var(--t-1);
    color: var(--s-base);
  }

  .a6 [data-dictate][aria-pressed="true"] {
    background: var(--f-press);
    color: var(--t-1);
  }

  .a6 .assistant-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 14px;
    padding: 7px 6px 0;
    font-size: .74rem;
    color: var(--t-4);
  }

  .a6 .assistant-options kbd {
    padding: 0 4px;
    font-size: .7rem;
  }

  .a6 .assistant-options .text-link {
    font-size: .76rem;
  }

  .a6 .assistant-wake {
    position: relative;
  }

  .a6 .assistant-wake summary {
    color: var(--t-3);
    text-decoration: underline;
    text-decoration-color: var(--b-2);
    text-underline-offset: 3px;
  }

  .a6 .assistant-wake-info {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: calc(100% + 8px);
    display: grid;
    gap: 10px;
    width: min(300px, 80vw);
    padding: 12px;
    border: 1px solid var(--b-1);
    border-radius: 12px;
    background: var(--s-3);
    font-size: .82rem;
    line-height: 1.5;
    color: var(--t-2);
    box-shadow: var(--sh-3);
  }

  .a6 .voice-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 6px 6px 6px 12px;
    border: 1px solid var(--b-1);
    border-radius: 12px;
    background: var(--s-1);
    font-size: .84rem;
    color: var(--t-2);
  }

  .a6 .voice-bar canvas {
    width: 40px;
    height: 18px;
    color: var(--t-1);
  }

  .a6 .voice-bar > span {
    flex: 1 1 auto;
  }

  /* ---------- The message box's menus ---------- */

  .a6 .compose-popover {
    position: absolute;
    z-index: 8;
    bottom: calc(100% + 8px);
    left: 0;
    width: min(336px, 100%);
    max-height: min(440px, 62vh);
    padding: 5px;
    overflow-y: auto;
    border: 1px solid var(--b-1);
    border-radius: 14px;
    background: var(--s-3);
    box-shadow: var(--sh-3);
    transform-origin: 20px 100%;
    animation: a6-pop var(--d-2) var(--e-out) both;
    scrollbar-width: thin;
  }

  .a6 .compose-popover[data-kind="slash"] {
    width: 100%;
  }

  .a6 .compose-popover[data-kind="usage"] {
    right: 0;
    left: auto;
    width: min(300px, 100%);
    transform-origin: calc(100% - 100px) 100%;
  }

  .a6 .compose-popover[data-kind="model"] {
    width: min(368px, 100%);
    max-height: min(560px, calc(100dvh - 140px));
    transform-origin: 76px 100%;
  }

  .a6 .menu,
  .a6 .slash {
    display: grid;
    gap: 1px;
  }

  .a6 .menu-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 5px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--t-3);
  }

  .a6 .menu-back {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin: -2px 0 -2px -4px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--t-2);
  }

  .a6 .menu-back .icon {
    width: 14px;
    height: 14px;
  }

  .a6 .menu-group {
    padding: 9px 8px 4px;
    font-size: .74rem;
    font-weight: 560;
    color: var(--t-4);
  }

  .a6 .menu-note {
    margin: 0;
    padding: 6px 8px 8px;
    font-size: .8rem;
    line-height: 1.45;
    color: var(--t-3);
  }

  .a6 .menu-rule {
    height: 1px;
    margin: 4px 3px;
    background: var(--b-0);
  }

  .a6 :is(.menu-item, .slash-item) {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--t-1);
    text-align: left;
    cursor: pointer;
    outline: 0;
  }

  .a6 :is(.menu-item, .slash-item) > .icon {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--t-3);
  }

  .a6 .menu-item:is(:hover, :focus-visible),
  .a6 .slash-item[aria-selected="true"] {
    background: var(--f-hover);
  }

  .a6 .menu-item:disabled {
    opacity: .5;
    cursor: default;
  }

  .a6 .menu-text {
    display: grid;
    flex: 1 1 auto;
    gap: 1px;
    min-width: 0;
  }

  .a6 .menu-label {
    font-size: .88rem;
    font-weight: 560;
    line-height: 1.35;
  }

  .a6 .menu-detail {
    font-size: .78rem;
    line-height: 1.4;
    color: var(--t-3);
  }

  .a6 .menu-meta {
    flex: none;
    font-size: .76rem;
    color: var(--t-4);
  }

  .a6 .menu-item.caution .menu-label,
  .a6 .menu-item.caution > .icon:first-child {
    color: var(--warn);
  }

  .a6 .menu-item[role="menuitemradio"] > .icon:last-child {
    width: 15px;
    height: 15px;
    color: var(--t-1);
    opacity: 0;
  }

  .a6 .menu-item[role="menuitemradio"][aria-checked="true"] > .icon:last-child {
    opacity: 1;
  }

  .a6 .menu-item .switch,
  .a6-switch {
    position: relative;
    flex: none;
    width: 32px;
    height: 19px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--b-2);
    transition: background-color var(--d-2) ease;
  }

  .a6 .menu-item .switch::after,
  .a6-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px oklch(0 0 0 / .25);
    transition: transform var(--d-2) var(--e-out);
  }

  .a6 .menu-item[aria-checked="true"] .switch,
  .a6-switch[aria-checked="true"] {
    background: var(--t-1);
  }

  .a6 .menu-item[aria-checked="true"] .switch::after,
  .a6-switch[aria-checked="true"]::after {
    transform: translateX(13px);
  }

  &[data-theme="dark"] :is(.a6 .menu-item[aria-checked="true"] .switch, .a6-switch[aria-checked="true"])::after {
    background: var(--s-base);
  }

  .a6-switch:disabled {
    opacity: .5;
  }

  .a6 .menu-link {
    display: block;
    padding: 7px 8px;
    border-radius: 9px;
    font-size: .82rem;
    font-weight: 560;
    color: var(--t-2);
    text-decoration: none;
  }

  .a6 .slash-hint {
    font-weight: 450;
    color: var(--t-4);
  }

  .a6 .usage-card {
    display: grid;
    gap: 12px;
    padding: 9px 10px 10px;
    outline: 0;
  }

  .a6 .usage-card h4 {
    margin: 0 0 4px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--t-3);
  }

  .a6 :is(.usage-card, .a6-usage) p {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 2px 0;
    font-size: .84rem;
    color: var(--t-2);
  }

  .a6 :is(.usage-card, .a6-usage) b {
    font-weight: 590;
    text-align: right;
    color: var(--t-1);
  }

  .a6 .usage-meter {
    height: 4px;
    margin-top: 7px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--b-1);
  }

  .a6 .usage-meter::after {
    content: "";
    display: block;
    width: calc(var(--used, 0) * 1%);
    height: 100%;
    border-radius: 2px;
    background: var(--t-2);
  }

  .a6 .usage-model {
    font-size: .78rem !important;
    color: var(--t-4) !important;
  }

  /* ---------- The views: search, scheduled, plugins, settings ---------- */

  .a6-view {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .a6-view-body {
    display: grid;
    gap: 28px;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 18px var(--gut) 44px;
  }

  .a6-sec h3 {
    font-size: 1rem;
    font-weight: 640;
    font-stretch: 103%;
    letter-spacing: -.012em;
  }

  .a6-note {
    max-width: 62ch;
    margin: 3px 0 6px;
    font-size: .84rem;
    line-height: 1.5;
    color: var(--t-3);
  }

  .a6-sub {
    margin: 14px 0 2px;
    font-size: .76rem;
    font-weight: 560;
    color: var(--t-4);
  }

  .a6-empty {
    margin: 0;
    padding: 10px 0;
    font-size: .86rem;
    line-height: 1.5;
    color: var(--t-3);
  }

  .a6-row,
  .a6-rule,
  .a6-skill,
  .a6-result {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid var(--b-0);
    background: transparent;
    color: var(--t-1);
    text-align: left;
  }

  .a6-sec > :is(.a6-row, .a6-rule):last-child,
  .a6-skills > :last-child {
    border-bottom: 0;
  }

  .a6-row-ico {
    display: grid;
    flex: none;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--s-2);
    color: var(--t-2);
    box-shadow: inset 0 0 0 1px var(--b-0);
  }

  .a6-row-ico .icon,
  :is(.a6-skill, .a6-result) > .icon {
    width: 16px;
    height: 16px;
  }

  :is(.a6-skill, .a6-result) > .icon {
    flex: none;
    margin: 0 7px;
    color: var(--t-3);
  }

  .a6-row .a6-row-text b,
  .a6-rule .a6-row-text b {
    white-space: normal;
  }

  .a6-row-meta {
    flex: none;
    max-width: 38%;
    overflow: hidden;
    font-size: .76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--t-4);
  }

  .a6-skill,
  .a6-result {
    margin: 0 -8px;
    padding-inline: 8px;
    width: calc(100% + 16px);
    border-bottom-color: transparent;
    border-radius: 9px;
    cursor: pointer;
    transition: background-color var(--d-1) ease;
  }

  .a6-result[aria-selected="true"] {
    background: var(--f-hover);
  }

  /* permissions: four ways of working, one chosen */
  .a6-modes {
    display: grid;
    gap: 6px;
    margin-top: 10px;
  }

  .a6-mode {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--b-1);
    border-radius: 11px;
    background: var(--s-1);
    color: var(--t-1);
    text-align: left;
    transition: border-color var(--d-1) ease, background-color var(--d-1) ease;
  }

  .a6-mode > .icon {
    flex: none;
    width: 17px;
    height: 17px;
    color: var(--t-3);
  }

  .a6-mode .a6-row-text b {
    white-space: normal;
  }

  .a6-mode[data-mode="auto"] > .icon {
    color: var(--warn);
  }

  .a6-mode:disabled {
    opacity: .5;
  }

  .a6-radio {
    flex: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px var(--b-2);
  }

  .a6-mode[aria-checked="true"] {
    border-color: var(--t-1);
    background: var(--f-selected);
  }

  .a6-mode[aria-checked="true"] .a6-radio {
    box-shadow: inset 0 0 0 5px var(--t-1);
  }

  .a6-rule {
    flex-wrap: wrap;
  }

  /* the words give way before the choice does, so every rule's choice sits on the right */
  .a6-rule > .a6-row-text {
    flex: 1 1 0;
    min-width: min(100%, 210px);
  }

  .a6-rule > .a6-row-text small {
    text-wrap: pretty;
  }

  .a6-rule-now {
    flex: 1 1 100%;
    margin: -2px 0 0;
    font-size: .78rem;
    color: var(--warn);
  }

  .a6-seg {
    display: flex;
    flex: none;
    gap: 2px;
    padding: 2px;
    border-radius: 9px;
    background: var(--f-hover);
    box-shadow: inset 0 0 0 1px var(--b-0);
  }

  .a6-seg button {
    height: 26px;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--t-3);
    font-size: .8rem;
    font-weight: 560;
    white-space: nowrap;
    transition: color var(--d-1) ease, background-color var(--d-1) ease;
  }

  .a6-seg button[aria-checked="true"] {
    background: var(--s-1);
    color: var(--t-1);
    box-shadow: var(--sh-1), 0 0 0 1px var(--b-0);
  }

  .a6-seg button:disabled {
    cursor: default;
  }

  .a6-never {
    display: grid;
    gap: 5px;
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 11px;
    background: var(--s-2);
    list-style: none;
    font-size: .84rem;
    line-height: 1.45;
    color: var(--t-2);
  }

  .a6-never li {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
  }

  .a6-never .icon {
    width: 13px;
    height: 13px;
    margin-top: 3px;
    color: var(--t-4);
  }

  .a6-never .a6-never-head {
    display: block;
    padding-bottom: 2px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--t-3);
  }

  .a6-usage {
    padding: 10px 0 2px;
  }

  .a6-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
  }

  .a6-sec > .btn,
  .a6-connect {
    margin-top: 10px;
  }

  /* scheduled: one card per routine */
  .a6-routine {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    padding: 12px 14px;
    border: 1px solid var(--b-1);
    border-radius: 12px;
    background: var(--s-1);
  }

  .a6-routine[data-on="false"] {
    background: transparent;
  }

  .a6-routine[data-on="false"] .a6-row-text b {
    color: var(--t-2);
  }

  .a6-routine-head {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .a6-routine-head .a6-row-text b {
    white-space: normal;
  }

  .a6-routine-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    margin: 0;
    font-size: .8rem;
    color: var(--t-3);
  }

  .a6-routine-last {
    margin: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--s-well);
    font-size: .84rem;
    line-height: 1.5;
    color: var(--t-2);
  }

  .a6-routine-acts {
    display: flex;
    gap: 6px;
  }

  .a6-form {
    display: grid;
    gap: 12px;
    margin-top: 10px;
  }

  .a6-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .a6-form-row > * {
    flex: 1 1 140px;
  }

  .a6-field {
    display: grid;
    gap: 5px;
    font-size: .82rem;
    font-weight: 560;
    color: var(--t-2);
  }

  .a6-field :is(input, select, textarea),
  .a6-search input {
    width: 100%;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid var(--b-1);
    border-radius: 9px;
    background: var(--s-well);
    color: var(--t-1);
    font: inherit;
    font-size: .92rem;
    font-weight: 450;
    transition: border-color var(--d-1) ease, box-shadow var(--d-1) ease, background-color var(--d-1) ease;
  }

  .a6-field textarea {
    line-height: 1.5;
    resize: vertical;
  }

  .a6-field :is(input, select, textarea):focus-visible,
  .a6-search input:focus-visible {
    outline: 0;
    border-color: var(--a-ring);
    background: var(--s-1);
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--a-ring) 22%, transparent);
  }

  .a6-form > .btn {
    justify-self: start;
  }

  .a6-search {
    position: relative;
    display: block;
  }

  .a6-search > .icon {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    color: var(--t-4);
  }

  .a6-search input {
    height: 40px;
    padding-left: 36px;
    border-radius: 11px;
  }

  .a6-results {
    margin-top: -16px;
  }

  /* ---------- Live voice ---------- */

  .voice-stage {
    --voice-ink: #f4efe6;
    --voice-gold: #f6cf7d;
    --voice-soft: rgb(244 239 230 / .5);
    --voice-quiet: rgb(244 239 230 / .19);
    position: fixed;
    z-index: 80;
    inset: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    color: var(--voice-ink);
    /* the product site's night: cobalt above, an ember low on the right, on near-black */
    background:
      radial-gradient(60% 52% at 96% 104%, rgb(194 74 23 / .3), transparent 70%),
      radial-gradient(58% 60% at 2% -6%, rgb(16 42 124 / .58), transparent 72%),
      radial-gradient(40% 40% at 100% 14%, rgb(10 85 96 / .2), transparent 70%),
      #070a14;
    animation: a6-fade var(--d-3) ease both;
  }

  &[data-theme="light"] .voice-stage {
    --voice-ink: #171a24;
    --voice-gold: #8a5d0f;
    --voice-soft: rgb(23 26 36 / .5);
    --voice-quiet: rgb(23 26 36 / .2);
    background:
      radial-gradient(60% 52% at 96% 104%, rgb(255 190 150 / .58), transparent 70%),
      radial-gradient(58% 60% at 2% -6%, rgb(172 190 255 / .66), transparent 72%),
      radial-gradient(40% 40% at 100% 14%, rgb(170 226 220 / .48), transparent 70%),
      #eef0f6;
  }

  /* a little grain, so the sky is paper and not a gradient */
  .voice-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: .16;
    mix-blend-mode: overlay;
    pointer-events: none;
  }

  .voice-instrument {
    position: absolute;
    inset: 7% 0 auto;
    display: block;
    width: 100%;
    height: 64%;
  }

  .voice-head {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px clamp(14px, 2vw, 24px);
  }

  .voice-back {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 4px;
    height: 34px;
    padding: 0 13px 0 8px;
    border: 1px solid color-mix(in srgb, var(--voice-ink) 16%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--voice-ink) 6%, transparent);
    color: var(--voice-ink);
    font-size: .86rem;
    font-weight: 560;
    backdrop-filter: blur(10px);
    transition: background-color var(--d-1) ease;
  }

  .voice-back .icon {
    width: 16px;
    height: 16px;
  }

  .voice-title {
    display: flex;
    align-items: baseline;
    gap: 9px;
  }

  .voice-title h2 {
    font-size: .92rem;
    font-weight: 620;
  }

  .voice-title span {
    font-size: .84rem;
    color: var(--voice-soft);
  }

  .voice-head > .icon-btn {
    justify-self: end;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--voice-soft);
  }

  .voice-head > .icon-btn[aria-pressed="true"] {
    background: color-mix(in srgb, var(--voice-ink) 10%, transparent);
    color: var(--voice-ink);
  }

  .voice-body {
    position: relative;
    display: grid;
    align-content: end;
    justify-items: center;
    gap: 12px;
    min-height: 0;
    padding: 0 clamp(16px, 4vw, 48px) 6px;
    text-align: center;
  }

  .voice-status {
    margin: 0;
    font-size: .88rem;
    font-weight: 540;
    color: var(--voice-soft);
  }

  .voice-stage[data-mood="speak"] .voice-status {
    color: var(--voice-gold);
  }

  .voice-lines {
    display: grid;
    gap: 8px;
    width: min(680px, 100%);
    min-height: 4.6em;
    align-content: end;
  }

  .voice-lines p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 1.06rem;
    font-weight: 500;
    line-height: 1.45;
    color: var(--voice-soft);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    transition: color var(--d-3) ease;
  }

  .voice-lines p.current {
    color: var(--voice-ink);
  }

  .voice-lines small {
    display: block;
    margin-bottom: 1px;
    font-size: .74rem;
    font-weight: 560;
    color: var(--voice-soft);
  }

  .voice-word {
    animation: a6-fade 240ms ease both;
  }

  .voice-work {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .84rem;
    color: var(--voice-soft);
  }

  .voice-work li {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
  }

  .voice-work .icon {
    width: 14px;
    height: 14px;
  }

  .voice-controls {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 16px 16px max(26px, env(safe-area-inset-bottom));
  }

  .voice-control {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--voice-ink) 16%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--voice-ink) 8%, transparent);
    color: var(--voice-ink);
    backdrop-filter: blur(10px);
    transition: background-color var(--d-1) ease, transform var(--d-1) var(--e-out);
  }

  .voice-control:active {
    transform: scale(.95);
  }

  .voice-control .icon {
    width: 21px;
    height: 21px;
  }

  .voice-control .mic-off,
  .voice-control[aria-pressed="true"] .mic-on {
    display: none;
  }

  .voice-control[aria-pressed="true"] .mic-off {
    display: grid;
  }

  .voice-control[aria-pressed="true"] {
    background: var(--voice-ink);
    color: #10131c;
  }

  &[data-theme="light"] .voice-control[aria-pressed="true"] {
    color: #f4f1ea;
  }

  .voice-control.end {
    border-color: transparent;
    background: oklch(.58 .2 27);
    color: #fff;
  }
}

/* the whole page holds still under the voice stage, and the window that holds the stage comes to the front */
:root[data-layout="v5"].voice-open {
  overflow: hidden;
}

:root[data-layout="v5"].voice-open .a6 {
  z-index: 90;
}

/* the frame's cap over the top gap (shell.css) would lie across the stage's sky */
:root[data-layout="v5"].voice-open body::before {
  display: none;
}

/* ---------- Hover ---------- */

@media (hover: hover) and (pointer: fine) {
  :root[data-layout="v5"] {
    .a6 :is(.a6-nav, .a6-agent, .a6-recent):hover,
    .a6 .a6-model:not(:disabled):hover,
    .a6-starters button:not(:disabled):hover,
    .a6 .work-toggle:not(:disabled):hover,
    .a6 .foot-btn:hover,
    .a6 .mode-chip:not(:disabled):hover,
    .a6 .usage-ring:hover,
    .a6 :is(.menu-back, .menu-link):hover,
    .a6 .assistant-attachments button:hover,
    .a6-skill:hover {
      background: var(--f-hover);
      color: var(--t-1);
    }

    .a6 .effort-auto:hover,
    .a6 .effort-stops span:not([data-on]):hover {
      color: var(--t-1);
    }

    .a6-starters button:not(:disabled):hover .icon {
      color: var(--t-2);
    }

    .a6 .record-links .record-link:hover,
    .a6-chip:hover,
    .a6-mode:not(:disabled, [aria-checked="true"]):hover {
      border-color: var(--b-2);
      color: var(--t-1);
    }

    .a6 .approval-btn.primary:hover {
      filter: brightness(1.04) saturate(1.04);
    }

    .a6 .approval-btn.quiet:hover {
      border-color: var(--b-2);
    }

    .a6-seg button:not([aria-checked="true"], :disabled):hover {
      color: var(--t-1);
    }

    .a6 .assistant-send:not([data-empty="true"], :disabled):hover {
      background: color-mix(in oklch, var(--t-1) 86%, var(--s-1));
    }

    .voice-back:hover,
    .voice-control:not(.end, [aria-pressed="true"]):hover {
      background: color-mix(in srgb, var(--voice-ink) 14%, transparent);
    }
  }
}

/* ---------- Beside the work: docked on a wide screen ---------- */

@media (min-width: 1080px) {
  :root[data-layout="v5"] {
    .app-shell:has(> .a6:not([hidden])) {
      --assistant-min: 365px;
      --assistant-max: 860px;
      --workspace-min: 420px;
      --assistant-col: clamp(var(--assistant-min), var(--assistant-width, clamp(390px, 31vw, 560px)), min(var(--assistant-max), calc(100% - var(--rail-w) - var(--workspace-min))));
      grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--assistant-col);
    }

    .app-shell[data-assistant-dock="left"]:has(> .a6:not([hidden])) {
      grid-template-columns: var(--rail-w) var(--assistant-col) minmax(0, 1fr);
    }

    .app-shell[data-assistant-dock="left"]:has(> .a6:not([hidden])) > .a6 {
      grid-column: 2;
      grid-row: 1;
    }

    .app-shell[data-assistant-dock="left"]:has(> .a6:not([hidden])) > .work-area {
      grid-column: 3;
      grid-row: 1;
    }

    /* a second sheet in the frame */
    .a6 {
      top: var(--frame);
      height: calc(100dvh - 2 * var(--frame));
      margin: var(--frame) var(--frame) var(--frame) 0;
      border: 1px solid var(--b-1);
      border-radius: var(--r-pane);
      box-shadow: var(--sh-1);
    }

    .a6-head {
      min-height: var(--top-h);
    }

    .assistant-divider {
      position: absolute;
      z-index: 9;
      inset: 0 auto 0 0;
      display: block;
      width: 10px;
      cursor: col-resize;
      touch-action: none;
      outline: none;
    }

    [data-assistant-dock="left"] .assistant-divider {
      inset: 0 0 0 auto;
    }

    .assistant-divider::after {
      content: "";
      position: absolute;
      top: calc(50% - 18px);
      left: 3px;
      width: 3px;
      height: 36px;
      border-radius: 3px;
      background: var(--b-2);
      opacity: 0;
      transition: opacity var(--d-1) ease;
    }

    [data-assistant-dock="left"] .assistant-divider::after {
      right: 3px;
      left: auto;
    }

    .assistant-divider:is(:hover, :focus-visible)::after,
    [data-assistant-resizing] .assistant-divider::after {
      background: var(--a-ring);
      opacity: 1;
    }

    .app-shell[data-assistant-resizing] {
      cursor: col-resize;
      user-select: none;
    }

    /* the whole screen: the window becomes the app, with its sidebar on the frame's ground */
    .app-shell[data-assistant-full] > .a6 {
      position: fixed;
      z-index: 45;
      inset: 0;
      width: auto;
      height: 100dvh;
      margin: 0;
      border: 0;
      border-radius: 0;
      box-shadow: none;
    }

    .app-shell[data-assistant-full]:has(> .a6:not([hidden])) {
      grid-template-columns: var(--rail-w) minmax(0, 1fr);
    }

    [data-assistant-full] .assistant-divider {
      display: none;
    }
  }
}

/* ---------- Phones and tablets: the window takes the screen ---------- */

@media (max-width: 1079px) {
  :root[data-layout="v5"] {
    .a6 {
      position: fixed;
      z-index: 46;
      inset: 0;
      /* stretch: a positioned box that keeps align-self: start would shrink to its head */
      align-self: stretch;
      height: 100dvh;
    }

    .a6 .desk-only {
      display: none !important;
    }

    .a6-head {
      min-height: 54px;
      padding-top: env(safe-area-inset-top);
    }

    .a6 .assistant-controls {
      padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    .a6 .assistant-hint {
      display: none;
    }

    .a6 .assistant-compose textarea {
      font-size: 16px;
    }
  }
}

/* a tighter window folds permissions to its glyph first so the model chip and usage gauge both fit;
   a narrow window (phones, slender docked panels) folds the usage gauge as well (agent.js measures both) */
:root[data-layout="v5"] .a6:is([data-tight], [data-narrow]) :is(.mode-chip [data-mode-label], .mode-chip > .icon) {
  display: none;
}

:root[data-layout="v5"] .a6:is([data-tight], [data-narrow]) .mode-chip {
  flex: none;
  justify-content: center;
  width: 30px;
  padding: 0;
}

:root[data-layout="v5"] .a6[data-narrow] .usage-ring {
  display: none;
}

:root[data-layout="v5"] .a6[data-narrow] .a6-model {
  gap: 5px;
  padding: 0 4px 0 6px;
}

/* ---------- Motion ---------- */

@keyframes a6-fade {
  from { opacity: 0 }
}

@keyframes a6-drawer {
  from { transform: translateX(-100%) }
}

@keyframes a6-pop {
  from { opacity: 0; transform: scale(.97) translateY(4px) }
}

@keyframes a6-rise {
  from { opacity: 0; transform: translateY(6px) }
}

@keyframes a6-settle {
  from { opacity: 0; transform: translateY(5px) }
}

@keyframes a6-breathe {
  0%, 100% { opacity: .3; transform: none }
  40% { opacity: 1; transform: translateY(-1.5px) }
}

@keyframes a6-sweep {
  from { background-position: 100% 0 }
  to { background-position: -120% 0 }
}

@keyframes a6-turn {
  to { transform: rotate(360deg) }
}

@media (prefers-reduced-motion: no-preference) {
  :root[data-layout="v5"]:not([data-motion="reduced"]) {
    .a6 .work-pulse i {
      animation: a6-breathe 1.15s ease-in-out infinite;
    }

    .a6 .work-pulse i:nth-child(2) {
      animation-delay: .14s;
    }

    .a6 .work-pulse i:nth-child(3) {
      animation-delay: .28s;
    }

    .a6 .work-toggle.is-live .work-label,
    .a6 .step[data-state="running"] .step-label {
      animation: a6-sweep 1.9s linear infinite;
    }

    .a6 .step[data-state="running"] .step-mark::after {
      animation: a6-turn .9s linear infinite;
    }

    .a6 .answer.is-new {
      animation: a6-settle 300ms var(--e-out) both;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  :root[data-layout="v5"] {
    .a6[data-side="over"] .a6-side,
    .a6-side-veil,
    .a6 .compose-popover,
    .a6-jump,
    .voice-stage,
    .voice-word {
      animation: none;
    }
  }
}

@media print {
  :root[data-layout="v5"] .a6 {
    display: none !important;
  }
}

/* ---------- Making a Moon, in the window ---------- */

:root[data-layout="v5"] {
  .a6-new {
    display: grid;
    justify-items: start;
    gap: 6px;
    width: 100%;
    max-width: 520px;
    margin: 4vh auto 2vh;
  }

  .a6-new .a6-meet-face {
    width: 52px;
    height: 52px;
    margin-bottom: 10px;
  }

  .a6-new .a6-meet-face .icon {
    width: 38px;
    height: 38px;
  }

  .a6-new h3 {
    font-size: 1.28rem;
    font-weight: 640;
    font-stretch: 106%;
    letter-spacing: -.022em;
  }

  .a6-new-lead {
    max-width: 48ch;
    font-size: .92rem;
    line-height: 1.55;
    color: var(--t-3);
  }

  .a6-new .a6-form {
    width: 100%;
    margin-top: 16px;
  }

  .a6-new-names {
    margin: -4px 0 0;
  }

  /* the way to the full setup: a link under the button, never a second button */
  .a6-new-guided {
    justify-self: start;
    margin-top: 2px;
    color: var(--t-3);
    font-size: .84rem;
    font-weight: 550;
    text-decoration: underline;
    text-decoration-color: var(--b-2);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--d-1) ease;
  }

  .a6-new-guided:hover {
    color: var(--t-1);
  }

  .a6-checks {
    display: grid;
    gap: 2px;
    min-width: 0;
    margin: 4px 0 0;
    padding: 0;
    border: 0;
  }

  .a6-checks legend {
    margin-bottom: 6px;
    padding: 0;
    font-size: .82rem;
    font-weight: 560;
    color: var(--t-2);
  }

  .a6-check {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
    margin: 0 -10px;
    padding: 8px 10px;
    border-radius: var(--r-ctl);
    cursor: pointer;
    transition: background-color var(--d-1) ease;
  }

  .a6-check input {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--t-1);
  }

  .a6-check .a6-row-text b {
    white-space: normal;
  }

  /* there is no one to write to yet */
  .a6[data-agent="new-moon"] .assistant-controls {
    display: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  :root[data-layout="v5"] .a6-check:hover {
    background: var(--f-hover);
  }
}

/* ---------- A Moon's picture in the window, and "Ask your Moons" ---------- */

:root[data-layout="v5"] {
  /* the head: Caelion's mark, the Moon you are talking to, or all of them, overlapping */
  .a6-who {
    width: auto;
    min-width: 26px;
    height: 30px;
  }

  .a6-who-moon {
    display: none;
    align-items: center;
    width: auto;
    height: 30px;
    border-radius: 0;
    background: none;
    color: var(--t-1);
  }

  .a6-who-moon > .icon {
    width: 22px;
    height: 22px;
  }

  .a6-who-moon.is-many .moon-pic + .moon-pic {
    margin-left: -8px;
  }

  .a6[data-agent="moons"] .a6-who .assistant-face {
    display: none;
  }

  .a6[data-agent="moons"] .a6-who-moon,
  .a6[data-agent="moon"] .a6-who-moon,
  .a6[data-agent="new-moon"] .a6-who-moon {
    display: flex;
  }

  .a6-said {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .a6-said-pic {
    margin-top: 1px;
  }

  .a6-meet-pic {
    margin-bottom: 6px;
  }

  .a6-new .a6-meet-pic {
    margin-bottom: 10px;
  }

  .a6 .approval-head > .moon-pic {
    flex: none;
  }

  /* whom the message box asks, when every Moon is in front of you */
  .a6-quick.is-to {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .a6-to {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 11px 0 5px;
  }

  .a6-to[aria-pressed="true"] {
    border-color: transparent;
    background: var(--t-1);
    color: var(--s-base);
  }

  /* ----- every Moon at once ----- */

  .a6-hub {
    display: grid;
    /* a row's long line is cut with an ellipsis; it must not widen the column */
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 4px 0 20px;
  }

  .a6-hub[hidden] {
    display: none;
  }

  /* Caelion in the middle, the Moons on one orbit round it */
  .a6-orbit {
    position: relative;
    width: min(100%, 320px);
    aspect-ratio: 320 / 148;
    margin: 12px auto 14px;
    /* the Moons measure their way round by this box (cqw, below) */
    container-type: inline-size;
  }

  .a6-orbit-line {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
  }

  /* the ring of an instrument: its near half drawn firmer than its far one, graduated every ten degrees */
  .a6-orbit-arc {
    fill: none;
    stroke: var(--b-2);
    stroke-width: 1;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    vector-effect: non-scaling-stroke;
  }

  .a6-orbit-ticks {
    fill: none;
    stroke: var(--b-2);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
  }

  :is(.a6-orbit-arc, .a6-orbit-ticks).is-far {
    stroke: var(--b-1);
  }

  .a6-orbit-core {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -50%);
  }

  .a6-orbit-core img {
    display: block;
    width: 30px;
    height: 30px;
  }

  .a6-orbit-moon {
    position: absolute;
    top: var(--y);
    left: var(--x);
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    translate: -50% -50%;
  }

  .a6-orbit-moon .moon-pic {
    transition: scale var(--d-2) var(--e-out);
  }

  .a6-orbit-moon:active .moon-pic {
    scale: .96;
  }

  /* the Moons the message box is about to ask: ringed in ink */
  .a6-orbit-moon::before {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1.5px solid var(--t-1);
    border-radius: 50%;
    opacity: 0;
    scale: .86;
    transition: opacity var(--d-2) ease, scale var(--d-3) var(--e-out);
  }

  .a6-orbit-moon[data-asked]::before {
    opacity: 1;
    scale: 1;
  }

  /* pointing at a Moon's row picks it out here, and pointing at it here picks out its row */
  .a6-orbit-moon.is-linked .moon-pic {
    scale: 1.08;
  }

  .a6-hub-row.is-linked {
    background: var(--f-hover);
  }

  /* and its name shows under it for as long */
  .a6-orbit-name {
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--s-base);
    box-shadow: inset 0 0 0 1px var(--b-1);
    color: var(--t-1);
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    translate: -50% -3px;
    transition: opacity var(--d-1) ease, translate var(--d-2) var(--e-out);
  }

  .a6-orbit-moon.is-linked .a6-orbit-name {
    opacity: 1;
    translate: -50% 0;
  }

  /* working: a dashed ring turns round it */
  .a6-orbit-moon[data-status="working"]::after {
    content: "";
    position: absolute;
    inset: -2px;
    border: 1.5px dashed var(--t-3);
    border-radius: 50%;
    animation: a6-turn 7s linear infinite;
  }

  .a6-orbit-moon[data-status="paused"] .moon-pic {
    opacity: .62;
  }

  /* waiting on you: how many things, in gold */
  .a6-orbit-n {
    position: absolute;
    top: -1px;
    right: -1px;
    display: grid;
    place-items: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--a-fill);
    color: var(--a-on);
    font-size: .66rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--s-base);
  }

  @keyframes a6-turn {
    to {
      transform: rotate(1turn);
    }
  }

  /* how busy they are, together */
  .a6-hub-sum {
    display: grid;
    justify-items: center;
    gap: 7px;
    margin: 8px 0 16px;
    text-align: center;
  }

  .a6-hub-sum b {
    max-width: 34ch;
    font-size: 1.02rem;
    font-weight: 620;
    line-height: 1.3;
    letter-spacing: -.01em;
    text-wrap: balance;
  }

  .a6-hub-waiting {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--a-soft);
    color: var(--a-ink);
    font-size: .8rem;
    font-weight: 560;
    box-shadow: inset 0 0 0 1px var(--a-line);
  }

  /* each Moon: what it is doing, its last words, and the way into its thread */
  .a6-hub-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--b-1);
    border-radius: var(--r-card);
    background: var(--s-1);
    list-style: none;
  }

  .a6-hub-list > li + li {
    border-top: 1px solid var(--b-0);
  }

  .a6-hub-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 10px 12px 14px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--d-1) ease;
  }

  .a6-hub-row:focus-visible {
    outline-offset: -2px;
  }

  .a6-hub-text {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    flex: 1;
    gap: 2px;
    min-width: 0;
  }

  .a6-hub-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 9px;
  }

  .a6-hub-name b {
    font-size: .95rem;
    font-weight: 620;
  }

  .a6-hub-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    font-weight: 560;
    color: var(--t-3);
  }

  .a6-hub-state::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ok);
  }

  [data-status="paused"] .a6-hub-state::before {
    background: var(--t-4);
  }

  [data-status="waiting"] .a6-hub-state {
    color: var(--a-ink);
  }

  [data-status="waiting"] .a6-hub-state::before {
    background: var(--a-fill);
  }

  [data-status="working"] .a6-hub-state {
    color: var(--t-1);
  }

  [data-status="working"] .a6-hub-state::before {
    content: none;
  }

  .a6-hub-pulse {
    display: inline-flex;
    gap: 2px;
  }

  .a6-hub-pulse i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    animation: a6-blink 1.1s ease-in-out infinite;
  }

  .a6-hub-pulse i:nth-child(2) {
    animation-delay: .16s;
  }

  .a6-hub-pulse i:nth-child(3) {
    animation-delay: .32s;
  }

  @keyframes a6-blink {
    0%, 70%, 100% {
      opacity: .28;
    }

    35% {
      opacity: 1;
    }
  }

  .a6-hub-count {
    display: grid;
    place-items: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--a-fill);
    color: var(--a-on);
    font-size: .66rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
  }

  .a6-hub-detail,
  .a6-hub-last {
    font-size: .82rem;
    line-height: 1.4;
    color: var(--t-3);
  }

  .a6-hub-detail {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .a6-hub-last {
    display: flex;
    gap: 8px;
  }

  .a6-hub-last span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .a6-hub-last time {
    flex: none;
    color: var(--t-4);
  }

  .a6-hub-go {
    display: grid;
    flex: none;
    place-items: center;
    width: 24px;
    color: var(--t-4);
    transition: transform var(--d-2) var(--e-out), color var(--d-1) ease;
  }

  .a6-hub-go .icon {
    width: 16px;
    height: 16px;
  }

  .a6-hub-plus {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px dashed var(--b-2);
    border-radius: 50%;
    color: var(--t-3);
  }

  .a6-hub-plus .icon {
    width: 17px;
    height: 17px;
  }

  .a6-hub-row.is-add b {
    font-size: .92rem;
    font-weight: 590;
  }
}

@media (hover: hover) and (pointer: fine) {
  :root[data-layout="v5"] {
    .a6-orbit-moon:hover .moon-pic {
      scale: 1.08;
    }

    .a6-hub-row:hover {
      background: var(--f-hover);
    }

    .a6-hub-row:hover .a6-hub-go {
      color: var(--t-2);
      transform: translateX(2px);
    }

    .a6-to:not([aria-pressed="true"]):hover {
      border-color: var(--b-2);
      color: var(--t-1);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  :root[data-layout="v5"] .a6-orbit-moon[data-status="working"]::after,
  :root[data-layout="v5"] .a6-hub-pulse i {
    animation: none;
  }
}

:root[data-layout="v5"][data-motion="reduced"] .a6-orbit-moon[data-status="working"]::after,
:root[data-layout="v5"][data-motion="reduced"] .a6-hub-pulse i {
  animation: none;
}

/* ---------- The Moons go round ---------- */

/*
  Each Moon starts from its own angle (--a0, set by agent-moons.js) and all of them are carried
  round together by one slowly turning angle, so they keep their distances. On the far side of
  the ring a Moon is a little smaller. They stop while the pointer or the keyboard is among
  them, and for anyone who asked for less motion they stay where they start.
*/
@property --a6-round {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

@keyframes a6-round {
  to {
    --a6-round: 360deg;
  }
}

@supports (translate: calc(cos(10deg) * 1cqw)) {
  :root[data-layout="v5"] .a6-orbit-moon {
    --at: calc(var(--a0, 0deg) + var(--a6-round));
    top: 50%;
    left: 50%;
    translate: calc(-50% + cos(var(--at)) * 41.25cqw) calc(-50% + sin(var(--at)) * 14.375cqw);
    scale: calc(.93 + sin(var(--at)) * .07);
  }

  @media (prefers-reduced-motion: no-preference) {
    :root[data-layout="v5"]:not([data-motion="reduced"]) .a6-orbit {
      animation: a6-round 140s linear infinite;
    }

    :root[data-layout="v5"] .a6-orbit:is(:hover, :focus-within) {
      animation-play-state: paused;
    }
  }
}

/* ---------- The model's card, its effort scale, names after @, and the crossing ---------- */

/* the scale's colours are registered, so the script that draws its dots reads back a colour and not the words var(--t-1) */
@property --effort-ink {
  syntax: "<color>";
  inherits: true;
  initial-value: #222;
}

@property --effort-gold {
  syntax: "<color>";
  inherits: true;
  initial-value: #a37a1c;
}

@property --effort-wash {
  syntax: "<color>";
  inherits: true;
  initial-value: #c9a227;
}

@property --effort-track-r {
  syntax: "<length>";
  inherits: true;
  initial-value: 12px;
}

:root[data-layout="v5"] {
  .a6 .model-card {
    display: grid;
    gap: 1px;
  }

  .a6 .model-list {
    display: grid;
    gap: 1px;
  }

  .a6 .model-logo {
    display: grid;
    flex: none;
    place-items: center;
    width: 16px;
    height: 16px;
    color: var(--t-2);
  }

  .a6 .model-logo svg {
    display: block;
    width: 15px;
    height: 15px;
  }

  .a6 .model-list .menu-item > .icon:last-child {
    width: 15px;
    height: 15px;
    color: var(--t-1);
    opacity: 0;
  }

  .a6 .model-list .menu-item[aria-checked="true"] > .icon:last-child {
    opacity: 1;
  }

  /* ----- Reasoning effort (agent-effort.js): a round bar that fills with a halftone, a knob to slide along it, and Ultra's lanes ----- */

  .a6 .effort {
    --effort-ink: var(--t-1);
    --effort-gold: var(--a-ink);
    --effort-wash: var(--a-fill);
    --effort-knob: #fff;
    /* on the knob, which is white in either theme: the accent as it is written on a light page */
    --effort-pip: oklch(.5 min(var(--acc-c), .125) var(--acc-h));
    --effort-track-r: 12px;
    display: grid;
    padding: 6px 8px 9px;
    container-type: inline-size;
  }

  .a6 .effort-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 26px;
  }

  .a6 .effort-auto {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    font-weight: 560;
    color: var(--t-3);
    cursor: pointer;
    transition: color var(--d-1) ease;
  }

  .a6 .effort[data-effort="auto"] .effort-auto {
    color: var(--t-1);
  }

  /* a band 44px tall: room for a finger, for the lanes to part past Max, and for the knob to stand taller than the bar */
  .a6 .effort-scale {
    position: relative;
    height: 44px;
    border-radius: 6px;
    outline-offset: 1px;
    cursor: pointer;
    touch-action: pan-y;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .a6 .effort[data-held] .effort-scale {
    cursor: grabbing;
  }

  .a6 .effort-dots {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    pointer-events: none;
  }

  /* the knob: round, a little larger than the bar is tall, and (--open, 0 to 1, from the script)
     tall enough at Ultra to hold all four lanes */
  .a6 .effort-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 28px;
    height: calc(28px + 14px * var(--open, 0));
    border-radius: 14px;
    background: var(--effort-knob);
    box-shadow: 0 0 0 .5px oklch(0 0 0 / .18), 0 1px 2px oklch(0 0 0 / .2), 0 4px 10px -3px oklch(0 0 0 / .32);
    pointer-events: none;
    transition: box-shadow var(--d-1) ease;
  }

  /* a pip on it where each lane arrives (--lane-in and --lane-out, from the script) */
  .a6 .effort-thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
      radial-gradient(circle at 50% calc(50% - var(--lane-out, 15px)), var(--effort-pip) 1.5px, transparent 2.1px),
      radial-gradient(circle at 50% calc(50% - var(--lane-in, 5px)), var(--effort-pip) 1.5px, transparent 2.1px),
      radial-gradient(circle at 50% calc(50% + var(--lane-in, 5px)), var(--effort-pip) 1.5px, transparent 2.1px),
      radial-gradient(circle at 50% calc(50% + var(--lane-out, 15px)), var(--effort-pip) 1.5px, transparent 2.1px);
    opacity: var(--open, 0);
  }

  /* under a hand it lifts */
  .a6 .effort[data-held] .effort-thumb {
    box-shadow: 0 0 0 .5px oklch(0 0 0 / .18), 0 2px 4px oklch(0 0 0 / .22), 0 9px 18px -4px oklch(0 0 0 / .42);
  }

  /* each stop's name under it, placed by the script where the stop is */
  .a6 .effort-stops {
    position: relative;
    height: 15px;
    margin-top: 3px;
    font-size: .69rem;
    font-weight: 520;
    line-height: 15px;
    color: var(--t-3);
  }

  .a6 .effort-stops span {
    position: absolute;
    top: 0;
    translate: -50% 0;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--d-1) ease;
  }

  .a6 .effort-stops span[data-on] {
    color: var(--t-1);
    font-weight: 640;
  }

  .a6 .effort-stops span[data-stop="ultra"][data-on] {
    color: var(--a-ink);
  }

  /* Instant's stop is in the bar's round start, too near the edge for a name centred under it:
     its name starts where the bar does */
  .a6 .effort-stops span[data-stop="instant"] {
    translate: -12px 0;
  }

  /* too slender for every name: the ends, and the one chosen */
  .a6 .effort-stops[data-crowded] span:not([data-on], [data-stop="instant"], [data-stop="max"], [data-stop="ultra"]) {
    visibility: hidden;
  }

  .a6 .effort-stops[data-crowded]:has(span[data-on]:is([data-stop="low"], [data-stop="xhigh"])) span:is([data-stop="instant"], [data-stop="max"]):not([data-on]) {
    visibility: hidden;
  }

  .a6 .effort-note {
    min-height: 1.45em;
    margin: 8px 0 0;
    font-size: .78rem;
    line-height: 1.45;
    color: var(--t-3);
  }

  /* a slender window: smaller names so none meets its neighbour, and room for a note of two lines */
  @container (max-width: 316px) {
    .a6 .effort-stops {
      font-size: .64rem;
    }

    .a6 .effort-note {
      min-height: 2.9em;
    }
  }

  @media (forced-colors: active) {
    .a6 .effort {
      --effort-ink: CanvasText;
      --effort-gold: Highlight;
      --effort-wash: Highlight;
      --effort-knob: ButtonText;
      --effort-pip: ButtonFace;
    }
  }

  .a6 .model-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 38px;
    padding: 5px 8px;
  }

  /* a choice among many takes the card's whole width, its options sharing it out */
  .a6 .model-row.is-wide {
    display: grid;
    justify-content: stretch;
    gap: 7px;
    padding-block: 7px 8px;
  }

  .a6 .model-label {
    display: grid;
    gap: 1px;
    min-width: 0;
    font-size: .86rem;
    font-weight: 560;
    line-height: 1.35;
  }

  .a6 .model-label small {
    font-size: .78rem;
    font-weight: 450;
    line-height: 1.4;
    color: var(--t-3);
  }

  .a6 .model-row.is-wide .a6-seg button {
    flex: 1 1 auto;
    padding: 0 6px;
  }

  .a6 .model-card [aria-busy="true"] {
    cursor: progress;
  }

  /* a Moon's name after @ */
  .a6 .compose-popover[data-kind="naming"] {
    width: min(288px, 100%);
  }

  .a6 .naming .slash-item {
    gap: 10px;
  }

  .a6 .naming .menu-label {
    font-weight: 590;
  }

  .a6 .naming-all {
    display: inline-flex;
    flex: none;
    align-items: center;
  }

  .a6 .naming-all .moon-pic + .moon-pic {
    margin-left: -10px;
  }

  /* nothing can be asked of Caelion until a key is connected: said where the keys hint is, and only there */
  .a6 .assistant-hint[data-a6-connect] {
    display: inline;
    color: var(--t-3);
    line-height: 1.5;
  }

  .a6 .assistant-hint[data-a6-connect] .text-link {
    font-size: inherit;
    white-space: nowrap;
  }

  .a6:not([data-agent="caelion"]) [data-a6-connect],
  .a6[data-ready="no"][data-agent="caelion"] [data-a6-keys] {
    display: none;
  }

  /* moonrise and moonset (agent-sweep.js): the veil over the conversation, and the Moon that rides it */
  .a6-veil {
    position: absolute;
    z-index: 5;
    left: 0;
    pointer-events: none;
  }

  .moon-pic.a6-flyer {
    position: absolute;
    z-index: 6;
    top: 0;
    left: 0;
    pointer-events: none;
    transform-origin: 50% 50%;
    will-change: transform;
  }
}

@keyframes a6-drop {
  from { opacity: 0; transform: scale(.97) translateY(-4px) }
}
