/* The charts and the table: a chart over time and over distance, a measure's start, the line-end labels, the turned table, the pin
   beside the comparison, the readout. After panel.css, before overlay.css. */
/* charts (pane.js): over time and over distance, one look */
.chart-box {
  position: relative;
  margin-top: 6px;
  user-select: none;
  -webkit-user-select: none;
}
svg.chart {
  display: block;
  overflow: visible;
  cursor: crosshair;
  touch-action: pan-y;
}
svg.chart text {
  fill: var(--dim);
  font:
    400 10px Inter,
    system-ui,
    sans-serif;
  font-variant-numeric: tabular-nums;
}
svg.chart .line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
svg.chart .proj {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-dasharray: 4 3;
  opacity: 0.7;
}
svg.chart .line.then {
  stroke: var(--dim);
  stroke-width: 1.3;
}
svg.chart .top-l {
  font-size: 12px;
  font-weight: 600;
  fill: var(--ink-2);
}
svg.chart .proj-shade {
  fill: var(--ink);
  fill-opacity: 0.05;
  stroke: none;
}
/* the measure as one chip with its menu (its heading names the section for a screen reader and is not drawn), and the other ways to
   look as a quiet list */
.pn-mpick {
  position: relative;
}
#pnmeasure > h3 {
  display: none;
}
#pnmchip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--float-rule);
  border-radius: 16px;
  background: var(--float-ctl);
  color: var(--float-ink);
  font:
    500 14px/1 Inter,
    system-ui,
    sans-serif;
  cursor: pointer;
}
#pnmmenu {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 36px;
  width: min(100%, 320px);
  padding: 0 8px 8px;
  border: 1px solid var(--float-rule);
  border-radius: 10px;
  background: var(--pn-menu, var(--surface));
  box-shadow: var(--shadow);
}
#pnmmenu p {
  margin: 12px 4px 4px;
  font:
    600 12px/1.3 Inter,
    system-ui,
    sans-serif;
  color: var(--float-dim);
}
#pnmmenu button {
  display: block;
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--float-ink);
  font:
    400 14px/1.3 Inter,
    system-ui,
    sans-serif;
  text-align: left;
  cursor: pointer;
}
#pnmmenu button:hover {
  background: var(--hover);
}
#pnmmenu button[aria-checked='true'] {
  background: var(--float-ctl);
  font-weight: 600;
}
.ui #panel .pn-grid {
  display: block;
}
.ui #panel .pn-grid button {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--float-rule);
  border-radius: 0;
  background: none;
  color: var(--float-ink);
  font:
    400 14px/1.3 Inter,
    system-ui,
    sans-serif;
  text-align: left;
}
.ui #panel .pn-grid button[aria-pressed='true'] {
  font-weight: 600;
}
/* a measure's own start, on its chart: the years before it shaded, a grip on the axis to drag it by */
svg.chart .pre-shade {
  fill: var(--ink);
  fill-opacity: 0.05;
  stroke: none;
}
svg.chart .start {
  cursor: ew-resize;
  touch-action: none;
}
svg.chart .start-l {
  stroke: var(--ink-2);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}
svg.chart .start-hit {
  fill: transparent;
  stroke: none;
  pointer-events: all;
}
svg.chart .start-grip {
  fill: var(--ink);
  stroke: var(--bg);
  stroke-width: 1.5;
}
svg.chart .start-ridge {
  stroke: var(--bg);
  stroke-width: 1;
  fill: none;
}
svg.chart .area {
  fill: var(--ink);
  opacity: 0.07;
}
svg.chart .axis {
  fill: none;
  stroke: var(--rule);
}
svg.chart .grid {
  stroke: var(--rule);
  stroke-dasharray: 2 3;
}
/* The playhead and its dots, laid over the chart (web/pane.js, playheadHtml): each a small layer of its own, moved by transform, so following
   the year moves layers and repaints nothing. Drawn by the same rules as the chart's own marks. */
.ph {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.ph svg {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  overflow: visible;
  will-change: transform;
}
svg.chart .head,
.ph .head {
  stroke: var(--accent);
  stroke-width: 1.2;
}
svg.chart .dot,
.ph .dot {
  fill: var(--accent);
  stroke: var(--panel);
  stroke-width: 1.5;
}
svg.chart .dot.ink,
.ph .dot.ink {
  fill: var(--ink);
  stroke-width: 1;
}
svg.chart .hit {
  fill: transparent;
  pointer-events: all;
}
svg.chart .hyear {
  fill: var(--ink);
  font-weight: 600;
}
/* a line's end: its badge and its number, in a column the chart keeps for them */
svg.chart .lab {
  cursor: pointer;
}
svg.chart .lab-hit {
  fill: transparent;
  pointer-events: all;
}
svg.chart .lab .v {
  fill: var(--ink);
  font-weight: 600;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
svg.chart .lab .v.none {
  font-weight: 400;
  fill: var(--ink-2);
}
svg.chart .lab .n {
  fill: var(--ink-2);
  font-size: 12px;
}
svg.chart .lab-t {
  font:
    600 9px Inter,
    system-ui,
    sans-serif;
  text-anchor: middle;
}
svg.chart .lab-l {
  fill: none;
  stroke-width: 1;
  opacity: 0.6;
}
svg.chart .lab-b,
svg.chart .lab-t {
  stroke: none !important;
}
svg.chart .lab-b.s0 {
  fill: var(--s0);
}
svg.chart .lab-b.s1 {
  fill: var(--s1);
}
svg.chart .lab-b.s2 {
  fill: var(--s2);
}
svg.chart .lab-b.s3 {
  fill: var(--s3);
}
svg.chart .lab-b.s4 {
  fill: var(--s4);
}
svg.chart .lab-b.s5 {
  fill: var(--s5);
}
svg.chart .lab-b.s6 {
  fill: var(--s6);
}
svg.chart .lab-b.s7 {
  fill: var(--s7);
}
svg.chart .lab-b.gA {
  fill: var(--gA);
}
svg.chart .lab-b.gB {
  fill: var(--gB);
}
svg.chart .lab-t.s0 {
  fill: var(--s0-on);
}
svg.chart .lab-t.s1 {
  fill: var(--s1-on);
}
svg.chart .lab-t.s2 {
  fill: var(--s2-on);
}
svg.chart .lab-t.s3 {
  fill: var(--s3-on);
}
svg.chart .lab-t.s4 {
  fill: var(--s4-on);
}
svg.chart .lab-t.s5 {
  fill: var(--s5-on);
}
svg.chart .lab-t.s6 {
  fill: var(--s6-on);
}
svg.chart .lab-t.s7 {
  fill: var(--s7-on);
}
svg.chart .lab-t.gA {
  fill: var(--gA-on);
}
svg.chart .lab-t.gB {
  fill: var(--gB-on);
}
svg.chart.focusing .lab:not(.focus) {
  opacity: 0.45;
}
svg.chart .hover {
  stroke: var(--dim);
  stroke-width: 1;
  stroke-dasharray: 2 2;
}
svg.chart .hdot {
  fill: var(--panel);
  stroke: var(--ink);
  stroke-width: 1.6;
}
svg.chart .hdot.then {
  stroke: var(--dim);
}
/* the table turned: a measure a row, an area a column (or a card an area, from four) */
table.cmp-turned {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--fs-body, 14px);
}
table.cmp-turned th,
table.cmp-turned td {
  padding: 8px 4px;
  border-bottom: 1px solid var(--float-rule, var(--rule));
  vertical-align: middle;
}
table.cmp-turned thead th {
  text-align: right;
  font-weight: 600;
  overflow-wrap: anywhere;
}
table.cmp-turned thead th:first-child,
table.cmp-turned tbody th {
  width: 44%;
  text-align: left;
  font-weight: 400;
  color: var(--float-ink-2, var(--ink-2));
}
table.cmp-turned thead th .badge {
  margin-left: auto;
  margin-right: 4px;
}
table.cmp-turned td {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
table.cmp-turned tr.area td {
  font-weight: 400;
}
.cmp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.cmp-card {
  padding: 8px 12px;
  border: 1px solid var(--float-rule, var(--rule));
  border-radius: 8px;
}
.cmp-card h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}
.cmp-card h4 small {
  margin-left: auto;
  font-weight: 400;
  color: var(--float-dim, var(--dim));
}
.cmp-card dl {
  margin: 0;
}
.cmp-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--float-rule, var(--rule));
}
.cmp-card dt {
  color: var(--float-ink-2, var(--ink-2));
}
.cmp-card dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
/* the pin beside the comparison: read, not yet kept, so faint and dashed */
svg.chart .line.pin,
svg.chart .proj.pin {
  stroke: var(--ink);
  stroke-dasharray: 4 3;
  opacity: 0.75;
}
svg.chart .lab-b.pin {
  fill: var(--ctl);
}
svg.chart .lab-t.pin {
  fill: var(--ink);
}
.badge.pin {
  background: none;
  color: var(--ink);
  border: 1px dashed var(--ink-2);
}
svg.chart .s0,
.ph .s0 {
  stroke: var(--s0);
}
svg.chart .s1,
.ph .s1 {
  stroke: var(--s1);
}
svg.chart .s2,
.ph .s2 {
  stroke: var(--s2);
}
svg.chart .s3,
.ph .s3 {
  stroke: var(--s3);
}
svg.chart .s4,
.ph .s4 {
  stroke: var(--s4);
}
svg.chart .s5,
.ph .s5 {
  stroke: var(--s5);
}
svg.chart .s6,
.ph .s6 {
  stroke: var(--s6);
}
svg.chart .s7,
.ph .s7 {
  stroke: var(--s7);
}
svg.chart .gA,
.ph .gA {
  stroke: var(--gA);
}
svg.chart .gB,
.ph .gB {
  stroke: var(--gB);
}
svg.chart .band {
  stroke: none;
  opacity: 0.92;
}
svg.chart .band.proj {
  opacity: 0.45;
}
.chart-read.one {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.chart-read.one .v {
  font-weight: 600;
  color: var(--ink);
}
svg.chart.focusing .line:not(.focus),
svg.chart.focusing .proj:not(.focus),
svg.chart.focusing .dot:not(.focus),
.ph.focusing .dot:not(.focus) {
  opacity: 0.22;
}
svg.chart .line.focus {
  stroke-width: 2.8;
}
svg.chart .dot.s0,
.ph .dot.s0 {
  fill: var(--s0);
}
svg.chart .dot.s1,
.ph .dot.s1 {
  fill: var(--s1);
}
svg.chart .dot.s2,
.ph .dot.s2 {
  fill: var(--s2);
}
svg.chart .dot.s3,
.ph .dot.s3 {
  fill: var(--s3);
}
svg.chart .dot.s4,
.ph .dot.s4 {
  fill: var(--s4);
}
svg.chart .dot.s5,
.ph .dot.s5 {
  fill: var(--s5);
}
svg.chart .dot.s6,
.ph .dot.s6 {
  fill: var(--s6);
}
svg.chart .dot.s7,
.ph .dot.s7 {
  fill: var(--s7);
}
svg.chart .dot.gA,
.ph .dot.gA {
  fill: var(--gA);
}
svg.chart .dot.gB,
.ph .dot.gB {
  fill: var(--gB);
}
/* the readout under a chart: what is read, then a row per line */
.chart-read {
  margin-top: 4px;
  font-size: 12px;
}
.cr-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-height: 17px;
  font-size: 12px;
  color: var(--dim);
}
.cr-head b {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.chart-read.reading .cr-head b {
  color: var(--accent-text);
}
.cr-row {
  display: flex;
  align-items: center;
  padding: 2px 0;
  border-top: 1px solid var(--rule);
}
.cr-row .badge {
  margin-right: 6px;
}
.cr-row .nm {
  flex: 1;
  min-width: 0;
  color: var(--ink-2);
  line-height: 1.25;
}
.cr-row .v {
  flex: none;
  margin-left: 8px;
  color: var(--ink);
  font-weight: 600;
}
.cr-swatch {
  display: inline-block;
  flex: none;
  width: 12px;
  height: 3px;
  border-radius: 2px;
  margin-right: 6px;
  background: var(--ink);
}
.cr-swatch.then {
  background: var(--dim);
}
.chart-read.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 14px;
}
.chart-read.grid .cr-head {
  grid-column: 1/-1;
}
.chart-read.grid .cr-swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.link.more {
  display: inline-block;
  margin-top: 8px;
}
/* the window's small chart: no axis, no reading of its own */
svg.chart.mini {
  cursor: inherit;
  pointer-events: none;
  touch-action: auto;
}
svg.chart.mini .lab {
  pointer-events: auto;
}
svg.chart .lab-s {
  stroke: none !important;
}
/* lines on the dark window: a casing keeps the darker series legible, in their own colours */
#panel svg.chart .casing,
#sheet svg.chart .casing {
  fill: none;
  stroke: var(--float-casing);
  stroke-width: 3.4;
  stroke-linejoin: round;
}
#panel svg.chart .casing.dashed,
#sheet svg.chart .casing.dashed {
  stroke-dasharray: 4 3;
}
#panel svg.chart .plot,
#sheet svg.chart .plot {
  fill: var(--float-plot);
}
.no-chart {
  margin: 8px 0 4px;
  padding: 14px 10px;
  border: 1px dashed var(--rule);
  border-radius: 8px;
  text-align: center;
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--ink-2);
}
ol.items .v.none {
  font-weight: 400;
  font-size: var(--fs-small);
  color: var(--ink-2);
}
/* the compared areas in numbers: every measure a row, every area a column under its badge */
.cmp-rows {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 4px;
  font-size: 12px;
}
.cmp-rows th,
.cmp-rows td {
  padding: 4px 3px;
  text-align: right;
  font-weight: 400;
}
.cmp-rows thead th {
  vertical-align: bottom;
  border-bottom: 1px solid var(--rule);
  font-size: 12px;
  line-height: 1.25;
  color: var(--ink-2);
}
.cmp-rows thead th:first-child {
  width: 36%;
  text-align: left;
}
.cmp-rows tbody th {
  text-align: left;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  white-space: normal;
}
.cmp-rows tbody th .badge {
  float: left;
  margin: 1px 5px 8px 0;
}
.cmp-rows tbody th span {
  display: block;
  overflow: hidden;
}
.cmp-rows tbody th small {
  display: block;
  color: var(--dim);
  font-size: 12px;
}
.cmp-rows tbody td {
  font-weight: 600;
  font-size: 12.5px;
  vertical-align: top;
  white-space: nowrap;
}
.cmp-rows tbody tr {
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.cmp-rows .focus {
  background: var(--ctl);
}
.table-which {
  margin: 0;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
