/* The report page: long-form reading in the site's type and colours. */
:root {
  --bg: #e9e9e6; --paper: #f8f8f7; --ink: #1d1c17; --muted: #55534b; --blue: #2456d6; --line: #d9d6cf;
  --font: "Bricolage Grotesque", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { background: var(--bg); color: var(--ink); font: 400 18px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }

.bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px clamp(16px, 4vw, 56px); background: var(--bg); border-bottom: 1px solid var(--line); }
.bar .home { font: 800 1.25rem var(--font); letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.bar .tools { display: flex; align-items: center; gap: 18px; font-weight: 700; font-size: 15px; }
.bar .tools a { color: var(--ink); text-decoration: none; }
.bar .tools a:hover { color: var(--blue); }
#print { font: 700 15px var(--font); border: 0; border-radius: 999px; padding: 10px 18px; background: var(--ink); color: var(--paper); cursor: pointer; transition: background .2s; }
#print:hover { background: var(--blue); }

.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); padding: 40px clamp(16px, 4vw, 56px) 0; max-width: 1240px; margin: 0 auto; }
.toc { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: 14px; line-height: 1.35; }
.toc b { display: block; font-weight: 800; margin-bottom: 10px; }
.toc ul { list-style: none; padding: 0; }
.toc ul ul { padding-left: 12px; margin: 4px 0 6px; }
.toc li { margin: 5px 0; }
.toc { padding-left: 12px; scrollbar-width: none; }
.toc::-webkit-scrollbar { display: none; }
.toc a { position: relative; display: inline-block; color: var(--muted); text-decoration: none; transition: color .2s; }
.toc a:hover { color: var(--blue); }
/* the section being read (set by toc.js) */
.toc a[aria-current="true"] { color: var(--blue); font-weight: 700; }
.toc a[aria-current="true"]::before { content: ""; position: absolute; left: -12px; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: var(--blue); }

.report { max-width: 72ch; padding-bottom: 40px; overflow-wrap: break-word; }
.report p, .report li { overflow-wrap: anywhere; }
.toc-mini { display: none; margin-top: 22px; background: var(--paper); border-radius: 14px; padding: 4px 16px; font-size: 15px; line-height: 1.35; }
.toc-mini summary { font-weight: 800; padding: 10px 0; cursor: pointer; }
.toc-mini ul { list-style: none; padding: 0 0 10px; margin: 0; }
.toc-mini ul ul { padding: 4px 0 4px 12px; }
.toc-mini li { margin: 7px 0; }
.toc-mini a { color: var(--muted); text-decoration: none; }
.kicker { font-weight: 700; color: var(--blue); }
.report h1 { font: 800 clamp(2rem, 1.3rem + 2.4vw, 3.3rem)/1.04 var(--font); letter-spacing: -0.04em; margin-top: 8px; }
.by { margin-top: 14px; font-weight: 700; }
.report h2 { font: 800 clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem)/1.1 var(--font); letter-spacing: -0.03em; margin: 64px 0 16px; }
.report h3 { font: 800 1.3rem/1.2 var(--font); letter-spacing: -0.02em; margin: 40px 0 12px; }
.report p, .report ul, .report ol { margin-top: 14px; }
.report ul, .report ol { padding-left: 1.3em; }
.report li + li { margin-top: 6px; }
.report code { font-size: .88em; background: var(--paper); padding: 1px 5px; border-radius: 5px; }
.report pre { background: var(--paper); padding: 14px 16px; border-radius: 12px; overflow-x: auto; margin-top: 14px; font-size: 14px; }
.report pre code { padding: 0; }
.report blockquote { margin-top: 14px; padding-left: 16px; border-left: 3px solid var(--line); color: var(--muted); }

.tablewrap { margin-top: 18px; overflow-x: auto; background: var(--paper); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.4; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 800; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* figures: dots are seed means, bars are 95% intervals, dashed line is the optimum */
figure.dots { margin: 26px 0 0; background: var(--paper); border-radius: 18px; padding: clamp(16px, 2.4vw, 26px); }
figure.dots figcaption { font-size: 17px; line-height: 1.3; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 11px; height: 11px; border-radius: 50%; }
.legend i.dash { width: 18px; height: 0; border-radius: 0; border-top: 2px dashed var(--muted); }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 28px; }
.panels.three { grid-template-columns: 1fr; }
.panel { margin-top: 14px; }
.panel h4 { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.drow { display: grid; grid-template-columns: minmax(0, 11.5em) minmax(0, 1fr) 3.6em; gap: 12px; align-items: center; min-height: 30px; border-bottom: 1px solid #ecebe7; }
.dl { font-size: 14px; line-height: 1.2; padding: 5px 0; }
.dl b { font-weight: 800; }
.dv { font-size: 13px; font-weight: 700; text-align: right; line-height: 1.25; font-variant-numeric: tabular-nums; }
.dt { position: relative; align-self: stretch; }
.dt .ref { position: absolute; top: 0; bottom: 0; border-left: 2px dashed #8d8a82; }
.dt .ci { position: absolute; height: 3px; margin-top: -1.5px; border-radius: 2px; min-width: 2px; }
.dt .pt { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid var(--paper); }
.axis { display: grid; grid-template-columns: minmax(0, 11.5em) minmax(0, 1fr) 3.6em; gap: 12px; height: 26px; }
.ticks { position: relative; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ticks i { position: absolute; top: 6px; transform: translateX(-50%); font-style: normal; white-space: nowrap; }
.ticks i::before { content: ""; position: absolute; left: 50%; top: -6px; height: 4px; border-left: 1px solid #b9b6ae; }
.xlab { margin-top: 2px !important; font-size: 13px; color: var(--muted); text-align: center; }
.sub { margin-top: 22px; padding-top: 6px; border-top: 1px solid var(--line); }
.fnote { margin-top: 14px !important; font-size: 13px; line-height: 1.45; color: var(--muted); }
@media (max-width: 560px) {
  .drow, .axis { grid-template-columns: minmax(0, 8.2em) minmax(0, 1fr) 3.2em; gap: 8px; }
  .dl { font-size: 13px; }
  .ticks i:nth-child(even) { display: none; }
}

.end { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 48px clamp(16px, 4vw, 56px); border-top: 1px solid var(--line); margin-top: 40px; font-weight: 600; color: var(--muted); }
.end a { color: var(--ink); }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .toc { display: none; }
  .toc-mini { display: block; }
  .bar .tools a { display: none; }
}

@media print {
  body { background: #fff; font-size: 11pt; line-height: 1.5; }
  .bar, .toc, .toc-mini, .end { display: none; }
  .layout { display: block; padding: 0; }
  .report { max-width: none; }
  .report h2 { margin-top: 28px; break-after: avoid; }
  .report h3 { break-after: avoid; }
  .tablewrap { overflow: visible; background: none; border: 1px solid #ccc; }
  figure, table { break-inside: avoid; }
  figure.dots { -webkit-print-color-adjust: exact; print-color-adjust: exact; background: none; border: 1px solid #ccc; }
  .dt .pt { border-color: #fff; }
  a { color: inherit; }
}
