:root {
  --scm: #276f82;
  --scm-dark: #1f5e6f;
  --ink: #344054;
  --muted: #748197;
  --line: #e2e8f0;
  --soft: #f3f8fa;
  --chip: #eaf5f8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f7f9fb;
  color: var(--ink);
}

.container {
  max-width: 1120px;
  margin: 18px auto;
  background: #fff;
  padding: 24px 30px 20px;
  border-radius: 16px;
  box-shadow: 0 10px 32px rgba(16, 24, 40, 0.06);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 12px;
}

h1 {
  margin: 0;
  color: var(--scm);
  font-size: 30px;
  line-height: 1.15;
}

.user-bar {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.user-bar a { color: var(--scm); }

.top-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

select, .clear-btn {
  border: 1px solid #d5dde7;
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
}

.clear-btn { cursor: pointer; }
.clear-btn:hover, select:hover { border-color: var(--scm); }

.hint {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.hero-hint { margin: 20px 10px 14px; }

.starter-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.starter-actions button,
.reference-chip {
  border: 1px solid #c7dfe7;
  background: var(--chip);
  color: #2d6d8d;
  border-radius: 24px;
  padding: 9px 16px;
  text-decoration: none;
  font-weight: 650;
  cursor: pointer;
  transition: .15s ease;
}

.starter-actions button:hover,
.reference-chip:hover {
  background: #dceff5;
  transform: translateY(-1px);
}

.chat-window {
  height: 610px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  background: #fff;
  scroll-behavior: smooth;
}

.message { margin-bottom: 24px; }

.user {
  font-size: 17px;
  font-weight: 700;
  color: #344054;
}

.assistant-label {
  font-weight: 700;
  margin-bottom: 10px;
}

.copilot-wrapper { position: relative; }

.copilot {
  background: var(--soft);
  border-left: 4px solid var(--scm);
  border-radius: 12px;
  padding: 16px 20px;
  line-height: 1.55;
  font-size: 16px;
}

.copy-btn {
  position: absolute;
  right: 10px;
  top: 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
}

.copilot-wrapper:hover .copy-btn { opacity: 1; }

.metadata {
  margin-top: 14px;
  font-size: 13px;
  color: #667085;
}

.reference-title {
  font-weight: 650;
  color: #475467;
  margin: 10px 0 8px;
}

.reference-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.follow-up-message { margin-bottom: 8px; }
.quick-title { margin-top: 12px; }

.input-area {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

#userInput {
  flex: 1;
  min-width: 0;
  border: 1px solid #d5dde7;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
}

#userInput:focus {
  outline: none;
  border-color: var(--scm);
  box-shadow: 0 0 0 3px rgba(39, 111, 130, .10);
}

#sendBtn {
  width: 130px;
  border: 0;
  border-radius: 12px;
  background: var(--scm);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

#sendBtn:hover { background: var(--scm-dark); }
#sendBtn:disabled { opacity: .55; cursor: default; }

.ai-loading .loader { display: flex; gap: 6px; padding: 10px 0; }
.loader span {
  width: 8px;
  height: 8px;
  background: var(--scm);
  border-radius: 50%;
  animation: bounce 1.2s infinite ease-in-out;
}
.loader span:nth-child(2) { animation-delay: .15s; }
.loader span:nth-child(3) { animation-delay: .3s; }

.footer-note {
  margin-top: 20px;
  text-align: center;
  color: #98a2b3;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

@media (max-width: 760px) {
  .container { margin: 0; border-radius: 0; padding: 18px; }
  .topbar { flex-direction: column; }
  .top-actions { width: 100%; justify-content: space-between; }
  h1 { font-size: 24px; }
  .chat-window { height: 62vh; }
  #sendBtn { width: 94px; }
}
