:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; --brand: #75091e; --accent: #d95851; --ink: #39282d; --muted: #826e73; --line: #e7d2cc; color: var(--ink); background: #fdf4ee; font-synthesis: none; }
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
[hidden] { display: none !important; }
main { width: min(1200px, 100%); margin: 0 auto; padding: 20px 24px 28px; }
.demo-title { margin: 0 0 22px; font-size: 40px; line-height: 1.1; font-weight: 700; color: var(--brand); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.conversation { min-width: 0; padding: 0 34px 0 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 30px; margin-bottom: 12px; }
.section-heading h2, .section-heading label { font-size: 15px; font-weight: 650; margin: 0; color: var(--brand); }
.section-heading > span, .response-tools > span { font-size: 12px; color: var(--muted); }
textarea { display: block; width: 100%; min-height: 150px; max-height: 360px; resize: vertical; border: 1px solid #d9bbb6; background: #fffdfb; border-radius: 6px; padding: 16px; line-height: 1.65; color: var(--ink); font-size: 16px; }
textarea::placeholder { color: #9a8486; }
textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.prompt-policy { min-width: 0; margin: 16px 0 0; padding: 0; border: 0; }
.prompt-policy legend { max-width: 100%; padding: 0; font-size: 13px; font-weight: 600; line-height: 1.5; color: var(--brand); }
.example-picker { margin: 0 0 18px; }
.example-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.example-option { position: relative; }
.example-option input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.example-option span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid #d9bbb6; border-radius: 999px; background: #fffdfb; font-size: 13px; color: var(--ink); }
.example-option input:checked + span { background: var(--brand); border-color: var(--brand); color: white; font-weight: 600; }
.example-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.example-picker:disabled .example-option { opacity: .5; }
.example-option input:disabled { cursor: default; }
.block-signals { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 4px; }
.block-control { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; line-height: 1.5; color: var(--head-color); cursor: pointer; }
.block-toggle { position: relative; width: 20px; height: 20px; flex: none; }
.block-toggle input { appearance: none; display: block; width: 20px; height: 20px; border: 1px solid var(--head-color); border-radius: 50%; margin: 0; cursor: pointer; background: #fffdfb; }
.block-toggle input:checked { background: var(--head-color); border-color: var(--head-color); }
.block-toggle svg { position: absolute; inset: 3px; width: 14px; height: 14px; color: white; pointer-events: none; display: none; }
.block-toggle input:checked + svg { display: block; }
.block-control:has(input:disabled) { opacity: .5; cursor: default; }
.block-toggle input:disabled { cursor: default; }
.prompt-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 14px; }
.limit { font-size: 12px; color: var(--muted); }
.primary, .stop { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; padding: 0 16px; min-height: 42px; border-radius: 5px; font-size: 14px; font-weight: 600; background: var(--brand); color: white; }
.primary:hover { background: #951932; }
#send.is-pulsing { animation: generate-pulse 0.9s ease-in-out 3; }
@keyframes generate-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(117, 9, 30, 0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(117, 9, 30, 0); }
}
.stop { background: #973c35; }
button svg { width: 17px; height: 17px; }
.response-section { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 20px; min-height: 320px; }
.response-section > .section-heading { margin-left: 12px; margin-right: 12px; }
.response-tools { display: flex; align-items: center; gap: 10px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; background: transparent; border: 1px solid var(--line); border-radius: 5px; color: var(--brand); }
.icon-button:hover:not(:disabled) { background: #f6e4dd; }
.empty-state { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #a18a8d; font-size: 14px; }
.empty-state svg { width: 28px; height: 28px; stroke-width: 1.5; }
.response { --mark-label: 142px; --mark-gap: 16px; --mark-pad: 12px; position: relative; font-size: 16px; line-height: 1.75; padding: 8px 12px 24px; }
#response-text { position: relative; white-space: pre-wrap; overflow-wrap: anywhere; z-index: 1; padding-left: calc(var(--mark-label) + var(--mark-gap)); padding-right: var(--mark-pad); }
#response-highlights { position: absolute; inset: 0; pointer-events: none; }
.line-highlight { position: absolute; left: 0; right: 0; }
.line-mark-label { position: absolute; left: 12px; width: var(--mark-label); top: 0; bottom: 0; overflow: hidden; font-size: 11px; line-height: 1.2; color: var(--muted); }
.line-mark-label [data-head] { color: var(--head-color); font-weight: 650; }
.line-colors { position: absolute; left: calc(12px + var(--mark-label) + var(--mark-gap) - var(--mark-pad)); right: 0; top: 0; bottom: 0; display: flex; }
.line-color { flex: 1; min-width: 0; background: var(--head-tint); border-left: 3px solid var(--head-color); }
[data-head="coding_activity"] { --head-color: #3165be; --head-tint: #e0eafb; }
[data-head="cyber_a_v1"] { --head-color: #cc4944; --head-tint: #fbe0dd; }
[data-head="cryptography_activity_v1"] { --head-color: #97700b; --head-tint: #f7edc7; }
[data-head="xml_format_v1"] { --head-color: #8551ae; --head-tint: #eee1f8; }
[data-head="yaml_format_v1"] { --head-color: #b66022; --head-tint: #fbe5d0; }
[data-head="qwen_native_tool_call_sm_v2_100x100"] { --head-color: #b23277; --head-tint: #f7deec; }
.model-info { margin: 0 0 16px; text-align: right; font-size: 13px; line-height: 1.5; color: var(--muted); }
.heads-panel { min-width: 0; border-left: 1px solid var(--line); padding: 0 0 0 26px; }
.head-count { color: var(--muted); }
.head-row { display: grid; grid-template-columns: 8px minmax(0, 1fr); align-items: center; gap: 8px; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.head-row[data-active="true"] { background: var(--head-tint); box-shadow: inset 3px 0 var(--head-color); }
.head-swatch { width: 8px; height: 8px; border-radius: 2px; background: var(--head-color); }
.head-row.is-pulsing { animation: head-pulse 1s ease-in-out 2; }
.head-row.is-pulsing .head-swatch { animation: swatch-pulse 1s ease-in-out 2; }
@keyframes head-pulse {
  0%, 100% { background-color: var(--head-tint); box-shadow: inset 3px 0 var(--head-color); }
  50% { background-color: transparent; box-shadow: inset 3px 0 transparent; }
}
@keyframes swatch-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}
@media (prefers-reduced-motion: reduce) {
  .head-row.is-pulsing, .head-row.is-pulsing .head-swatch, #send.is-pulsing { animation: none; }
}
.head-description { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.head-name { overflow-wrap: anywhere; font-size: 12px; line-height: 1.3; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.head-state { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 11px; line-height: 1.3; color: var(--muted); }
.head-state[data-active="true"] { color: var(--head-color); font-weight: 650; }
.head-state[data-active="true"]::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.feedback { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 16px; }
.feedback-votes { display: flex; gap: 6px; margin-bottom: 12px; }
.vote { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1; min-height: 36px; padding: 0 10px; border: 1px solid #d9bbb6; border-radius: 5px; background: #fffdfb; color: var(--ink); font-size: 13px; font-weight: 600; }
.vote[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: white; }
.feedback-label { display: block; margin: 12px 0 8px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.feedback-label:first-of-type { margin-top: 0; }
.feedback textarea { min-height: 96px; padding: 10px 12px; }
.feedback input { display: block; width: 100%; margin-bottom: 4px; border: 1px solid #d9bbb6; background: #fffdfb; border-radius: 6px; padding: 10px 12px; line-height: 1.4; color: var(--ink); font-size: 14px; }
.feedback input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.feedback input::placeholder { color: #9a8486; }
.turnstile { margin-top: 10px; }
#feedback-send { width: 100%; margin-top: 10px; }
#feedback-status { margin: 12px 0 0; font-size: 13px; padding: 12px 14px; border-left: 3px solid #2f7d32; color: #1f6b28; background: #e7f6e9; line-height: 1.6; overflow-wrap: anywhere; }
#feedback-status[data-error="true"] { color: #8c3030; border-color: #b64949; background: #faeeee; }
#notice, #error { font-size: 13px; padding: 12px 14px; border-left: 3px solid var(--accent); background: #fbe6dc; line-height: 1.6; overflow-wrap: anywhere; }
#error { color: #8c3030; border-color: #b64949; background: #faeeee; }
@media (max-width: 760px) { main { padding: 16px; } .workspace { grid-template-columns: 1fr; } .conversation { padding-right: 0; } .heads-panel { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; margin-top: 24px; } .response-section { min-height: 240px; } .response { --mark-label: 118px; --mark-gap: 12px; } }
@media (max-width: 380px) { .limit { max-width: 180px; } }
