/*
 * BCRF donor file analysis, report site.
 * White page, one reading column, hairlines only, M+R blue as the single accent,
 * nothing smaller than 14px. Chart styles are at the end.
 */

@font-face {
  font-family: "Proxima Nova";
  src: url("assets/fonts/proximanova-regular-webfont.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Proxima Nova";
  src: url("assets/fonts/proximanova-bold-webfont.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
}

@font-face {
  font-family: "Proxima Nova";
  src: url("assets/fonts/proximanova-regularitalic-webfont.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #1f2020;
  --muted: #5b5f62;
  --rule: #dcdedf;
  --grid: #eaebec;
  --accent: #4796b8;
  --accent-deep: #2f6f8f;
  --accent-pale: #d6e6ee;
  --paper: #ffffff;
  --chart-teal: #6ee3e5;
  --chart-orange: #f26f2c;
  --chart-grey: #cacaca;
  --slide-bar: #5cc6c8;
  --topbar-height: 72px;
  --column: 880px;
  --font: "Proxima Nova", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 24px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Top bar ---------- */

.topbar {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--topbar-height);
  padding: 0 64px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.brand { display: flex; align-items: center; gap: 20px; }
.brand-mr { display: block; height: 26px; width: auto; }
.brand-divider { width: 1px; height: 32px; background: var(--rule); }
.brand-bcrf { display: block; height: 44px; width: auto; }
.brand-title { display: flex; flex-direction: column; gap: 2px; margin-left: 12px; }
.brand-title strong { font-size: 18px; line-height: 1.2; }
.brand-title span { font-size: 14px; line-height: 1.2; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 32px; margin-left: auto; }
.nav-item { position: relative; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 24px 0;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.nav-link:hover { text-decoration: none; color: var(--ink); }
.nav-link.active { color: var(--ink); border-bottom-color: var(--accent); }
.nav-link svg { flex: 0 0 auto; }

.nav-panel {
  position: absolute;
  top: calc(100% + 1px);
  left: 50%;
  display: none;
  min-width: 260px;
  padding: 12px 0;
  border: 1px solid var(--rule);
  background: var(--paper);
  box-shadow: 0 12px 24px rgba(31, 32, 32, .08);
  transform: translateX(-50%);
}
.nav-item.open .nav-panel { display: block; }
.nav-panel a {
  display: block;
  padding: 9px 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
  white-space: nowrap;
}
.nav-panel a:hover { color: var(--ink); text-decoration: none; background: #f4f5f6; }
.nav-panel a.current { color: var(--ink); font-weight: 700; }

.present-button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.present-button:hover { background: var(--accent-deep); }
.present-button[hidden] { display: none; }

.download-button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
  color: var(--accent-deep);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}
.download-button:hover { text-decoration: none; background: var(--accent-pale); }

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 10px;
  border: 0;
  background: none;
  cursor: pointer;
}
.menu-button span { display: block; height: 2px; margin: 6px 0; background: var(--ink); }

/* ---------- Page column ---------- */

#main-content {
  width: min(var(--column), calc(100% - 48px));
  margin: 0 auto;
  padding: calc(var(--topbar-height) + 64px) 0 96px;
}
#main-content:focus { outline: none; }
#main-content.wide { width: min(1312px, calc(100% - 48px)); }

.page-title { font-size: 48px; line-height: 1.05; letter-spacing: -.02em; }
.page-lead { max-width: 760px; margin-top: 18px; font-size: 20px; line-height: 1.5; color: var(--muted); }

.kicker {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Numbered lists that read down the first column, then the second. */
.contents { margin: 36px 0 48px; padding-top: 24px; border-top: 1px solid var(--rule); }
.contents .kicker { margin-bottom: 14px; }
.contents ol {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: contents;
}
.contents li { counter-increment: contents; }
.contents li a { display: flex; gap: 12px; font-size: 16px; line-height: 1.4; }
.contents li a::before {
  content: counter(contents) ".";
  flex: 0 0 28px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.contents li a[aria-current="location"] { font-weight: 700; }

/* ---------- Overview ---------- */

.overview-prose { max-width: 820px; margin-top: 28px; display: flex; flex-direction: column; gap: 18px; font-size: 18px; line-height: 1.55; }
.section-groups { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.section-group .kicker { margin-bottom: 12px; }
.section-group a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 16px; line-height: 1.4; }
.section-group a span { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Questions ---------- */

.question {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 56px 0 64px;
  border-top: 1px solid var(--rule);
}
.question-title { font-size: 32px; line-height: 1.2; scroll-margin-top: calc(var(--topbar-height) + 24px); }
.answer { max-width: 820px; margin-top: 12px; font-size: 20px; line-height: 1.5; }
.answer ul { display: flex; flex-direction: column; gap: 10px; margin: 0; padding-left: 24px; }
.answer p + ul { margin-top: 12px; }

/* Layout "left": text in a 400px column, figure on the right. */
.question.left .row { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 48px; align-items: stretch; }
.question.left .text { display: flex; flex-direction: column; gap: 16px; }
.question.left .answer { margin-top: 28px; font-size: 18px; }
.question.left .data-used { margin-top: auto; }

/* The display rule hides the disclosure for now. Delete the display rule to show the disclosure again. */
.data-used { display: none; max-width: 820px; margin-top: 4px; }
.data-used summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  list-style: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}
.data-used summary::-webkit-details-marker { display: none; }
.data-used summary svg { flex: 0 0 auto; transition: transform .15s ease; }
.data-used[open] summary svg { transform: rotate(180deg); }
.data-used ul { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 0; padding-left: 24px; font-size: 16px; line-height: 1.5; color: var(--muted); }
.data-used p { margin-top: 8px; font-size: 16px; color: var(--muted); }

/* ---------- Figures ---------- */

.figure { display: flex; flex-direction: column; gap: 24px; }
.question.left .figure .controls { margin-top: 28px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 -10px; font-size: 15px; color: var(--muted); }
.control-label:not(:first-child) { margin-left: 28px; }
/* The Chart | Table control sits at the right edge of the controls row, above the chart. */
.view-toggle { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.controls select { font: inherit; font-size: 14px; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 5px 8px; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.seg button { white-space: nowrap; padding: 6px 12px; border: 0; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
.seg button.on { background: var(--accent); color: #fff; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 220px; height: 6px; border-radius: 3px; background: var(--chart-grey); outline: none; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--accent); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--accent); }
input[type="range"]:focus-visible { box-shadow: 0 0 0 2px var(--chart-orange); }
.chart { width: 100%; height: auto; display: block; font-family: var(--font); }
.lbl { font-size: 14px; fill: var(--muted); }
.lbl.strong, .val.strong { font-weight: 700; fill: var(--ink); }
.val { font-size: 13px; fill: var(--ink); font-variant-numeric: tabular-nums; }
.dense .val { font-size: 11px; }
.denser .val { font-size: 9.5px; letter-spacing: -0.2px; }
.tick { font-size: 13px; fill: var(--muted); }
.inbar { font-size: 13px; fill: #fff; font-weight: 700; pointer-events: none; }
.inbar.dark { fill: var(--ink); }
.grid { stroke: var(--grid); stroke-width: 1; }
.c1 { --series: var(--accent); } .c2 { --series: var(--chart-orange); } .c3 { --series: #38b565; } .c4 { --series: #f8a359; }
.cteal { --series: var(--chart-teal); } .cgrey { --series: var(--chart-grey); } .cdark { --series: #545454; } .cyellow { --series: #faac2e; } .cpale { --series: #fde862; }
.cink { --series: var(--ink); } .clgreen { --series: #97cc7e; } .cwhite { --series: #f3f3f3; }
rect.bar { fill: var(--series); }
/* A value the data cannot show: a pale fill with a light grey outline. */
.cunknown { --series: #efefef; }
rect.cunknown { fill: var(--series); stroke: var(--chart-grey); stroke-width: 1; }
.swatch.cunknown { box-shadow: inset 0 0 0 1px var(--chart-grey); }
rect.c1, rect.c2, rect.c3, rect.c4, rect.cteal, rect.cgrey, rect.cdark, rect.cyellow, rect.cpale, circle.dot { fill: var(--series); }
path.line { fill: none; stroke: var(--series); stroke-width: 2.5; }
path.line.dashed { stroke-dasharray: 6 5; }
circle.dot { stroke: var(--paper); stroke-width: 1.5; }
line.mark { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; }
line.mark.solid { stroke: var(--rule); stroke-dasharray: none; }
rect.slice { pointer-events: none; }
path.flow { fill: none; stroke: var(--series); stroke-opacity: .35; }
path.flow:hover { stroke-opacity: .6; }
path.state { stroke: var(--paper); stroke-width: 1; }
path.state:hover { stroke: var(--ink); }
.slide .map .chart { max-height: 330px; }
/* A legend row under a column chart sits as close to the fiscal year labels as a legend drawn in the chart. */
.legend-host { margin-top: -10px; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: 14px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 2px; background: var(--series); }
.swatch.dashed { width: 22px; height: 3px; border-radius: 0; background: repeating-linear-gradient(90deg, var(--series) 0 6px, transparent 6px 10px); }
/* Off-white does not show on the white page, so its marks and swatches have a light grey outline. */
rect.cwhite { stroke: var(--chart-grey); stroke-width: 1; }
.swatch.cwhite { box-shadow: inset 0 0 0 1px var(--chart-grey); }
/* Two titles over a horizontal bar chart: one over the row names, which take 150 of the drawing's 800, and one over the bars. */
.bar-titles { display: flex; }
.bar-titles span:first-child { width: 18.75%; padding-right: 1%; text-align: right; box-sizing: border-box; }
/* The title of a chart's vertical axis, above the drawing at its left edge. */
.y-title { font-size: 14px; color: var(--muted); margin-bottom: -16px; }
/* The drawing above keeps room under its axis labels for a legend. An axis title takes that room. */
.axis-title { text-align: center; font-size: 14px; color: var(--muted); margin-top: -38px; position: relative; }
@media (max-width: 700px) { .axis-title { margin-top: -14px; } }
.axis-title.under-legend { margin-top: -12px; }
.axis-title.over { margin: 0 0 -12px; font-size: 16px; }
.control-group { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.control-group:not(:last-child) { margin-right: 20px; }
.seg.multi button.on::before { content: "✓ "; }
/* A picker of many options: a second controls row whose buttons wrap onto more lines. */
/* One row per group and one bar column per measure, so a reader compares a group across the measures. */
.bar-grid { display: grid; grid-template-columns: minmax(150px, 1.3fr) repeat(3, minmax(0, 1fr)); column-gap: 20px; align-items: center; width: 100%; }
.bar-grid .head { align-self: end; padding-bottom: 8px; border-bottom: 1px solid var(--rule); font-size: 13px; font-weight: 700; color: var(--muted); }
.bar-grid .cell { min-width: 0; padding: 6px 0; }
.bar-grid .name { font-size: 15px; line-height: 1.25; }
.bar-grid .name small { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.bar-grid .barrow { display: flex; align-items: center; gap: 8px; }
.bar-grid .bar { height: 16px; background: #6ee3e5; }
.bar-grid .val { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-grid .multi .bar { background: var(--accent); }
.bar-grid .multi.name, .bar-grid .multi .val { font-weight: 700; }
.bar-grid .all .bar { background: #cacaca; }
.bar-grid .sep { grid-column: 1 / -1; margin: 4px 0; border-top: 1px solid var(--rule); }
.bar-grid .measure { display: none; }
.slide .figure .bar-grid { max-width: 1100px; }
.slide .bar-grid .cell { padding: 3px 0; }
.slide .bar-grid .name { line-height: 1.2; }
@media screen and (max-width: 699px) {
  .bar-grid { grid-template-columns: 1fr; }
  .bar-grid .head { display: none; }
  .bar-grid .cell.name { padding-top: 14px; font-weight: 700; }
  .bar-grid .measure { display: block; font-size: 12px; color: var(--muted); }
}
.pick-many { position: relative; display: inline-block; }
.pick-button { position: relative; min-width: 170px; padding: 6px 30px 6px 12px; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); color: var(--ink); font-size: 14px; text-align: left; white-space: nowrap; cursor: pointer; }
.pick-button::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-70%) rotate(45deg); }
.pick-menu { position: absolute; left: 0; top: calc(100% + 4px); z-index: 10; min-width: 100%; padding: 6px 0; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); box-shadow: 0 12px 24px rgba(31, 32, 32, .12); }
.pick-menu[hidden] { display: none; }
.pick-menu label { display: flex; align-items: center; gap: 8px; padding: 6px 14px; color: var(--ink); font-size: 14px; white-space: nowrap; cursor: pointer; }
.pick-menu label:hover { background: #f4f5f6; }
.pick-menu label.all { margin-bottom: 4px; padding-bottom: 9px; border-bottom: 1px solid var(--rule); }
.pick-menu input { margin: 0; accent-color: var(--accent); }
rect.bar { transition: opacity .3s; }
.axis { font-family: var(--font); font-size: 13px; }
.axis text { fill: var(--muted); }
.axis line { stroke: var(--grid); stroke-width: 1; }
rect.bar:hover { opacity: .85; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); }
th { font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 700; cursor: pointer; user-select: none; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
.data-table { width: auto; min-width: 520px; margin: 14px auto 0; font-size: 15px; }
.data-table th { cursor: default; font-size: 13px; white-space: normal; vertical-align: bottom; }
.data-table tr.total td { font-weight: 700; border-top: 1px solid var(--ink); }
/* A heading across the last columns, and a first column that stays in place when the table scrolls sideways. */
.data-table tr.span th { text-align: center; padding-bottom: 4px; border-bottom: 0; color: var(--ink); }
.data-table tr.span th + th { border-bottom: 1px solid var(--rule); }
.data-table.sticky th:first-child, .data-table.sticky td:first-child { position: sticky; left: 0; background: var(--paper); }
.data-table tr.heading td { padding-top: 16px; font-size: 13px; font-weight: 700; color: var(--muted); }
.data-table th, .data-table td { padding: 7px 28px 7px 0; }
.data-table th:last-child, .data-table td:last-child { padding-right: 0; }
.data-table td:first-child { white-space: nowrap; }
/* Every number column has the same width, and a long heading wraps. */
.data-table.even th:not(:first-child) { width: 114px; }
.slide .data-table.even th:not(:first-child) { width: 170px; }
.data-table.tight { font-size: 14px; }
.data-table.tight th, .data-table.tight td { padding-right: 14px; }
.data-table.tight th:last-child, .data-table.tight td:last-child { padding-right: 0; }
/* A table of measures: one row per group, with the row for all donors bold and shaded. */
.table-host { margin-top: 14px; }
.measure-table { font-size: 15px; font-variant-numeric: tabular-nums; }
.measure-table th, .measure-table td { padding: 10px 12px; text-align: right; white-space: nowrap; }
.measure-table th:first-child, .measure-table td:first-child { text-align: left; }
.measure-table th { cursor: default; font-size: 13px; text-transform: none; letter-spacing: 0; white-space: normal; vertical-align: bottom; }
.measure-table tr.all td { font-weight: 700; background: #f4f6f7; }
/* A table of percentages whose cells are shaded by value. */
.heat-table { width: auto; margin: 0 auto; font-size: 14px; font-variant-numeric: tabular-nums; }
.heat-table th, .heat-table td { border-bottom: 0; padding: 8px 6px; text-align: center; }
.heat-table th { cursor: default; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; vertical-align: bottom; line-height: 1.25; }
.heat-table th.group { font-size: 13px; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--rule); }
.heat-table th.row { text-align: left; font-size: 14px; color: var(--ink); white-space: nowrap; padding-right: 14px; vertical-align: middle; }
.heat-table thead th.row { color: var(--muted); font-size: 13px; font-weight: 700; vertical-align: bottom; }
.heat-table .n { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--muted); }
.heat-table td { min-width: 44px; border: 2px solid var(--paper); color: var(--ink); }
.heat-table td.deep { color: #fff; font-weight: 700; }
.heat-table.tight { font-size: 13px; }
.heat-table.tight th, .heat-table.tight td { padding: 7px 3px; }
.heat-table.tight th { font-size: 11px; }
.heat-table.tight th.row { font-size: 13px; padding-right: 10px; }
.heat-table.tight td { min-width: 38px; }
.heat-table td.plain { padding: 8px 12px; }
.heat-table td.same { box-shadow: inset 0 0 0 2px var(--ink); }
/* A heat table that fills the page column, with taller rows and the body text size. */
.heat-table.wide { font-size: 16px; }
.heat-table.wide th, .heat-table.wide td { padding: 14px 10px; }
.heat-table.wide th { font-size: 14px; }
.heat-table.wide th.row { font-size: 16px; }
.grid-table { width: auto; min-width: 560px; font-variant-numeric: tabular-nums; }
.grid-table th, .grid-table td { padding: 12px 14px; text-align: right; }
.grid-table th { text-align: left; cursor: default; }
/* Every data column has the same width, and a long heading wraps. */
.grid-table tr:first-child th { vertical-align: bottom; }
.grid-table tr:first-child th:not(:first-child) { width: 10.5em; text-align: right; }
.grid-table td { font-size: 22px; font-weight: 700; }
.grid-table td.cell { background: #f3f6f7; }
.figure-note { font-size: 14px; color: var(--muted); }
.tip { position: fixed; pointer-events: none; z-index: 300; max-width: 260px; padding: 6px 9px; border-radius: 4px; background: var(--ink); color: var(--paper); font-size: 13px; opacity: 0; transition: opacity .12s; }

/* ---------- Page footer nav ---------- */

.page-nav { display: flex; justify-content: space-between; gap: 24px; padding-top: 24px; border-top: 1px solid var(--rule); }
.page-nav a { display: flex; flex-direction: column; gap: 4px; }
.page-nav a:last-child { text-align: right; }
.page-nav strong { font-size: 18px; }

/* ---------- Methodology ---------- */

.topic { display: flex; flex-direction: column; gap: 20px; padding: 56px 0 24px; border-top: 1px solid var(--rule); }
.topic h2 { font-size: 32px; line-height: 1.2; scroll-margin-top: calc(var(--topbar-height) + 24px); }
.topic-summary { max-width: 820px; font-size: 20px; line-height: 1.5; }
.terms { display: flex; flex-direction: column; margin-top: 16px; }
.term { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 32px; padding: 24px 0; border-top: 1px solid var(--rule); }
.term h3 { font-size: 19px; }
.term p { font-size: 18px; line-height: 1.5; }

.empty-state { padding: 40px 0; }
.noscript { margin: 100px 20px 20px; padding: 20px; border: 1px solid var(--rule); }

/* ---------- Present mode ---------- */
/* Every slide is drawn on a 1440 by 900 stage that app.js scales to the window. */

body.presenting { overflow: hidden; }
#deck { position: fixed; inset: 0; z-index: 200; background: var(--paper); }
#deck[hidden] { display: none; }
.stage { position: absolute; left: 50%; top: 50%; width: 1440px; height: 900px; overflow: hidden; background: var(--paper); transform: translate(-50%, -50%); transform-origin: center; }
.deck-bar { position: absolute; left: 0; right: 0; top: 0; height: 10px; background: var(--slide-bar); }
.slide { position: absolute; inset: 0; }
.slide.question { display: flex; flex-direction: column; gap: 18px; padding: 48px 72px 80px; }
.slide .question { border-top: 0; padding: 0; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.slide .question-title { font-size: 40px; line-height: 1.15; scroll-margin-top: 0; }
.slide .answer { font-size: 20px; max-width: 1200px; margin: 14px 0 0; }
.slide .data-used { display: none; }
.slide .figure { flex: none; align-items: center; }
.slide .figure .controls { margin: 14px 0 -10px; justify-content: center; }
.slide .figure .view-toggle { margin-left: 20px; }
.slide .figure .bar-titles { width: 100%; max-width: 1000px; }
/* The donor status explainer has no bullets, so it fills the slide's content area. */
.slide .figure.status-explainer { display: block; width: fit-content; margin: auto; zoom: 1.4; }
.slide .figure .chart-host { width: 100%; max-width: 1000px; display: flex; justify-content: center; }
.slide .figure .tablewrap { width: 100%; max-width: 1400px; display: flex; justify-content: center; }
.slide .chart { width: 100%; height: auto; }
.slide .grid-table th, .slide .grid-table td { padding: 16px 26px; }
.slide .grid-table th { font-size: 18px; }
.slide .grid-table tr:first-child th:not(:first-child) { width: 11.5em; }
.slide .grid-table td { font-size: 32px; }
.slide div.row { flex: 1; min-height: 0; display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 56px; align-items: stretch; }
.slide div.row .text { display: flex; flex-direction: column; }
.slide div.row .answer { margin-top: 38px; font-size: 19px; }
.slide div.row .figure { display: flex; flex-direction: column; }
.slide-foot {
  position: absolute;
  left: 72px;
  right: 72px;
  bottom: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid var(--rule);
}
.slide-foot img, .section-foot img { height: 26px; width: auto; filter: grayscale(1) opacity(.45); }
.foot-divider { width: 1px; height: 12px; margin: 0 18px; background: var(--ink); }
.slide-number { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.slide-hint { position: absolute; right: 72px; top: 20px; display: flex; align-items: center; gap: 18px; font-size: 13px; color: var(--ink); }
.close-button { width: 28px; height: 28px; margin-left: 6px; border: 1.5px solid #c4c8cb; border-radius: 50%; background: none; color: #9aa0a4; font-size: 20px; line-height: 1; cursor: pointer; }
.close-button:hover { border-color: var(--muted); color: var(--muted); }
.toc-button { padding: 0; border: 0; border-bottom: 1px solid var(--ink); background: none; color: inherit; font-size: 13px; line-height: 1.2; cursor: pointer; }
.toc-button:hover { color: var(--accent-deep); border-bottom-color: var(--accent-deep); }
.toc {
  position: absolute;
  right: 72px;
  top: 48px;
  z-index: 5;
  width: 320px;
  padding: 6px 0 12px;
  border: 1px solid var(--rule);
  background: var(--paper);
  box-shadow: 0 12px 24px rgba(31, 32, 32, .12);
}
.toc[hidden] { display: none; }
.toc-group { margin: 14px 18px 6px; padding: 0 0 6px; border-bottom: 1px solid var(--rule); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.toc-group:first-child { margin-top: 10px; }
.toc-section { display: block; width: 100%; padding: 6px 18px 6px 34px; border: 0; background: none; color: var(--ink); font-size: 15px; text-align: left; cursor: pointer; }
.toc-section:hover { background: #f4f5f6; }
.toc-section.current { font-weight: 700; background: #f4f5f6; }

/* Title slide (A1): logos top left, DRAFT tag top right, four-color stripe under the dek. */
.slide.title, .slide.section { padding: 0; }
.title-slide { position: absolute; inset: 0; }
.title-logos { position: absolute; left: 120px; top: 56px; display: flex; align-items: center; gap: 20px; }
.title-logos img { height: 26px; width: auto; }
.title-logos img.bcrf { height: 44px; }
.title-logos .brand-divider { width: 1px; height: 32px; background: var(--rule); }
.draft-tag { display: inline-block; padding: 3px 9px; background: #fff3cd; color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: .04em; vertical-align: middle; }
.title-big { position: absolute; left: 120px; top: 300px; font-size: 96px; font-weight: 800; line-height: 1; letter-spacing: -.025em; }
.title-dek { position: absolute; left: 120px; top: 428px; font-size: 30px; line-height: 1.3; color: var(--muted); }
.stripe { position: absolute; left: 120px; top: 520px; width: 840px; height: 14px; display: flex; }
.stripe i { display: block; height: 100%; }
.stripe i:nth-child(1) { flex: 5; background: var(--accent); }
.stripe i:nth-child(2) { flex: 3; background: var(--slide-bar); }
.stripe i:nth-child(3) { flex: 2; background: #54b36a; }
.stripe i:nth-child(4) { flex: 1.2; background: #f26b2b; }
.title-foot { position: absolute; left: 120px; right: 120px; bottom: 64px; display: flex; justify-content: space-between; padding-top: 22px; border-top: 1px solid var(--rule); font-size: 18px; font-weight: 700; }
#deck.no-bar .deck-bar { display: none; }

/* Section title slide: blue field, white centered title, white footer band with the grey mark. */
.section-slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--accent); }
.section-slide h2 { color: #fff; font-size: 48px; font-weight: 800; letter-spacing: -.01em; padding-bottom: 64px; }
.section-foot { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; display: flex; align-items: center; justify-content: flex-end; padding: 0 72px; background: var(--paper); }
.slide.section .slide-hint { color: #fff; }
.slide.section .close-button { border-color: rgba(255, 255, 255, .6); color: rgba(255, 255, 255, .8); }
.slide.section .toc-button { border-bottom-color: currentColor; }

/* ---------- Narrow screens ---------- */

/* The top bar tightens in steps so the four menus fit on one line down to 901px. */
@media (max-width: 1500px) {
  .topbar { padding: 0 24px; }
  .nav { gap: 20px; }
}

@media (min-width: 901px) and (max-width: 1400px) {
  .brand-title { display: none; }
}

@media (min-width: 901px) and (max-width: 1160px) {
  .nav { gap: 14px; }
  .nav-link { font-size: 15px; }
}

@media (min-width: 901px) and (max-width: 1090px) {
  .brand { gap: 12px; }
  .nav { gap: 10px; }
  .nav-link { gap: 3px; font-size: 14px; }
}

@media (min-width: 901px) and (max-width: 1000px) {
  .topbar { gap: 12px; }
  .brand-divider, .brand-bcrf { display: none; }
  .nav { gap: 8px; }
  .download-button, .present-button { padding: 0 10px; }
  .download-button svg { display: none; }
}

@media (max-width: 900px) {
  .brand-title span { display: none; }
  .menu-button { display: block; }
  .present-button { order: -1; margin-left: auto; height: 34px; padding: 0 12px; font-size: 14px; }
  .download-button { display: none; }
  .menu-button { margin-left: 0; }
  .nav {
    position: fixed;
    top: var(--topbar-height);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 0 16px;
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
    box-shadow: 0 12px 24px rgba(31, 32, 32, .08);
  }
  .nav.open { display: flex; }
  .nav-link { width: 100%; padding: 12px 24px; border-bottom: 0; }
  .nav-link.active { border-left: 3px solid var(--accent); padding-left: 21px; }
  .nav-panel { position: static; display: block; min-width: 0; padding: 0 0 8px; border: 0; box-shadow: none; transform: none; }
  .nav-panel a { padding: 8px 24px 8px 44px; }
  .contents ol { grid-auto-flow: row; grid-template-columns: 1fr; }
  .section-groups { grid-template-columns: 1fr; gap: 24px 0; }
  .page-title { font-size: 36px; }
  .question-title { font-size: 26px; }
  .answer { font-size: 18px; }
  .question.left .row { grid-template-columns: 1fr; }
  .term { grid-template-columns: 1fr; gap: 8px; }
}

/* Phones: Present mode is a scrolling column of slides in the site layout. */
@media screen and (max-width: 699px) {
  #deck { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .stage { position: static; width: auto; height: auto; transform: none !important; overflow: visible; }
  .deck-bar { position: sticky; top: 0; z-index: 2; }
  .slide { position: static; display: flex; flex-direction: column; gap: 12px; min-height: 100vh; padding: 0 20px 24px; }
  .slide.question { padding: 0 20px 24px; gap: 12px; }
  .slide .question-title { font-size: 26px; }
  .slide .answer { font-size: 17px; }
  .slide .figure .chart-host, .slide .figure .tablewrap { display: block; }
  .slide .grid-table th, .slide .grid-table td { padding: 12px 14px; }
  .slide .grid-table th { font-size: 14px; }
  .slide .grid-table td { font-size: 18px; }
  .slide div.row { display: block; }
  .slide-foot { position: static; height: auto; margin-top: 16px; padding-top: 10px; }
  .slide-hint { order: -1; position: sticky; top: 0; right: auto; z-index: 3; margin: 0 -20px 4px; padding: 10px 20px; gap: 12px; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .close-button { margin-left: auto; width: 32px; height: 32px; }
  .toc { right: 20px; top: 40px; width: calc(100% - 40px); }
  .title-slide { position: static; padding-top: 16px; }
  .slide.title { padding: 0 20px 24px; }
  .slide.section { padding-bottom: 0; }
  .title-logos { position: static; margin-bottom: 40px; }
  .title-big { position: static; font-size: 44px; margin: 0 0 12px; }
  .title-dek { position: static; font-size: 18px; }
  .stripe { position: static; width: 100%; margin: 20px 0; }
  .title-foot { position: static; flex-direction: column; gap: 6px; font-size: 15px; margin-top: 24px; }
  .section-slide { position: static; flex: 1; display: flex; flex-direction: column; justify-content: center; margin: 0 -20px; padding: 48px 20px 0; }
  .section-slide h2 { font-size: 30px; padding: 0 0 48px; }
  .section-foot { position: static; width: calc(100% + 40px); margin: auto -20px 0; padding: 0 20px; }
  .slide.section .slide-hint { color: var(--ink); }
  .slide.section .close-button { border-color: #c4c8cb; color: #9aa0a4; }
}

@media (max-width: 560px) {
  .brand-bcrf { display: none; }
  .brand-divider { display: none; }
  .page-nav { flex-direction: column; }
  .page-nav a:last-child { text-align: left; }
}

/* ---------- The PDF deck ---------- */
/* app.js draws this layout at #print, and report/build_pdf.py prints it with Chrome. */

@page deck { size: 1440px 900px; margin: 0; }
body.print-deck { page: deck; }
body.print-deck * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
body.print-deck :is(.topbar, .skip-link, #main-content, .tip, .noscript, .deck-bar, .toc-button, .close-button, .toc) { display: none; }
body.print-deck #deck { position: static; }
body.print-deck .stage { position: static; height: auto; overflow: visible; transform: none; }
body.print-deck .slide { position: relative; width: 1440px; height: 900px; overflow: hidden; break-after: page; }
body.print-deck .slide.question::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 10px; background: var(--slide-bar); }
/* On a screen 900px wide or narrower the browser stacks the text over the figure.
   This rule keeps the two side by side in the PDF. */
body.print-deck .slide div.row { grid-template-columns: 420px minmax(0, 1fr); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  rect.bar { transition: none; }
}

/* The donor status explainer, the first question of Donor Retention. */
/* The grid starts as far under the question title as a chart's controls row does. */
.status-explainer { display: block; margin-top: 28px; }
.status-explainer table { width: 100%; border-collapse: collapse; font-size: 16px; }
.status-explainer th, .status-explainer td { padding: 7px 0; text-align: left; border-bottom: 1px solid var(--grid); cursor: default; }
.status-explainer thead th { padding: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--rule); vertical-align: bottom; text-transform: none; letter-spacing: 0; }
.status-explainer thead .span { text-align: center; letter-spacing: .04em; text-transform: uppercase; border-bottom: 0; padding-bottom: 2px; }
/* The first and last columns are as wide as their longest entry, which leaves 80px for each of the four year columns in the 880px page column. */
.status-explainer .yr { width: 80px; min-width: 80px; max-width: 80px; text-align: center; }
.status-explainer thead .yr { font-weight: 600; }
.status-explainer .this { background: #eef9f9; }
.status-explainer .name { white-space: nowrap; padding-right: 24px; }
.status-explainer td.name { font-size: 14px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.status-explainer .def { padding-left: 24px; font-size: 15px; white-space: nowrap; }
.status-explainer tbody.giving tr:last-child td { border-bottom: 1px solid var(--rule); }
.status-explainer tbody.lapsed tr:last-child td { border-bottom: 0; }
.status-explainer .mark { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; }
.status-explainer .mark.gave { background: var(--accent); }
.status-explainer .mark.none { border: 1.25px solid var(--accent); background: var(--paper); }
/* Either one: a dot split on the diagonal, with the upper left half filled. */
.status-explainer .mark.either { border: 1.25px solid var(--accent); background: linear-gradient(135deg, var(--accent) 50%, var(--paper) 50%) border-box; }
.status-explainer .mark.any { width: 74px; border-radius: 9px; background: var(--accent); }
/* In the grid the wide mark spans two columns, so half of its cell plus one dot runs from the first column's dot to the second's. */
.status-explainer td .mark.any { width: calc(50% + 18px); }
.status-explainer .key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.status-explainer .key span { display: inline-flex; align-items: center; gap: 7px; }
.status-explainer .key .mark.gave, .status-explainer .key .mark.none, .status-explainer .key .mark.either { width: 14px; height: 14px; }
.status-explainer .key .mark.any { width: 40px; height: 14px; }
.status-explainer .footnote { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
