/* Audio unfolds above the composer without covering the conversation. */
.widget-audio { flex: 0 0 auto; padding: 0 12px; color: var(--ink); }
.widget-audio svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.widget-audio button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: rgba(255,255,255,.05); font: .72rem var(--body); cursor: pointer; }
.widget-audio .widget-audio-toggle { display: flex; min-height: 26px; margin: 0 auto; padding: 1px 12px; border-bottom: 0; border-radius: 9px 9px 0 0; color: var(--cyan); }
.widget-audio-toggle svg { transition: transform 300ms var(--ease); }
.widget-audio.is-expanded .widget-audio-toggle svg { transform: rotate(180deg); }
.widget-audio-drawer { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 380ms var(--ease), opacity 380ms ease; }
.widget-audio.is-expanded .widget-audio-drawer { grid-template-rows: 1fr; opacity: 1; }
.widget-audio-content { min-height: 0; overflow: hidden; }
.widget-audio-controls { display: grid; grid-template-columns: minmax(0,1fr) max-content minmax(0,1fr); gap: 8px; align-items: center; padding: 6px 0 8px; }
.widget-audio-reading { display: flex; align-items: center; gap: 7px; min-width: 0; }
.widget-audio-speaking { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.widget-audio-speaking > button { flex-shrink: 0; }
.widget-audio-voice { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 36px; font-size: .58rem; line-height: 1; }
.widget-audio-voice select { width: auto; max-width: 100%; min-height: 24px; height: 24px; appearance: none; -webkit-appearance: none; text-align: center; text-align-last: center; border: 1px solid var(--line); border-radius: 7px; padding: 1px 19px; color: var(--ink); background: var(--paper); font: .75rem var(--body); }
.widget-audio-voice::after { position: absolute; right: 8px; bottom: 11px; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); pointer-events: none; content: ""; }
.widget-audio-auto { display: flex; align-items: center; gap: 5px; font-size: .65rem; line-height: 1.3; white-space: nowrap; cursor: pointer; }
.widget-audio-auto input { margin: 0; accent-color: var(--cyan); width: 16px; height: 16px; flex-shrink: 0; }
.widget-audio-status:empty { display: none; }
.widget-audio-status { flex: 1; min-width: 0; margin: 0; font-size: .6rem; line-height: 1.2; text-align: center; overflow-wrap: anywhere; max-height: 36px; overflow-y: auto; scrollbar-width: none; }
.widget-audio-status::-webkit-scrollbar { display: none; }
.widget-audio button:disabled, .widget-audio select:disabled { opacity: .45; cursor: default; }
.widget-audio button[aria-pressed="true"] { border-color: var(--cyan); color: var(--cyan); }
.widget-audio :focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.widget-audio [hidden] { display: none; }
html[data-theme="light"] .widget-audio button { background: rgba(255,255,255,.3); }
@media (max-width: 380px) { .widget-audio-controls { grid-template-columns: max-content minmax(65px,1fr) minmax(0,1fr); gap: 4px; } .widget-audio button { padding-inline: 5px; } .widget-audio-reading { gap: 4px; } .widget-audio-auto { gap: 3px; font-size: .6rem; } }
@media (prefers-reduced-motion: reduce) { .widget-audio-drawer, .widget-audio-toggle svg { transition: none; } }

/* Only the policy and examples pages place their minimized launcher near the edge. */
@media (max-width: 740px) {
  .policy-page .agentic-widget:not(.is-open):not(.is-closing),
  body:has(.masthead) .agentic-widget:not(.is-open):not(.is-closing) { bottom: 6px; }
}


.widget-voice-hint { margin: 0 0 8px; width: 100%; max-width: 100%; box-sizing: border-box; flex-shrink: 0; align-self: flex-start; color: var(--ink); font: inherit; animation: widget-hint-in 200ms ease-out; }
.widget-voice-hint .voice-hint-label { display: block; margin: 0 0 3px 2px; opacity: .65; font-size: .6rem; line-height: 1.2; letter-spacing: .04em; }
.widget-voice-hint p { box-sizing: border-box; width: 100%; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.05); font: inherit; }
.widget-voice-hint[hidden] { display: none !important; }
.widget-audio [data-audio-mic] span { white-space: nowrap; }
@keyframes widget-hint-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .widget-voice-hint { animation: none; } }
