:root {
  --bc-ink: #172033;
  --bc-muted: #526078;
  --bc-line: #d7deea;
  --bc-panel: #ffffff;
  --bc-soft: #f4f7fb;
  --bc-brand: #3730a3;
  --bc-brand-dark: #25206f;
  --bc-red: #b42318;
  --bc-green: #08745c;
  --bc-amber: #9a5b00;
  --bc-radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

.bc-page {
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 28px 22px 56px;
  color: var(--bc-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.62;
}

.bc-hero {
  padding: 28px 30px;
  border-left: 6px solid #e0a11a;
  background: #172554;
  color: #fff;
  box-shadow: 0 12px 30px rgba(23, 37, 84, .12);
}

.bc-eyebrow {
  margin: 0 0 5px;
  color: #fde68a;
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bc-hero h2 { margin: 0; color: #fff !important; font: 800 clamp(1.8rem, 4vw, 2.65rem)/1.12 Georgia, "Times New Roman", serif; }
.bc-hero__copy > p:last-child { max-width: 780px; margin: 13px 0 0; color: #dbeafe; font-size: 1.06rem; }

.bc-method {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--bc-line);
  border-top: 0;
  background: var(--bc-panel);
}

.bc-method > div { padding: 15px 20px; }
.bc-method > div + div { border-left: 1px solid var(--bc-line); }
.bc-method strong, .bc-method span { display: block; }
.bc-method strong { color: var(--bc-brand); font-size: .92rem; }
.bc-method span { margin-top: 2px; color: var(--bc-muted); font-size: .82rem; line-height: 1.45; }

.bc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 340px);
  gap: 24px;
  align-items: start;
  margin-top: 28px;
}

.bc-chat, .bc-side-card {
  border: 1px solid var(--bc-line);
  background: var(--bc-panel);
}

.bc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--bc-line);
}

.bc-toolbar h2, .bc-side-card h2 { margin: 0; font-size: 1.08rem; font-weight: 800; }
.bc-toolbar p { margin: 1px 0 0; color: var(--bc-muted); font-size: .78rem; }
.bc-toolbar__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.bc-button, .bc-export summary {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 8px 13px;
  font: 750 .87rem/1.2 inherit;
  cursor: pointer;
  text-decoration: none;
}

.bc-button:focus-visible, .bc-export summary:focus-visible, .bc-prompt:focus-visible,
.bc-autocomplete button:focus-visible, .bc-export__menu button:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

.bc-button:disabled { cursor: wait; opacity: .58; }
.bc-button--primary { min-width: 92px; background: var(--bc-brand); color: #fff; }
.bc-button--primary:hover { background: var(--bc-brand-dark); }
.bc-button--quiet { border-color: #cbd5e1; background: #fff; color: #334155; }
.bc-button--quiet:hover { background: #f1f5f9; }
.bc-button--danger { border-color: #fecaca; background: #fff7f7; color: var(--bc-red); }

.bc-export { position: relative; }
.bc-export summary { list-style: none; }
.bc-export summary::-webkit-details-marker { display: none; }
.bc-export__menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  right: 0;
  width: 235px;
  padding: 6px;
  border: 1px solid var(--bc-line);
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .15);
}
.bc-export__menu button { width: 100%; border: 0; background: #fff; padding: 10px; color: #243047; text-align: left; cursor: pointer; }
.bc-export__menu button:hover { background: #eef2ff; }

.bc-conversation { padding: 22px 18px 8px; }
.bc-turn { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 11px; margin: 0 0 22px; scroll-margin-top: 18px; }
.bc-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #e0e7ff;
  color: var(--bc-brand);
  font-size: .72rem;
  font-weight: 900;
}
.bc-turn--user .bc-avatar { background: #e2e8f0; color: #334155; }
.bc-message { min-width: 0; }
.bc-message__label { margin: 0 0 5px; color: #536079; font-size: .76rem; font-weight: 800; text-transform: uppercase; }
.bc-message__body {
  padding: 15px 17px;
  border: 1px solid var(--bc-line);
  border-radius: 2px 10px 10px 10px;
  background: #fff;
  overflow-wrap: anywhere;
}
.bc-turn--user .bc-message__body { background: #f8fafc; }
.bc-message__body > p { margin: 0; white-space: pre-wrap; }
.bc-message__body > p + p { margin-top: 10px; }

.bc-answer-label { margin: 0 0 5px !important; color: #4338ca; font-size: .72rem; font-weight: 900; letter-spacing: .075em; text-transform: uppercase; }
.bc-answer { color: #121a2a; font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; line-height: 1.7; }
.bc-answer-categories { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 16px; padding: 10px; border: 1px solid #dbe3f2; background: #f8fafc; }
.bc-answer-categories__label { margin-right: 2px; color: #526078; font-size: .74rem; font-weight: 850; }
.bc-category-chip { min-height: 34px; border: 1px solid #c7d2fe; border-radius: 999px; padding: 5px 10px; background: #fff; color: #3730a3; font: 750 .76rem/1.2 inherit; cursor: pointer; }
.bc-category-chip:hover { background: #eef2ff; }
.bc-category-chip:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }
.bc-answer-group { margin-top: 18px; padding: 14px 15px 4px; border: 1px solid #dce3ef; border-left: 5px solid #6366f1; background: #fff; scroll-margin-top: 18px; }
.bc-answer-group--concept { border-left-color: #7c3aed; background: #fdfcff; }
.bc-answer-group--usage { border-left-color: #0f766e; background: #fbfefd; }
.bc-answer-group--dictionary { border-left-color: #2563eb; background: #fcfdff; }
.bc-answer-group--method { border-left-color: #a16207; background: #fffdf8; }
.bc-answer-group--status { border-left-color: #b42318; background: #fffafa; }
.bc-answer-group__title { margin: 0; color: #1f2a44; font-size: 1.08rem; line-height: 1.3; }
.bc-answer-section { margin-top: 13px; padding-top: 13px; border-top: 1px solid #e2e8f0; }
.bc-answer-section h4 { margin: 0 0 7px; font-size: 1rem; line-height: 1.35; }
.bc-answer-section p { margin: 6px 0; color: #334155; }
.bc-answer-section ul { margin: 8px 0 0; padding-left: 22px; }
.bc-answer-section li + li { margin-top: 7px; }

.bc-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 10px; }
.bc-metric { padding: 9px 11px; border-left: 3px solid #818cf8; background: #f4f5ff; }
.bc-metric span, .bc-metric strong { display: block; }
.bc-metric span { color: #626d83; font-size: .74rem; font-weight: 750; }
.bc-metric strong { margin-top: 2px; font-size: .94rem; }

.bc-quote { margin: 10px 0 0; padding: 10px 13px; border-left: 4px solid #cbd5e1; background: #f8fafc; }
.bc-quote p { margin: 0; color: #263449; font-family: Georgia, "Times New Roman", serif; }
.bc-quote cite { display: block; margin-top: 4px; color: #64748b; font-size: .78rem; font-style: normal; }

.bc-evidence-footer { margin-top: 17px; padding-top: 14px; border-top: 1px solid #dbe2ed; }
.bc-confidence-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bc-confidence-track { width: min(230px, 55vw); height: 8px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.bc-confidence-fill { display: block; height: 100%; border-radius: inherit; background: var(--bc-green); }
.bc-confidence-label { color: #344158; font-size: .8rem; font-weight: 800; }
.bc-source-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.bc-source-list a { border: 1px solid #c7d2fe; border-radius: 999px; padding: 5px 9px; background: #eef2ff; color: #312e81; font-size: .78rem; font-weight: 750; text-decoration: none; }
.bc-source-list a:hover { text-decoration: underline; }

.bc-decisions { margin-top: 12px; color: #46536a; font-size: .84rem; }
.bc-decisions summary { cursor: pointer; color: #38418a; font-weight: 800; }
.bc-decisions ul { margin: 8px 0 0; padding-left: 20px; }
.bc-latency { margin-left: 8px; color: #64748b; font-size: .75rem; }

.bc-loading .bc-message__body { color: #4f5d73; }
.bc-dots { display: inline-flex; gap: 4px; margin-left: 6px; }
.bc-dots i { width: 6px; height: 6px; border-radius: 50%; background: #6366f1; animation: bcPulse 1s infinite alternate; }
.bc-dots i:nth-child(2) { animation-delay: .18s; }
.bc-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes bcPulse { to { opacity: .25; transform: translateY(-2px); } }

.bc-starters { display: flex; flex-wrap: wrap; gap: 8px; padding: 3px 18px 17px 70px; }
.bc-prompt { border: 1px solid #c7d2fe; border-radius: 999px; background: #f7f7ff; padding: 7px 11px; color: #34308d; font-size: .8rem; font-weight: 700; cursor: pointer; }
.bc-prompt:hover { background: #e8eaff; }

.bc-composer { margin: 0 18px 18px; padding: 15px; border: 2px solid #a5b4fc; background: #fafaff; }
.bc-composer > label { display: block; margin-bottom: 6px; color: #25206f; font-size: .88rem; font-weight: 850; }
.bc-input-wrap { position: relative; }
.bc-composer textarea { width: 100%; min-height: 108px; resize: vertical; border: 1px solid #aab4c6; border-radius: 7px; background: #fff; padding: 12px 13px; color: #111827; font: 500 1rem/1.55 inherit; }
.bc-composer textarea:focus { outline: 3px solid rgba(99, 102, 241, .25); border-color: #4f46e5; }
.bc-composer__footer { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.bc-composer__footer p { flex: 1; margin: 0; color: #657086; font-size: .76rem; }
.bc-composer__footer > span { margin-right: auto; color: #536079; font-size: .76rem; font-variant-numeric: tabular-nums; }

.bc-autocomplete { position: absolute; z-index: 15; right: 0; left: 0; top: calc(100% + 4px); border: 1px solid #bac4d5; background: #fff; box-shadow: 0 10px 25px rgba(15, 23, 42, .13); }
.bc-autocomplete button { display: flex; width: 100%; justify-content: space-between; gap: 12px; border: 0; border-bottom: 1px solid #edf0f5; background: #fff; padding: 9px 12px; color: #1e293b; text-align: left; cursor: pointer; }
.bc-autocomplete button:hover { background: #eef2ff; }
.bc-autocomplete small { color: #6b7280; }

.bc-side { display: grid; gap: 15px; }
.bc-side-card { padding: 18px 19px; }
.bc-side-card p, .bc-side-card li { color: #46536a; font-size: .88rem; line-height: 1.58; }
.bc-side-card p { margin: 9px 0 0; }
.bc-side-card ul, .bc-side-card ol { margin: 10px 0 0; padding-left: 20px; }
.bc-side-card li + li { margin-top: 6px; }
.bc-side-card summary { cursor: pointer; color: var(--bc-brand); font-weight: 850; }
.bc-side-card--privacy { border-left: 4px solid #059669; }
.bc-guide-link { display: block; border: 1px solid #c7d2fe; background: #eef2ff; padding: 12px 15px; color: #312e81; font-size: .88rem; font-weight: 800; text-decoration: none; }
.bc-guide-link:hover { text-decoration: underline; }

.bc-error { border-color: #fecaca; background: #fff1f2; color: #991b1b; }
.bc-empty-note { padding: 8px 18px 22px 70px; color: #657086; font-size: .82rem; }

@media (max-width: 980px) {
  .bc-layout { grid-template-columns: 1fr; }
  .bc-method { grid-template-columns: 1fr; }
  .bc-method > div + div { border-top: 1px solid var(--bc-line); border-left: 0; }
}

@media (max-width: 680px) {
  .bc-page { padding: 16px 10px 38px; font-size: 16px; }
  .bc-hero { padding: 21px 18px; }
  .bc-toolbar { align-items: flex-start; flex-direction: column; }
  .bc-toolbar__actions { width: 100%; }
  .bc-button, .bc-export { flex: 1 1 auto; }
  .bc-export summary { width: 100%; }
  .bc-turn { grid-template-columns: 32px minmax(0, 1fr); gap: 8px; }
  .bc-avatar { width: 30px; height: 30px; font-size: .62rem; }
  .bc-conversation { padding: 17px 10px 3px; }
  .bc-message__body { padding: 13px; }
  .bc-starters { padding: 4px 10px 14px 50px; }
  .bc-composer { margin: 0 10px 12px; padding: 12px; }
  .bc-composer__footer { flex-wrap: wrap; }
  .bc-composer__footer p { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .bc-dots i { animation: none; }
}
