:root {
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
  font-weight: normal;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Cantarell, 'Helvetica Neue', sans-serif;
  --fratio: 1.2;
  --fontsize0: calc(0.1vw + 1rem);
  --fontsize-3: calc(var(--fontsize-2) / var(--fratio));
  --fontsize-2: calc(var(--fontsize-1) / var(--fratio));
  --fontsize-1: calc(var(--fontsize0) / var(--fratio));
  --fontsize1: calc(var(--fontsize0) * var(--fratio));
  --fontsize2: calc(var(--fontsize1) * var(--fratio));
  --fontsize3: calc(var(--fontsize2) * var(--fratio));
  font-size: var(--fontsize0);
  line-height: 1.8;
  --col1: #3ebddb;
  --col2: #94dbeb;
  --col3: #69cce3;
  --col5: #24a4c1;
  --col6: #1c7f96;
  --col7: #145b6b;
  --col8: #0c3740;
  --col9: #041215;
}

h1 {
  font-size: var(--fontsize3);
  font-weight: 600;
}

h1 a {
  text-decoration: none;
}

h2 {
  font-size: var(--fontsize2);
}

h3 {
  font-size: var(--fontsize1);
}

body {
  background-color: var(--col8);
  color: #fff;
  min-height: 100vh;
}

a {
  color: white;
  text-decoration-thickness: 0.05em;
  text-decoration-color: var(--col5);
  text-decoration-style: double;
}

hr {
  color: var(--col6);
}

footer {
  font-family: var(--font-ui);
  font-size: var(--fontsize-1);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
}

.subtitle {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: var(--fontsize-1);
  letter-spacing: 0.05em;
}

svg[name="sinc"] {
  opacity: 0.6;
}

svg[name="sinc"] path {
  stroke: var(--col1);
}

a.tag {
  background-color: var(--col7);
  border: 1px solid var(--col1);
  padding: var(--s-3) var(--s-2);
  font-family: var(--font-ui);
  font-size: var(--fontsize-1);
  font-weight: 500;
  font-style: normal;
  text-decoration: none;
  white-space: nowrap;
}

a.tag:hover {
  background-color: var(--col6);
  border-color: var(--col3);
}

.empty, a.tag.empty {
  color: var(--col1);
}

.tag-count {
  color: var(--col5);
}

.selected, .current, .active {
  text-decoration: none;
  font-weight: bolder;
  background-color: var(--col7);
}

.group {
  padding: var(--s-1);
  border: 1px solid var(--col2);
  border-radius: var(--s-4);
}

.group h1, .group h2, .group h3, .group h4 {
  margin-top: 0;
  margin-bottom: var(--s-4);
}

.group .current {
  background-color: var(--col6);
}

a.tag:has(+ .group.grandchild) {
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  padding-top: var(--s-5);
  padding-bottom: var(--s-5);

}

a.tag + .group.grandchild {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left-color: var(--col3);
  border-left-width: 2px;
  margin-left: calc(var(--space) / -2);
}

.group-toggle + label {
  font-size: var(--fontsize-2);
  font-weight: normal;
  color: var(--col5);
  cursor: pointer;
  margin-left: var(--s-1);
}

.group-toggle:checked + label {
  color: var(--col3);
}

.filter-scope-toggle + label {
  font-size: var(--fontsize-2);
  font-weight: normal;
  color: var(--col5);
  cursor: pointer;
  margin-left: var(--s-1);
}

.filter-scope-toggle:checked + label {
  color: var(--col3);
}

.grandchild a.tag {
  border-color: var(--col6);
  font-size: var(--fontsize-2);
}


img {
  border-radius: var(--s1);
}

.page > img {
  background-color: white;
  border-radius: var(--s1) 0 0 var(--s1);
}

.page-meta .group {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.large-icon {
  border-radius: var(--s-3);
  padding: var(--s0) var(--s1);
  border: 3px solid var(--col2);
}

.icon-glyph {
  background-color: var(--col1);
}

.group > ul {
  overflow-y: auto;
  max-height: 25vh;
  scrollbar-width: thin;
  scrollbar-color: var(--col3) transparent;
}

ul{
  list-style: none;
}

dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--s-4) var(--s0);
}

dt {
  color: var(--col3);
  font-size: var(--fontsize-1);
}

dd {
  margin: 0;
  font-size: var(--fontsize-1);
}

/* inset, not outline: .cluster's overflow:hidden (structure.css) clips
   anything drawn outside an element's own box at a row's edge */
:focus-visible {
  box-shadow: inset 0 0 0 2px var(--col1);
}

nav a {
  border-radius: var(--s-4);
  padding: var(--s-8) var(--s-2);
  font-family: var(--font-ui);
  font-size: var(--fontsize-1);
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.group a {
  font-size: var(--fontsize-1);
  font-style: normal;
  white-space: nowrap;
}

.group h1 a, .group h2 a, .group h3 a, .group h4 a {
  font-size: inherit;
  white-space: normal;
}

.tag-aka {
  font-style: italic;
}

.tree-pre {
  font-size: var(--s1);
}

.tag-subtree {
  font-size: 0.9em;
  line-height: 1.35;
}

.tag-forest--simple .tree-line {
  line-height: 1;
}

.multi-parent {
  font-weight: bold;
}

.page-meta a {
  word-break: break-all;
}

.group-toggle + label::after {
  content: "hide empty";
}

.group-toggle:checked + label::after {
  content: "show empty";
}

.filter-scope-toggle + label::after {
  content: "show all filters";
}

.filter-scope-toggle:checked + label::after {
  content: "show found in only";
}

.filter-scope-text::after {
  content: "is found in filters";
}

.group:has(.filter-scope-toggle:checked) .filter-scope-text::after {
  content: "is found in some filters";
}

nav.subnav {
  padding-left: var(--s0);
  font-size: var(--fontsize0);
}

.not-active {
  opacity: 0.4;
}

.invalid-field input{box-shadow: 0 0 3px #CC0000;}
.valid-field input{box-shadow: 0 0 3px #36cc00;}

input[readonly] {
  opacity: 0.55;
  cursor: not-allowed;
  border-style: dashed;
}

.highlight {
  padding: var(--s-5) var(--s-1);
  border-radius: var(--s-3);
  overflow-x: scroll;
  scrollbar-width: thin;
  scrollbar-color: var(--col3) transparent;
}

.epigraph {
  max-width: var(--max-width);
  padding-left: var(--s1);
  padding-right: var(--s1);
}

blockquote p:first-child{
  font-weight: bolder;
}


/* Header search form */

header form input[type="search"] {
  flex: 1 1 10rem;
  min-width: 0;
}

#search-results, #search-results-preview {
  max-width: var(--max-width);
}

header form label {
  color: #fff;
}

header form input,
header form select {
  font-size: inherit;
  font-family: inherit;
  background-color: var(--col8);
  color: white;
  border: 1px solid var(--col2);
  border-radius: var(--s-4);
  padding: var(--s-3) var(--s-2);
}

header form input[type="submit"] {
  background-color: var(--col8);
}


header form input[type="submit"]:hover, nav a:hover, .icon:hover, .large-icon:hover {
  background-color: var(--col7);
  transition: background-color 1s;
}

table {
  border-collapse: collapse;
  border: 1px solid var(--col6);
}

th, td {
  padding: var(--s-2) var(--s-1);
  border: 1px solid var(--col6);
  background-color: var(--col8);
  text-align: left;
  vertical-align: top;
}

th {
  background-color: var(--col7);
}

tr:hover td {
  background-color: var(--col7);
  transition: background-color 0.2s;
}

.important {
  background-color: var(--col6);
  color: var(--col9);
  font-family: courier;
  font-size: var(--fontsize1);
  text-align: center;
}
