:root {
  color-scheme: dark;
  --background: #111013;
  --panel: #1c1a1e;
  --raised: #242126;
  --text: #f7f4f5;
  --muted: #b4aab1;
  --line: #3a333c;
  --accent: #ffb0ad;
  --action: #fbb3ad;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .2em; }
button, textarea, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 1rem; top: .75rem; z-index: 4; padding: .6rem; background: var(--panel); }
.skip:not(:focus) { transform: translateY(-150%); }
.header { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 0 clamp(1rem, 4vw, 3rem); border-bottom: 1px solid #29252b; }
.header nav, .brand { display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.15rem); }
.brand { gap: .45rem; color: var(--text); text-decoration: none; font-size: 1rem; font-weight: 680; white-space: nowrap; }
.brand img { object-fit: contain; mix-blend-mode: screen; }
.brand small { font-size: .875rem; font-weight: 490; color: var(--muted); margin-left: .25rem; }
.home-link, .reset { font-size: .875rem; color: var(--muted); text-decoration: none; }
.reset, .example-button { background: transparent; border: 1px solid var(--line); border-radius: .65rem; padding: .55rem .8rem; }
.home-link:hover, .reset:hover, .example-button:hover { color: var(--text); }
.reset:hover, .example-button:hover { background: var(--panel); }
.workspace { width: min(48rem, 100%); min-height: calc(100dvh - 68px); margin: 0 auto; padding: 0 1.25rem; display: flex; flex-direction: column; }
.empty { text-align: center; padding: clamp(2.2rem, 15vh, 9rem) 0 1.6rem; }
.empty h1 { font-size: clamp(1.8rem, 5vw, 2.9rem); line-height: 1.13; letter-spacing: -.055em; margin: .4rem 0 .8rem; font-weight: 660; }
.empty p { color: var(--muted); line-height: 1.6; margin: 0; }
.logo { position: relative; width: 128px; height: 128px; margin: 0 auto .75rem; }
.logo::before { content: ""; position: absolute; inset: -2rem; background: radial-gradient(ellipse, #461d25 0, transparent 68%); }
.logo img, .logo video { width: 100%; height: 100%; object-fit: contain; position: relative; mix-blend-mode: screen; }
.logo video { opacity: 0; position: absolute; inset: 0; pointer-events: none; }
.logo.playing video { opacity: 1; }
.logo.playing img { visibility: hidden; }
.composer-dock { padding: .5rem 0 1.25rem; }
.composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .6rem .75rem; padding: .65rem; border: 1px solid var(--line); border-radius: 1.25rem; background: var(--panel); box-shadow: 0 14px 42px #0003; }
.composer:focus-within { border-color: #a76167; }
textarea { display: block; width: 100%; min-height: 2.65rem; max-height: 10rem; resize: none; outline: none !important; border: 0; background: transparent; color: var(--text); padding: .62rem .48rem; line-height: 1.45; }
textarea::placeholder { color: var(--muted); }
.send-button { border: 0; border-radius: .8rem; background: var(--action); color: #2b141a; padding: .55rem .9rem; min-width: 3.8rem; min-height: 2.65rem; font-weight: 680; }
.send-button:hover { background: #ffccc4; }
.stop-icon { display: block; width: .85rem; height: .85rem; margin: auto; border-radius: .18rem; background: currentColor; }
.examples { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: .85rem 0; }
.example-button { color: var(--muted); font-size: .875rem; }
.environment { margin: .65rem 0 0; text-align: center; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.access { grid-column: 1 / -1; padding: .3rem; color: var(--muted); }
.access label { display: block; font-size: .875rem; margin-bottom: .3rem; }
.access input { width: 100%; border: 1px solid var(--line); border-radius: .5rem; background: var(--background); padding: .55rem; color: var(--text); }
.conversation { flex: 1; padding: 2.1rem 0 1.5rem; min-width: 0; }
.has-messages .composer-dock { position: sticky; bottom: 0; z-index: 1; background: linear-gradient(transparent, var(--background) 1rem); padding: 1rem 0 max(.9rem, env(safe-area-inset-bottom)); }
.has-messages .examples { display: none; }
.turn + .turn { margin-top: 2.3rem; }
.user-message { max-width: 85%; width: fit-content; margin: 0 0 1.25rem auto; padding: .7rem 1rem; border-radius: 1.05rem 1.05rem .3rem 1.05rem; background: var(--raised); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-message { scroll-margin-top: 1rem; overflow-wrap: anywhere; line-height: 1.65; }
.assistant-label { display: flex; align-items: center; gap: .35rem; margin: 0 0 .4rem; font-size: .875rem; font-weight: 670; }
.assistant-mark { width: 29px; height: 29px; object-fit: contain; mix-blend-mode: screen; }
.bottom-line { margin: 0 0 .7rem; font-size: 1.12rem; font-weight: 620; }
.answer, .formula { white-space: pre-wrap; margin: .6rem 0; }
.formula { font-weight: 620; }
.demo-label, .result-foot, .source-role, .technical-limit, .evidence-limit, .search-scope, .observation-label { color: var(--muted); }
.demo-label, .result-foot { font-size: .875rem; }
.answer-tools { display: flex; align-items: flex-start; flex-direction: column; margin-top: .9rem; gap: .35rem; }
.answer-tools details { width: 100%; }
.answer-tools summary { width: fit-content; cursor: pointer; color: var(--accent); font-size: .875rem; padding: .22rem 0; }
.report-section { margin: .85rem 0; }
.report-section h3 { margin: 0 0 .4rem; font-size: 1rem; }
.report-section p { margin: .25rem 0; }
.technical-list, .outside-list, .sources-list { margin: 0; padding: 0; list-style: none; }
.technical-list li, .outside-list li, .sources-list li { padding: .65rem 0; border-bottom: 1px solid var(--line); }
.technical-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .4rem; }
.test-status, .observation-label, .source-role { font-size: .875rem; }
.test-status { color: var(--accent); }
.observation-label, .source-role { display: block; }
.evidence-list { padding-left: 1.2rem; margin: .35rem 0; }
.source-link { margin-left: .25rem; font-size: .875rem; }
.research-download { font-size: .875rem; }
.progress { display: flex; align-items: center; gap: .6rem; padding: 0 .25rem .65rem; color: var(--muted); font-size: .875rem; }
.progress p { margin: 0; flex: 1; }
.spinner { width: 1rem; height: 1rem; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; }
.error, .turn-error { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .spinner { animation: spin .9s linear infinite; }
  @keyframes spin { to { transform: rotate(1turn); } }
}
@media (max-width: 430px) {
  .header { height: 60px; }
  .workspace { min-height: calc(100dvh - 60px); padding: 0 .9rem; }
  .brand small { display: block; margin-left: 0; }
  .empty { padding-top: clamp(1.5rem, 10vh, 7rem); }
  .user-message { max-width: 94%; }
}

@media (prefers-reduced-motion: reduce) {
  .logo video { display: none; }
}
