.dcn-research-workspace,
.dcn-rx-login,
.dcn-rx-error {
  --rx-bg: #06101f;
  --rx-panel: #0a172a;
  --rx-panel-2: #0d1c31;
  --rx-border: #1f3551;
  --rx-border-soft: #172a43;
  --rx-text: #f8fafc;
  --rx-muted: #91a6c0;
  --rx-blue: #38bdf8;
  --rx-blue-strong: #0284c7;
  --rx-green: #34d399;
  --rx-red: #fb7185;
  --rx-gold: #f6c453;
  box-sizing: border-box;
  color: var(--rx-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dcn-research-workspace *,
.dcn-research-workspace *::before,
.dcn-research-workspace *::after {
  box-sizing: border-box;
}

.dcn-research-workspace {
  max-width: 1280px;
  margin: 22px auto;
  padding: 24px;
  border: 1px solid var(--rx-border);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% -8%, rgba(56, 189, 248, .12), transparent 30%),
    linear-gradient(145deg, #071528, var(--rx-bg));
  box-shadow: 0 24px 55px rgba(0, 0, 0, .28);
}

.dcn-rx-standalone {
  padding: 24px;
}

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

.dcn-rx-eyebrow {
  display: block;
  color: var(--rx-blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
}

.dcn-rx-header h2 {
  margin: 6px 0;
  color: #fff;
  font-size: clamp(27px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.dcn-rx-header p,
.dcn-rx-view-head p {
  max-width: 760px;
  margin: 0;
  color: var(--rx-muted);
  font-size: 13px;
  line-height: 1.55;
}

.dcn-rx-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid rgba(52, 211, 153, .25);
  border-radius: 999px;
  background: rgba(52, 211, 153, .07);
  color: #a7f3d0;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.dcn-rx-live span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rx-green);
}

.dcn-rx-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 18px;
  padding: 7px;
  border: 1px solid var(--rx-border);
  border-radius: 14px;
  background: rgba(3, 10, 22, .58);
}

.dcn-rx-nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--rx-muted);
  text-align: left;
  cursor: pointer;
}

.dcn-rx-nav button:hover {
  background: rgba(255, 255, 255, .035);
}

.dcn-rx-nav button.is-active {
  border-color: rgba(56, 189, 248, .34);
  background: linear-gradient(135deg, rgba(2, 132, 199, .23), rgba(37, 99, 235, .13));
  color: #fff;
}

.dcn-rx-nav button > b {
  color: var(--rx-blue);
  font-size: 10px;
}

.dcn-rx-nav button > span {
  min-width: 0;
  font-size: 12px;
  font-weight: 850;
}

.dcn-rx-nav small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--rx-muted);
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dcn-rx-view,
.dcn-rx-result-panel {
  display: none;
}

.dcn-rx-view.is-active,
.dcn-rx-result-panel.is-active {
  display: block;
}

.dcn-rx-view {
  padding: 22px;
  border: 1px solid var(--rx-border);
  border-radius: 15px;
  background: rgba(8, 20, 38, .74);
}

.dcn-rx-view-head {
  margin-bottom: 18px;
}

.dcn-rx-view-head h3,
.dcn-rx-pattern-heading h3,
.dcn-rx-result-head h3 {
  margin: 4px 0;
  color: #fff;
  font-size: 22px;
  line-height: 1.2;
}

.dcn-rx-pattern-form {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 850px;
}

.dcn-rx-pattern-form label,
.dcn-rx-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.dcn-rx-pattern-form label > span,
.dcn-rx-field > span {
  color: #a9bed7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.dcn-rx-pattern-form input,
.dcn-rx-pattern-form select,
.dcn-rx-field input,
.dcn-rx-field select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #29405f !important;
  border-radius: 9px !important;
  outline: 0;
  background: #071426 !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  font: inherit;
  font-size: 12px !important;
}

.dcn-rx-pattern-form input:focus,
.dcn-rx-pattern-form select:focus,
.dcn-rx-field input:focus,
.dcn-rx-field select:focus {
  border-color: var(--rx-blue) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .13);
}

.dcn-rx-pattern-form input::placeholder,
.dcn-rx-field input::placeholder {
  color: #6f849d !important;
  -webkit-text-fill-color: #6f849d !important;
}

.dcn-rx-button,
.dcn-rx-use-pattern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid #29405f;
  border-radius: 9px;
  background: #10213a;
  color: #dbeafe;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.dcn-rx-button.is-primary {
  border-color: var(--rx-blue-strong);
  background: var(--rx-blue-strong);
  color: #fff;
}

.dcn-rx-button.is-quiet {
  background: transparent;
  color: var(--rx-muted);
}

.dcn-rx-button:hover,
.dcn-rx-use-pattern:hover {
  filter: brightness(1.12);
}

.dcn-rx-button:disabled,
.dcn-rx-use-pattern:disabled {
  cursor: wait;
  opacity: .55;
}

.dcn-rx-pattern-explainer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.dcn-rx-pattern-explainer > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--rx-border-soft);
  border-radius: 9px;
  background: rgba(4, 12, 25, .38);
}

.dcn-rx-pattern-explainer b {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: rgba(56, 189, 248, .1);
  color: var(--rx-blue);
  font-size: 10px;
}

.dcn-rx-pattern-explainer span {
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.dcn-rx-pattern-explainer small {
  display: block;
  margin-top: 2px;
  color: var(--rx-muted);
  font-size: 9px;
  font-weight: 600;
}

.dcn-rx-pattern-heading,
.dcn-rx-result-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin: 20px 0 12px;
}

.dcn-rx-pattern-heading small {
  color: var(--rx-muted);
  font-size: 10px;
}

.dcn-rx-pattern-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dcn-rx-pattern-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--rx-border);
  border-radius: 11px;
  background: linear-gradient(145deg, #0d1b30, #091426);
}

.dcn-rx-pattern-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--rx-muted);
  font-size: 9px;
  text-transform: uppercase;
}

.dcn-rx-pattern-card-top b {
  color: var(--rx-green);
}

.dcn-rx-pattern-card h4 {
  margin: 12px 0 2px;
  overflow: hidden;
  color: #fff;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dcn-rx-pattern-card p {
  margin: 0;
  color: var(--rx-muted);
  font-size: 11px;
}

.dcn-rx-pattern-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 13px 0;
}

.dcn-rx-pattern-stats span {
  padding: 7px 5px;
  border-radius: 7px;
  background: rgba(3, 10, 22, .55);
  color: var(--rx-muted);
  font-size: 9px;
  text-align: center;
}

.dcn-rx-pattern-stats b {
  display: block;
  margin-bottom: 2px;
  color: #fff;
  font-size: 11px;
}

.dcn-rx-use-pattern {
  width: 100%;
  border-color: rgba(56, 189, 248, .3);
  background: rgba(56, 189, 248, .08);
  color: var(--rx-blue);
}

.dcn-rx-filter-chips {
  display: flex;
  min-height: 42px;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid var(--rx-border);
  border-radius: 10px;
  background: rgba(3, 10, 22, .5);
}

.dcn-rx-chip,
.dcn-rx-chip-placeholder {
  padding: 6px 8px;
  border: 1px solid rgba(56, 189, 248, .25);
  border-radius: 999px;
  background: rgba(56, 189, 248, .08);
  color: #bae6fd;
  font-size: 9px;
  font-weight: 750;
}

.dcn-rx-chip {
  cursor: pointer;
}

.dcn-rx-chip-placeholder {
  border-color: transparent;
  background: transparent;
  color: var(--rx-muted);
}

.dcn-rx-filter-group {
  overflow: hidden;
  margin-bottom: 9px;
  border: 1px solid var(--rx-border);
  border-radius: 11px;
  background: rgba(5, 15, 29, .58);
}

.dcn-rx-filter-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 15px;
  color: #fff;
  list-style: none;
  cursor: pointer;
}

.dcn-rx-filter-group summary::-webkit-details-marker {
  display: none;
}

.dcn-rx-filter-group summary span {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 850;
}

.dcn-rx-filter-group summary b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: rgba(56, 189, 248, .1);
  color: var(--rx-blue);
  font-size: 9px;
}

.dcn-rx-filter-group summary small {
  color: var(--rx-muted);
  font-size: 9px;
  font-weight: 600;
}

.dcn-rx-filter-group[open] summary {
  border-bottom: 1px solid var(--rx-border);
  background: rgba(56, 189, 248, .035);
}

.dcn-rx-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.dcn-rx-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0 14px 14px;
}

.dcn-rx-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #c5d4e6;
  font-size: 10px;
  font-weight: 700;
}

.dcn-rx-check input {
  accent-color: var(--rx-blue-strong);
}

.dcn-rx-actions {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
  padding: 10px;
  border: 1px solid var(--rx-border);
  border-radius: 11px;
  background: rgba(6, 16, 31, .94);
  box-shadow: 0 12px 25px rgba(0, 0, 0, .25);
  backdrop-filter: blur(8px);
}

.dcn-rx-status {
  margin-left: auto;
  color: var(--rx-muted);
  font-size: 10px;
}

.dcn-rx-result-head {
  align-items: center;
  margin-top: 0;
}

.dcn-rx-grade {
  padding: 8px 11px;
  border: 1px solid var(--rx-border);
  border-radius: 999px;
  color: var(--rx-muted);
  font-size: 10px;
  font-weight: 850;
}

.dcn-rx-grade.is-strong,
.dcn-rx-grade.is-positive {
  border-color: rgba(52, 211, 153, .3);
  background: rgba(52, 211, 153, .08);
  color: #a7f3d0;
}

.dcn-rx-grade.is-mixed {
  border-color: rgba(246, 196, 83, .3);
  background: rgba(246, 196, 83, .08);
  color: #fde68a;
}

.dcn-rx-grade.is-caution {
  border-color: rgba(251, 113, 133, .3);
  background: rgba(251, 113, 133, .08);
  color: #fecdd3;
}

.dcn-rx-result-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  margin-bottom: 13px;
  padding: 5px;
  border: 1px solid var(--rx-border);
  border-radius: 10px;
  background: rgba(3, 10, 22, .5);
}

.dcn-rx-result-tabs button {
  flex: 1;
  min-width: 110px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--rx-muted);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.dcn-rx-result-tabs button.is-active {
  background: #102743;
  color: #fff;
}

.dcn-rx-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.dcn-rx-metric {
  padding: 13px;
  border: 1px solid var(--rx-border);
  border-radius: 10px;
  background: linear-gradient(145deg, var(--rx-panel-2), var(--rx-panel));
}

.dcn-rx-metric span,
.dcn-rx-metric small {
  display: block;
  color: var(--rx-muted);
  font-size: 9px;
}

.dcn-rx-metric strong {
  display: block;
  margin: 6px 0 3px;
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.dcn-rx-evidence {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.dcn-rx-evidence > div,
.dcn-rx-evidence > p {
  margin: 0;
  padding: 13px;
  border: 1px solid var(--rx-border);
  border-radius: 10px;
  background: rgba(4, 12, 25, .45);
}

.dcn-rx-evidence span {
  display: block;
  color: var(--rx-muted);
  font-size: 9px;
}

.dcn-rx-evidence strong {
  display: block;
  margin-top: 5px;
  color: #fff;
  font-size: 16px;
}

.dcn-rx-evidence > p {
  grid-column: 1 / -1;
  color: var(--rx-muted);
  font-size: 10px;
  line-height: 1.55;
}

.dcn-rx-table-heading {
  margin-bottom: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
}

.dcn-rx-table-wrap {
  overflow: auto;
  border: 1px solid var(--rx-border);
  border-radius: 10px;
}

.dcn-rx-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: rgba(4, 12, 25, .38);
}

.dcn-rx-runs-table {
  min-width: 1080px;
}

.dcn-rx-table th,
.dcn-rx-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rx-border-soft);
  color: #d8e5f3;
  font-size: 10px;
  text-align: left;
  white-space: nowrap;
}

.dcn-rx-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0d1c31;
  color: #9eb4cd;
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dcn-rx-table td small {
  display: block;
  margin-top: 2px;
  color: var(--rx-muted);
}

.dcn-rx-table .is-up {
  color: var(--rx-green);
}

.dcn-rx-table .is-down {
  color: var(--rx-red);
}

.dcn-rx-empty,
.dcn-rx-error,
.dcn-rx-login {
  padding: 18px;
  border: 1px dashed var(--rx-border);
  border-radius: 11px;
  background: rgba(4, 12, 25, .42);
  color: var(--rx-muted);
}

.dcn-rx-empty strong,
.dcn-rx-empty span {
  display: block;
}

.dcn-rx-empty strong {
  margin-bottom: 4px;
  color: #fff;
  font-size: 12px;
}

.dcn-rx-empty span {
  font-size: 10px;
}

.dcn-rx-error {
  border-color: rgba(251, 113, 133, .35);
  color: #fecdd3;
}

.dcn-rx-login {
  max-width: 720px;
  margin: 20px auto;
}

.dcn-rx-login strong {
  color: #fff;
}

.dcn-rx-login p {
  color: var(--rx-muted);
}

.dcn-rx-login a {
  color: var(--rx-blue);
}

.dcn-rx-saved-list {
  display: grid;
  gap: 9px;
}

.dcn-rx-saved-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 15px;
  border: 1px solid var(--rx-border);
  border-radius: 11px;
  background: linear-gradient(145deg, #0d1b30, #091426);
}

.dcn-rx-saved-label {
  color: var(--rx-blue);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
}

.dcn-rx-saved-card h3 {
  margin: 4px 0;
  color: #fff;
  font-size: 15px;
}

.dcn-rx-saved-card p {
  margin: 0;
  color: var(--rx-muted);
  font-size: 9px;
}

.dcn-rx-saved-actions {
  display: flex;
  gap: 7px;
}

.dcn-rx-hub-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dcn-rx-hub-cards a {
  padding: 19px;
  border: 1px solid var(--rx-border);
  border-radius: 13px;
  background: linear-gradient(145deg, #0d1b30, #091426);
  color: inherit;
  text-decoration: none;
}

.dcn-rx-hub-cards a:hover {
  border-color: rgba(56, 189, 248, .5);
  transform: translateY(-2px);
}

.dcn-rx-hub-cards b {
  color: var(--rx-blue);
  font-size: 10px;
}

.dcn-rx-hub-cards h3 {
  margin: 11px 0 5px;
  color: #fff;
  font-size: 18px;
}

.dcn-rx-hub-cards p {
  min-height: 38px;
  margin: 0 0 12px;
  color: var(--rx-muted);
  font-size: 11px;
  line-height: 1.5;
}

.dcn-rx-hub-cards span {
  color: var(--rx-blue);
  font-size: 10px;
  font-weight: 850;
}

.dcn-research-workspace.is-loading .dcn-rx-validation-host {
  opacity: .65;
}

/* Ask DCN */
.dcn-rx-ask-form {
  padding: 18px;
  border: 1px solid var(--rx-border);
  border-radius: 16px;
  background: rgba(4, 13, 27, .72);
}

.dcn-rx-ask-form > label > span {
  display: block;
  margin-bottom: 8px;
  color: #dce9f8;
  font-size: 12px;
  font-weight: 850;
}

.dcn-rx-ask-form textarea {
  display: block;
  width: 100%;
  min-height: 112px;
  padding: 15px;
  resize: vertical;
  border: 1px solid #294765;
  border-radius: 12px;
  outline: none;
  background: #071426;
  color: #fff;
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
}

.dcn-rx-ask-form textarea:focus {
  border-color: var(--rx-blue);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .12);
}

.dcn-rx-ask-form textarea::placeholder {
  color: #7088a4;
}

.dcn-rx-ask-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.dcn-rx-ask-examples button {
  padding: 7px 10px;
  border: 1px solid #23415f;
  border-radius: 999px;
  background: #0a1a2e;
  color: #9fc0df;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.dcn-rx-ask-examples button:hover {
  border-color: var(--rx-blue);
  color: #fff;
}

.dcn-rx-ask-submit {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.dcn-rx-ask-submit small {
  color: var(--rx-muted);
  font-size: 10px;
}

.dcn-rx-ask-results {
  margin-top: 15px;
}

.dcn-rx-ask-thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 86px;
  padding: 18px;
  border: 1px solid var(--rx-border);
  border-radius: 14px;
  background: rgba(5, 15, 29, .7);
}

.dcn-rx-ask-thinking span {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 2px solid rgba(56, 189, 248, .22);
  border-top-color: var(--rx-blue);
  border-radius: 50%;
  animation: dcn-rx-spin .75s linear infinite;
}

.dcn-rx-ask-thinking strong,
.dcn-rx-ask-thinking small {
  display: block;
}

.dcn-rx-ask-thinking small {
  margin-left: auto;
  color: var(--rx-muted);
}

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

.dcn-rx-ask-question,
.dcn-rx-ask-interpretation {
  padding: 13px 15px;
  border: 1px solid var(--rx-border-soft);
  background: rgba(8, 23, 42, .64);
}

.dcn-rx-ask-question {
  border-radius: 14px 14px 0 0;
}

.dcn-rx-ask-interpretation {
  border-top: 0;
  border-radius: 0 0 14px 14px;
}

.dcn-rx-ask-question span,
.dcn-rx-ask-interpretation span,
.dcn-rx-ask-cohort header > div:first-child > span,
.dcn-rx-ask-unsupported > span {
  display: block;
  margin-bottom: 4px;
  color: var(--rx-blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .11em;
}

.dcn-rx-ask-question strong {
  color: #fff;
  font-size: 14px;
}

.dcn-rx-ask-interpretation p {
  margin: 0;
  color: #b9cbe0;
  font-size: 12px;
  line-height: 1.5;
}

.dcn-rx-ask-cohorts {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.dcn-rx-ask-cohort {
  overflow: hidden;
  padding: 17px;
  border: 1px solid var(--rx-border);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(12, 29, 51, .96), rgba(7, 18, 34, .96));
}

.dcn-rx-ask-cohort > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dcn-rx-ask-cohort h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
}

.dcn-rx-ask-direct {
  margin: 14px 0;
  color: #c8d7e8;
  font-size: 13px;
  line-height: 1.65;
}

.dcn-rx-ask-direct strong {
  color: #fff;
}

.dcn-rx-ask-direct .is-up {
  color: var(--rx-green);
}

.dcn-rx-ask-direct .is-down {
  color: var(--rx-red);
}

.dcn-rx-ask-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.dcn-rx-ask-metrics > div {
  padding: 10px;
  border: 1px solid var(--rx-border-soft);
  border-radius: 10px;
  background: rgba(3, 12, 25, .6);
}

.dcn-rx-ask-metrics span,
.dcn-rx-ask-metrics strong {
  display: block;
}

.dcn-rx-ask-metrics span {
  color: var(--rx-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.dcn-rx-ask-metrics strong {
  margin-top: 3px;
  color: #fff;
  font-size: 17px;
}

.dcn-rx-ask-ranking {
  margin-top: 13px;
}

.dcn-rx-ask-ranking > strong {
  display: block;
  margin-bottom: 7px;
  color: #dce9f8;
  font-size: 11px;
}

.dcn-rx-ask-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 13px;
}

.dcn-rx-ask-filters span {
  padding: 5px 8px;
  border: 1px solid rgba(56, 189, 248, .19);
  border-radius: 999px;
  background: rgba(56, 189, 248, .07);
  color: #b9dcf4;
  font-size: 9px;
  font-weight: 750;
}

.dcn-rx-ask-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.dcn-rx-ask-cohort-detail {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--rx-border-soft);
}

.dcn-rx-ask-caution {
  margin: 12px 2px 0;
  color: var(--rx-muted);
  font-size: 10px;
  line-height: 1.5;
}

.dcn-rx-ask-unsupported {
  padding: 18px;
  border: 1px solid rgba(246, 196, 83, .28);
  border-radius: 14px;
  background: rgba(246, 196, 83, .07);
}

.dcn-rx-ask-unsupported strong {
  display: block;
  color: #fff1bd;
  font-size: 14px;
}

.dcn-rx-ask-unsupported p {
  margin: 7px 0 0;
  color: var(--rx-muted);
  font-size: 11px;
}

.dcn-rx-grounded-card {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid rgba(56, 189, 248, .24);
  border-radius: 15px;
  background:
    radial-gradient(circle at 100% 0, rgba(56, 189, 248, .1), transparent 32%),
    linear-gradient(145deg, rgba(12, 29, 51, .98), rgba(7, 18, 34, .98));
}

.dcn-rx-grounded-summary {
  margin: 8px 0 0;
  color: #e5eef9;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.dcn-rx-grounded-items {
  display: grid;
  gap: 8px;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.dcn-rx-grounded-items li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--rx-border-soft);
  border-radius: 11px;
  background: rgba(3, 12, 25, .58);
}

.dcn-rx-grounded-items li > b {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(56, 189, 248, .13);
  color: var(--rx-blue);
  font-size: 11px;
}

.dcn-rx-grounded-items strong,
.dcn-rx-grounded-items span {
  display: block;
}

.dcn-rx-grounded-items strong {
  color: #fff;
  font-size: 12px;
}

.dcn-rx-grounded-items span {
  margin-top: 3px;
  color: #a9bdd3;
  font-size: 10px;
  line-height: 1.5;
}

.dcn-rx-grounded-caveat {
  margin: 12px 0 0;
  padding-top: 11px;
  border-top: 1px solid var(--rx-border-soft);
  color: #f7d98b;
  font-size: 10px;
  line-height: 1.5;
}

.dcn-rx-grounded-sources {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.dcn-rx-grounded-sources > span {
  color: var(--rx-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.dcn-rx-grounded-sources a {
  padding: 5px 8px;
  border: 1px solid var(--rx-border);
  border-radius: 999px;
  color: #a7dafa;
  font-size: 9px;
  font-weight: 750;
  text-decoration: none;
}

.dcn-rx-grounded-sources a:hover {
  border-color: var(--rx-blue);
  color: #fff;
}

/* Site-wide floating Ask DCN */
.dcn-rx-float {
  --rx-bg: #06101f;
  --rx-panel: #0a172a;
  --rx-panel-2: #0d1c31;
  --rx-border: #1f3551;
  --rx-border-soft: #172a43;
  --rx-text: #f8fafc;
  --rx-muted: #91a6c0;
  --rx-blue: #38bdf8;
  --rx-green: #34d399;
  --rx-red: #fb7185;
  --rx-gold: #f6c453;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999999;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dcn-rx-float-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 14px 9px 9px;
  border: 1px solid rgba(56, 189, 248, .42);
  border-radius: 999px;
  background: linear-gradient(135deg, #0a2340, #071426);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .36);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.dcn-rx-float-trigger:hover {
  border-color: var(--rx-blue);
  transform: translateY(-1px);
}

.dcn-rx-float-mark {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff;
  font-size: 10px;
  font-weight: 950;
}

.dcn-rx-float-panel {
  position: absolute;
  right: 0;
  bottom: 58px;
  width: min(440px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 95px));
  overflow: auto;
  border: 1px solid #294765;
  border-radius: 18px;
  background: #06101f;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .54);
  color: #f8fafc;
}

.dcn-rx-float-panel[hidden] {
  display: none !important;
}

.dcn-rx-float-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border-bottom: 1px solid #1f3551;
  background: rgba(6, 16, 31, .97);
  backdrop-filter: blur(10px);
}

.dcn-rx-float-head span,
.dcn-rx-float-head strong {
  display: block;
}

.dcn-rx-float-head span {
  color: #38bdf8;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
}

.dcn-rx-float-head strong {
  margin-top: 2px;
  color: #fff;
  font-size: 16px;
}

.dcn-rx-float-close {
  width: 31px;
  height: 31px;
  border: 1px solid #294765;
  border-radius: 50%;
  background: #0a1a2e;
  color: #b9cbe0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.dcn-rx-float-workspace {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dcn-rx-ask.is-compact .dcn-rx-ask-form {
  padding: 0;
  border: 0;
  background: transparent;
}

.dcn-rx-ask.is-compact .dcn-rx-ask-form textarea {
  min-height: 90px;
  font-size: 13px;
}

.dcn-rx-ask.is-compact .dcn-rx-ask-examples {
  display: grid;
}

.dcn-rx-ask.is-compact .dcn-rx-ask-examples button {
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dcn-rx-ask.is-compact .dcn-rx-ask-thinking {
  align-items: flex-start;
  flex-wrap: wrap;
}

.dcn-rx-ask.is-compact .dcn-rx-ask-thinking small {
  width: 100%;
  margin-left: 28px;
}

.dcn-rx-ask.is-compact .dcn-rx-ask-cohort {
  padding: 13px;
}

.dcn-rx-ask.is-compact .dcn-rx-ask-cohort > header {
  flex-direction: column;
}

.dcn-rx-ask.is-compact .dcn-rx-ask-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dcn-rx-ask.is-compact .dcn-rx-ask-cohort-detail {
  overflow-x: auto;
}

@media (max-width: 1000px) {
  .dcn-rx-fields,
  .dcn-rx-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .dcn-research-workspace {
    padding: 15px;
    border-radius: 14px;
  }

  .dcn-rx-header {
    flex-direction: column;
  }

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

  .dcn-rx-view {
    padding: 15px;
  }

  .dcn-rx-fields,
  .dcn-rx-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dcn-rx-pattern-explainer,
  .dcn-rx-evidence {
    grid-template-columns: 1fr;
  }

  .dcn-rx-evidence > p {
    grid-column: auto;
  }

  .dcn-rx-saved-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .dcn-rx-nav,
  .dcn-rx-fields,
  .dcn-rx-metrics,
  .dcn-rx-pattern-grid,
  .dcn-rx-hub-cards {
    grid-template-columns: 1fr;
  }

  .dcn-rx-pattern-form {
    grid-template-columns: 1fr;
  }

  .dcn-rx-filter-group summary small {
    display: none;
  }

  .dcn-rx-actions {
    position: static;
  }

  .dcn-rx-status {
    width: 100%;
    margin-left: 0;
  }

  .dcn-rx-ask-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dcn-rx-ask-submit {
    align-items: flex-start;
    flex-direction: column;
  }

  .dcn-rx-float {
    right: 12px;
    bottom: 12px;
  }

  .dcn-rx-float-panel {
    position: fixed;
    inset: 10px;
    width: auto;
    max-height: none;
    border-radius: 15px;
  }
}
