/* =====================================================================
   decision-rerank report: additions on top of bad-monkey.css
   Code panels with syntax colours, prose width, the score charts,
   and a few report-only blocks. Same tokens: ink borders, hard shadows,
   mono kickers.
   ===================================================================== */

.prose {
  max-width: 780px;
  font-size: 16.5px;
  line-height: 1.7;
  color: #34343d
}

.prose p {
  margin: 0 0 16px
}

.prose ul {
  margin: 0 0 18px;
  padding-left: 22px
}

.prose li {
  margin: 0 0 8px
}

.prose strong {
  color: var(--ink)
}

.prose a,
.box a,
.score a,
.credit a {
  color: #5b4c71;
  text-decoration: underline;
  text-underline-offset: 3px
}

code.inline,
.prose code,
.box code,
.score code,
.memo code {
  font: 0.88em var(--mono);
  background: #eae5f1;
  border: 1px solid #d3cadf;
  padding: 1px 5px;
  white-space: nowrap
}

.band.dark code.inline {
  background: #393846;
  border-color: #4d4b5b;
  color: #f5f3ec
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: start;
  margin-top: 34px
}

.split.even {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr)
}

.col-stack {
  display: grid;
  gap: 26px
}

.sub-title {
  font: 700 28px/1.1 var(--display);
  letter-spacing: -.045em;
  margin: 0 0 14px
}

.sub-kicker {
  font: 11px var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #62606b;
  margin: 0 0 8px
}

.detail-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  border-bottom: 1.5px solid #292832;
  padding-bottom: 14px;
  margin: 0 0 30px
}

.detail-head .num {
  font: 700 64px/0.9 var(--display);
  letter-spacing: -.07em;
  color: #80738f
}

.detail-head h2 {
  font: 700 clamp(34px, 3.4vw, 52px)/1.04 var(--display);
  letter-spacing: -.06em;
  margin: 0
}

/* ---------- code panels ---------- */
.code {
  background: #282833;
  border: 1.5px solid #292832;
  box-shadow: 6px 7px 0 #82dbb5;
  color: #f5f3ec;
  min-width: 0
}

.code-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #22242b;
  color: #dcd6e6;
  font: 11px var(--mono);
  letter-spacing: .06em;
  padding: 9px 16px
}

.code-head .lang {
  color: #82dbb5;
  border: 1px solid #4d4b5b;
  padding: 0 6px
}

.code pre {
  margin: 0;
  padding: 18px 22px;
  overflow-x: auto;
  font: 13px/1.7 var(--mono);
  tab-size: 4
}

.code pre code {
  font: inherit;
  white-space: pre
}

.tok-k { color: #b597f2 }
.tok-s { color: #82dbb5 }
.tok-c { color: #8f8a9e; font-style: italic }
.tok-a { color: #f0c987 }
.tok-t { color: #f2e9b8 }
.tok-n { color: #d7eac1 }
.tok-f { color: #ffffff }
.tok-v { color: #f0c987 }
.tok-o { color: #b5a5ca }

/* ---------- report tables ---------- */
.score.mono-cells td:not(:first-child) {
  font-family: var(--mono);
  font-size: 13px
}

.score td.hit {
  background: #f1e6fb;
  color: #5d2f8f;
  font-weight: 700
}

.score .muted,
.muted {
  color: #6c6a74;
  font-weight: 400
}

.score.plain td:last-child {
  background: #fcfbf7;
  color: inherit;
  font-weight: 400
}

.score.plain thead th:last-child {
  background: #dcd6e6;
  color: inherit
}

.score caption {
  caption-side: top;
  text-align: left;
  font: 10.5px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #62606b;
  padding-bottom: 10px
}

/* ---------- stat tiles on the summary ---------- */
.stats.four {
  grid-template-columns: repeat(4, 1fr)
}

.stats .stat {
  border: 1.5px solid #292832;
  background: #fcfbf7;
  box-shadow: 6px 7px 0 #292832;
  padding: 20px 22px
}

.stats .stat b {
  font-size: 44px
}

.stats .stat p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #52515b
}

/* ---------- score charts ---------- */
.charts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px
}

.chart-card {
  border: 1.5px solid #292832;
  background: #fcfbf7;
  box-shadow: 6px 7px 0 #292832;
  padding: 18px 18px 12px;
  min-width: 0
}

.chart-card h4 {
  font: 700 17px/1.25 var(--display);
  letter-spacing: -.03em;
  margin: 0 0 4px
}

.chart-card .q {
  font-size: 13px;
  color: #62606b;
  margin: 0 0 12px;
  min-height: 38px
}

.chart-card svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible
}

.chart-card svg text {
  font-family: var(--mono);
  fill: #34343d
}

.chart-card .bar {
  cursor: default
}

.chart-card .bar:hover rect.mark,
.chart-card .bar:focus rect.mark {
  opacity: .82
}

.chart-card .bar:focus {
  outline: none
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font: 11px var(--mono);
  letter-spacing: .04em;
  margin: 0 0 16px;
  color: #34343d
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px
}

.chart-legend i {
  display: inline-block;
  width: 14px;
  height: 10px;
  border-radius: 0 3px 3px 0
}

.chart-tip {
  position: fixed;
  pointer-events: none;
  z-index: 50;
  background: #282833;
  color: #f5f3ec;
  font: 12px/1.45 var(--mono);
  padding: 8px 11px;
  border: 1.5px solid #292832;
  box-shadow: 3px 4px 0 #82dbb5;
  opacity: 0;
  transition: opacity .08s;
  max-width: 280px
}

.chart-tip.on {
  opacity: 1
}

details.data {
  margin-top: 22px
}

details.data summary {
  cursor: pointer;
  font: 11px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #3f3a4a;
  border: 1px solid #b7afc1;
  background: #fcfbf7;
  display: inline-block;
  padding: 8px 12px
}

details.data[open] summary {
  margin-bottom: 16px
}

/* ---------- comparison blocks ---------- */
.vs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 34px
}

.box ul.tight {
  margin: 10px 0 0;
  padding-left: 18px
}

.box ul.tight li {
  margin-bottom: 7px;
  font-size: 14.5px;
  line-height: 1.55
}

.band.dark .score {
  color: var(--ink)
}

.verdict {
  display: inline-block;
  font: 10.5px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid #292832;
  background: #d7eac1;
  white-space: nowrap
}

.verdict.warn {
  background: #f1e6fb
}

.verdict.neutral {
  background: #eae5f1
}

.credit {
  border-left: 4px solid #80738f;
  background: #fcfbf7;
  padding: 16px 20px;
  font-size: 15px;
  line-height: 1.6;
  max-width: 780px;
  margin-top: 26px
}

/* fleet diagram */
.fleet-fig svg {
  display: block;
  width: 100%;
  height: auto
}

.fleet-fig svg text {
  font-family: var(--mono)
}

.fleet-fig svg .title {
  font-family: var(--display);
  font-weight: 700
}

@media (max-width: 1100px) {
  .charts { grid-template-columns: 1fr }
  .split, .split.even, .vs { grid-template-columns: 1fr }
  .stats.four { grid-template-columns: repeat(2, 1fr) }
}

@media (max-width: 620px) {
  .stats.four { grid-template-columns: 1fr }
}

@media print {
  .topbar, .subnav, .chart-tip { display: none }
  .code { box-shadow: none }
}

.pillar-index {
  white-space: nowrap
}

/* a prominent link to a report's source post */
.source-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border: 1.5px solid #292832;
  background: #fcfbf7;
  box-shadow: 6px 7px 0 #80738f;
  padding: 22px 26px;
  margin: 0 0 34px
}

.source-callout .k {
  font: 11px var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #80738f
}

.source-callout h4 {
  font: 700 22px/1.2 var(--display);
  letter-spacing: -.03em;
  margin: 6px 0 8px
}

.source-callout p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #52515b;
  max-width: 720px
}

.source-callout .button {
  white-space: nowrap
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 260px
}

.cta-actions .button {
  justify-content: center;
  text-align: center
}

@media (max-width: 900px) {
  .source-callout { display: block }
  .source-callout .button { margin-top: 16px; display: inline-block }
}
