.expert-context { margin: 22px 0; padding-top: 18px; border-top: 1px solid #dce4ec; }
.expert-context-heading { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.expert-context-heading strong { font-size: 18px; }
.expert-context .expert-context-toggle { margin: 0 0 0 auto; display: flex; align-items: center; white-space: nowrap; }
.expert-context fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.expert-context-project-bar { display: flex; align-items: center; gap: 12px; }
.expert-context-project-bar > div { flex: 1; min-width: 0; }
.expert-context-project-bar button { flex-shrink: 0; }
.expert-context-project-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 12px; }
.expert-context-heading span, .expert-context p, .expert-context small { color: #64748b; font-size: 13px; line-height: 1.5; }
.expert-context small { display: block; margin-top: 8px; }
.expert-context label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0 6px; }
.expert-context label small { display: inline; font-weight: 400; }
.expert-context p { margin: 6px 0 10px; }
.expert-context select, .expert-context textarea, .expert-context input[type=text], .expert-context input[type=url] { box-sizing: border-box; width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; font: inherit; font-size: 14px; }
.expert-context select { margin-bottom: 16px; }
.expert-context textarea { resize: vertical; margin: 0 0 10px; }
.expert-context input[type=checkbox] { width: auto; margin-right: 6px; }
.expert-context-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 18px; }
.expert-context-inputs, .expert-context-card { min-width: 0; padding: 16px; border: 1px solid #dce4ec; border-radius: 10px; }
.expert-context-inputs { background: #f8fafc; }
.expert-context-card { background: #fff; }
.expert-context-card > strong { display: block; font-size: 14px; margin-bottom: 10px; }
.expert-context button { border: 1px solid #cbd5e1; padding: 9px 13px; border-radius: 6px; background: white; cursor: pointer; font: inherit; font-size: 13px; }
.expert-context button:hover { border-color: #83be27; }
.expert-context button:disabled { opacity: .55; cursor: wait; }
.expert-context #prepareArticleContext { background: #83be27; border-color: #83be27; color: #172c08; font-weight: 600; }
.expert-context-status { border-radius: 6px; padding: 10px; color: #64748b; background: #f1f5f9; font-size: 13px; line-height: 1.5; }
.expert-context-status.success { background: #edf8e8; color: #35651c; }
.expert-context-status.loading, .expert-context-status.warning { background: #fff6df; color: #805b18; }
.expert-context-status.error { background: #fff0f0; color: #a52a2a; }
.expert-context-content { max-height: 430px; overflow: auto; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.expert-context-content h4 { margin: 12px 0 5px; font-size: 13px; }
.expert-context-content p { white-space: pre-wrap; color: inherit; }
.expert-context-content ul, .expert-context-content ol { padding-left: 20px; margin: 6px 0; }
.expert-context-content li { margin-bottom: 7px; }
.expert-context-content a { text-decoration: underline; }
.expert-context-content .context-provenance { display: block; font-size: 11px; color: #64748b; }
.expert-context details summary { cursor: pointer; font-size: 13px; margin-bottom: 8px; }
.expert-context [hidden] { display: none !important; }
@media (max-width: 800px) {
  .expert-context-grid, .expert-context-project-fields { grid-template-columns: 1fr; }
  .expert-context-project-bar { flex-wrap: wrap; margin-bottom: 12px; }
  .expert-context-project-bar > div { flex-basis: 100%; }
}
