.edc-shell {
  width: 100%;
}

.edc-panel {
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(200,170,80,0.12), transparent 36%),
    linear-gradient(180deg, rgba(17,19,26,0.98) 0%, rgba(10,11,15,0.98) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 2px solid rgba(200,170,80,0.8);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.28);
}

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

.edc-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C8AA50;
  margin-bottom: 6px;
}

.edc-title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  line-height: 1.05;
  color: #F3F4F7;
}

.edc-intro {
  margin: 8px 0 0;
  color: #B6BDCA;
  font-size: 13px;
  line-height: 1.6;
  max-width: 720px;
}

.edc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 6px 10px;
  background: rgba(255,255,255,0.02);
  color: #B6BDCA;
  font-size: 11px;
  font-weight: 600;
}

.edc-status-live {
  color: #FBBF24;
  border-color: rgba(251,191,36,0.18);
  background: rgba(251,191,36,0.08);
}

.edc-status-ok {
  color: #3DDC97;
  border-color: rgba(61,220,151,0.18);
  background: rgba(61,220,151,0.08);
}

.edc-status-warn {
  color: #FF8B72;
  border-color: rgba(255,92,122,0.18);
  background: rgba(255,92,122,0.08);
}

.edc-context-row,
.edc-peer-row,
.edc-framework-row,
.edc-suggestions,
.edc-history {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edc-context-row {
  margin-bottom: 14px;
}

.edc-context-chip,
.edc-framework-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  line-height: 1;
}

.edc-context-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #B6BDCA;
}

.edc-form {
  margin-bottom: 12px;
}

.edc-label {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7E8799;
}

.edc-input-row {
  display: flex;
  gap: 10px;
}

.edc-input {
  flex: 1;
  min-width: 0;
  background: #06060A;
  border: 1px solid rgba(200,170,80,0.14);
  border-radius: 10px;
  padding: 11px 13px;
  color: #F3F4F7;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
}

.edc-input:focus {
  outline: none;
  border-color: #C8AA50;
  box-shadow: 0 0 0 3px rgba(200,170,80,0.12);
}

.edc-submit,
.edc-suggestion,
.edc-history-item,
.edc-raw-toggle {
  appearance: none;
  border: none;
  cursor: pointer;
}

.edc-submit {
  flex-shrink: 0;
  padding: 11px 16px;
  border-radius: 10px;
  background: linear-gradient(180deg, #D4B86A 0%, #C8AA50 100%);
  color: #06060A;
  font-size: 12px;
  font-weight: 700;
}

.edc-submit:hover {
  box-shadow: 0 10px 24px rgba(200,170,80,0.28);
}

.edc-suggestion,
.edc-history-item {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: #E8E7E3;
  font-size: 11px;
  line-height: 1.4;
  text-align: left;
}

.edc-suggestion:hover,
.edc-history-item:hover {
  border-color: rgba(200,170,80,0.32);
  background: rgba(200,170,80,0.08);
}

.edc-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.edc-history-empty {
  color: #7E8799;
  font-size: 11px;
}

.edc-output {
  min-height: 160px;
}

.edc-placeholder {
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px;
  color: #B6BDCA;
  background: rgba(255,255,255,0.02);
}

.edc-placeholder-title,
.edc-loading-title,
.edc-list-title,
.edc-framework-title {
  font-size: 12px;
  font-weight: 700;
  color: #F3F4F7;
}

.edc-placeholder p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
}

.edc-loading {
  display: flex;
  gap: 12px;
  align-items: center;
  border-radius: 12px;
  padding: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.edc-loading-copy {
  margin-top: 4px;
  color: #7E8799;
  font-size: 12px;
}

.edc-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(200,170,80,0.16);
  border-top-color: #C8AA50;
  border-radius: 50%;
  animation: edc-spin 900ms linear infinite;
}

@keyframes edc-spin {
  to {
    transform: rotate(360deg);
  }
}

.edc-response-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.edc-response-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7E8799;
}

.edc-raw-toggle {
  background: transparent;
  color: #C8AA50;
  font-size: 11px;
  font-weight: 600;
}

.edc-prose p,
.edc-section-body p,
.edc-list-item p,
.edc-view-card p {
  margin: 0 0 10px;
  color: #D3D8E2;
  font-size: 13px;
  line-height: 1.7;
}

.edc-prose p:last-child,
.edc-section-body p:last-child,
.edc-list-item p:last-child,
.edc-view-card p:last-child {
  margin-bottom: 0;
}

.edc-citations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.edc-cite {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #C8AA50;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}

.edc-cite:hover::after,
.edc-cite:focus-visible::after {
  content: attr(data-preview);
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(320px, 70vw);
  padding: 10px 12px;
  border-radius: 10px;
  background: #05060A;
  border: 1px solid rgba(200,170,80,0.2);
  color: #E8E7E3;
  font-size: 11px;
  line-height: 1.55;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  z-index: 20;
  white-space: normal;
}

.edc-cite-type {
  color: #7E8799;
  text-transform: uppercase;
}

.edc-card-grid,
.edc-grid,
.edc-view-grid,
.edc-valuation-grid {
  display: grid;
  gap: 12px;
}

.edc-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 14px;
}

.edc-mini-card,
.edc-list-item,
.edc-view-card,
.edc-valuation-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px;
}

.edc-mini-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.edc-mini-label,
.edc-valuation-card span,
.edc-view-card span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7E8799;
}

.edc-mini-value,
.edc-valuation-card strong,
.edc-view-card strong {
  color: #F3F4F7;
  font-size: 14px;
  font-weight: 700;
}

.edc-mini-title {
  color: #E8E7E3;
  font-size: 13px;
  font-weight: 600;
}

.edc-mini-meta,
.edc-mini-copy,
.edc-empty-copy {
  margin-top: 8px;
  color: #8F97A8;
  font-size: 12px;
  line-height: 1.55;
}

.edc-hero-thesis {
  margin-bottom: 14px;
}

.edc-thesis {
  margin-top: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1.15;
  color: #F3F4F7;
}

.edc-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.edc-section,
.edc-framework {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  padding: 14px;
}

.edc-section h4,
.edc-section summary {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  color: #F3F4F7;
  list-style: none;
  cursor: pointer;
}

.edc-section summary::-webkit-details-marker {
  display: none;
}

.edc-section-body {
  margin-top: 12px;
}

.edc-section-full {
  margin-top: 12px;
}

.edc-list-item-risk {
  border-left: 3px solid rgba(255,92,122,0.55);
}

.edc-list-item-catalyst {
  border-left: 3px solid rgba(61,220,151,0.55);
}

.edc-valuation-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0;
}

.edc-view-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.edc-view-card-stance {
  background: linear-gradient(180deg, rgba(200,170,80,0.12) 0%, rgba(200,170,80,0.04) 100%);
}

.edc-framework {
  margin-top: 12px;
}

.edc-framework-title {
  margin-bottom: 10px;
}

.edc-framework-pill-ok {
  background: rgba(61,220,151,0.12);
  border: 1px solid rgba(61,220,151,0.18);
  color: #3DDC97;
}

.edc-framework-pill-miss {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #7E8799;
}

.edc-disclaimer {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: #9FA7B8;
  font-size: 11px;
  line-height: 1.6;
}

.edc-error {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,92,122,0.18);
  background: rgba(255,92,122,0.08);
  color: #FFD0DA;
  font-size: 12px;
  line-height: 1.6;
}

.edc-raw-json {
  margin-top: 12px;
  max-height: 320px;
  overflow: auto;
  background: #05060A;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px;
  color: #B6BDCA;
  font-size: 11px;
}

.edc-compact .edc-panel {
  padding: 16px;
}

.edc-compact .edc-title {
  font-size: 18px;
}

.edc-compact .edc-intro {
  font-size: 12px;
}

.edc-compact .edc-suggestions,
.edc-compact .edc-history {
  gap: 6px;
}

.edc-compact .edc-output {
  min-height: 120px;
}

@media (max-width: 960px) {
  .edc-grid {
    grid-template-columns: 1fr;
  }

  .edc-valuation-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .edc-header,
  .edc-response-top,
  .edc-input-row,
  .edc-meta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .edc-submit {
    width: 100%;
  }
}
