/* whiteknights-trees.css, by Jonathan Gregory, derived from Studio Lift */
@import url("https://fonts.googleapis.com/css2?family=Alegreya+Sans:ital,wght@0,100;0,300;0,400;0,500;0,700;0,800;0,900;1,100;1,300;1,400;1,500;1,700;1,800;1,900&display=swap");
:root {
  --black: hsl(0, 0%, 12%);
  --white: hsl(0, 0%, 100%);
  --selected-accent: hsl(131, 71%, 40%);
  --possible-accent: hsl(42, 100%, 50%);
  --slight-accent: Gainsboro; /* #e0e0e0; */
  --text-default: var(--black);
  --text-inverted: var(--white);
  --text-secondary: hsl(0, 0%, 35%);
  --background-leftend: var(--white);
  --background-rightend: #F7F0F5;
  --reading-red: #D8131D;
  --mid-red: #EB8189; /* mean of background-rightend and reading-red */
  --winter-color: SaddleBrown;
  --spring-color: #00E020;
  --summer-color: Green;
  --autumn-color: DarkOrange;
  --body-font: "Alegreya Sans", sans-serif;
  --display-font: "Alegreya Sans", sans-serif;
  --tree-label-font: Arial, Helvetica;
  --small-radius: 4px;
  --medium-radius: 10px;
  --small-gap: 0.5rem;
  --gap: 1rem;
  --large-gap: 3rem;
  --map-legend-height: 2rem; /* > iconsize */
  --body-padding: 1rem;
  --body-margin: 0.5rem;
  --block-margin: 1rem; /* below header, above footer, between major blocks */
  --outer-block-gap: 0.75rem; /* above header, below footer */
  --nav-arrow-padding: 0.75rem;
  --nav-arrow-width: 3rem;
  --menu-height: 2.2rem;
}
@media (min-width: 501px) {
  :root {
    --body-padding: 2rem;
    --body-margin: 1rem;
  }
}

/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  box-sizing: border-box;
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  line-height: 1.3;
  position: relative;
  font-family: var(--display-font);
  background-color: var(--background-rightend);
  color: var(--text-default);
/* display: flex; flex-direction: column; */ /* now in inner div */
  width: 100%;
  overflow-x: hidden; /* ineffective in @media max-width:, don't know why */
  container-type: inline-size;
  container-name: body;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Includes the embedded tree page but not the map page, prevents vertical scollbar */
body:not(:has(div.main_content_flexbox)) {
  box-sizing: border-box;
  width: 100%;
}
@media (min-width: 1025px) {
/* This condition excludes the map page and the embedded tree page, but it's too complicated! */
  body:has(div.main_content_flexbox):not(:has(div.main_content_flexbox > div.map_container)) {
    box-sizing: border-box;
/* NB not 100vw because that includes the vertical scrollbar */
    width: max(100%, calc(1300px + 2rem + 2*var(--body-padding)));
    overflow-x: auto;
  }
}
body:not(:has(header)) {
  padding-top: var(--body-margin);
}

.body_high {
  height: 100vh; /* shouldn't exceed vw so no need for horizontal scrollbar */
}
@media (min-width: 1025px) {
  @container body (width>100vw) {
    body > div.body_high { /* not for body.body_high because container reqd */
      height: calc(100vh - 20px); /* 20px allows for horizontal scrollbar */
    }
  }
}
div.body_high {
  display: flex;
  flex-direction: column;
}

.body_padding:not(.body_padding .body_padding) {
  padding-inline: var(--body-padding);
}

hr {
  border: none;
  height: 2px;
  background-color: var(--mid-red);
  margin: 0px;
  padding: 0px;
  margin-block: var(--block-margin);
}
@container body (width > 0px) {
  hr { width: 100cqi; }
}

ol, ul {
  list-style: none;
}

blockquote, q {
  quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
  content: "";
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

*/
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* This messes up Leaflet markers
*:first-child {
  margin-block-start: 0 !important;
}
*/

/* I don't know what this does either
*:last-child {
  margin-block-end: 0 !important;
}
*, *:before, *:after {
  box-sizing: inherit;
}
*/

:where(.is-layout-flex) {
  gap: 1rem;
}

img {
  display: inline-block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5 {
  margin-block: 2rem 0px;
  line-height: 1.1;
  text-wrap: pretty;
}

h1 + h2, h2 + h3, h3 + h4, h4 + h5 {
  margin-block-start: 1.5rem;
}

h1, .h1 {
  font-size: 2rem;
  font-weight: 500;
}

h2, .h2 {
  font-size: 1.5rem;
  font-weight: 500;
}

h3, .h3 {
  font-size: 1.25rem;
  font-weight: 500;
}

h4, .h4 {
  font-size: 1.125rem;
  font-weight: 500;
}

h5, .h5 {
  font-size: 1rem;
  font-weight: 500;
}

figure {
  margin-block-start: 1rem;
}

figcaption {
  margin-block-start: 0.5rem;
}

p, ul, ol, summary, figcaption, button {
  font-family: var(--body-font);
  line-height: 1.3;
  font-size: 1rem;
}
@media (min-width: 501px) {
  p, ul, ol, summary, figcaption, button {
    font-size: 1.125rem;
  }
}

p, ul, ol, summary { /* 18.4.26 removed button */
  margin-block-start: 1rem;
}

ul {
  list-style-type: disc;
  margin-inline-start: 1.5rem;
}

ol {
  list-style-type: decimal;
  margin-inline-start: 1.5rem;
}

ul li,
ol li {
  margin-block-start: 0.5rem;
}

.no_bullets {
  list-style-type: none;
  margin-inline-start: 0;
}

ul li::marker,
ol li::marker {
  color: var(--selected-accent);
  font-family: var(--display-font);
}

a {
  font-family: var(--display-font);
  text-decoration-color: var(--selected-accent);
  text-underline-offset: 0.25rem;
  text-decoration-thickness: 2px;
  color: initial;
  transition: ease 0.25s text-decoration;
}

@media (any-hover: hover) {
  a:hover {
    text-decoration-color: var(--possible-accent);
  }
}
@media (any-hover: none) {
  a:active {
    text-decoration-color: var(--possible-accent);
  }
}

details {
  margin-block-start: 1rem;
}

summary {
  font-weight: 700;
}

strong, .strong {
  font-weight: 700;
}

.normal_weight {
  font-weight: 400;
}

.light {
  font-weight: 300;
}

em {
  font-style: italic;
}

.flexright {
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
}

.header {
  padding-block: var(--outer-block-gap);
  background: var(--white) linear-gradient(to right, var(--background-leftend), var(--background-rightend));
  margin-bottom: var(--block-margin);
  position: relative; /* for the menu-item underline */
}

.header menu {
  margin-block-start: 0px;
  margin-inline-start: 0px;
  display: flex;
  flex-wrap: wrap;
  font-size: 1.25rem;
  line-height: 1.3;
  gap: 1rem;
  align-items: center;
  list-style-type: none; /* Removes the bullet */
}
@media (min-width: 501px) {
  .header menu {
    gap: 1.5rem;
  }
}

.header menu a {
  text-decoration: none;
}

.header menu img {
  display: inline;
  height: var(--menu-height);
  vertical-align: top;
}

.header menu li {
  --menu-item-decoration-color: transparent;
  --menu-item-decoration-width: 100%;
  font-weight: 300;
  height: var(--menu-height);
  line-height: var(--menu-height);
  position: relative;
}

.header menu li.home_menu_item {
  --menu-item-decoration-width: 2rem;
}

.header menu li.home_menu_item div {
  padding-right: 0.25rem;
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2rem;
}

.header menu li:before {
  content: "";
  position: absolute;
  top: calc(var(--menu-height) + var(--block-margin) - 4px);
  right: 0px;
  width: var(--menu-item-decoration-width);
  height: 2px;
  background-color: var(--menu-item-decoration-color);
  transition: ease 0.25s all;
}
@media (any-hover: hover) {
  .header menu li:not(.current_menu_item):hover {
    --menu-item-decoration-color: var(--possible-accent);
  }
}
@media (any-hover: none) {
  .header menu li:not(.current_menu_item):active {
    --menu-item-decoration-color: var(--possible-accent);
  }
}

.header menu li.current_menu_item {
  --menu-item-decoration-color: var(--selected-accent);
}

@media (min-width: 1025px) {
  .main_content_high {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 425px;
  }
}

div.main_content_flexbox {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100vw;
}
div.main_content_flexbox:not(:has(.main_content_imgitem, .main_content_textitem, .main_content_newmapitem, > .map_container)) {
  margin-block: var(--block-margin);
}
@media (min-width: 1025px) {
/* does not apply to mappage */
  div.main_content_flexbox:not(:has( > .map_container)) {
    margin-block: var(--block-margin);
    margin-inline: auto;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    box-sizing: content-box;
    width: calc(1300px + 2rem); /* for bottom part of home page */
  }
/* does not apply to mappage or bottom part of home page */
  div.main_content_flexbox:has(.main_content_imgitem, .main_content_textitem, .main_content_newmapitem) {
    box-sizing: border-box;
    width: 100%;
  }
}

.scroll {
  overflow-y: auto;
  overflow-x: hidden; /* prevents extra horizontal scrollbar */
}

/* must not precede scroll */
.flexgrow {
  flex-basis: 1px;
  flex-grow: 1;
}

/*
div.main_content_flexbox + div {
  margin-block-start: 1.25rem;
}
*/

/*
div.main_content_imgitem,
div.main_content_mapitem,
div.main_content_newmapitem,
div.main_content_textitem {
  padding-block: var(--block-margin);
}
*/

/* h2 at the top level of the body content */
div.body_high > h2 {
  padding-block-start: var(--block-margin);
}
@media (min-width: 1025px) {
  div.body_high > h2 {
    padding-block-end: var(--block-margin);
  }
}

.main_content_imgitem {
  box-sizing: content-box;
  width: 650px;
}

h2:not(.main_content_flexbox h2) {
  text-align: center;
}

.main_content_flexbox .main_content_textitem {
  min-width: 300px;
/* a textitem within a column flexbox is allowed to take the whole width */
  @media (min-width: 1025px) {
    max-width: 650px;
  }
}

.main_content_textitem:not(.main_content_flexbox .main_content_textitem),
.main_content_imgitem:not(.main_content_flexbox .main_content_imgitem)
{
  margin-block: var(--block-margin);
  margin-inline: auto;
  box-sizing: content-box; /* was border-box */
  max-width: min(100vw, 650px);
}

.main_content_flexbox .main_content_imgitem,
.main_content_flexbox .main_content_newmapitem {
  max-width: 650px; /* not box-sizing: border-box; for routepage */
}

@media (max-width: 1024px) {
  .main_content_flexbox .main_content_textitem,
  .main_content_flexbox .main_content_imgitem,
  .main_content_flexbox .main_content_newmapitem { 
    margin-block: var(--block-margin);
  }
  .route .main_content_imgitem {
    margin-block-end: 0px; /* so the scrollbar touches the footer border */
  }
  .main_content_flexbox .main_content_imgitem,
  .main_content_flexbox .main_content_newmapitem {  
    box-sizing: content-box;
    max-width: min(100%, 650px);
    margin-inline: auto;
  }
  .route .main_content_flexbox .main_content_imgitem,
  .route .main_content_flexbox .main_content_newmapitem {
    max-width: 100%;
    width: calc(100vw - 2*var(--body-padding));
  }
  .route .main_content_flexbox .scroll .main_content_imgitem {
    width: calc(100vw - 3*var(--body-padding)); /* extra for scrollbar */
  }
}
@media (max-width: 1024px) {
  .route .main_content_newmapitem, .route .main_content_imgitem {
    margin-block: 0px; /* to save space */
  }
}
@media (min-width: 1025px) {
  .main_content_flexbox .main_content_imgitem {
    min-width: 650px; /* min-width prevents textitem from taking the width */
  }
}

.main_content_mapitem {
/* for row flexbox to pass on to map, otherwise img invades map territory */
  width: 100%;
}
@media (min-width: 1025px) {
  .main_content_mapitem {
    min-height: 425px;
/* max-height is chosen to match a landscape imgitem. */
/* It would be better to work it out with calc */
    max-height: 515px;
    max-width: 650px;
  }
}
@media (max-width: 1024px) {
  .main_content_mapitem {
/* min-width of flexbox allows at least this width for row flexbox */
/* previously this statement was not under if_twocol */
    max-height: 720px;
    aspect-ratio: 1;
  }
}

body > h2:first-child,
header + h2,
div > p:first-child,
div > h2:first-child,
div > h3:first-child {
  margin-block-start: 0rem;
}

/* This selection applies when the flexbox is in row direction */
@media (min-width: 1025px) {
  div.main_content_flexbox > p {
    margin-block-start: 0rem;
  }
}

div.map_legend { /* single line of text */
  border-radius: 0px;
  border-top-left-radius: var(--medium-radius);
  border-top-right-radius: var(--medium-radius);
  height: var(--map-legend-height);
  line-height: var(--map-legend-height); /* for vertical alignment */
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 2px;
  background-color: var(--white);
  position: relative;
}

/* ********
  margin-inline: 1rem;
}
@media (min-width: 501px) {
  div.map_legend {
    margin-inline: 2rem;
  }
}
.main_content_mapitem div.map_legend,
.main_content_newmapitem div.map_legend {
  margin-inline: 0rem;
}
******** */

.map_legend > div:has(button) {
  box-sizing: border-box;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.map_legend button {
  height: 100%;
  box-sizing: border-box;
/*  vertical-align: middle; */
  border-radius: var(--small-radius); /* similar to Google Maps buttons */
  margin: 0px;
  border-style: solid;
  border-width: 2px;
  border-color: var(--slight-accent);
  padding: 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.map_legend button.hidden {
  visibility: hidden;
}
.map_legend button.h3 {
  font-weight: 400;
  padding-inline: 0.25rem;
}
.map_legend button.active_button {
  border-color: var(--selected-accent);
  background-color: hsl(131, 50%, 90%);
}
@media (any-hover: hover) {
  .map_legend button:not(.active_button):not(.waiting_button):hover {
    border-color: var(--possible-accent);
    background-color: hsl(42, 50%, 90%);
    transition: ease 0.25s border-color;
    cursor: grab;
  }
}
@media (any-hover: none) {
  .map_legend button:not(.active_button):not(.waiting_button):active {
    border-color: var(--possible-accent);
    background-color: hsl(42, 50%, 90%);
  }
}
.map_legend button.waiting_button {
  background-color: var(--mid-red);
  border-color: var(--reading-red);
}

.map_legend img {
/*  vertical-align: -20%;  18.4.26 apparently has no effect */
}

.map_legend button img {
  box-sizing: border-box;
  height: 100%;
  aspect-ratio: 1;
/*  vertical-align: middle; */
}
.map_legend button.h3 img {
  height: 20px; /* matches tree icons */
/*  vertical-align: -6px; */
}

/* *************
.map_status_report {
  text-align: right;
  padding-right: 0.5rem;
  font-style: italic;
  font-weight: 300;
  display: inline-block;
  vertical-align: middle;
}
************* */

/* container for Google and Leaflet maps, needed to superimpose them because
their individual divs must be absolutely positioned wrt a positioned div */
.map_container {
  height: 100%; /* passes the height available to the contained divs */
  position: relative; /* no effect other than to make this div positioned */
}

/*
  margin-inline: 1rem;
}
@media (min-width: 501px) {
  .map_container {
    margin-inline: 2rem;
  }
}
*/

.main_content_mapitem .map_container {
  height: calc(100% - var(--map-legend-height));
  margin-inline: 0rem;
}

.main_content_newmapitem {
  @media (min-width: 1025px) {
    width: 650px;
    min-width: 650px;
    box-sizing: content-box;
  }
  @media (max-width: 1024px) {
    width: fit-content;
    height: fit-content;
  }
}

.main_content_newmapitem .map_container {
  margin-inline: 0rem;
  @media (min-width: 1025px) {
/* max-height is chosen to match a landscape imgitem. */
/* It would be better to work it out with calc */
    width: 100%;
    height: 515px;
  }
  @media (max-width: 1024px) {
    --map-dimension: min(650px, calc(100vw - 2*var(--body-padding)));
    width: var(--map-dimension);
    height: var(--map-dimension);
  }
}

@media (max-width: 1024px) {
  .route .map_container {
    --map-dimension: calc(100vw - 2*var(--body-padding));
    width: var(--map-dimension);
    height: min(33vh, var(--map-dimension));
  }
}

@media (min-width: 1025px) {
  .route .main_content_newmapitem {
    position: sticky;
    top: 0px;
  }
}

.map {
  border-radius: 0px;
  border-bottom-left-radius: var(--medium-radius);
  border-bottom-right-radius: var(--medium-radius);
  box-shadow: var(--shadow-1);
  height: 100%;
  width: 100%;
}

@media (min-width: 1025px) {
  .main_content_flexbox .map {
    min-height: 425px;
  }
}

.positioned_map {
  position: absolute;
  top: 0px;
  left: 0px;
  display: block;
}

.map_help {
  position: absolute;
  top: var(--body-margin);
  left: var(--body-margin);
  box-sizing: border-box;
  width: calc(min(100%, 650px) - 2 * var(--body-margin));
/*  height: calc(100% - 2 * var(--body-margin)); */
  height: auto;
  z-index: 2000;
  background-color: var(--background-leftend);
  border-radius: var(--medium-radius);
  border-style: solid;
  border-width: 2px;
  border-color: var(--slight-accent);
  padding-inline: var(--body-margin);
  padding-block: 0.5rem;
  display: none;
  overflow: hidden;
}

.map_help p {
  margin-block-start: 0.25rem;
}

.map_help p img {
  height: 1rem;
  width: auto;
  display: inline;
  vertical-align: -3px;
}

.map_help span.td1 {
  display: inline-block;
  padding-right: 0.25rem;
}

.map_help span.button {
  border-radius: var(--small-radius);
  border-style: solid;
  border-width: 2px;
  border-color: var(--slight-accent);
  padding-inline: 2px;
  background-color: buttonface;
  display: inline-block; /* allows height to be specified */
  height: fit-content;
  vertical-align: bottom;
}

/* ************
.map_button_container {
  position: absolute;
  top: 0.6rem; left: 0.6rem;
  z-index: 2000;
}
.map_button_container button {
  font-family: var(--body-font);
  font-size: 1rem;
  width: 5.5rem;
  border-radius: var(--small-radius);
  margin-block-start: 0px;
  border-style: solid;
}
.map_icon_container {
  display: flex;
  justify-items: flex-end;
  gap: 4px;
  position: absolute;
  top: 0.6rem; right: 0.6rem;
  z-index: 2000;
  width: 5rem;
}
.map_icon {
  height: 2rem;
  width: 2rem;
  padding: 5px;
  background-color: ButtonFace;
  border-radius: var(--small-radius);
}
************ */

.tree_label {
  font-weight: 700; /* also set on buttons */
  font-family: var(--tree-label-font); /* also set on buttons */
  font-size: 12px;
  color: white;
  background-color: transparent;
  border: none;
  box-shadow: none;
  text-align: center;
  padding: 0px;
  width: auto;
  margin-bottom: 1px;
}

.active_icon {
  background-color: var(--mid-red);
}

.waiting_icon {
  background-color: gray;
}

@keyframes google-flashing {
  0% {color: red;}
  50% {color: cyan;}
}
/******
@keyframes leaflet-flashing {
  0% {opacity: 1;}
  50% {opacity: 0;}
}
******/
@keyframes leaflet-flashing {
  0% {color: red;}
  50% {color: cyan;}
}

.google_location_icon,
.leaflet_location_icon {
  height: 12px; width: 12px; /* iconsize */
  animation-name: google-flashing;
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-timing-function: steps(1);
}
.leaflet_location_icon {
  animation-name: leaflet-flashing;
/*  color: var(--reading-red); */
}

.lightbox_container { 
  display: none;
  position: fixed;
  z-index: 3000;
  top: 0%;
  left: 0%;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5); /* Dark semi-transparent background */
  text-align: center;
}

.lightbox_container div {
  display: block;
  position: fixed;
  top: var(--body-padding);
  left: var(--body-padding);
  width: calc(100vw - 2*var(--body-padding));
  height: calc(100vh - 2*var(--body-padding));
  background-color: white;
}

.lightbox_container button, 
.map_help button {
  display: block;
  position: absolute;
  top: 0rem;
  right: 0rem;
  margin: 0rem;
  height: 2rem;
  width: 2rem;
  padding: 0px;
  text-align: center;
  font-size: 2rem;
  text-decoration: none;
  z-index: 3010;
  border-radius: var(--small-radius);
  border-style: none;
  background-color: transparent;
}

.lightbox_container button img,
.map_help button img {
  width: 100%;
  height: 100%;
}


/* Override Google Maps styles. Their css is loaded automatically as required
so !important is needed to modify them whenever loaded. Experiment indicated
that the height and max-height keywords were needed, to avoid the height being
too short with a scrollbar included, in both gm-style-iw-d and gm-style-iw-c
but I don't understand the relationships of these classes. */

.gm-style-iw-chr {
  height: 10px !important;
}

.gm-style-iw-d {
  margin-right: 20px !important;
  max-height: none !important;
  height: fit-content !important;
}

.gm-style-iw-c {
  max-height: none !important;
  height: fit-content !important;
}

.gmll_popup {
  margin-block: 0rem;
  font-family: var(--body-font);
  color: var(--text-default);
  line-height: 1.3;
  font-size: 1rem;
  font-weight: 500;
  padding: 0px;
  width: fit-content;
  height: fit-content;
  margin-inline: auto;
  margin-block: 0px;
}

.gmll_popup p {
  margin-block-start: 0.5rem;
  margin-block-end: 0px;
  max-width: 200px;
}
.gmll_popup p:first-of-type { 
  margin-block-start: 0px;
}

.gmll_popup a {
  text-decoration-color: var(--selected-accent);
  text-underline-offset: 0.25rem;
  text-decoration-thickness: 2px;
  color: var(--text-default);
}
@media (any-hover: hover) {
  .gmll_popup a:hover {
    text-decoration-color: var(--possible-accent);
    transition: ease 0.25s;
  }
}
@media (any-hover: none) {
  .gmll_popup a:active {
    text-decoration-color: var(--possible-accent);
  }
}

.gmll_popup img {
  max-height: 200px;
  max-width: 200px;
  width: auto;
  height: auto;
}

.gmll_popup .box,
.gmll_popup .crossbox {
  display: inline-block;
  border: 2px solid #333;
  border-radius: var(--small-radius);
  border-style: solid;
  border-width: 2px;
  border-color: var(--slight-accent);
  padding-inline: 2px;
  margin-inline: 2px;
  margin-block: 0px;
  vertical-align: middle;
  background-color: ButtonFace;
}
@media (any-hover: hover) {
  .gmll_popup .box:hover,
  .gmll_popup .crossbox:hover {
    border-color: var(--possible-accent);
    background-color: hsl(42, 50%, 90%);
    transition: ease 0.25s border-color;
    cursor: grab;
  }
}
@media (any-hover: none) {
  .gmll_popup .box:active,
  .gmll_popup .crossbox:active {
    border-color: var(--possible-accent);
    background-color: hsl(42, 50%, 90%);
  }
}
.gmll_popup .crossbox {
  text-decoration-line: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--reading-red);
}

.gmll_popup .box img {
  display: inline-block;
  height: 1rem;
  width: auto;
  vertical-align: -10%;
}

div.tree_example {
  position: relative;
  background-color: var(--background-leftend);
  border-radius: var(--medium-radius);
  border-style: solid;
  border-width: 2px;
  border-color: var(--slight-accent); /* var(--mid-red); */
}
@media (max-width: 1024px) {
  div.tree_example {
    width: fit-content;
    margin-inline: auto;
  }
}
.route div.tree_example,
.route div.main_content_imgitem > p {
  width: 100%;
  margin-top: 1rem;
}
@media (min-width: 1025px) {
  .route div.main_content_imgitem h2 + p,
  .route div.main_content_imgitem h2 + div.tree_example {
    margin-top: 0rem;
  }
}

div.tree_example a {
  text-decoration: none;
}

div.tree_example h2 { /* above the photo */
  text-align: center;
  margin-inline: auto;
  margin-block-start: var(--block-margin); /* matches figure padding-bottom */
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}
.route div.tree_example h2 {
  padding-inline: 3rem; /* enough for the button */
}
@media (min-width: 501px) {
  div.tree_example h2 {
    gap: 2rem;
  }
}
/* ***********
@media (min-width: 1025px) {
  div.tree_example h2 {
    margin-block-end: 0px;
  }
}
*********** */

div.tree_example button img {
  width: 2rem;
  display: inline;
  vertical-align: -30%;
}

div.tree_example figure {
  padding-block: var(--block-margin);
  padding-inline: 10px;
  margin-block-start: 0px;
  border-radius: var(--medium-radius); /* irrelevant for column flex */
  background-color: var(--background-leftend); /* irrelevant for row flex */
  width: fit-content;
  margin-inline: auto;
}
@media (min-width: 1025px) {
  div.tree_example figure {
    padding-inline: 0px;
    display: block;
  }
}

div.tree_example img { 
  max-height: calc(100vmin - 3.5rem);
}

/* for the navigational photos */
.route div.main_content_imgitem
img:not(figure img, h2 img, button img, p img) {
  display: block;
  --imgsize: min(417px, calc(100vmin - 3.5rem));
  max-width: var(--imgsize);
  max-height: var(--imgsize);
  margin-block: 1rem;
  margin-inline: auto;
}
.route div.main_content_imgitem p img {
  vertical-align: middle;
}

.route div.main_content_imgitem p span {
  position: relative;
}
.route div.main_content_imgitem p span.overprint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
}


div.tree_example h3 { /* below the photo */
  margin-block-start: 0.5rem;
}

div.tree_example figcaption {
  margin-block-start: 0.5rem;
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.route div.tree_example p { /* species information below the figure */
  width: fit-content;
  padding-inline: 1rem;
  box-sizing: border-box;
  max-width: 100%;
  margin-inline: 0px;
  margin-block-start: 0px;
  margin-block-end: 1rem;
}

div.tree_example figure p,
div.tree_example button {
  margin-block-start: 0;
}

div.tree_example button,
.route div.main_content_imgitem p button {
  border-color: var(--slight-accent);
  border-style: solid;
  border-radius: var(--small-radius);
  background-color: ButtonFace; /* hsl(131, 30%, 90%); */
}
div.tree_example button {
  padding: 0.25rem;
}
.route div.main_content_imgitem p button {
  padding-block: 0px;
  padding-inline: 2px;
  margin-inline: 2px;
  font-family: var(--tree-label-font); /* also set by .tree_label */
  font-weight: 700; /* also set by .tree_label */
  font-size: 12px;
}
@media (any-hover: hover) {
  div.tree_example button:hover {
    border-color: var(--possible-accent);
    background-color: hsl(42, 50%, 90%);
    transition: ease 0.25s border-color;
    cursor: grab;
  }
}
@media (any-hover: none) {
  div.tree_example button:active {
    border-color: var(--possible-accent);
    background-color: hsl(42, 50%, 90%);
  }
}
div.tree_example button.h2 {
 padding-block: 0px;
 line-height: 1.0;
 position: absolute;
 top: 10px;
 left: 10px;
}
.route div.tree_example button.h2 {
  font-family: var(--tree-label-font); /* also set by .tree_label */
  font-weight: 700; /* also set by .tree_label */
  font-size: 16px;
}

.tree_gallery {
  background-color: var(--background-leftend);
  border-radius: var(--medium-radius);
  border-style: solid;
  border-width: 2px;
  border-color: var(--slight-accent);
  padding-block: var(--block-margin) calc(2 * var(--block-margin));
  padding-inline: 0px;
  max-width: 650px;
  overflow: hidden;
  margin-block: 0px;
}

.tree_gallery figure {
  overflow: clip;
  margin-inline: auto;
  width: fit-content;
  height: fit-content;
  padding-inline: 10px;
}

.tree_gallery figure img {
  display: block;
  max-height: calc(100vmin - 3.5rem);
  object-fit: cover;
  margin-inline: auto;
}

.body_high .tree_gallery figure img {
/* 11rem for title and nav on embedded page */
  max-height: min(calc(100vw - 2*var(--body-padding)), calc(100vh - 12rem));
}

.tree_gallery figcaption {
/*  display: inline-block; text-align: right; */
  display: flex;
  justify-content: space-between;
  width: 100%;
}

div:has(> div.tree_gallery__pagination) {
  width: calc(100% - 2*(var(--nav-arrow-width) + var(--nav-arrow-padding)));
  margin-inline: auto;
}

.tree_gallery__pagination {
  margin-block-start: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.tree_gallery__pagination .swiper-pagination-bullet {
  margin: 0 !important;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--possible-accent);
  background-color: transparent;
  opacity: 1;
}

.tree_gallery__pagination .swiper-pagination-bullet-active {
  border: 1px solid var(--selected-accent);
  background-color: var(--selected-accent);
}

.tree_nav {
  flex-direction: row;
  display: flex;
  justify-content: space-between;
  height: 0px; /* No space below the fig; the arrows are on top of the fig */
}

/* The relative positioning moves the nav arrows onto the same level as
the page dots. It can't be done by positioning the tree_nav div instead,
because the pagination is disabled by having something on top of it. */
.tree_nav_next,
.tree_nav_prev {
  cursor: grab;
  width: var(--nav-arrow-width);
  position: relative;
  top: -2.6rem;
}

.tree_nav_prev {
  padding-left: var(--nav-arrow-padding);
}

.tree_nav_next {
  transform: scaleX(-1);
  padding-left: var(--nav-arrow-padding);
}

.swiper-button-disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.insert { 
  color: var(--reading-red);
}

.warning {
  color: var(--reading-red);
}

.border_top {
  border: none;
  border-top: 2px solid var(--mid-red); /* var(--possible-accent); */
  padding-block: 1rem;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0rem 1rem; 
  padding-block: 0px calc(0.5rem + var(--outer-block-gap));
}

.footer p {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0px;
}

/* These come last because display: none must supersede previous classes */
.if_narrow, .if_wide, .if_le1k, .if_gt1k { }

@media (min-width: 501px) {
  .if_narrow {
    display: none;
  }
}

@media (max-width: 500px) {
  .if_wide {
    display: none;
  }
}

@media (min-width: 1025px) {
  .if_le1k { display: none; }
}

@media (max-width: 1024px) {
  .if_gt1k { display: none; }
}
