/* Report layout refinement, 28 November 2026. Evidence and scales are unchanged. */
body.mari-report main figure,
.mari-essay .doc figure.chart {
  margin-block: 2rem !important;
}
body.mari-report main :is(.chart-data,.source-chart-data,.ai-exact,.ai-data-details),
.mari-essay .doc .chart-data {
  margin-block: 3rem !important;
}
body.mari-report main .report-table-scroll,
.mari-essay .report-table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  margin-block: 1.25rem;
  padding-bottom: .5rem;
}
body.mari-report main .report-table-scroll > table,
.mari-essay .report-table-scroll > table {
  display: table !important;
  max-width: none;
  width: 100%;
  margin: 0;
  font-size: .765rem;
  line-height: 1.4;
}
body.mari-report main .report-table-scroll > .report-wide-table,
.mari-essay .report-table-scroll > .report-wide-table {
  min-width: 36rem;
}
body.mari-report main table :is(th,td),
.mari-essay table :is(th,td) {
  font-size: inherit;
  text-transform: none;
  letter-spacing: 0;
  text-align:left;
}
body.mari-report main table tbody th,.mari-essay table tbody th { font-weight:400; }
body.mari-report main table thead th,.mari-essay table thead th { font-weight:600; }
body.mari-report main table .report-number,.mari-essay table .report-number { text-align:right; }
body.mari-report main .source-data-wide > p { font-size:.765rem;line-height:1.4;color:#6b716d; }
body.mari-report main .report-table-scroll:focus-visible,.mari-essay .report-table-scroll:focus-visible { outline:2px solid #3f6476;outline-offset:4px; }
body.mari-report main table caption,
.mari-essay table caption {
  text-align: left;
  font-size: .765rem;
  line-height: 1.4;
  margin-bottom: .75rem;
  color: #6b716d;
}
/* Every source has explicit prose and note containers. Tables are never notes. */
body.mari-report main .source-body {
  display: grid;
  grid-template-columns: minmax(0,1fr) var(--margin-w);
  gap: 0 var(--gutter);
  align-items: start;
}
body.mari-report main .source-body::after { display:none; }
body.mari-report main .source-body > h3 { grid-column:1 / -1; grid-row:auto; }
body.mari-report main .source-body > .source-summary { grid-column:1; grid-row:2; }
body.mari-report main .source-body > .source-notes { grid-column:2; grid-row:2; }
body.mari-report main .source-body > .source-data-wide {
  grid-column:1 / -1;
  grid-row:auto;
  width:100%;
  max-width:none !important;
  min-width:0;
}
body.mari-report main .source-summary > :is(figure,details,.report-table-scroll) {
  width:100%;
  max-width:100% !important;
  min-width:0;
}
body.mari-report main .source-notes :is(p,.source-caveat) {
  float:none;
  width:auto !important;
  max-width:none !important;
  margin:0 0 .75rem !important;
  font-size:.765rem !important;
  line-height:1.4 !important;
}
body.mari-report main .source-summary .source-figure { margin-block:2rem !important; }
body.mari-report main .source-figure figcaption strong,
body.mari-report main .topic-figure > h3 {
  font-size:15px !important;
  line-height:20px !important;
  font-weight:600 !important;
}
body.mari-report main .source-chart-panel h4 {
  font-size:13px !important;
  line-height:18px !important;
}
/* The alumni chart uses the same quiet, direct labels as the essay charts. */
body.mari-report main .cohort-chart { font-size:13px;line-height:1.4;margin-block:1.25rem; }
body.mari-report main .cohort-chart .cohort-label {
  font-size:13px;line-height:18px;font-weight:600;margin:0 0 .75rem;
}
body.mari-report main .cohort-chart .cohort-group + .cohort-group { margin-top:1.5rem; }
body.mari-report main .cohort-axis { display:flex;justify-content:space-between;margin:0 3rem .5rem 42%;color:#6b716d;font-size:12px; }
body.mari-report main .cohort-row { display:grid;grid-template-columns:minmax(0,40%) minmax(0,1fr) 3rem;gap:.5rem;align-items:center;min-height:2.1rem; }
body.mari-report main .cohort-rail { height:1px;background:#d9dedb; }
body.mari-report main .cohort-rail i { display:block;height:1px;background:#202321;position:relative; }
body.mari-report main .cohort-rail i::after { content:"";position:absolute;right:-2px;top:-2px;width:5px;height:5px;border-radius:50%;background:#202321; }
body.mari-report main .cohort-value { text-align:right;font-variant-numeric:tabular-nums; }
body.mari-report main :is(.topic-table-scroll,.ai-table-scroll,.table-wrap,.table-scroll) {
  max-width:100%;min-width:0;overflow-x:auto;
}
/* Wide essay tables may use the margin; their captions remain in the reading flow. */
@media(min-width:1200px) {
  .mari-essay .doc :is(details.report-wide-data,.chapter > .report-wide-data) {
    width:calc(100% + var(--gutter) + var(--margin-w));
    max-width:calc(var(--measure) + var(--gutter) + var(--margin-w)) !important;
  }
  .mari-essay .doc figure:has(.report-wide-data) > figcaption {
    position:static;float:none;width:auto;max-width:var(--measure);margin-top:1rem;
  }
}
@media(max-width:1199px) {
  body.mari-report main .source-body { display:block; }
  body.mari-report main .source-body > .source-notes { margin:1.5rem 0;max-width:var(--measure); }
}
@media print {
  body.mari-report main .report-table-scroll,.mari-essay .report-table-scroll { overflow:visible; }
  body.mari-report main .report-table-scroll > .report-wide-table,.mari-essay .report-table-scroll > .report-wide-table { min-width:0; }
}
