/* Standalone console using the docs blue palette. No UI framework or remote assets. */
* { box-sizing: border-box; }
body { margin: 0; background: #f8f9fa; color: #333333; font: 15px/1.5 "Segoe UI", Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button, input, select { min-height: 44px; }
button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 15px; border: 1px solid #d7e1ee; border-radius: 9px; background: #fff; color: #35506b; font-weight: 600; cursor: pointer; transition: background-color 150ms, border-color 150ms; }
button:hover { background: #edf5ff; border-color: #9fc5ed; }
button:disabled { opacity: 0.48; cursor: default; }
a { color: #1e87f0; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus { outline: 2px solid #1e87f0; outline-offset: 3px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #d7e1ee; border-radius: 8px; background: #fafbfd; color: #333333; }
input:focus, select:focus, textarea:focus { background: #fff; border-color: #1e87f0; }
input:disabled, select:disabled, textarea:disabled { background: #f8f9fa; color: #64758a; }
input::placeholder, textarea::placeholder { color: #748398; opacity: 1; }
label { display: block; margin-bottom: 7px; color: #40556e; font-size: 12px; font-weight: 600; }
h1, h2, h3, p { margin: 0; }
.icon { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
button .icon { margin-left: 9px; }
.site-header { background: #1e87f0; border-bottom: 1px solid #1676d5; }
.topbar { display: flex; align-items: center; justify-content: space-between; max-width: 1320px; min-height: 76px; margin: 0 auto; padding: 0 32px; }
.brand { display: inline-flex; align-items: center; color: #ffffff; font-size: 19px; font-weight: 700; letter-spacing: -0.5px; }
.brand:hover { color: #fff; text-decoration: none; }
.site-header :focus { outline-color: #fff; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-right: 11px; border-radius: 10px; background: #ffffff; color: #1e87f0; }
.brand-mark img { display: block; width: 36px; height: 36px; }
.brand-divider { margin: 0 15px; color: #c8e4ff; font-weight: 400; }
.brand-section { color: #e3f1ff; font-size: 14px; font-weight: 400; letter-spacing: 0; }
.guide-link { display: inline-flex; align-items: center; color: #ffffff; font-size: 13px; font-weight: 600; }
.guide-link .icon { width: 16px; height: 16px; margin-left: 8px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; max-width: 1320px; margin: 0 auto; padding: 32px 32px 27px; }
.eyebrow { display: block; color: #1e87f0; font-size: 10px; line-height: 1.5; font-weight: 700; letter-spacing: 1.8px; }
h1 { margin-top: 4px; color: #253b53; font-size: 36px; line-height: 1.2; font-weight: 600; letter-spacing: -1.5px; }
.title-dot { color: #1e87f0; }
.subtitle { margin-top: 9px; color: #64758a; font-size: 14px; }
.session-badge { display: inline-flex; align-items: center; flex-shrink: 0; margin-left: 20px; padding: 9px 13px; border: 1px solid #cfe2f7; border-radius: 24px; background: #eaf4ff; color: #355f8a; font-size: 11px; font-weight: 600; }
.session-badge .icon { width: 15px; height: 15px; margin-right: 7px; }
.layout { display: flex; align-items: stretch; max-width: 1320px; margin: 0 auto; padding: 0 32px 16px; }
.settings { flex: 0 0 310px; min-width: 0; margin-right: 24px; border: 1px solid #d7e1ee; border-radius: 10px; background: #fff; overflow: hidden; }
.panel-heading { padding: 24px 24px 20px; }
.panel-heading .eyebrow { font-size: 9px; letter-spacing: 1.5px; }
.panel-heading h2 { margin-top: 5px; color: #253b53; font-size: 22px; font-weight: 600; letter-spacing: -0.6px; }
.settings-section { padding: 18px 24px 21px; border-top: 1px solid #e8edf4; }
.section-heading { display: flex; align-items: center; font-size: 13px; font-weight: 600; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 23px; height: 23px; margin-right: 9px; border-radius: 6px; background: #e8f3ff; color: #1769b5; font: 10px/1.3 Consolas, monospace; }
.field { margin-top: 15px; }
.room-input { font: 20px/1.4 Consolas, monospace; letter-spacing: 2px; }
.technical-input { font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.help { display: block; margin-top: 7px; color: #64758a; font-size: 11px; line-height: 1.6; }
.viewer-help { margin-top: 12px; }
.viewer-url { display: block; margin-top: 8px; padding: 9px 10px; border: 1px solid #cfe2f7; border-radius: 6px; background: #eaf4ff; font: 12px/1.6 Consolas, "Courier New", monospace; word-wrap: break-word; }
.label-hint { float: right; color: #748398; font-size: 10px; font-weight: 400; }
.actions { display: flex; flex-wrap: wrap; align-items: center; }
.actions button { margin-left: 8px; }
.actions button:first-child { margin-left: 0; }
.key-actions { margin-top: 9px; }
.key-actions button { min-height: 38px; padding: 7px 12px; font-size: 12px; }
.secondary { border-color: #c9dff7; background: #eaf4ff; color: #1769b5; }
.secondary:hover { border-color: #9fc5ed; background: #dceeff; }
.quiet { border-color: transparent; background: transparent; color: #5d7189; }
.quiet:hover { background: #edf5ff; border-color: transparent; }
.quiet .icon { margin-left: 0; margin-right: 5px; }
.key-status { display: block; margin-top: 12px; color: #64758a; font-size: 11px; }
.key-status:before, .session-state:before { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #aab8c8; content: ""; vertical-align: middle; }
.key-status.loaded { color: #1769b5; }
.key-status.loaded:before, .session-state.ready:before { background: #1e87f0; }
.session-state.working:before { background: #b88628; }
.endpoint-section { background: #fafbfd; }
.settings-section.endpoint-section { padding-top: 8px; padding-bottom: 8px; }
.settings-toggle { justify-content: space-between; width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; color: #40556e; text-align: left; }
.settings-toggle:hover { background: transparent; color: #1e87f0; }
.settings-toggle .icon { width: 16px; height: 16px; transition: transform 150ms; }
.settings-toggle[aria-expanded="true"] .icon { transform: rotate(90deg); }
.mcp-settings { padding-bottom: 12px; }
.usage-notes { margin-top: 14px; padding-top: 4px; border-top: 1px solid #e8edf4; }
.usage-notes .settings-toggle { font-size: 12px; }
.usage-notes-copy { padding: 4px 0 8px; color: #64758a; font-size: 11px; line-height: 1.7; }
.usage-notes-copy strong { color: #40556e; font-weight: 600; }
.usage-notes-copy p + p { margin-top: 10px; }
.notice { margin-top: 15px; padding: 10px 12px; border-radius: 6px; font-size: 11px; line-height: 1.6; }
.warning { border: 1px solid #ead9b8; background: #fff7e7; color: #816331; }
.chat { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; border: 1px solid #d7e1ee; border-radius: 10px; background: #fff; overflow: hidden; }
.chat-header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; padding: 18px 26px; border-bottom: 1px solid #e8edf4; }
.chat-heading-group { display: flex; align-items: center; min-width: 0; }
.chat-icon { display: inline-flex; align-items: center; justify-content: center; width: 39px; height: 39px; margin-right: 12px; border-radius: 8px; background: #e8f3ff; color: #1e87f0; }
.chat-icon img { display: block; width: 30px; height: 30px; }
.chat-heading-group h2 { font-size: 14px; font-weight: 600; }
.session-state { display: block; margin-top: 3px; color: #64758a; font-size: 11px; }
.chat-header button { font-size: 12px; white-space: nowrap; }
.messages { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 28px; }
.welcome { max-width: 530px; margin: 25px auto 10px; text-align: center; }
.welcome-art { margin-bottom: 18px; }
.welcome-art svg { display: block; width: 250px; max-width: 80%; height: auto; margin: 0 auto; }
.welcome .eyebrow { font-size: 9px; letter-spacing: 1.5px; }
.welcome h2 { margin-top: 10px; color: #253b53; font-size: 27px; line-height: 1.25; font-weight: 600; letter-spacing: -0.8px; }
.welcome-copy { margin-top: 12px; color: #64758a; font-size: 13px; line-height: 1.7; }
.examples { display: flex; margin: 28px -6px 0; text-align: left; }
.example { display: block; flex: 1 1 0; min-width: 0; margin: 0 6px; padding: 17px; border-color: #d7e1ee; border-radius: 8px; background: #f4f7fb; text-align: left; font-weight: 400; }
.example:hover { border-color: #9fc5ed; background: #eaf4ff; }
.example .icon { display: block; margin: 0 0 13px; width: 21px; height: 21px; color: #1e87f0; }
.example-title { display: block; color: #35506b; font-size: 12px; font-weight: 600; }
.example-title span { float: right; margin-left: 4px; color: #5b86b2; }
.example-copy { display: block; margin-top: 5px; color: #64758a; font-size: 11px; line-height: 1.6; }
.welcome-tip { margin-top: 21px; color: #748398; font-size: 11px; }
.welcome-tip span { color: #536a84; }
.message { margin-bottom: 23px; padding: 17px 19px; border: 1px solid #dfe7f1; border-radius: 3px 14px 14px; background: #f4f7fb; }
.message.user { margin-left: 60px; border-color: #c9dff7; border-radius: 14px 3px 14px 14px; background: #eaf4ff; }
.message.error { border-color: #ead4ca; background: #fff5ef; }
.message.note { border-color: #e6ddc5; background: #fff9ec; }
.message.activity { background: #fff; border-style: dashed; }
.message-label { display: block; margin-bottom: 7px; color: #1769b5; font-size: 10px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase; }
.message-body { white-space: pre-wrap; word-wrap: break-word; font-size: 14px; line-height: 1.7; }
.waiting-dots { display: flex; align-items: center; height: 26px; }
.waiting-dots span { display: block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #1e87f0; animation: waiting-dot 1.2s ease-in-out infinite; }
.waiting-dots span:nth-child(2) { animation-delay: 0.15s; }
.waiting-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes waiting-dot {
    0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
    .waiting-dots span { animation: none; opacity: 0.7; }
}
.tool-toggle { width: 100%; justify-content: flex-start; border-color: #dfe7f1; font-size: 12px; font-weight: 400; }
pre { max-height: 260px; overflow: auto; margin: 12px 0 0; padding: 16px; border-radius: 8px; background: #202b36; color: #f5f7fa; white-space: pre-wrap; word-wrap: break-word; font: 12px/1.6 Consolas, monospace; }
.composer { flex-shrink: 0; padding: 19px 26px 17px; border-top: 1px solid #e8edf4; background: #fff; }
.input-box { padding: 15px 16px 13px; border: 1px solid #c5d8ec; border-radius: 8px; background: #fafcff; }
.input-box label { margin-bottom: 5px; color: #355f8a; font-size: 11px; }
textarea { display: block; min-height: 66px; max-height: 240px; padding: 5px 0; border: 0; border-radius: 0; background: transparent; font-size: 14px; line-height: 1.6; resize: vertical; }
textarea:focus { outline-offset: 0; background: transparent; }
.composer-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.composer-row .actions { justify-content: flex-end; flex-shrink: 0; }
.composer-row .actions button { padding: 9px 14px; font-size: 12px; }
.primary { min-width: 97px; border-color: #1e87f0; background: #1e87f0; color: #ffffff; }
.primary:hover { border-color: #0d6efd; background: #0d6efd; }
.primary:disabled { border-color: #e0eaf5; background: #e0eaf5; color: #6d89a6; opacity: 1; }
.keyboard-hint { margin-right: 12px; color: #64758a; font-size: 10px; line-height: 1.9; }
kbd { font: inherit; }
.hint-divider { margin: 0 5px; }
.status-row { display: flex; flex-wrap: wrap; justify-content: space-between; margin-top: 10px; }
#status { color: #64758a; font-size: 11px; line-height: 1.6; }
#status.error { color: #a44c36; }
#usage { color: #64758a; font-size: 10px; line-height: 1.6; }
.composer-note { margin-top: 7px; color: #64758a; font-size: 10px; line-height: 1.6; }
[hidden] { display: none !important; }
body.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; z-index: 100; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; background: rgba(25, 49, 75, 0.5); }
.key-modal { width: 100%; max-width: 460px; max-height: 100%; overflow-y: auto; padding: 28px; border: 1px solid #cfe2f7; border-radius: 10px; background: #fff; color: #40556e; }
.key-modal h2 { margin: 8px 0 16px; color: #253b53; font-size: 24px; line-height: 1.3; }
.key-modal p { font-size: 14px; line-height: 1.6; }
.key-modal .eyebrow { font-size: 10px; }
.key-modal p + p { margin-top: 12px; }
.save-key-option { display: flex; align-items: center; min-height: 44px; margin: 18px 0 6px; font-size: 14px; cursor: pointer; }
.save-key-option input { flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; margin: 0 10px 0 0; padding: 0; }
.key-modal .save-key-help { color: #64758a; font-size: 12px; }
.modal-actions { justify-content: flex-end; margin-top: 24px; }
.modal-actions button { margin-top: 8px; }
@media (max-width: 1000px) {
    .topbar { padding: 0 24px; }
    .page-heading { padding: 25px 24px; }
    .layout { padding: 0 24px 16px; }
    .settings { flex-basis: 285px; margin-right: 16px; }
    .settings-section { padding: 18px; }
    .panel-heading { padding: 22px 18px 18px; }
    .chat-header { padding: 17px 19px; }
    .messages { padding: 20px; }
    .composer { padding: 18px; }
    .keyboard-hint { max-width: 145px; }
    .examples { display: block; margin: 23px 0 0; }
    .example { width: 100%; margin: 0 0 9px; padding: 11px 13px; }
    .example .icon { float: left; margin: 4px 12px 15px 0; }
    .welcome h2 { font-size: 24px; }
}
@media (max-width: 760px) {
    .topbar { min-height: 64px; padding: 0 18px; }
    .brand { font-size: 17px; }
    .brand-section { font-size: 12px; }
    .brand-divider { margin: 0 9px; }
    .guide-link { font-size: 12px; }
    .page-heading { display: block; padding: 26px 18px 22px; }
    h1 { font-size: 32px; }
    .subtitle { max-width: 330px; font-size: 13px; }
    .session-badge { margin: 14px 0 0; padding: 6px 10px; font-size: 10px; }
    .layout { display: block; padding: 0 18px 16px; }
    .settings { margin: 0 0 20px; border-radius: 10px; }
    .panel-heading { padding: 18px 20px; }
    .settings-section { padding: 18px 20px; }
    .help { font-size: 12px; }
    input, select, textarea { font-size: 16px; }
    .room-input { font-size: 21px; }
    .key-actions button { min-height: 44px; font-size: 13px; }
    .chat { height: calc(100vh - 36px); min-height: 520px; border-radius: 10px; }
    .chat-header { padding: 16px; }
    .chat-icon { width: 34px; height: 34px; margin-right: 9px; }
    .chat-header button { padding: 9px; }
    .chat-heading-group h2 { font-size: 13px; }
    .session-state { font-size: 10px; }
    .messages { padding: 17px; }
    .welcome { margin-top: 12px; }
    .welcome-art svg { width: 210px; }
    .welcome h2 { font-size: 24px; }
    .welcome-copy { font-size: 12px; }
    .examples { margin-top: 23px; }
    .example { padding: 13px; }
    .example-title { font-size: 11px; }
    .example-copy { font-size: 11px; }
    .welcome-tip { font-size: 10px; }
    .message.user { margin-left: 24px; }
    .composer { padding: 15px; }
    .input-box { padding: 12px; }
    .composer-row { flex-wrap: wrap; }
    .keyboard-hint { max-width: none; width: 100%; margin-bottom: 10px; font-size: 10px; }
    .composer-row .actions { margin-left: auto; }
    #status { font-size: 12px; }
}
@media (max-width: 380px) {
    .brand-section, .brand-divider { display: none; }
    .examples { display: block; margin: 18px 0 0; }
    .example { width: 100%; margin: 0 0 9px; padding: 11px 13px; }
    .example .icon { float: left; margin: 4px 12px 15px 0; }
    .welcome-art { margin-bottom: 12px; }
    .welcome-art svg { width: 180px; }
    .welcome h2 { font-size: 22px; }
    .welcome-tip { margin-top: 14px; }
}
/* Fit the desktop workspace to the window; each column scrolls independently. */
@media (min-width: 761px) {
    html { height: 100%; }
    body { display: flex; flex-direction: column; height: 100%; min-height: 680px; }
    .site-header, .page-heading { flex: 0 0 auto; }
    .topbar { min-height: 60px; }
    .page-heading, .layout { width: 100%; }
    .page-heading { padding-top: 16px; padding-bottom: 16px; }
    h1 { font-size: 30px; }
    .layout { flex: 1 1 0; min-height: 0; }
    .settings { overflow-y: auto; }
    .panel-heading { padding-top: 16px; padding-bottom: 14px; }
    .settings-section { padding-top: 14px; padding-bottom: 14px; }
    .field { margin-top: 12px; }
    .chat { min-height: 0; }
    .chat-header { padding-top: 10px; padding-bottom: 10px; }
    .composer { padding-top: 12px; padding-bottom: 12px; }
    .input-box { padding-top: 10px; padding-bottom: 10px; }
    .welcome { margin-top: 0; }
    .welcome-art { margin-bottom: 10px; }
    .welcome-art svg { width: 180px; }
}
/* Keep the composer usable on short laptop windows and at higher zoom levels. */
@media (min-width: 761px) and (max-height: 850px) {
    .topbar { min-height: 52px; }
    .page-heading { padding-top: 12px; padding-bottom: 12px; }
    .messages { padding-top: 12px; padding-bottom: 12px; }
    .welcome { margin-bottom: 0; }
    .welcome-art { display: none; }
    .welcome h2 { margin-top: 6px; font-size: 23px; }
    .welcome-copy { margin-top: 8px; line-height: 1.5; }
    .examples { margin-top: 12px; }
    .example { padding: 10px; }
    .example .icon { margin-bottom: 6px; }
    .welcome-tip { margin-top: 12px; }
    .composer, .input-box { padding-top: 8px; padding-bottom: 8px; }
    .input-box label { margin-bottom: 3px; }
    textarea { min-height: 44px; max-height: 120px; }
    .composer-row { margin-top: 0; }
    .status-row { margin-top: 6px; }
    .composer-note { margin-top: 3px; }
}
