.assistant { container-type: inline-size; --a-bg: #182b23; --a-panel: #20372d; --a-line: #345244; --a-text: #e9efe4; --a-muted: #a9bbad; --a-lime: #d6eaa0; --a-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--a-bg); color: var(--a-text); border: 1px solid #2c4639; border-radius: 6px; overflow: hidden; font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 13px; line-height: 1.55; box-shadow: 0 30px 60px -35px #0b1a1380; }
.assistant h4 { margin: 0; }
.asst-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--a-line); }
.asst-brand { display: flex; align-items: center; gap: 10px; font-size: 14px; letter-spacing: -.02em; }
.asst-spark { color: var(--a-lime); font-size: 15px; }
.asst-model { display: flex; align-items: center; gap: 8px; font-family: var(--a-mono); font-size: 11px; color: var(--a-muted); }
.asst-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #8fd16a; box-shadow: 0 0 0 3px #8fd16a26; }
.asst-tabs { display: flex; gap: 6px; padding: 12px 18px; border-bottom: 1px solid var(--a-line); overflow-x: auto; }
.asst-tabs button { flex: none; border: 1px solid transparent; background: transparent; color: var(--a-muted); padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.asst-tabs button:hover { color: var(--a-text); }
.asst-tabs button[aria-selected="true"] { background: var(--a-text); color: var(--a-bg); }
.asst-stage { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: 560px; }
.asst-stage:focus-visible { outline: 2px solid var(--a-lime); outline-offset: -2px; }
.asst-col { padding: 22px; min-width: 0; }
.asst-input { border-right: 1px solid var(--a-line); }
.asst-step { display: block; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--a-muted); margin: 0 0 10px; }
.asst-step:not(:first-child) { margin-top: 22px; }
.asst-trigger { background: #f5f3ec; color: #25352e; border-radius: 4px; padding: 14px 16px; animation: asst-in .35s ease both; }
.asst-trigger-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 12px; }
.asst-kind { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: #e0edb9; color: #2f4a26; padding: 2px 7px; border-radius: 3px; }
.asst-meta { color: #6b7568; font-size: 11px; }
.asst-subject { font-weight: 700; margin: 9px 0 4px; }
.asst-body { margin: 0; color: #3c4b42; font-size: 12.5px; line-height: 1.65; }
.asst-thinking { margin: 0 0 8px; color: var(--a-muted); font-size: 12px; }
.asst-tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.asst-tool { border: 1px solid var(--a-line); background: var(--a-panel); border-radius: 4px; padding: 8px 10px; animation: asst-in .3s ease both; }
.asst-call { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-family: var(--a-mono); font-size: 11.5px; }
.asst-name { color: var(--a-lime); flex: none; }
.asst-args { color: var(--a-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asst-tick { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #8fd16a; position: relative; top: 1px; }
.asst-tick::after { content: ""; position: absolute; left: 4px; top: 2px; width: 3px; height: 6px; border: solid var(--a-bg); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.asst-result { margin: 4px 0 0 20px; font-size: 12px; color: var(--a-text); }
.asst-tool.is-running .asst-tick { background: transparent; border: 1.5px solid var(--a-lime); border-right-color: transparent; animation: asst-spin .7s linear infinite; }
.asst-tool.is-running .asst-tick::after, .asst-tool.is-running .asst-result { visibility: hidden; }
.asst-actions { display: grid; gap: 10px; }
.asst-action { background: #f5f3ec; color: #25352e; border-radius: 4px; padding: 13px 15px; animation: asst-in .35s ease both; }
.asst-label { display: block; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #5b7650; }
.asst-action h4 { font-size: 13.5px; letter-spacing: -.02em; margin-top: 4px; }
.asst-lines { margin: 8px 0 0; font-size: 12px; }
.asst-lines div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-top: 1px solid #dcdfd4; }
.asst-lines dt, .asst-lines dd { margin: 0; }
.asst-lines dd { font-variant-numeric: tabular-nums; }
.asst-total { font-weight: 700; }
.asst-note, .asst-draft { margin: 6px 0 0; font-size: 12px; color: #3c4b42; line-height: 1.6; }
.asst-draft { border-left: 2px solid #8caa6b; padding-left: 10px; }
.asst-rule { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--a-line); border-radius: 4px; font-size: 12px; color: var(--a-muted); animation: asst-in .35s ease both; }
.asst-rule strong { color: var(--a-lime); }
.asst-rule-review strong { color: #f3c77a; }
.asst-approve { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; animation: asst-in .35s ease both; }
.asst-approve button, .asst-replay { font: inherit; font-size: 12px; font-weight: 700; border-radius: 4px; padding: 9px 14px; cursor: pointer; }
.asst-ok { background: var(--a-lime); color: var(--a-bg); border: 1px solid var(--a-lime); }
.asst-ok:hover { background: #e4f2bd; }
.asst-edit, .asst-replay { background: transparent; color: var(--a-text); border: 1px solid var(--a-line); }
.asst-edit:hover, .asst-replay:hover { border-color: var(--a-muted); }
.asst-hint { flex-basis: 100%; margin: 4px 0 0; font-size: 12px; color: var(--a-muted); }
.asst-trail:focus { outline: none; }
.asst-trail { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; font-size: 12px; }
.asst-trail li { display: flex; gap: 8px; animation: asst-in .3s ease both; }
.asst-trail li::before { content: "✓"; color: #8fd16a; }
.asst-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.asst-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--a-line); font-size: 11px; color: var(--a-muted); }
.assistant button:focus-visible { outline: 2px solid var(--a-lime); outline-offset: 2px; }
/* Before scripts run, the panel shows a completed request. */
.assistant:not(.is-live) .asst-stage { min-height: 0; }
@keyframes asst-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes asst-spin { to { transform: rotate(360deg); } }
@container (max-width: 760px) {
  .asst-stage { grid-template-columns: 1fr; min-height: 0; }
  .asst-input { border-right: 0; border-bottom: 1px solid var(--a-line); }
}
@container (max-width: 460px) {
  .asst-header { padding: 14px 16px; }
  .asst-model { font-size: 10px; }
  .asst-tabs { padding: 10px 12px; }
  .asst-col { padding: 16px; }
  .asst-foot { padding: 12px 16px; }
  .asst-args { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .asst-trigger, .asst-tool, .asst-action, .asst-rule, .asst-approve, .asst-trail li { animation: none; }
  .asst-tool.is-running .asst-tick { animation: none; }
}

/* The live demo's side panel. */
.assistant-open { display: inline-flex; align-items: center; gap: 6px; font-weight: 700 !important; color: #1e5a3c !important; }
.assistant-drawer { position: fixed; z-index: 40; top: 44px; right: 0; bottom: 0; width: min(560px, 100vw); display: flex; flex-direction: column; background: #f7f6f3; border-left: 1px solid #deded7; box-shadow: -20px 0 40px -20px #0003; }
.assistant-drawer[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; font-size: 13px; }
.drawer-head button { font: inherit; font-size: 12px; background: transparent; border: 0; cursor: pointer; color: inherit; padding: 6px; }
.assistant-drawer .assistant { flex: 1; overflow-y: auto; margin: 0 10px 10px; }
.demo-about { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small-screen-note { display: none; }
@media (max-width: 760px) {
  .small-screen-note { display: block; position: fixed; z-index: 15; left: 8px; right: 8px; bottom: 18px; margin: 0; padding: 10px 12px; border-radius: 6px; background: #203d34; color: #f5f3ec; font-size: 12px; line-height: 1.45; pointer-events: none; animation: note-out .4s ease 7s forwards; }
}
@keyframes note-out { to { opacity: 0; visibility: hidden; } }
