/* The one stylesheet for the archive's own pages: the landing page and the
   reports rebuilt here (2001-2017). Report pages use <nav class="sidebar"> +
   <main>; the Quarto, bookdown and 2018/2019 reports keep their own CSS. */

/* Values copied from the 2025 Quarto report's Bootstrap theme, without
   Bootstrap: 17px root, Source Sans Pro, text #343a40, links #2761e3, headings
   600 weight with Bootstrap's responsive sizes (fixed from 1200px wide), and
   Quarto's sidebar spacing and colors. */
:root {
  --text: #343a40;
  --muted: #6c757d;
  --link: #2761e3;
  --link-hover: #1f4eb6;
  --nav: #595959;
  --nav-hover: rgba(33, 81, 191, 0.8);
  --border: #dee2e6;
  --font: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html { font-size: 17px; }
* { box-sizing: border-box; }

body {
  margin: 0;
  /* the top padding also leaves room for the fixed pink bar (pinkbar.css);
     the fallback keeps the page usable if that file doesn't load */
  padding: calc(35px + var(--pinkbar-h, 34px)) 24px 64px 46px;
  background: #fff;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  display: grid;
  grid-template-columns: 250px minmax(0, 720px);
  column-gap: 48px;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }
p { margin: 0 0 1rem; }

/* ---- Headings ---- */
h1, h2, h3, h4 { line-height: 1.2; color: inherit; }
h1 { font-size: min(calc(1.325rem + 0.9vw), 2rem); font-weight: 600; margin: 0 0 1rem; }
h2 {
  font-size: min(calc(1.29rem + 0.48vw), 1.65rem); font-weight: 600;
  margin: 2rem 0 1rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
main > section:first-of-type > h2:first-child { margin-top: 0; }
h3 { font-size: min(calc(1.27rem + 0.24vw), 1.45rem); font-weight: 600; opacity: 0.9; margin: 1.5rem 0 0.5rem; }
h4 { font-size: 1.25rem; font-weight: 400; opacity: 0.9; margin: 1.5rem 0 0.5rem; }

/* ---- Left menu (report pages and the landing page's archive list) ---- */
.sidebar {
  position: sticky; top: calc(35px + var(--pinkbar-h, 34px)); align-self: start;
  max-height: calc(100vh - 70px - var(--pinkbar-h, 34px)); overflow-y: auto;
}
.sidebar-title { font-size: 1.3rem; font-weight: 400; line-height: 1.6rem; margin: 0.25rem 0 1.5rem; padding: 0; border: 0; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin: 0.4rem 0 0.2em; font-size: 0.925rem; line-height: 1rem; }
.sidebar a { color: var(--nav); text-decoration: none; }
.sidebar a:hover, .sidebar a:focus-visible { color: var(--nav-hover); }
.sidebar ul ul { padding-left: 0.5em; }
.sidebar ul ul li { font-size: 0.875rem; }

@media (max-width: 991px) {
  body { display: block; padding-left: 1rem; }
  .sidebar { position: static; max-height: none; margin-bottom: 2rem; }
  .sidebar ul.sections { display: none; }
}

/* ---- Body content ---- */
.label { color: var(--muted); font-weight: 400; }
.subtitle-line { color: var(--muted); font-size: 1.25rem; margin: 0 0 1.25rem; }
.cover { margin: 0 0 1.5rem; max-width: 465px; }
.cover img { display: block; width: 100%; height: auto; }
main ul ul { margin-top: 0.25rem; }
main li { margin-bottom: 0.35rem; }

.figures { list-style: none; margin: 0; padding: 0; }
.figures li { margin: 0 0 1rem; font-weight: 600; }
.figures strong { display: block; }

/* ---- Cropped After Burn charts (2001-2012) ---- */
.chart { margin: 0; max-width: calc(var(--w, 385) * 1px); overflow: hidden; position: relative; }
.chart img { display: block; width: 100%; height: auto; margin-top: calc(var(--crop, 0) / var(--w, 385) * -100%); }
.chart .mask { position: absolute; background: #fff; }
/* Window of --h native px. The height comes from a spacer whose padding is
   a % of the figure's own width, not aspect-ratio: WebKit (all iPhone
   browsers) lets an aspect-ratio box grow to fit the image. */
.chart.part::before { content: ""; display: block; padding-top: calc(var(--h) / var(--w, 385) * 100%); }
.chart.part img { position: absolute; top: 0; left: 0; }
/* 2001: a window that also clips --e px from the left, right and bottom
   (its GIFs have a 1px frame). Visible area: (--w - 2*--e) x --h native px,
   starting --crop px down and --e px in; padding spacer as for .part. */
.chart.edged { max-width: calc(var(--max, calc(var(--w) - 2 * var(--e))) * 1px); }   /* --max: display width */
.chart.edged::before { content: ""; display: block; padding-top: calc(var(--h) / (var(--w) - 2 * var(--e)) * 100%); }
.chart.edged img {
  position: absolute; top: 0; left: 0;
  width: calc(var(--w) / (var(--w) - 2 * var(--e)) * 100%);
  margin-left: calc(var(--e) / (var(--w) - 2 * var(--e)) * -100%);
  margin-top: calc(var(--crop) / (var(--w) - 2 * var(--e)) * -100%);
}

/* ---- Reports rebuilt from PDFs (2013-2017): <body class="popanalysis"> ---- */
/* Wider text column: full-slide images and data tables. */
body.popanalysis { grid-template-columns: 250px minmax(0, 860px); }

.popanalysis main figure { margin: 0.5rem 0 1rem; }
.popanalysis main figure img { display: block; max-width: 100%; height: auto; }   /* hand-cropped charts can be narrower than the column */

.chart-title { font-weight: 600; margin: 1.5rem 0 0; text-align: center; }
.chart-subtitle { margin: 0; text-align: center; }
.chart-title + figure, .chart-subtitle + figure { margin-top: 0.5rem; }
.popanalysis .note { font-style: italic; }
.popanalysis .small { color: var(--muted); font-size: 0.85rem; }

table.data { border-collapse: collapse; margin: 0.75rem 0 1.25rem; font-size: 0.95rem; }
table.data th, table.data td { padding: 0.3rem 0.75rem; border-bottom: 1px solid var(--border); text-align: left; }
table.data thead th { background: #e9ecef; }
.table-scroll { overflow-x: auto; }
.popanalysis main li.sub { margin-left: 1.5rem; list-style: circle; }

/* ---- Landing page: <html class="home-root"><body class="home"> ---- */
/* Styled after history.burningman.org's Census Archive page (its
   burning-man-phoenix theme, values read from its app.css and
   universal-navigation.css, November 2026): dark top bar, banner with the
   section title in Stint Ultra Expanded, Rockwell page title, Open Sans body,
   a 1000px column split 62.5% / 29% with the archive list on the right as its
   cream "section menu" in Barlow Semi Condensed, and a charcoal footer in
   Lato. No Burning Man Project logo or photo: the top bar has our name and
   the banner is our own photo, with the gradient behind it. RockwellStd is a licensed font the
   history site hosts itself, so we fall back to Rockwell where installed,
   then Roboto Slab. Report pages keep the look above. The intro comes first
   in the HTML so phones show it, then the list. Breakpoints are the theme's
   (Foundation's): 40.063em and 64.063em. */
html.home-root { font-size: 16px; }
body.home {
  --h-ink: #333;
  --h-link: #1a64a8;
  --h-link-hover: #0078a0;
  --h-title: #2c5573;
  --h-menu: #996600;
  --h-menu-top: #722426;
  --h-rockwell: "RockwellStd", Rockwell, "Rockwell Nova", "Roboto Slab", serif;
  --h-lato: Lato, "Helvetica Neue", Arial, sans-serif;
  display: block;
  padding: 0;
  color: var(--h-ink);
  font-family: "Open Sans", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
  line-height: 24px;
}
.home a { color: var(--h-link); text-decoration: none; }
.home a:hover, .home a:focus { color: var(--h-link-hover); }
.home p { line-height: 1.6; margin: 0 0 1.25rem; }

/* Top bar (history site: 6px padding, logo where our name is, on #2f2f2f;
   ours is Census pink instead, so it is this page's pink bar and there is
   not a second, empty one stacked above it) */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--pinkbar-bg, #EA008B); color: #fff;
  padding: 0.6rem 20px; min-height: 52px;
}
.topbar a, .home .topbar a:hover {
  color: #fff;
  font-family: var(--h-rockwell); font-size: 1.4rem; letter-spacing: 0.02em;
}
.topbar a { display: inline-flex; align-items: center; gap: 0.6rem; }
.topbar .seal { width: 40px; height: 40px; }
/* Right side of the bar, like the history site's DONATE NOW pill and MENU
   button (the pill hides on phones, as theirs does). */
.tab-bar { display: flex; align-items: center; gap: 15px; }
.home .pill {
  display: inline-block;
  font-family: var(--h-lato); font-size: 0.9rem; text-transform: uppercase;
  line-height: 2.1; padding: 0 15px; border: 1px solid #c4400d; border-radius: 6px;
  color: #fff;
}
.tab-bar .pill { display: none; border-color: #fff; }
.menu-toggle {
  display: flex; align-items: center; gap: 0.5rem;
  border: 0; background: transparent; color: #fff; cursor: pointer; padding: 4px;
  font-family: var(--h-lato); font-size: 15px; text-transform: uppercase;
}
.menu-toggle .title { display: none; }

/* Slide-out menu (history site: 20.625rem wide, #4b4b4b panel, #2f2f2f list
   with #6c6c6c rules, Lato 0.8rem uppercase links, 500ms slide). */
.sidenav {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1003;
  width: 20.625rem; max-width: 85vw; overflow-y: auto;
  background: #4b4b4b;
  box-shadow: -4px 0 4px rgba(0, 0, 0, 0.5);
  transform: translate3d(100%, 0, 0); visibility: hidden;
  transition: transform 500ms ease, visibility 0s linear 500ms;
}
.menu-open .sidenav { transform: none; visibility: visible; transition: transform 500ms ease; }
.sidenav-overlay { position: fixed; inset: 0; z-index: 1002; cursor: pointer; }
.sidenav-close { background: #2f2f2f; text-align: right; }
.sidenav-close button {
  border: 0; background: transparent; cursor: pointer;
  padding: 11px 1.25rem; color: #989898;
  font-family: var(--h-lato); font-size: 1.3125rem; font-weight: bold;
}
.sidenav-close button:hover, .sidenav-close button:focus-visible { color: #fff; }
.sidenav-list { list-style: none; margin: 0; padding: 0; background: #2f2f2f; border-top: 1px solid #6c6c6c; }
.sidenav-list li { border-bottom: 1px solid #6c6c6c; }
.home .sidenav-list a {
  display: block; padding: 14px 5% 12px;
  color: #fff; font-family: var(--h-lato); font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase;
}
.home .sidenav-list a:hover, .home .sidenav-list a:focus { background: #484747; color: #fff; }
.sidenav-tools { background: #3c3c3c; padding: 2rem 1.5rem 2rem 1rem; text-align: center; }
.home .sidenav-tools .pill { padding: 5px 15px; line-height: 1.5; }
.home .sidenav-tools .pill:hover, .home .sidenav-tools .pill:focus { color: #fff; background: #484747; }
@media (prefers-reduced-motion: reduce) { .sidenav, .menu-open .sidenav { transition: none; } }

/* Banner (history site: a full-width photo, at most 500px tall, with the
   section title centered 40% down in white with a dark shadow) */
.band {
  position: relative;
  height: clamp(160px, 26vw, 500px);
  background: linear-gradient(180deg, #8a5a3a 0%, #c98b5a 55%, #e2b88a 100%);
}
/* Photo: public/banner.jpg, with class="band has-photo" on the band in
   index.html (drop the class to fall back to the gradient above). The photo
   fills the banner, cropped to fit, darkened a little so the white title
   stays readable. */
.band.has-photo {
  /* The band takes the photo's own shape instead of the gradient's fixed
     height, so the whole of banner.jpg is always in frame: "Come to Your
     Census" at the top of it and the baby at the bottom. Any fixed height
     is a letterbox that cuts one or the other off, because those two sit
     430 of the photo's 498 rows apart. Keep this ratio in step with the
     file. Below about 550px wide the min-height wins and the sides crop
     instead, which both of them survive. */
  width: 100%;          /* definite, so min-height can't resolve back into width */
  height: auto;
  aspect-ratio: 1621 / 498;
  min-height: 160px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15)),
    url(banner.jpg) center / cover no-repeat,
    #8a5a3a;
}
.band-title {
  position: absolute; top: 40%; left: 0; right: 0;
  transform: translateY(-50%);
  margin: 0; padding: 0 1rem;
  font-family: "Stint Ultra Expanded", serif;
  font-size: clamp(1.5rem, 4.2vw, 60px); line-height: 1;
  color: #fff; text-align: center; text-shadow: 2px 2px 2px #232323;
}
.home .band-title { line-height: 1; margin: 0; }

/* Content column and sidebar (history site: .container.detail-page,
   #primary 62.5% + .widget-area 29.17%, each with a 4.17% left margin) */
.home .page {
  max-width: 62.5rem; margin: 0 auto;
  padding: 2.5rem 0 3rem;
  display: flow-root;
}
.home main { padding: 0 0.6rem 0 1rem; }
/* The Census logo beside the intro, floated as the history site floats its
   censuslogo.png (6px 25px 8px 0). */
.home .logo { float: left; width: 150px; height: auto; margin: 6px 25px 8px 0; }
.home h1 {
  font-family: var(--h-rockwell); font-weight: normal;
  font-size: 1.7rem; line-height: 1; color: var(--h-title);
  margin: 0.2rem 0 1.25rem;
}

.home .archive {
  margin: 1rem 0.25rem 2rem;
  background: linear-gradient(to right, #fcfbf9 0%, rgba(252, 251, 249, 0) 100%);
  border-top: 2px solid #ece4d8; border-bottom: 2px solid #ece4d8;
  padding-bottom: 1rem;
}
.archive-title {
  margin: 0; padding: 1.125rem 5px 0.75rem 0.6rem; border: 0;
  font-family: "Barlow Semi Condensed", sans-serif; font-weight: normal;
  font-size: 1.8rem; line-height: 1.1; color: var(--h-menu-top);
}
.home .reports { list-style: none; margin: 0; padding: 0 5px 0 2rem; }
.home .reports li { padding: 0 0 2px; }
.home .reports a {
  display: inline-block; padding: 0 0 5px;
  font-family: "Barlow Semi Condensed", sans-serif;
  font-size: 1.4rem; line-height: 1.1; color: var(--h-menu);
}
.home .reports a:hover, .home .reports a:focus-visible { color: var(--h-menu-top); text-decoration: underline; }
.home .reports .pdf { font-family: "Barlow Semi Condensed", sans-serif; font-size: 1.4rem; color: var(--h-menu); }
.reports li { white-space: nowrap; }   /* the hidden ", PDF" must never push a line onto two */

@media only screen and (max-width: 40em) {
  .home .logo { width: 110px; margin-right: 16px; }
}
@media only screen and (min-width: 40.063em) {
  .topbar { padding: 6px 20px; }
  .tab-bar .pill { display: inline-block; }
  .home h1 { font-size: 1.9rem; }
}
@media only screen and (min-width: 64.063em) {
  .menu-toggle .title { display: inline; }
  .home main { float: left; width: 62.5%; margin-left: 4.16667%; padding: 0 0.25rem; }
  .home .archive { float: right; width: 29.16667%; margin: 0.5rem 0 2rem 4.16667%; }
}

/* Footer (history site: #3c3c3c, Lato uppercase links in #bdbdbd) */
.footer {
  clear: both;
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem;
  background: #3c3c3c; padding: 2rem 5% 3rem;
}
.home .footer a { color: #bdbdbd; font-family: var(--h-lato); text-transform: uppercase; }
.home .footer a:hover, .home .footer a:focus { color: #fff; }
@media only screen and (min-width: 64.063em) {
  .footer { padding-left: 10%; padding-right: 10%; }
}

/* A report with both a web page and a PDF: the PDF link sits after the title
   and shows on hover or keyboard focus. It is transparent, not visibility:hidden,
   so Tab can still reach it (a hidden link can't take focus, and the title's
   blur would hide it mid-Tab). :focus-visible, not :focus-within, so a mouse
   click, which leaves the link focused, doesn't keep it showing. Touch screens
   (no hover) always show it. */
.reports .pdf { opacity: 0; }
.reports li:hover .pdf,
.reports li:has(:focus-visible) .pdf { opacity: 1; }
@media (hover: none) {
  .reports .pdf { opacity: 1; }
}

/* ---- PDF archive (public/pdf/index.html, written by bin/pdf-index) ---- */
body.files { grid-template-columns: max-content; }
.files .reports { width: max-content; max-width: 100%; }   /* sizes stay beside the names at any width or zoom */
.files .reports li { display: flex; justify-content: space-between; gap: 1.5em; }   /* sizes right-aligned */
.size { color: var(--muted); font-variant-numeric: tabular-nums; }
