/* Focus Toolbox layout standard: white logo bar, #034ea2 app-name bar. */
:root {
  --foe-blue: #034ea2;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f5f7fa;
  --pill-bg: #d7f3e3;
  --pill-ink: #0f6b3a;
  --error: #b42318;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
.logo-bar { height: 80px; background: #fff; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.logo { height: 64px; width: auto; }
.env-tag { font-size: 12px; text-transform: uppercase; background: #fff4e5; color: #92400e; border-radius: 999px; padding: 2px 10px; }
.app-bar { background: var(--foe-blue); color: #fff; min-height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; flex-wrap: wrap; gap: 8px; }
.app-name { text-transform: uppercase; font-weight: 800; font-size: 13px; letter-spacing: .04em; }
.who { font-size: 13px; }
.who .link { color: #fff; margin-left: 8px; }
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.narrow { max-width: 520px; margin: 32px auto; }
h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 15px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--error); }
.inline { display: inline; }
.link { background: none; border: 0; padding: 0; color: var(--foe-blue); cursor: pointer; font: inherit; text-decoration: underline; text-align: left; }
.button { display: inline-block; border: 1px solid var(--foe-blue); color: var(--foe-blue); background: #fff; border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.button.primary { background: var(--foe-blue); color: #fff; }
.button:disabled { opacity: .6; cursor: progress; }
.stack { display: grid; gap: 10px; }
.stack label { display: grid; gap: 4px; font-size: 14px; }
input, textarea { font: inherit; border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px; width: 100%; }
.preview { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 12px; }
.preview summary { cursor: pointer; color: var(--muted); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }

.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.topic { text-align: left; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 14px; cursor: pointer; display: grid; gap: 6px; font: inherit; color: inherit; }
.topic:hover:not(:disabled), .topic:focus-visible { border-color: var(--foe-blue); box-shadow: 0 0 0 3px rgba(3, 78, 162, .12); }
.topic:disabled { cursor: not-allowed; background: #fafafa; color: var(--muted); }
.topic-title { font-weight: 700; }
.topic-blurb { font-size: 14px; color: var(--muted); }
.topic-docs { font-size: 12px; color: var(--pill-ink); background: var(--pill-bg); border-radius: 999px; padding: 2px 8px; justify-self: start; }
.topic-docs.soon { color: var(--muted); background: #f1f5f9; }
.topic-all { border-style: dashed; }

.chat-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; font-size: 14px; }
.chat-head span { margin-right: auto; }
.messages { min-height: 320px; max-height: 62vh; overflow-y: auto; padding: 12px 0; display: grid; gap: 12px; align-content: start; }
.msg { max-width: 90%; border-radius: 12px; padding: 10px 14px; line-height: 1.5; }
.msg.user { justify-self: end; background: var(--foe-blue); color: #fff; white-space: pre-wrap; }
.msg.assistant { justify-self: start; background: #f8fafc; border: 1px solid var(--line); }
.msg .body p:first-child { margin-top: 0; }
.msg .body p:last-child { margin-bottom: 0; }
.typing { color: var(--muted); font-style: italic; }
.sources { margin-top: 8px; font-size: 13px; }
.sources summary { cursor: pointer; color: var(--muted); }
.ask { display: flex; gap: 8px; align-items: end; border-top: 1px solid var(--line); padding-top: 12px; }
.ask textarea { resize: vertical; }
.asking ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.asking .link { font-size: 14px; text-decoration: none; }
.asking .link:hover { text-decoration: underline; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cc-dock:not(:empty) { position: fixed; left: 16px; bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, .10); z-index: 50; }
