.match-editorial-narrative {
  margin: 0;
  padding: clamp(24px, 4vw, 52px);
  color: #102c5c;
  background: linear-gradient(145deg, #fffdf7 0%, #f4f8ff 58%, #eef7f3 100%);
  border-bottom: 1px solid #bfd0e6;
}

.match-editorial-lead > span,
.match-editorial-sections small,
.match-editorial-flow small,
.match-editorial-model small {
  color: #a46c00;
  font-weight: 900;
  letter-spacing: .12em;
}

.match-editorial-lead > p { margin: 14px 0 8px; color: #607089; font-weight: 800; }
.match-editorial-lead h2 { margin: 0; max-width: 980px; font-size: clamp(28px, 5vw, 54px); line-height: 1.15; font-family: var(--font-serif); }
.match-editorial-lead em { display: block; margin-top: 16px; max-width: 980px; color: #52637b; font-style: normal; font-size: 18px; line-height: 1.8; }
.match-editorial-sections { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 30px; }
.match-editorial-sections section { padding: 22px; border: 1px solid #c9d8ea; border-radius: 18px; background: rgba(255,255,255,.78); box-shadow: 0 12px 30px rgba(16,44,92,.06); }
.match-editorial-sections h3 { margin: 8px 0 10px; font-size: 23px; }
.match-editorial-sections p,
.match-editorial-model p { margin: 0; line-height: 1.85; font-size: 17px; }
.match-editorial-model { margin-top: 18px; padding: 20px 22px; border-radius: 16px; border-left: 5px solid #248f79; background: #eefaf6; }
.match-editorial-sources { margin-top: 20px; color: #5b6d84; }
.match-editorial-sources summary { cursor: pointer; font-weight: 900; }
.match-editorial-sources ul { padding-left: 22px; }
.match-editorial-sources li { margin: 8px 0; }
.match-editorial-sources small { margin-left: 10px; color: #718199; }

/* Polymarket context is the primary detail surface when a complete three-way
   public-market snapshot is available. Keep the provenance obvious without
   stacking a second, oversized frame around the market card. */
.polymarket-editorial-narrative {
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid transparent;
  border-radius: 20px;
  overflow: hidden;
  color: #e9f1f9;
  background:
    radial-gradient(circle at 88% 0, rgba(64, 178, 213, .14), transparent 30%),
    linear-gradient(#0b1119, #0b1119) padding-box,
    linear-gradient(118deg, rgba(84, 194, 223, .72), rgba(127, 179, 211, .22) 46%, rgba(217, 154, 22, .5)) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 42px rgba(4, 18, 34, .2);
}
.polymarket-editorial-narrative::before { content: ""; position: absolute; top: 0; right: 32px; left: 32px; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(84, 194, 223, .72) 24%, rgba(217, 154, 22, .58) 76%, transparent); }

/* The market surface already owns the frame. Remove the universal-model
   bezel only for this source so the technical audit below remains separate. */
.universal-model-panel:has(> .polymarket-editorial-narrative) {
  gap: 0;
  padding: 0;
  border-color: rgba(84, 194, 223, .32);
  background: linear-gradient(145deg, #081522, #0b2034);
  box-shadow: 0 22px 54px rgba(4, 18, 34, .28);
}
.universal-model-panel:has(> .polymarket-editorial-narrative)::before { display: none; }
.universal-model-panel:has(> .polymarket-editorial-narrative) > .v4-technical-audit { margin: 14px; overflow: hidden; border: 1px solid rgba(127, 179, 211, .2); border-radius: 16px; }
.polymarket-editorial-narrative .match-editorial-lead > span { color: #54c0df; }
.polymarket-editorial-narrative .match-editorial-lead > p { color: rgba(203, 218, 233, .72); }
.polymarket-editorial-narrative .match-editorial-lead h2 { color: #f3f7fb; }
.polymarket-editorial-narrative .match-editorial-lead h3 { margin: 8px 0 0; color: #f3f7fb; font-size: clamp(24px, 3.4vw, 38px); line-height: 1.2; }
.polymarket-editorial-background {
  max-width: none;
  margin-top: 30px;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid transparent;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(16, 31, 49, .94), rgba(12, 25, 41, .86)) padding-box,
    linear-gradient(135deg, rgba(84, 194, 223, .62), rgba(127, 179, 211, .22) 58%, rgba(217, 154, 22, .38)) border-box;
  box-shadow: inset 3px 0 0 rgba(77, 194, 225, .82), inset 0 1px 0 rgba(255, 255, 255, .045), 0 14px 30px rgba(4, 18, 34, .16);
}
.polymarket-editorial-background > small {
  display: block;
  margin-bottom: 12px;
  color: #73c6df;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}
.polymarket-editorial-background p {
  max-width: 1180px;
  margin: 0;
  color: #edf5fb;
  font-size: clamp(18px, 2.15vw, 28px);
  line-height: 1.72;
}
.polymarket-editorial-source {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(127, 179, 211, .18);
}
.polymarket-editorial-source summary {
  cursor: pointer;
  color: rgba(203, 218, 233, .72);
  font-size: 13px;
  font-weight: 800;
}
.polymarket-editorial-source p {
  margin-top: 10px;
  color: rgba(203, 218, 233, .78);
  font-size: 15px;
  line-height: 1.65;
}
.polymarket-editorial-data-note {
  display: block;
  margin-top: 18px;
  color: rgba(203, 218, 233, .68);
  font-size: 13px;
  line-height: 1.6;
}
.polymarket-editorial-probability-rail {
  max-width: none;
  margin-top: 18px;
  padding: 20px 22px 18px;
  border: 1px solid rgba(127, 179, 211, .2);
  border-radius: 18px;
  background: rgba(17, 31, 49, .76);
}
.polymarket-editorial-probability-labels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.polymarket-editorial-probability-labels span {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  color: rgba(203, 218, 233, .84);
  font-size: 18px;
  white-space: nowrap;
}
.polymarket-editorial-probability-labels i {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: currentColor;
}
.polymarket-editorial-probability-labels b { font-weight: 700; }
.polymarket-editorial-probability-labels strong {
  margin-left: 2px;
  color: #f3f7fb;
  font-size: clamp(20px, 2.2vw, 28px);
  font-variant-numeric: tabular-nums;
}
.polymarket-editorial-probability-labels .home { color: #ff7d6b; }
.polymarket-editorial-probability-labels .draw { color: #b99cff; }
.polymarket-editorial-probability-labels .away { color: #62c5e5; }
.polymarket-editorial-probability-labels .home strong,
.polymarket-editorial-probability-labels .draw strong,
.polymarket-editorial-probability-labels .away strong { color: #f3f7fb; }
.polymarket-editorial-probability-bar {
  display: flex;
  width: 100%;
  height: 14px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(203, 218, 233, .16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.polymarket-editorial-probability-bar span {
  display: block;
  flex: 0 0 var(--segment-width);
  min-width: 0;
  transition: flex-basis .35s ease;
}
.polymarket-editorial-probability-bar .home { background: #ff7d6b; }
.polymarket-editorial-probability-bar .draw { background: #8f6be0; }
.polymarket-editorial-probability-bar .away { background: #4db8d8; }
.polymarket-editorial-probability-bar span + span { box-shadow: inset 1px 0 rgba(255, 255, 255, .28); }
.polymarket-editorial-narrative > footer {
  max-width: none;
  margin-top: 18px;
  color: rgba(203, 218, 233, .62);
  font-size: 13px;
  line-height: 1.7;
}

html[data-theme="light"] .polymarket-editorial-narrative {
  color: #173746;
  background:
    linear-gradient(145deg, #f4fbfd 0%, #eef7fb 58%, #f1f7f5 100%) padding-box,
    linear-gradient(118deg, rgba(22, 132, 166, .62), rgba(199, 217, 229, .92) 48%, rgba(194, 138, 26, .44)) border-box;
  border-bottom-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 18px 42px rgba(37, 69, 101, .12);
}
html[data-theme="light"] .universal-model-panel:has(> .polymarket-editorial-narrative) {
  border-color: rgba(44, 164, 201, .38);
  background: linear-gradient(145deg, #eaf5f8, #f2f8fa);
  box-shadow: 0 22px 54px rgba(37, 69, 101, .14);
}

/* Detail-page night-surface rules are intentionally broad and load after the
   shared editorial sheet. Keep this market-frame exception explicit so the
   single-frame treatment is not flattened back into the old bezel. */
body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .universal-model-panel:has(> .polymarket-editorial-narrative) {
  gap: 0;
  padding: 0;
  border-color: rgba(84, 194, 223, .32);
  background: linear-gradient(145deg, #081522, #0b2034);
  box-shadow: 0 22px 54px rgba(4, 18, 34, .28);
}
body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .universal-model-panel:has(> .polymarket-editorial-narrative)::before { display: none; }
body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-narrative {
  border-color: transparent;
  background:
    radial-gradient(circle at 88% 0, rgba(64, 178, 213, .14), transparent 30%),
    linear-gradient(#0b1119, #0b1119) padding-box,
    linear-gradient(118deg, rgba(84, 194, 223, .72), rgba(127, 179, 211, .22) 46%, rgba(217, 154, 22, .5)) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 42px rgba(4, 18, 34, .2);
}
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .universal-model-panel:has(> .polymarket-editorial-narrative) {
  border-color: rgba(44, 164, 201, .38);
  background: linear-gradient(145deg, #eaf5f8, #f2f8fa);
  box-shadow: 0 22px 54px rgba(37, 69, 101, .14);
}
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-narrative {
  background:
    linear-gradient(145deg, #f4fbfd 0%, #eef7fb 58%, #f1f7f5 100%) padding-box,
    linear-gradient(118deg, rgba(22, 132, 166, .62), rgba(199, 217, 229, .92) 48%, rgba(194, 138, 26, .44)) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 18px 42px rgba(37, 69, 101, .12);
}
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-narrative .match-editorial-lead > span { color: #1684a6; }
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-narrative .match-editorial-lead > p { color: #647986; }
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-narrative .match-editorial-lead h3 { color: #173746; -webkit-text-fill-color: #173746; }
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-background p { color: #173746; }
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-background > small { color: #1684a6; }
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-source summary,
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-source p,
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-narrative > footer { color: #647986; }
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-probability-labels { color: #173746; }
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-probability-labels b,
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-probability-labels strong { color: #173746; }
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-probability-labels .home { color: #e35f51; }
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-probability-labels .draw { color: #7656c7; }
html[data-theme="light"] body.is-detail-page .dashboard-shell > .detail-panel [data-match-mode-panel="full"] .polymarket-editorial-probability-labels .away { color: #1684a6; }
html[data-theme="light"] .polymarket-editorial-narrative .match-editorial-lead > span { color: #1684a6; }
html[data-theme="light"] .polymarket-editorial-narrative .match-editorial-lead > p { color: #647986; }
html[data-theme="light"] .polymarket-editorial-narrative .match-editorial-lead h2 { color: #173746; }
html[data-theme="light"] .polymarket-editorial-narrative .match-editorial-lead h3 { color: #173746; }
html[data-theme="light"] .polymarket-editorial-background {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(241, 248, 251, .9)) padding-box,
    linear-gradient(135deg, rgba(44, 164, 201, .64), rgba(199, 217, 229, .9) 58%, rgba(194, 138, 26, .34)) border-box;
  box-shadow: inset 3px 0 0 rgba(44, 164, 201, .86), inset 0 1px 0 rgba(255, 255, 255, .96), 0 14px 30px rgba(37, 69, 101, .1);
}
html[data-theme="light"] .polymarket-editorial-background > small { color: #1684a6; }
html[data-theme="light"] .polymarket-editorial-background p { color: #173746; }
html[data-theme="light"] .polymarket-editorial-source { border-top-color: #d9e6ed; }
html[data-theme="light"] .polymarket-editorial-source summary,
html[data-theme="light"] .polymarket-editorial-source p { color: #647986; }
html[data-theme="light"] .polymarket-editorial-data-note { color: #647986; }
html[data-theme="light"] .polymarket-editorial-probability-rail { border-color: #cbdde8; background: rgba(255, 255, 255, .82); }
html[data-theme="light"] .polymarket-editorial-probability-labels { color: #173746; }
html[data-theme="light"] .polymarket-editorial-probability-labels strong { color: #173746; }
html[data-theme="light"] .polymarket-editorial-probability-labels .home { color: #e35f51; }
html[data-theme="light"] .polymarket-editorial-probability-labels .draw { color: #7656c7; }
html[data-theme="light"] .polymarket-editorial-probability-labels .away { color: #1684a6; }
html[data-theme="light"] .polymarket-editorial-probability-labels .home strong,
html[data-theme="light"] .polymarket-editorial-probability-labels .draw strong,
html[data-theme="light"] .polymarket-editorial-probability-labels .away strong { color: #173746; }
html[data-theme="light"] .polymarket-editorial-probability-bar { background: #e6eef2; box-shadow: inset 0 0 0 1px rgba(20, 58, 76, .08); }
html[data-theme="light"] .polymarket-editorial-narrative > footer { color: #647986; }

@media (max-width: 720px) {
  .match-editorial-narrative { padding: 24px 18px; }
  .match-editorial-sections { grid-template-columns: 1fr; }
  .match-editorial-sections section { padding: 18px; }
  .match-editorial-sections h3 { font-size: 20px; }
  .match-editorial-sections p,
  .match-editorial-model p { font-size: 16px; }
  .polymarket-editorial-narrative { padding: 24px 18px 22px; }
  .polymarket-editorial-narrative .match-editorial-lead > span {
    font-size: 10px;
    line-height: 1.25;
  }
  .polymarket-editorial-narrative .match-editorial-lead h2 {
    margin-top: 4px;
    font-size: 20px;
    line-height: 1.2;
  }
  .polymarket-editorial-background {
    margin-top: 14px;
    padding: 12px 13px;
    border-radius: 14px;
  }
  .polymarket-editorial-background > small {
    margin-bottom: 7px;
    font-size: 10px;
    line-height: 1.3;
  }
  .polymarket-editorial-background p {
    font-size: clamp(13px, 3.5vw, 14px);
    line-height: 1.6;
    letter-spacing: .01em;
  }
  .polymarket-editorial-source { margin-top: 14px; padding-top: 11px; }
  .polymarket-editorial-source p { font-size: 13px; line-height: 1.55; }
  .polymarket-editorial-data-note { margin-top: 12px; font-size: 11px; line-height: 1.5; }
  .polymarket-editorial-probability-rail { padding: 16px 14px 14px; }
  .polymarket-editorial-probability-labels { gap: 8px; }
  .polymarket-editorial-probability-labels span { gap: 5px; font-size: 14px; }
  .polymarket-editorial-probability-labels i { width: 7px; height: 7px; flex-basis: 7px; }
  .polymarket-editorial-probability-labels strong { font-size: 19px; }
  .polymarket-editorial-probability-bar { height: 11px; margin-top: 11px; }
}
