:root { color-scheme: light; --bg: #f5f5f2; --paper: #fff; --ink: #242522; --muted: #72736d; --line: #dedfd8; --accent: #c83b2f; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
button, input, select, textarea { border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
button { padding: 9px 14px; white-space: nowrap; }
button:hover { border-color: #9c9e95; }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--ink); color: white; border-color: var(--ink); }
button.stop { background: var(--accent); border-color: var(--accent); }
button.quiet { background: transparent; }
input, select { padding: 9px 10px; }
textarea { display: block; width: 100%; padding: 16px; resize: vertical; line-height: 1.65; }
textarea::placeholder { color: #92948b; }
label { display: block; margin-bottom: 7px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1 { margin: 0; font: 36px/1.15 Georgia, serif; font-weight: normal; overflow-wrap: anywhere; }
a { color: inherit; }
.wordmark { font-weight: 750; font-size: 19px; text-decoration: none; letter-spacing: -.5px; }
.wordmark span { margin-left: 9px; color: var(--muted); font-size: 13px; font-weight: 400; letter-spacing: 0; }
.topbar { height: 72px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; gap: 20px; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.username { color: var(--muted); font-size: 12px; }
main { max-width: 1440px; margin: auto; padding: 0 32px 32px; }
.error-banner { max-width: 1376px; margin: 16px 32px 0; padding: 12px 16px; background: #fae9e5; color: #8c241a; border-radius: 5px; }
.site-picker { max-width: 650px; margin: 100px auto; }
.site-list { display: grid; gap: 12px; margin-top: 32px; }
.site-list button { display: flex; justify-content: space-between; text-align: left; padding: 20px; }
.site-list small { color: var(--muted); }
.experiment-nav { display: flex; justify-content: space-between; align-items: center; min-height: 64px; gap: 16px; }
#history-menu { position: relative; }
#history-menu > summary { padding: 8px 0; }
#experiment-list { position: absolute; z-index: 3; left: 0; top: 100%; width: min(340px, 85vw); max-height: 420px; overflow: auto; padding: 8px; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 8px 24px #0001; border-radius: 6px; }
#experiment-list button { display: block; width: 100%; text-align: left; border: 0; white-space: normal; }
#experiment-list button.current { background: var(--bg); }
.worldbits-bar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; }
.worldbits-bar > summary { padding: 12px 0; color: var(--muted); }
.worldbits-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 12px; padding: 4px 0 16px; }
.worldbit { border-left: 2px solid var(--line); padding-left: 12px; }
.worldbit strong { font-size: 13px; font-weight: 600; }
.worldbit p { margin: 4px 0; color: var(--muted); }
.worldbit .device-status { float: right; font-size: 11px; }
.setup { max-width: 780px; margin: 64px auto; }
.setup h1 { margin-bottom: 32px; font-size: 44px; }
.setup textarea { font-size: 17px; min-height: 220px; }
.form-bottom { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-top: 18px; }
.model-field { font-size: 12px; color: var(--muted); margin: 0; }
.model-field select { display: block; color: var(--ink); margin-top: 5px; min-width: 180px; }
.experiment-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 0; }
.experiment-heading h1 { font-size: 32px; }
.run-controls { display: flex; gap: 16px; align-items: center; flex-shrink: 0; }
.status-block { display: flex; flex-direction: column; text-align: right; font-size: 12px; }
.status { font-weight: 600; }
.last-error { color: #9a3025; }
.status.running::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 7px; }
.muted { color: var(--muted); }
.experiment-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 32px; align-items: start; }
.conversation { min-width: 0; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; overflow: hidden; }
.messages { height: min(62vh,720px); min-height: 280px; overflow-y: auto; padding: 24px; scroll-behavior: auto; }
.message { margin-bottom: 26px; overflow-wrap: anywhere; }
.message:last-child { margin-bottom: 0; }
.message-label { font-size: 11px; color: var(--muted); margin-bottom: 7px; display: flex; gap: 12px; align-items: baseline; }
.message-label time { margin-left: auto; font-size: 10px; }
.message-body { white-space: pre-wrap; }
.message.user .message-body { background: var(--bg); border-radius: 6px; padding: 12px 16px; }
.message.error .message-body { color: #9a3025; }
.composer { display: flex; gap: 12px; border-top: 1px solid var(--line); padding: 16px; align-items: end; }
.composer textarea { border: 0; padding: 5px; min-height: 48px; max-height: 220px; }
.inspector { min-width: 0; font-size: 12px; }
.inspector > details { border-top: 1px solid var(--line); padding: 12px 0 20px; }
.inspector summary { font-weight: 600; }
.inspector summary span { font-weight: 400; margin-left: 6px; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 14px; line-height: 1.7; }
.run { padding: 12px 0; border-bottom: 1px solid var(--line); }
.run > summary { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; font-weight: 400; }
.run > summary .run-preview { grid-column: 1/-1; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.run pre { font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; background: #eeefea; padding: 10px; border-radius: 4px; max-height: 360px; overflow: auto; }
.run.error > summary { color: #9a3025; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { background: var(--paper); border: 1px solid var(--line); width: min(400px,100%); padding: 32px; border-radius: 8px; }
.login-card h1 { margin: 32px 0; }
.login-card input { width: 100%; margin-bottom: 20px; }
.login-card button { width: 100%; margin-top: 8px; }
#error { overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (min-width: 1500px) { .error-banner { margin-left: auto; margin-right: auto; } }
@media (max-width: 900px) { .experiment-layout { grid-template-columns: minmax(0,1fr); gap: 24px; } .inspector { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; } .experiment-heading h1 { font-size: 28px; } .messages { height: 52vh; } }
@media (max-width: 600px) { .topbar { height: auto; min-height: 64px; padding: 12px 16px; flex-wrap: wrap; gap: 10px; } .top-actions { gap: 10px; } .top-actions select { max-width: 160px; } .username { display: none; } main { padding: 0 16px 24px; } .error-banner { margin: 12px 16px 0; } .setup { margin-top: 36px; } .setup h1 { font-size: 34px; } .setup textarea { font-size: 16px; } .experiment-heading { flex-wrap: wrap; padding: 24px 0; gap: 18px; } .run-controls { width: 100%; justify-content: space-between; } .status-block { text-align: left; } .inspector { display: block; } .messages { padding: 16px; } .composer { padding: 12px; gap: 8px; } .site-picker { margin: 50px auto; } .form-bottom { align-items: end; } .model-field select { min-width: 0; max-width: 200px; } }
