@charset "utf-8";
/* Same palette, spacing and component shapes as Strata's bundled web UI. */
:root {
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  color-scheme: light;
  --bg: #f9fafb; --surface: #fff; --surface-2: #f7f7f7;
  --ink: #221e1f; --soft: #303030; --muted: #6f6f6f; --line: #dee5ee;
  --accent: #10b981; --accent-hover: #0c8a60; --accent-ink: #fff; --link: #0c8a60;
  --focus: #405de6; --danger: #b01a2e;
  --card-shadow: 0 4px 4px #00000008, 0 1px 2px #0000000a;
  --bar-shadow: 0 30px 18px #00000008, 0 13px 13px #0000000d, 0 3px 7px #0000000f;
  background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1113; --surface: #161a1d; --surface-2: #1d2226;
  --ink: #eef1f3; --soft: #c7cdd3; --muted: #8e979f; --line: #2a3036;
  --accent: #34d399; --accent-hover: #4ade80; --accent-ink: #052e20; --link: #4ade80;
  --focus: #7b93ff; --danger: #ff8a98;
  --card-shadow: 0 1px 2px #0006;
  --bar-shadow: 0 12px 32px #0007, 0 2px 6px #0006;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { overflow: hidden; }
button, input, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
button:disabled { opacity: .45; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex: none; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 14px; font-size: 14px; font-weight: 700; }
.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px #10b9813d, inset 0 1px 0 #ffffff2e; }
.primary:hover { background: var(--accent-hover); }
.secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.secondary:hover, .plain:hover, .icon-button:hover { background: var(--surface-2); color: var(--ink); }
.plain { color: var(--muted); background: transparent; padding: 8px; border-radius: 8px; font-size: 13px; white-space: nowrap; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border-radius: 10px; background: transparent; color: var(--muted); flex: none; }
.sun { display: none; }
[data-theme="dark"] .moon { display: none; }
[data-theme="dark"] .sun { display: block; }
.brand { font-size: 18px; font-weight: 900; letter-spacing: -.01em; }
.entry { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.entry-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--card-shadow); }
.entry h1 { font-size: 24px; letter-spacing: -.02em; margin: 28px 0 8px; }
.intro { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.entry form > label { color: var(--soft); font-size: 13px; font-weight: 500; }
.key-row { display: flex; align-items: center; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding-right: 5px; margin: 8px 0 14px; }
.key-row:focus-within { border-color: var(--focus); }
.key-row input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); height: 44px; padding: 0 12px; font-size: 13px; }
.enter { width: 100%; }
.error { color: var(--danger); font-size: 13px; }
.error:empty { display: none; }
.entry-note { margin-top: 20px; color: var(--muted); font-size: 12px; }
.room { height: 100dvh; display: flex; flex-direction: column; }
.topbar { flex: none; height: 60px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; }
.chat-tab { display: inline-flex; align-items: center; gap: 8px; margin-left: 16px; padding: 8px 14px; color: var(--ink); background: var(--surface); border: 4px solid var(--surface-2); border-radius: 14px; box-shadow: 0 0 0 1px var(--line), var(--card-shadow); font-size: 14px; font-weight: 700; }
.chat-tab .icon { width: 16px; height: 16px; }
.header-spacer { flex: 1; }
.model-pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 9999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--soft); font-size: 12px; white-space: nowrap; }
.model-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.conversation { flex: 1; min-height: 0; overflow-y: auto; scrollbar-color: var(--line) transparent; }
.welcome { margin: 12vh auto 0; padding: 32px 24px 24px; text-align: center; }
.welcome h1 { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 900; letter-spacing: -.02em; }
.welcome p { margin: 12px 0 0; color: var(--muted); }
.messages { max-width: 860px; margin: 0 auto; padding: 32px 24px 24px; display: flex; flex-direction: column; gap: 24px; }
.messages:empty { display: none; }
.message { width: 100%; min-width: 0; max-width: 720px; display: flex; flex-direction: column; gap: 6px; }
.message.user { align-self: flex-end; align-items: flex-end; }
.message.assistant { align-self: flex-start; }
.message .text { padding: 12px 16px; border-radius: 20px; font-size: 16px; line-height: 1.55; color: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.message.user .text { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.message.assistant .text { width: 100%; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.message .speaker { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.message a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.message.user a { color: inherit; }
.copy { color: var(--muted); background: transparent; border-radius: 6px; padding: 3px 7px; font-size: 11px; }
.copy:hover { background: var(--surface-2); color: var(--ink); }
.message.assistant .text { white-space: normal; }
.message.assistant .text:empty { display: none; }
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown p { margin: 0 0 12px; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4, .markdown h5, .markdown h6 { color: var(--ink); font-weight: 700; line-height: 1.4; margin: 22px 0 10px; }
.markdown h1 { font-size: 24px; }
.markdown h2 { font-size: 22px; }
.markdown h3 { font-size: 19px; }
.markdown h4, .markdown h5, .markdown h6 { font-size: 16px; }
.markdown ul, .markdown ol { padding-left: 24px; margin: 10px 0 14px; }
.markdown li { padding-left: 2px; margin: 4px 0; }
.markdown li > ul, .markdown li > ol { margin: 4px 0; }
.markdown li > p { margin-bottom: 6px; }
.markdown blockquote { margin: 14px 0; padding: 4px 14px; border-left: 3px solid var(--line); color: var(--muted); }
.markdown blockquote > :last-child { margin-bottom: 0; }
.markdown hr { height: 1px; border: 0; background: var(--line); margin: 20px 0; }
.markdown code { font-family: Consolas, "Cascadia Code", monospace; font-size: .88em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.markdown pre { margin: 14px 0; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; white-space: pre; line-height: 1.6; }
.markdown pre code { padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; white-space: pre; overflow-wrap: normal; }
.code-block { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 14px 0; background: var(--surface-2); }
.code-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.code-header span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-copy { flex: none; padding: 3px 6px; color: var(--muted); background: transparent; border-radius: 5px; font-size: 11px; }
.code-copy:hover { color: var(--ink); background: var(--surface); }
.code-block pre { margin: 0; border: 0; border-radius: 0; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 14px 0; }
.markdown table { border-collapse: collapse; width: 100%; font-size: .92em; }
.markdown th, .markdown td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; min-width: 80px; }
.markdown th { background: var(--surface-2); font-weight: 600; }
.markdown .align-center { text-align: center; }
.markdown .align-right { text-align: right; }
.thought { width: 100%; min-width: 0; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; font-size: 14px; }
.thought summary { cursor: pointer; padding: 10px 14px; font-size: 13px; font-weight: 500; user-select: none; }
.thought[data-state="thinking"] summary { color: var(--link); }
.thought-body { padding: 2px 14px 14px; max-height: 320px; overflow: auto; overflow-wrap: anywhere; }
.thought-body h1, .thought-body h2, .thought-body h3 { font-size: 16px; }
.compose-area { width: 100%; max-width: 908px; margin: 0 auto; padding: 0 24px max(12px, env(safe-area-inset-bottom)); }
.composer { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--bar-shadow); }
.composer:focus-within { border-color: var(--focus); }
.composer textarea { display: block; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink); font-family: inherit; font-size: 16px; font-weight: 400; line-height: 1.5; padding: 6px 8px; min-height: 60px; max-height: 180px; width: 100%; }
.composer textarea::placeholder { color: var(--muted); }
.compose-bottom { display: flex; align-items: center; gap: 10px; }
.compose-spacer { flex: 1; }
.options { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.options label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.options input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
.send { width: 42px; padding: 0; flex: none; }
.status { color: var(--muted); font-size: 12px; line-height: 1.4; text-align: right; max-width: 42%; overflow-wrap: anywhere; }
.status.error-state { color: var(--danger); }
.footnote { margin: 10px 4px 0; color: var(--muted); font-size: 10px; text-align: center; line-height: 1.5; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 640px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .chat-tab { margin-left: 4px; padding: 7px 10px; }
  .model-pill { display: none; }
  .welcome { padding-inline: 16px; margin-top: 10vh; }
  .welcome h1 { font-size: 34px; }
  .welcome p { font-size: 14px; }
  .messages { padding: 20px 16px; }
  .message .text { font-size: 15px; }
  .compose-area { padding: 0 12px max(12px, env(safe-area-inset-bottom)); }
  .compose-bottom { flex-wrap: wrap; gap: 8px; }
  .options { gap: 12px; font-size: 12px; }
  .status { flex: 1 0 100%; order: 1; max-width: none; text-align: left; padding: 0 8px; }
  .status:empty { display: none; }
  .footnote { font-size: 9px; }
}
