/* The panel: its shell docked at the right and folded, the chips and the menu, the measure, the sentence and the rows, the reading's
   card, the views other than the chart (the table's, the groups', the findings' parts). After page.css, before charts.css. */
/* A browser moves a touch to the nearest thing it takes to be tappable, unless what is under the finger has an :active style: so a touch on
     the panel's words or rows stays where it lands and does not go to a button beside them. The map's canvas has one already. */
#panel :active {
  --pressed: 1; /* nothing reads it: the rule only has to exist and match, and an empty rule may be dropped */
}
/* The panel (web/pane.js, web/panel/panel.js): docked at the right, full height, dark in both themes, in a fixed order whatever its size:
     the head, the areas, what to measure, the answer, other ways to look. Folded, a strip. The map runs under it, so folding moves nothing on the
     map; the timeline, the column of the map's tools and the credit stand left of it. */
#panel {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--panel-w);
  display: flex;
  flex-direction: column;
  background: var(--pn-bg);
  border-left: 1px solid var(--float-rule);
  color: var(--float-ink);
  font-size: 13px;
  line-height: 1.4;
  --ink: var(--float-ink);
  --ink-2: var(--float-ink-2);
  --dim: var(--float-dim);
  --rule: var(--float-rule);
  --ctl: var(--float-ctl);
  --ctl-on: var(--float-ctl-on);
  --accent: var(--float-accent);
  --accent-text: var(--float-accent);
  --panel: var(--pn-bg);
  --card: transparent;
  --hover: var(--float-ctl);
  --bg: var(--pn-bg);
  --field: var(--pn-field);
  --field-rule: var(--pn-field-rule);
  --float-solid: var(--pn-bg);
}
#panel.folded {
  width: var(--strip-w);
}
.pn-folded {
  --panel-now: var(--strip-w);
}
#panel button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#panel :focus-visible {
  outline: 2px solid var(--float-accent);
  outline-offset: 2px;
}
#pnopen {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  padding: 14px 20px 12px;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
#pnopen[hidden],
#pnstrip[hidden] {
  display: none;
}
.pn-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pn-titles {
  flex: 1;
  min-width: 0;
}
.pn-kicker {
  margin: 0;
  font-size: 12px;
  color: var(--dim);
}
#pntitle {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.pn-icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
}
.pn-icon svg {
  width: 16px;
  height: 16px;
}
#pnbody {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 0 auto;
}
.pn-sec {
  position: relative;
  min-width: 0;
}
.pn-sec[hidden] {
  display: none;
}
.pn-sec h3,
.pn-sechead h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dim);
}
.pn-sechead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.pn-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pn-link[hidden] {
  display: none;
}
.pn-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pn-chip {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px 0 4px;
  border-radius: 15px;
  background: var(--float-ctl);
  border: 1px solid var(--rule);
  max-width: 100%;
  min-width: 0;
}
.pn-chip .badge {
  width: 20px;
  height: 20px;
  font-size: 11px;
  flex: none;
}
.pn-chipname {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.pn-chip.pending {
  background: transparent;
  border: 1px dashed var(--dim);
  color: var(--ink-2);
  padding-right: 10px;
}
.badge.next {
  background: transparent;
  border: 1px dashed var(--dim);
  color: var(--ink-2);
}
.pn-x,
.pn-mini {
  height: 24px;
  min-width: 24px;
  padding: 0 4px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  flex: none;
}
.pn-mini {
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pn-mini.off {
  opacity: 0.5;
}
.pn-add {
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
}
.pn-add[aria-expanded='true'] {
  background: var(--ink);
  color: var(--pn-bg);
}
.pn-add[aria-disabled='true'] {
  opacity: 0.55;
}
.pn-note {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--ink-2);
}
.pn-note[hidden] {
  display: none;
}
.pn-menu {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  padding: 12px;
  background: var(--pn-menu);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--pn-shadow);
}
.pn-menu[hidden] {
  display: none;
}
.pn-menu label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--ink-2);
}
#pnfind {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--field-rule);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
#pnfindlist {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}
#pnfindlist[hidden] {
  display: none;
}
#pnfindlist [role='option'] {
  min-height: 40px;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#pnfindlist [role='option'][aria-selected='true'],
#pnfindlist [role='option']:hover {
  background: var(--float-ctl);
}
#pnfindlist .sb-ctx {
  font-size: 12px;
  color: var(--ink-2);
}
#pnfindlist .sb-line {
  padding: 6px 8px;
  font-size: 12px;
  color: var(--ink-2);
}
.pn-or {
  margin: 12px 0 4px;
  font-size: 12px;
  color: var(--ink-2);
}
.pn-methods {
  display: flex;
  flex-direction: column;
}
.pn-methods button {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
}
.pn-methods button:hover {
  background: var(--float-ctl);
}
.pn-methods b {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.pn-methods small {
  display: block;
  font-size: 12px;
  color: var(--ink-2);
}
.pn-glyph {
  width: 26px;
  height: 26px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--float-ctl);
  color: var(--ink-2);
}
.pn-glyph svg {
  width: 16px;
  height: 16px;
}
.pn-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.pn-answer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#csent {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  overflow: hidden;
}
#cchart {
  position: relative;
}
/* the chart's height: what a window 900 px tall or more leaves it, so that nothing scrolls there; never under 160 px, where eight labels
   stacked would fill it and none could stand by its line (a shorter window's panel scrolls instead) */
#cchart .chart-box {
  position: relative;
  height: clamp(160px, calc(100vh - 730px), 220px);
}
.pn-rowshead {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 2px;
}
.pn-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pn-rows li {
  height: 21px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.pn-rows li.focus {
  background: var(--float-ctl);
}
.pn-rows .nm {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pn-rows .v {
  flex: none;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.pn-rows .v.none {
  font-weight: 400;
  color: var(--ink-2);
}
.pn-viewhead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.pn-viewhead h3 {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}
.pn-viewhead h3:focus {
  outline: none;
}
.pn-tablewrap {
  overflow-x: auto;
}
.pn-others {
  margin-top: auto;
}
.pn-grid,
.pn-mapmore {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 8px;
}
.pn-mapmore {
  margin-top: 6px;
}
.pn-mapmore[hidden] {
  display: none;
}
.pn-grid button,
.pn-mapmore button {
  min-width: 0;
  white-space: normal;
  min-height: 44px;
  padding: 4px 8px;
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.3;
}
.pn-grid button:hover,
.pn-mapmore button:hover,
.pn-grid button[aria-pressed='true'],
.pn-mapmore button[aria-pressed='true'] {
  background: var(--float-ctl);
  color: var(--ink);
}
#pnstrip {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  overflow: hidden;
}
#pnstripbadges {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#pnstripbadges .badge {
  width: 22px;
  height: 22px;
  font-size: 11px;
}
#pnstriptitle {
  margin: 10px 0 0;
  writing-mode: vertical-rl;
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
}
#panel.stale #pnmain {
  opacity: 0.45;
}
#panel.waiting .pn-head::after {
  content: '';
  position: absolute;
  left: 20px;
  right: 20px;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--float-accent), transparent);
  animation: pn-wait 1.2s linear infinite;
}
@keyframes pn-wait {
  from {
    transform: translateX(-30%);
  }
  to {
    transform: translateX(30%);
  }
}
.nohud,
.touring {
  --panel-now: 0px;
}
.embed .nohud.embed-compare {
  --panel-now: var(--panel-w);
}
.nohud #modebar,
.nohud #modetag,
.nohud #reading,
.touring #reading {
  display: none;
}
/* the map beside the panel: the timeline, the column of the map's tools and the credit stand left of it */
#foot {
  right: var(--panel-now);
}
#mapcorner {
  right: calc(var(--panel-now) + var(--gutter) - 4px);
}
/* a way of adding from the map: the banner at the top of the map, with its way out */
#modebar {
  position: absolute;
  z-index: 6;
  top: 16px;
  left: calc((100% - var(--panel-now)) / 2);
  transform: translateX(-50%);
  max-width: calc(100% - var(--panel-now) - 32px);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 6px 6px 6px 16px;
  background: var(--mode-bg);
  color: var(--mode-ink);
  border-radius: 10px;
  box-shadow: var(--pn-shadow);
  --ink: var(--mode-ink);
  --ink-2: var(--mode-dim);
  --dim: var(--mode-dim);
  --ctl: transparent;
  --rule: var(--mode-dim);
}
#modebar[hidden] {
  display: none;
}
#modetext {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
}
#modetext[hidden],
#modeesc[hidden],
#modedone[hidden],
#sessbar[hidden] {
  display: none;
}
#modeesc {
  font-size: 12px;
  color: var(--mode-dim);
}
/* a key is named only where there is one to press: a finger has Done beside it */
@media (pointer: coarse) {
  #modeesc {
    display: none;
  }
}
#modedone {
  height: 34px;
  padding: 0 14px;
  border-radius: 7px;
  border: 0;
  background: var(--mode-ink);
  color: var(--mode-bg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
#modebar.session {
  padding: 6px 10px;
}
/* the measuring tool's own buttons for a shape (undo, redo, cancel, finish), in the banner; the banner says what to do */
#measurehost {
  display: flex;
  align-items: center;
}
#measurehost:not(:has(.selection-on)) {
  display: none;
}
#modebar .selection-ui {
  position: static;
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  max-height: none;
  overflow: visible;
  background: none;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
  box-shadow: none;
  font-size: 12px;
  color: var(--mode-ink);
}
#modebar .selection-ui:not(.selection-on),
#modebar .selection-instruction {
  display: none;
}
#modebar .selection-draw {
  display: flex;
  gap: 4px;
  padding: 0;
  margin: 0;
}
#modebar .selection-draw button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid var(--mode-dim);
  color: var(--mode-ink);
  font-size: 12px;
}
#modebar .selection-draw [data-done] {
  background: var(--mode-ink);
  border-color: var(--mode-ink);
  color: var(--mode-bg);
  font-weight: 600;
}
#modebar .sess-row button.main {
  background: var(--mode-ink);
  border-color: var(--mode-ink);
  color: var(--mode-bg);
}
#modebar .selection-draw button[disabled] {
  opacity: 0.45;
  cursor: default;
}
#modetag {
  position: absolute;
  z-index: 6;
  left: 0;
  top: 0;
  padding: 6px 10px;
  background: var(--rd-bg);
  border: 1px solid var(--float-ink);
  border-radius: 8px;
  color: var(--float-ink);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}
#modetag span {
  color: var(--float-dim);
}
#modetag.taken {
  border-color: var(--float-dim);
}
#modetag[hidden] {
  display: none;
}
/* the reading at a point: beside it, a dot at the point */
#reading {
  position: absolute;
  z-index: 5;
  left: 0;
  top: 0;
  width: 268px;
  padding: 12px 14px;
  background: var(--rd-bg);
  /* a keyline, as every piece that stands on the map has: its edge shows over dark ground and bright alike (tests/legible.test.mjs) */
  border: 1px solid var(--rd-edge);
  border-radius: 10px;
  color: var(--float-ink);
  box-shadow: var(--shadow);
  --ink: var(--float-ink);
  --ink-2: var(--float-ink-2);
}
#reading[hidden] {
  display: none;
}
/* the pin's card: small, on glass, with the size stops under the number */
.ui #reading {
  width: 236px;
  padding: 8px 12px 10px;
  background: color-mix(in srgb, var(--rd-bg) 90%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  backdrop-filter: blur(20px) saturate(1.3);
}
.ui #reading .rd-row {
  margin-top: 8px;
}
.rd-stops {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr 1.5fr 1.5fr;
  gap: 4px;
  margin-top: 8px;
}
.rd-stops button {
  height: 28px;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--float-rule);
  border-radius: 14px;
  background: var(--float-ctl);
  color: var(--float-ink-2);
  font:
    500 12px/1 Inter,
    system-ui,
    sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
.rd-stops button[aria-pressed='true'] {
  background: var(--float-ink);
  color: var(--pane-solid);
  border-color: transparent;
  font-weight: 600;
}
.rd-stops button:disabled {
  opacity: 0.38;
  cursor: default;
}
#reading::before {
  content: '';
  position: absolute;
  left: calc(var(--dot-x, -20px) - 7px);
  top: calc(var(--dot-y, 20px) - 7px);
  width: 14px;
  height: 14px;
  border-radius: 7px;
  background: var(--float-ink);
  box-shadow: 0 0 0 3px var(--rd-ring);
  pointer-events: none;
}
#reading.live {
  pointer-events: none;
}
.rd-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.rd-head > div {
  flex: 1;
  min-width: 0;
}
.rd-title {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.rd-sub,
.rd-unit,
.rd-hint {
  margin: 0;
  font-size: 12px;
  color: var(--float-ink-2);
}
.rd-x {
  width: 28px;
  height: 28px;
  margin: -4px -6px 0 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--float-ink-2);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.rd-value {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rd-value.none {
  font-size: 15px;
  font-weight: 500;
}
.rd-hint {
  margin-top: 8px;
}
.rd-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.rd-add {
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--float-ink);
  background: var(--float-ink);
  color: var(--mark-on);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.rd-added {
  font-size: 12px;
  color: var(--float-ink-2);
}
.rd-sv {
  height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  border: 1px solid var(--float-rule);
  color: var(--float-ink);
  font-size: 12px;
  text-decoration: none;
}
/* read-only, as an essay frames it: nothing to change */
#panel.readonly .pn-head .pn-icon,
#panel.readonly .pn-x,
#panel.readonly .pn-mini,
#panel.readonly #pnrestore,
#panel.readonly #pnmeasure,
#panel.readonly #pnothers {
  display: none;
}
.chart-name {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  right: 0;
  pointer-events: none;
  font-size: 12px;
  line-height: 1.25;
  color: var(--ink);
  text-shadow:
    0 0 3px var(--float-solid),
    0 0 2px var(--float-solid);
  overflow-wrap: anywhere;
}
.chart-name .badge {
  width: 13px;
  height: 13px;
  font-size: 8.5px;
  margin-right: 4px;
  vertical-align: -2px;
}
#areatag {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  max-width: min(260px, 70vw);
  padding: 2px 8px;
  min-height: 24px;
  border-radius: 12px;
  background: var(--float-bg);
  border: 1px solid var(--float-rule);
  color: var(--float-ink);
  font-size: 12px;
  line-height: 1.2;
  will-change: transform;
  pointer-events: none;
}
#areatag .x {
  pointer-events: auto;
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  margin: -2px -8px -2px 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  color: var(--float-ink-2);
  font-size: 16px;
  line-height: 1;
}
#areatag .x::before {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
}
/* a compared area's colour and number (or group letter): badges in the rows and the table */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font:
    600 10px/1 Inter,
    system-ui,
    sans-serif;
  margin-right: 5px;
  vertical-align: -3px;
}
.badge.cur {
  box-shadow: inset 0 0 0 2px var(--ink);
}
.badge.s0 {
  background: var(--s0);
  color: var(--s0-on);
}
.badge.s1 {
  background: var(--s1);
  color: var(--s1-on);
}
.badge.s2 {
  background: var(--s2);
  color: var(--s2-on);
}
.badge.s3 {
  background: var(--s3);
  color: var(--s3-on);
}
.badge.s4 {
  background: var(--s4);
  color: var(--s4-on);
}
.badge.s5 {
  background: var(--s5);
  color: var(--s5-on);
}
.badge.s6 {
  background: var(--s6);
  color: var(--s6-on);
}
.badge.s7 {
  background: var(--s7);
  color: var(--s7-on);
}
.badge.gA {
  background: var(--gA);
  color: var(--gA-on);
}
.badge.gB {
  background: var(--gB);
  color: var(--gB-on);
}
.badge.sm {
  width: 14px;
  height: 14px;
  font-size: 9px;
}
/* The parts: type 13 body and section heads, 12 notes and controls, 11 captions and table heads, 10 chart
     labels. A section is a head and what follows; a switch is .seg, one pressed; numbers come from format.js. */
#panel h3 {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: 600;
}
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 18px 0 4px;
}
/* sections: stacked while narrow, side by side in columns of at least 300 px as the panel widens */
.regions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px 10px;
  align-items: start;
}
/* a region is a card: one step lighter than the panel, a faint lit top edge */
.region {
  min-width: 0;
  background: var(--card);
  border-radius: 12px;
  padding: 10px 12px 12px;
  box-shadow: inset 0 1px 0 var(--card-edge);
}
.region > .sec-head:first-child {
  margin-top: 0;
}
.region > :first-child:not(.sec-head) {
  margin-top: 0;
}
@container (min-width:640px) {
  .regions {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}
@container (min-width:980px) {
  .region.wide {
    grid-column: span 2;
  }
}
.sec-head .count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 12px;
  color: var(--dim);
  text-align: right;
}
/* a note: small text under what it is about */
.note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--dim);
}
.note p {
  margin: 0;
}
.note p + p {
  margin-top: 6px;
}
.meta {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--dim);
  line-height: 1.4;
}
.lead {
  margin: 8px 0 0;
  font-size: var(--fs-body);
  color: var(--ink-2);
  line-height: 1.45;
}
.cap {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--dim);
}
.live {
  margin: 8px 0 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--hover);
  font-size: 12px;
}
.link {
  all: unset;
  cursor: pointer;
  font-size: 12px;
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link:focus-visible {
  outline: 2px solid var(--accent);
}
/* switches: one pressed, raised */
.seg {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 9px;
  background: var(--ctl);
  margin-top: 8px;
  min-width: 0;
}
.seg button {
  flex: 1;
  min-height: 26px;
  border: 0;
  border-radius: 7px;
  background: none;
  font-size: 12px;
  color: var(--dim);
  box-shadow: none;
  padding: 0 6px;
  white-space: nowrap;
  line-height: 1.2;
}
.seg button[aria-pressed='true'] {
  background: var(--ctl-on);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
@media (hover: hover) {
  .seg button:hover {
    color: var(--ink);
    border-color: transparent;
  }
}
.seg .badge {
  margin: 0;
}
.seg.modes button.ic {
  padding: 0 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.seg.modes button.ic:first-of-type {
  margin-left: 6px;
}
.seg.modes svg {
  width: 13px;
  height: 13px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.ctl {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.ctl > .seg {
  flex: 1;
}
/* Street View: the pointer becomes a pin while the next tap on the map opens Google Street View there; a quiet line at the map's top says so */
.sv-mode #gl {
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='32' viewBox='0 0 24 32'%3E%3Cpath d='M12 31C12 31 2.5 18.6 2.5 11.5a9.5 9.5 0 0 1 19 0C21.5 18.6 12 31 12 31z' fill='%23f2a64a' stroke='%23171a1d' stroke-width='1.6'/%3E%3Ccircle cx='12' cy='11.5' r='3.6' fill='%23171a1d'/%3E%3C/svg%3E")
      12 31,
    crosshair;
}
#svhint {
  position: absolute;
  z-index: 6;
  /* beside the column, by the button that asked for it, clear of the window above */
  right: calc(var(--gutter) + 48px);
  bottom: calc(var(--foot-h, 44px) + 8px);
  max-width: min(420px, calc(100% - 120px));
  margin: 0;
  padding: 6px 6px 6px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  background: var(--float-bg);
  border: 1px solid var(--float-rule);
  box-shadow: var(--shadow);
  color: var(--float-ink);
  font-size: 13px;
  line-height: 1.35;
}
#svhint[hidden] {
  display: none;
}
/* Play the tour: on the map where a visit with no address rests, centred low in what the panel leaves (web/map.js, showTour) */
#tourplay {
  position: absolute;
  z-index: 6;
  left: calc((100vw - var(--panel-now)) / 2);
  bottom: calc(var(--foot-h, 44px) + 28px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px 0 16px;
  border-radius: 22px;
  border: 1px solid var(--float-rule);
  background: var(--float-bg);
  box-shadow: var(--shadow);
  color: var(--float-ink);
  font:
    600 15px/1 Inter,
    system-ui,
    sans-serif;
  white-space: nowrap;
  cursor: pointer;
  animation: tour-in 0.6s ease-out both;
}
#tourplay svg {
  width: 16px;
  height: 16px;
}
#tourplay[hidden],
.nohud #tourplay,
.touring #tourplay {
  display: none;
}
@keyframes tour-in {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  #tourplay {
    animation: none;
  }
}
#svcancel {
  flex: none;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--float-rule);
  background: var(--float-ctl);
  color: var(--float-ink);
  font-size: 13px;
}
/* Add: a small tray beside the window, from its +, only while adding. A few words, no sentence; it keeps one height
     from the first press to the last point, so it never moves under a finger. */
#measurehost {
  min-height: 28px;
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
  color: var(--ink-2);
}
#measurehost {
  display: flex;
  align-items: center;
  gap: 8px;
}
#measurehost:not(:has(.selection-on)) {
  display: none;
}
#sessbar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#sessbar[hidden] {
  display: none;
}
.sess-say {
  margin: 0;
  padding: 0 2px;
  font-size: 12px;
  line-height: 1.25;
  color: var(--ink-2);
}
.sess-row {
  display: flex;
  gap: 4px;
}
.sess-row button {
  flex: 1 1 auto;
  min-height: 30px;
  padding: 0 6px;
  border-radius: 14px;
  background: var(--ctl);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 12px;
}
.sess-row button.main {
  background: var(--float-ink);
  border-color: var(--float-ink);
  color: var(--float-solid);
  font-weight: 600;
}
.sess-row button[disabled] {
  opacity: 0.45;
  cursor: default;
}
/* the subject's part: what is read under the pointer or the +, then its figures and the chart */
/* a spot or a searched place: Google Street View at that point, a plain link to a new tab */
#depth > .regions + .regions {
  margin-top: 8px;
}
/* compared areas. In the figure: a grid of badges and numbers. At the ends of the chart's lines once there is room. In the list: their names. */
ol.items {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
}
ol.items li {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  margin: 0 -4px;
  padding: 0 4px;
  border-bottom: 1px solid var(--rule);
  border-radius: 6px;
}
ol.items li.focus {
  background: var(--ctl);
}
ol.items .badge {
  margin-right: 0;
}
ol.items.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  column-gap: 8px;
  margin: 0;
}
ol.items.grid li {
  min-height: 19px;
  border: 0;
  margin: 0;
  padding: 0;
  gap: 3px;
}
ol.items.grid .it-name {
  display: none;
}
ol.items.grid .v {
  margin-left: 0;
  padding-left: 0;
  font-size: 12px;
}
ol.items.names {
  margin: 0;
}
ol.items.names li {
  cursor: pointer;
  margin: 0;
  padding: 0 2px;
}
ol.items .it-name small {
  display: block;
  color: var(--dim);
  font-size: 12px;
}
ol.items .cp {
  width: auto;
  padding: 0 7px;
  margin-right: 2px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
/* Groups: the areas on one row, either side of a line; a tap moves one across */
.lanes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  align-items: center;
}
.lane {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 2px;
  min-height: 36px;
  padding: 0 8px;
}
.lane + .lane {
  border-left: 1px solid var(--rule);
}
.lane > b {
  margin-right: 4px;
  font-size: 13px;
}
.flip {
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.flip .badge {
  margin: 0;
}
@media (pointer: coarse) {
  .flip {
    min-width: 44px;
    min-height: 44px;
  }
}
ol.items .cp[disabled] {
  opacity: 0.35;
}
ol.items .v {
  flex: none;
  margin-left: auto;
  padding-left: 6px;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.it-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
/* ranked lists and findings: a line each */
ol.rank,
ol.facts {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}
ol.rank li button,
ol.facts li button {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  font-size: var(--fs-body);
}
ol.facts li button {
  display: block;
  padding: 7px 0;
  color: var(--ink-2);
  line-height: 1.45;
}
ol.rank li button:hover,
ol.facts li button:hover {
  background: var(--hover);
}
ol.rank li button:focus-visible,
ol.facts li button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
ol.rank .nm {
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
ol.rank .nm small,
ol.rank .v small {
  display: block;
  text-decoration: none;
  color: var(--dim);
  font-size: 12px;
}
ol.rank .v {
  white-space: nowrap;
  color: var(--ink-2);
  text-align: right;
}
.sw {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: -1px;
  box-shadow: inset 0 0 0 1px var(--rule);
}
