* { box-sizing: border-box; }
body { margin: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: #fafafa; color: #222; }
header { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid #ddd; background: #fff; }
header .tag { font-size: 11px; background: #fffbe0; padding: 2px 6px; border: 1px dashed #d4b800; }
header select { padding: 3px 6px; }
#status { margin-left: auto; color: #777; font-size: 12px; }

h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: #555; margin: 10px 0 6px; }
h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #777; margin: 16px 0 4px; }

/* -------- dev view (3-column) -------- */
body:not(.customer) main { display: grid; grid-template-columns: 260px 1fr 360px; gap: 0; height: calc(100vh - 40px); }
body:not(.customer) main > aside,
body:not(.customer) main > section { padding: 12px 14px; overflow-y: auto; border-right: 1px solid #eee; }
body:not(.customer) #right { border-right: none; border-left: 1px solid #eee; display: flex; flex-direction: column; }

#files { list-style: none; padding: 0; margin: 0; }
#files li { padding: 3px 0; color: #444; font-size: 12px; }
#profile { background: #fff; border: 1px solid #eee; padding: 8px; white-space: pre-wrap; font-size: 11px; max-height: 40vh; overflow-y: auto; }

#best { background: #fff; border: 1px solid #ddd; padding: 10px; white-space: pre-wrap; min-height: 120px; }
#bestMeta { font-size: 11px; color: #777; margin-bottom: 4px; }
.muted { color: #888; }

#allCandidates { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.cand { border: 1px solid #eee; background: #fff; padding: 8px; }
.cand header { display: flex; justify-content: space-between; align-items: baseline; padding: 0 0 4px; border-bottom: 1px dashed #eee; background: transparent; }
.cand pre { white-space: pre-wrap; font-size: 12px; margin: 6px 0 0; }
.scores { font-size: 11px; color: #555; }

/* -------- customer view (3-column, lighter) -------- */
.customer-main { display: grid; grid-template-columns: 320px 1fr 340px; gap: 0; height: calc(100vh - 40px); }
.customer-main > section { padding: 16px 18px; overflow-y: auto; border-right: 1px solid #eee; background: #fff; }
.customer-main > section:last-child { border-right: none; border-left: 1px solid #eee; display: flex; flex-direction: column; background: #fafafa; }

#brief-panel { background: #fafafa; }
#output-panel { background: #fff; }

#outputArea { background: #fff; border: 1px solid #e5e5e5; padding: 14px; white-space: pre-wrap; min-height: 240px; font-size: 13px; line-height: 1.5; }
#outputArea.empty { color: #aaa; font-style: italic; }
#sourcesBox ul { list-style: disc; padding-left: 18px; margin: 4px 0; }
#sourcesBox li { font-size: 11px; margin: 2px 0; }
#sourcesBox a { color: #555; text-decoration: none; }
#sourcesBox a:hover { text-decoration: underline; }

/* forms */
form label { display: block; margin: 8px 0; font-size: 12px; color: #555; }
form input[type=text], form input:not([type]), form textarea { width: 100%; padding: 6px 8px; border: 1px solid #ccc; background: #fff; font: inherit; }
form textarea { resize: vertical; }
form button { background: #111; color: #fff; padding: 8px 16px; border: none; cursor: pointer; font: inherit; margin-top: 4px; }
form button:disabled { background: #888; cursor: wait; }

/* chat */
#chatLog { flex: 1; overflow-y: auto; margin-bottom: 8px; border: 1px solid #eee; background: #fff; padding: 8px; }
.msg { margin-bottom: 10px; font-size: 12px; }
.msg.user strong { color: #0a4; }
.msg.assistant strong { color: #444; }
.msg strong { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.msg pre { white-space: pre-wrap; margin: 0; }
#chatInput { width: 100%; font: inherit; padding: 6px; border: 1px solid #ccc; }

/* customer view hides the prototype tag banner */
body.customer header .tag { display: none; }
