/* Ecoverity — data pages. Loaded after the site stylesheet (../style.css) and adds only what the
   data pages need: chart marks the home page does not use, and a table set for numbers. */

/* The current page in the site navigation */
nav a[aria-current] { color: var(--accent); }

/* Chart marks */
.fig-dot { fill: var(--muted); }
.fig-dot.acc { fill: var(--accent); }
.bar-a { fill: var(--muted); }
.bar-b { fill: var(--rule); }
.bar-c { fill: #8DB7A0; }
.bar-d { fill: var(--accent); }

/* A page title one step down from the home page's, since it sits over a table rather than a figure */
.hero.data .wrap { grid-template-columns: minmax(0, 1fr); align-items: start; }
.hero.data h1 { font-size: clamp(34px, 5vw, 56px); }

/* Figures inside the two-column sections */
.figures { display: grid; gap: 44px; }
.split .stack p { color: var(--muted); font-size: 16px; }

/* Table of numbers: same rules as Table 1, set for figures instead of sentences */
table.numbers tbody th { font-family: var(--body); font-size: 16px; font-style: normal; font-weight: 500; white-space: normal; width: auto; }
table.numbers tbody th, table.numbers tbody td { padding: 14px 20px 14px 0; }
table.numbers td.num { font-family: var(--mono); font-size: 15px; white-space: nowrap; }
table.numbers td.big { font-family: var(--display); font-size: 23px; font-weight: 500; line-height: 1.2; white-space: nowrap; }
table.numbers td.quiet { color: var(--muted); font-size: 14.5px; white-space: nowrap; }
table.numbers thead th { white-space: nowrap; }

@media (max-width: 640px) {
  table.numbers tbody th { margin-bottom: 4px; }
  table.numbers td.num, table.numbers td.quiet { display: inline; margin-right: 12px; }
}

/* Place picker: a <details> element, so it opens and closes with no script. */
.hero.data .wrap { gap: 32px; }
.picker-block { display: grid; gap: 8px; }
.picker { position: relative; max-width: 440px; }
.picker summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border: 1px solid var(--ink); border-radius: 2px; background: var(--paper); font-size: 17px; font-weight: 500; }
.picker summary::-webkit-details-marker { display: none; }
.picker summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-top: -4px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); }
.picker[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }
.picker summary:hover { border-color: var(--accent); }
.picker .panel { position: absolute; z-index: 10; top: calc(100% + 6px); left: 0; width: min(860px, calc(100vw - 2 * var(--gutter))); padding: 22px 24px 8px; border: 1px solid var(--ink); border-radius: 2px; background: var(--paper); columns: 3 200px; column-gap: 32px; }
.picker .group { break-inside: avoid; padding-bottom: 16px; }
.picker .group .label { margin-bottom: 4px; }
.picker ul { display: block; list-style: none; margin: 0; padding: 0; }
.picker a { display: block; padding: 3px 0; font-size: 15.5px; font-weight: 400; color: var(--ink); text-decoration: none; }
.picker a:hover { color: var(--accent); text-decoration: underline; }
.picker a[aria-current] { color: var(--accent); font-weight: 600; }

/* On a narrow screen the list is one column that scrolls inside the panel. (A height limit on a
   multi-column box would push the extra columns off the side instead.) */
@media (max-width: 640px) {
  .picker { max-width: none; }
  .picker .panel { columns: auto; max-height: 60vh; overflow-y: auto; }
}

/* Geography and topic, side by side under the page title */
.chooser { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px 48px; }
.chooser .picker-block { flex: 0 1 440px; min-width: min(100%, 280px); }
.topics { display: grid; gap: 8px; }
.topics ul { gap: 4px 26px; }
.topics a { display: inline-block; padding: 12px 0; font-size: 17px; font-weight: 500; color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; }
.topics a:hover { color: var(--accent); }
.topics a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }
