:root {
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --surface-subtle: #F1F3F6;
  --ink: #0B1220;
  --ink-secondary: #3E4C5E;
  --muted: #66758A;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --accent: #0A6852;
  --accent-bright: #10B981;
  --accent-soft: #E9F6F2;
  --gold: #9A7B3F;
  --gold-soft: #FDF8EE;
  --danger: #B42318;
  --danger-soft: #FEF3F2;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.04);
  --shadow-md: 0 6px 22px -6px rgba(11, 18, 32, 0.09), 0 1px 3px rgba(11, 18, 32, 0.04);
  --shadow-lg: 0 18px 42px -12px rgba(11, 18, 32, 0.14), 0 2px 6px rgba(11, 18, 32, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.full-width { width: 100%; }

/* Luxury Executive Auth Gate */
.auth-gate {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 0%, #EEF6F3 0%, var(--bg) 55%);
}
.auth-card {
  width: 100%; max-width: 396px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.auth-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--ink) 0%, var(--accent) 68%, var(--gold) 100%);
}
.auth-body { padding: 28px 26px 26px; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-title { font-size: 17px; font-weight: 700; letter-spacing: -0.025em; }
.auth-sub { font-size: 12px; color: var(--muted); }
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.auth-note { font-size: 13px; color: var(--ink-secondary); margin: 0 0 18px; line-height: 1.55; }
.auth-footer { margin-top: 18px; text-align: center; font-size: 12px; }
.link-muted { color: var(--muted); text-decoration: none; font-weight: 500; }
.link-muted:hover { color: var(--accent); }
.link-accent { color: var(--accent); text-decoration: none; font-weight: 600; }

.monogram {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(145deg, #162238 0%, #0B1220 100%);
  color: #FFF;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; letter-spacing: 0.04em; flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}

.field-label { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-secondary); margin-bottom: 5px; letter-spacing: 0.01em; }
.input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: 13.5px; font-family: var(--font-sans);
  background: var(--surface); color: var(--ink); outline: none; margin-bottom: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10, 104, 82, 0.11); }
.check-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ink-secondary); margin: 0 0 14px; cursor: pointer;
}
.check-row input { accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; }
.alert-error {
  font-size: 12.5px; color: var(--danger); background: var(--danger-soft);
  border: 1px solid #FECDCA; border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 12px;
}
.alert-ok {
  font-size: 12.5px; color: var(--accent); background: var(--accent-soft);
  border: 1px solid #B6DDD1; border-radius: var(--radius-sm); padding: 10px 12px;
}

.btn {
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 9px 14px; font-size: 13px; font-weight: 600; font-family: var(--font-sans);
  cursor: pointer; transition: all 0.14s ease; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink); color: #FFF;
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.18);
}
.btn-primary:hover { background: var(--accent); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-subtle { background: var(--surface); border-color: var(--border-strong); color: var(--ink-secondary); }
.btn-subtle:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.icon-btn {
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  width: 36px; height: 36px; font-size: 18px; line-height: 1; cursor: pointer; color: var(--ink-secondary);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: all 0.14s ease;
}
.icon-btn:hover { border-color: var(--border-strong); color: var(--ink); background: var(--surface-subtle); }

/* App Shell */
.app-shell { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(11, 18, 32, 0.38);
  backdrop-filter: blur(2px); z-index: 34;
}
.sidebar {
  width: 278px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
}
.sidebar-top {
  padding: 16px 16px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-name { font-size: 14.5px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.brand-sub { font-size: 11px; color: var(--muted); }
.sidebar-actions { padding: 12px 14px 8px; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 6px 12px 14px; }
.nav-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); padding: 6px 8px;
}

.specialist-list { display: flex; flex-direction: column; gap: 2px; }
.spec-btn {
  width: 100%; border: none; background: transparent; text-align: left;
  padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer;
  display: flex; align-items: center; gap: 9px; color: var(--ink-secondary);
  font-family: var(--font-sans); font-size: 12.8px; font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
}
.spec-btn:hover { background: var(--surface-subtle); color: var(--ink); }
.spec-btn.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.spec-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; }
.spec-btn.active .spec-dot { background: var(--accent-bright); }

.conv-list { display: flex; flex-direction: column; gap: 2px; }
.conv-item {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 12.5px; color: var(--ink-secondary);
}
.conv-item:hover { background: var(--surface-subtle); color: var(--ink); }
.conv-item.active { background: var(--surface-subtle); color: var(--ink); font-weight: 600; }
.conv-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.conv-del {
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 15px; padding: 0 4px; opacity: 0.55;
}
.conv-del:hover { color: var(--danger); opacity: 1; }

.sidebar-footer {
  border-top: 1px solid var(--border); padding: 10px 12px; display: flex; flex-direction: column; gap: 3px;
}
.side-link {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: var(--radius-sm); border: none;
  background: transparent; color: var(--ink-secondary); text-decoration: none;
  font-family: var(--font-sans); font-size: 12.8px; font-weight: 500; cursor: pointer;
}
.side-link:hover { background: var(--surface-subtle); color: var(--ink); }
.side-link-left { display: flex; align-items: center; gap: 9px; }
.side-link-danger:hover { color: var(--danger); background: var(--danger-soft); }
.badge {
  font-family: var(--font-mono); font-size: 11px; padding: 1px 7px;
  border-radius: 99px; background: var(--surface-subtle); color: var(--muted);
}
.status-pill {
  font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px;
  background: var(--gold-soft); color: var(--gold);
}
.status-pill.ok { background: var(--accent-soft); color: var(--accent); }

/* Main Column & Single-Row Header */
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; }
.topbar {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  height: 58px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.title-stack { min-width: 0; flex: 1; }
.title-row { display: flex; align-items: center; gap: 7px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-bright); flex-shrink: 0; }
.topbar-title {
  margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-sub {
  font-size: 11px; color: var(--muted); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-right { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.header-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  height: 36px; padding: 0 12px; font-size: 12.5px; font-weight: 600;
  color: var(--ink); font-family: var(--font-sans); cursor: pointer; white-space: nowrap;
  transition: all 0.14s ease;
}
.header-pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Thumb-Friendly Horizontal Specialist Ribbon */
.spec-ribbon {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 0;
}
.spec-ribbon::-webkit-scrollbar { display: none; }
.ribbon-pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  padding: 5px 12px;
  border-radius: 99px;
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 500;
  white-space: nowrap; cursor: pointer; flex-shrink: 0;
  transition: all 0.14s ease;
}
.ribbon-pill:hover { border-color: var(--border-strong); color: var(--ink); }
.ribbon-pill.active {
  background: var(--ink); color: #FFFFFF; border-color: var(--ink); font-weight: 600;
  box-shadow: 0 2px 8px rgba(11, 18, 32, 0.18);
}

.setup-banner {
  background: var(--gold-soft); border-bottom: 1px solid #EAD7B0; color: #7A5F2B;
  padding: 9px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 12.5px; flex-shrink: 0;
}

/* Chat Area */
.chat-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.messages-scroll { flex: 1; overflow-y: auto; padding: 24px 20px 16px; }
.welcome-pane { max-width: 780px; margin: 10px auto 0; }
.crest-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 4px 12px 4px 5px; border-radius: 99px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; color: var(--ink-secondary);
  box-shadow: var(--shadow-sm);
}
.crest-mark {
  background: var(--ink); color: #6EE7B7; font-size: 10px; font-weight: 800;
  width: 22px; height: 22px; border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center;
}
.welcome-heading {
  font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2;
  margin: 14px 0 8px; color: var(--ink);
}
.welcome-sub {
  font-size: 13.5px; color: var(--muted); margin: 0 0 22px; max-width: 600px; line-height: 1.55;
}

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.quick-card {
  text-align: left; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  font-family: var(--font-sans);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.quick-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.quick-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--accent); }
.quick-title { font-size: 13.5px; font-weight: 600; color: var(--ink); margin: 3px 0 3px; line-height: 1.3; }
.quick-desc { font-size: 12px; color: var(--muted); line-height: 1.45; }
.quick-arrow { color: var(--muted); font-size: 15px; margin-top: 2px; flex-shrink: 0; }
.quick-card:hover .quick-arrow { color: var(--accent); }

/* Executive Messages */
.messages-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; flex-direction: column; }
.msg-user { align-items: flex-end; }
.msg-user .msg-bubble {
  background: linear-gradient(145deg, #131E33 0%, #0B1220 100%);
  color: #FFFFFF; border-radius: 16px 16px 4px 16px;
  padding: 12px 16px; max-width: 84%; font-size: 13.8px; white-space: pre-wrap;
  box-shadow: 0 4px 14px -4px rgba(11, 18, 32, 0.25);
}
.msg-assistant .msg-bubble {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 14px; padding: 16px 20px; width: 100%;
  box-shadow: var(--shadow-sm);
}
.msg-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
  font-size: 11px; color: var(--muted); flex-wrap: wrap;
}
.msg-role-tag { font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.07em; font-size: 10.5px; }
.model-chip {
  font-family: var(--font-mono); font-size: 10.5px; background: var(--surface-subtle);
  color: var(--ink-secondary); padding: 2px 7px; border-radius: 99px;
}
.auto-note {
  font-size: 11.5px; color: var(--accent); background: var(--accent-soft);
  padding: 6px 10px; border-radius: 6px; margin-bottom: 10px;
}
.msg-actions { display: flex; gap: 7px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); flex-wrap: wrap; }

/* Rich Markdown */
.md h1 { font-size: 16.5px; margin: 14px 0 7px; border-bottom: 1px solid var(--border); padding-bottom: 4px; letter-spacing: -0.02em; }
.md h2 { font-size: 14.5px; margin: 14px 0 6px; color: var(--accent); letter-spacing: -0.01em; }
.md h3 { font-size: 13.5px; margin: 11px 0 5px; }
.md p { margin: 0 0 9px; }
.md ul, .md ol { margin: 4px 0 10px 18px; padding: 0; }
.md li { margin-bottom: 4px; }
.md blockquote {
  margin: 10px 0; padding: 9px 13px; background: var(--accent-soft);
  border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; color: var(--ink);
}
.md code {
  font-family: var(--font-mono); font-size: 12px; background: var(--surface-subtle);
  padding: 1px 5px; border-radius: 4px;
}
.md pre {
  background: var(--ink); color: #F8FAFC; padding: 12px 14px; border-radius: 9px; overflow-x: auto;
}
.md pre code { background: transparent; color: inherit; padding: 0; }
.md .table-scroll { overflow-x: auto; margin: 10px 0; }
.md table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.md th { background: var(--surface-subtle); text-align: left; padding: 8px 10px; border: 1px solid var(--border); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.md td { padding: 8px 10px; border: 1px solid var(--border); vertical-align: top; }

.sources-box { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.source-chip {
  font-size: 11.5px; color: var(--accent); background: var(--accent-soft);
  text-decoration: none; padding: 3px 9px; border-radius: 99px; font-weight: 500;
}

/* Elevated Floating Composer Dock */
.composer-wrap {
  padding: 10px 16px 14px;
  background: linear-gradient(180deg, rgba(245,246,248,0) 0%, var(--bg) 28%);
  flex-shrink: 0;
}
.composer-box {
  max-width: 820px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 18px;
  padding: 12px 12px 10px 15px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.composer-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 104, 82, 0.09), var(--shadow-md);
}
.composer-box textarea {
  width: 100%; border: none; outline: none; resize: none;
  font-family: var(--font-sans); font-size: 14.5px; line-height: 1.48;
  max-height: 150px; background: transparent; color: var(--ink);
  padding: 0 4px 6px 0;
}
.composer-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 6px; border-top: 1px solid var(--border);
}
.composer-controls {
  display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1;
}
.model-pill-wrap {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-subtle); border: 1px solid var(--border);
  border-radius: 99px; padding: 4px 10px 4px 9px;
  min-width: 0; max-width: 240px;
}
.model-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-bright); flex-shrink: 0; }
.model-select {
  border: none; background: transparent; outline: none;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; color: var(--ink);
  min-width: 0; width: 100%; cursor: pointer;
  text-overflow: ellipsis;
}
.search-pill {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  border-radius: 99px; padding: 5px 10px; font-size: 11.5px; font-weight: 600;
  font-family: var(--font-sans); cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: all 0.14s ease;
}
.search-pill.active {
  background: var(--accent-soft); border-color: #B6DDD1; color: var(--accent);
}
.send-circle {
  width: 36px; height: 36px; border-radius: 99px; border: none;
  background: var(--ink); color: #FFFFFF;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: all 0.14s ease;
  box-shadow: 0 2px 8px rgba(11, 18, 32, 0.22);
}
.send-circle:hover { background: var(--accent); transform: scale(1.03); }
.send-circle:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* Document Studio */
.docs-view { flex: 1; overflow-y: auto; padding: 20px; }
.docs-inner { max-width: 1120px; margin: 0 auto; }
.docs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.docs-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.docs-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.docs-grid { display: grid; grid-template-columns: 1.35fr 0.9fr; gap: 18px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.panel-head {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.panel-body { padding: 18px; }
.chip-row { display: flex; gap: 5px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-secondary);
  padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; cursor: pointer;
}
.chip.active { background: var(--ink); color: #FFF; border-color: var(--ink); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.line-item-row { display: grid; grid-template-columns: 2fr 0.7fr 1.1fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.line-item-row .input { margin-bottom: 0; }
.doc-submit-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.saved-docs-list { max-height: 620px; overflow-y: auto; }
.saved-doc-item { padding: 13px 18px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.saved-doc-item:last-child { border-bottom: none; }
.doc-pill {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent);
}

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(11, 18, 32, 0.42); backdrop-filter: blur(3px); z-index: 40; }
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: calc(100% - 28px); max-width: 470px; max-height: 90vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  z-index: 50; box-shadow: var(--shadow-lg);
}
.modal-head { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; }
.modal-kicker { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); }
.modal-body { padding: 18px 20px 20px; }

.thinking { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.spinner {
  width: 15px; height: 15px; border: 2px solid var(--border-strong);
  border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.mobile-only { display: none; }
@media (max-width: 960px) {
  .docs-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .mobile-only { display: inline-flex; }
  .sidebar {
    position: fixed; left: -292px; top: 0; bottom: 0; z-index: 36;
    transition: left 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .sidebar.open { left: 0; box-shadow: 16px 0 40px rgba(11, 18, 32, 0.18); }
  .topbar { padding: 8px 14px; height: 54px; }
  .spec-ribbon { padding: 8px 14px; }
  .messages-scroll { padding: 16px 14px 12px; }
  .welcome-heading { font-size: 21px; margin: 12px 0 6px; }
  .welcome-sub { font-size: 13px; margin-bottom: 16px; }
  .quick-card { padding: 12px 14px; }
  .composer-wrap { padding: 8px 12px 10px; }
  .model-pill-wrap { max-width: 175px; }
  .form-row-2 { grid-template-columns: 1fr; }
  .line-item-row { grid-template-columns: 1fr 1fr; }
  .msg-assistant .msg-bubble { padding: 14px 15px; }
}
