@font-face {
    font-family: "Simpler";
    font-weight: 400;
    src: url( "../fonts/SimplerPro_HLAR-Regular2.woff2" ) format( "woff2" );
}

@font-face {
    font-family: "Simpler";
    font-weight: 700;
    src: url( "../fonts/SimplerPro_HLAR-Bold2.woff2" ) format( "woff2" );
}

@font-face {
    font-family: "SimplerMono";
    font-weight: 400;
    src: url( "../fonts/SimplerPro_HLAR_Mono-Regular2.woff2" ) format( "woff2" );
}


*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { height: 100%; scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
iframe { border: none; display: block; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { font-weight: inherit; font-size: 1em; }
ul { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
details summary::marker { content: none; }
::-webkit-details-marker { display: none; }
fieldset { padding: 0; border: none; min-inline-size: 0; }

:root {
    --highlight-color: #FFF371;
    --secondary-color: #FFBE60;
    --secondary-text-color: #F98C00;
    --muted-text-color: #B3B3B3;
}

body {
    font-family: "Simpler";
    line-height: 1.58333;
    font-size: 12px;
}

.research-filters select,
.manuscripts-filters select,
input[type="submit"],
button {
    appearance: none;
    color: inherit;
    background-color: #e0e0e0;
    color: black;
    border: none;
    cursor: pointer;
}

.research-filters select,
.manuscripts-filters select {
    padding: 2px 5px;
}

.site-header {
    display: flex;
    margin: 0 40px;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.site-logo {
    height: 24px;
}

.site-logo img {
    max-width: none;
    height: 100%;
}

.site-nav {
    min-width: 50%;
}

.research-menu,
.about-menu,
.main-menu {
    font-family: "SimplerMono";
    display: flex;
    gap: 0 40px;
}

.main-menu {
    justify-content: space-between;
}

.research-menu,
.about-menu {
    gap: 0 20px;
}

nav > ul a:not([aria-current]) {
    color: rgba( 0, 0, 0, .4 );
}

body:not(.manuscript-page) main {
    margin: 40px;
    padding-bottom: 120px;
}

/* .site-breadcrumb {
    position: absolute;
    top: 70px; left: 40px;
    z-index: 10000;
    font-family: "SimplerMono";
}

html[dir="rtl"] .site-breadcrumb {
    left: auto; right: 40px;
} */

.ms-compare-container,
.ms-container {
    position: fixed;
    top: 60px; left: 0; right: 0; bottom: 0;
}

.ms-compare-container .ms-container {
    position: relative;
    flex: 1;
}

.ms-index {
    display: inline-block;
    width: 17px; height: 17px;
    background-color: black;
    color: white;
    text-align: center;
    border-radius: 17px;
    font-size: 12px;
    line-height: 17px;
    font-weight: bold;
    font-family: "Simpler", sans-serif;
    transform: scale(0.75);
}

.ms-compare-container {
    display: flex;
    top: 40px;
}

.ms-map {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}

/* loading spinner shown until the shapes + feature list are ready */
.ms-loading {
    position: absolute;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba( 255, 255, 255, .55 );
    pointer-events: none;
}
.ms-container.map-loaded .ms-loading {
    display: none;
}
.ms-spinner {
    width: 44px; height: 44px;
    border: 4px solid rgba( 0, 0, 0, .15 );
    border-top-color: rgba( 0, 0, 0, .55 );
    border-radius: 50%;
    animation: ms-spin .8s linear infinite;
}
@keyframes ms-spin { to { transform: rotate( 360deg ); } }

.ms-map-info-box {
    position: absolute;
    top: 38px; left: 20px;
    z-index: 10000;
    /* no top padding: the top spacing lives in the sticky toolbar instead, so
       the sticky header covers the box from the very top with no gap for
       scrolling content to peek through */
    padding: 0 20px 22px;
    background-color: white;
    max-width: 480px;
    max-height: calc( 100vh - 140px );
    overflow: auto;
    transition: padding 250ms;
}

.ms-map-info-box:has(.expand-toolbar-toggle:checked) {
    padding: 0 5px;
}

html[dir="rtl"] .ms-map-info-box {
    left: auto; right: 20px;
}

.ms-object-info img.preview-img {
    display: block;
    max-width: 150px; max-height: 150px;
}

.preview-img-link {
    margin-bottom: 10px;
    display: block;
}

.ms-map-toolbar {
    display: flex;
    align-items: center;
    gap: 0 10px;
    position: sticky;
    top: 0;
    z-index: 6;
    background-color: white;
    /* span the full box width (negative margins cancel the box's side padding)
       so the opaque header covers scrolling content edge to edge */
    padding: 22px 20px 0;
    margin-inline: -20px;
}

/* keep the collapsed box compact (no info content to scroll under) */
.ms-map-info-box:has(.expand-toolbar-toggle:checked) .ms-map-toolbar {
    padding: 5px 0 0;
    margin-inline: 0;
}

.expand-toolbar-toggle:not(:checked) + label .collapsed-icon,
.expand-toolbar-toggle:checked + label .expanded-icon,
.show-outlines-toggle:not(:checked) + label .active-icon,
.show-outlines-toggle:checked + label .inactive-icon,
.ms-map-toolbar-toggle:has(.rotate-toggle:not(:checked)) + .ms-map-toolbar-slider {
    display: none;
}

.ms-map-toolbar-label {
    font-family: "SimplerMono";
}

.ms-map-toolbar-item:has(.expand-toolbar-toggle:not(:checked)) ~ .ms-map-toolbar-label {
    display: none;
}

.ms-map-toolbar + .ms-map-info {
    transition: height 250ms, visibility 250ms;
}

.ms-map-toolbar:has(.expand-toolbar-toggle:checked) + .ms-map-info {
    height: 0;
    overflow: hidden;
    visibility: hidden;
}

.ms-map-toolbar-item:has(.expand-toolbar-toggle:checked) ~ .ms-map-toolbar-item {
    display: none;
}

.ms-map-toolbar-item {
    position: relative;
    height: 20px; width: 20px;
    background-color: rgba( 0, 0, 0, .1 );
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-map-toolbar-item.copy-link-button .link-copied-message {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate( -50%, -100% );
    white-space: nowrap;
    display: none;
    pointer-events: none;
}

.ms-map-toolbar-item.copy-link-button.copied .link-copied-message {
    display: block;
}

.ms-map-toolbar-item:has(.expand-toolbar-toggle:checked) {
    background-color: transparent;
}

.ms-map-toolbar-draw-color {
    border-radius: 20px;
    overflow: hidden;
}

.ms-map-toolbar-draw-color:has(input:checked) {
    border: 2px solid black;
}

.ms-map-toolbar-item:has(.draw-toggle:not(:checked)) + .ms-map-toolbar-item-colors {
    display: none;
}

.ms-map-toolbar-slider {
    width: fit-content;
}

.ms-map-toolbar-toggle:has(.rotate-toggle:checked),
.ms-map-toolbar-item:has(.draw-toggle:checked) {
    background-color: rgba( 0, 0, 0, .2 );
}

.research-article-title,
.ms-title {
    font-family: "Simpler";
    font-weight: bold;
    font-size: 21px;
}

.research-article-author {
    font-family: "Simpler";
    font-size: 21px;
}

.ms-title {
    margin: 10px 0 20px;
}

.ms-info-nav {
    display: flex;
    gap: 0 20px;
}

.ms-info-nav-item {
    position: relative;
    font-family: "SimplerMono";
}

.ms-info-nav-item input {
    position: absolute;
    appearance: none;
    top: 0; left: 0; right: 0; bottom: 0;
}

.ms-info-nav-item input:not(:checked) + label {
    color: rgba( 0, 0, 0, .4 );
}

.ms-map-info-header:has(input[value="general"]:not(:checked)) .ms-info-tab[data-id="general"],
.ms-map-info-header:has(input[value="features"]:not(:checked)) .ms-info-tab[data-id="features"],
.ms-map-info-header:has(input[value="object"]:not(:checked)) .ms-info-tab[data-id="object"],
.ms-map-info-header:has(input[value="links"]:not(:checked)) .ms-info-tab[data-id="links"] {
    display: none;
}

/* the title + tab-nav stay pinned below the (also-sticky) toolbar */
.ms-info-topbar {
    position: sticky;
    top: var( --toolbar-h, 40px );
    z-index: 5;
    background-color: white;
    /* full box width, matching the toolbar */
    padding: 2px 20px 0;
    margin-inline: -20px;
}

.ms-info-tab {
    max-width: 480px;
    font-size: 12px;
}

.ms-info-tab dl {
    display: grid;
    grid-template-columns: auto auto;
    gap: 5px 20px;
    margin: 20px 0;
}

.ms-info-tab dt {
    font-family: "SimplerMono";
}

/* Title-type toggle: show the scholarly name only in scholarly mode, and only
   for items that actually have one (otherwise the location title stays). */
.title-scholarly { display: none; }
html.title-type-scholarly .ilan-title.has-scholarly .title-location { display: none; }
html.title-type-scholarly .ilan-title.has-scholarly .title-scholarly { display: inline; }

/* the toggle button shows the label for the state it switches TO */
.title-type-toggle .tt-to-location { display: none; }
html.title-type-scholarly .title-type-toggle .tt-to-scholarly { display: none; }
html.title-type-scholarly .title-type-toggle .tt-to-location { display: inline; }
.title-type-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: black;
    background-color: #e0e0e0;
    border: none;
    padding: 3px 6px;
    cursor: pointer;
    line-height: 0;
}
.title-type-toggle svg {
    width: 16px;
    height: 16px;
    display: block;
}
/* toolbar variant sits inline with the map tools */
.title-type-toggle--toolbar {
    align-self: center;
}

.surface-menu {
    position: absolute;
    top: 20px; right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px 0;
    z-index: 10000;
}

.surface-menu > button[aria-current] {
    background-color: #ccc;
}

.related-surfaces {
    position: absolute;
    top: 20px; right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px 0;
    max-width: 160px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 10000;
}

/* Hebrew / RTL: flip the menu to the opposite (left) end */
html[dir="rtl"] .related-surfaces {
    right: auto;
    left: 20px;
}

/* if a diagram also has the JS surface switcher, stack this below it */
.ms-container:has(.surface-menu) .related-surfaces {
    top: auto;
    bottom: 20px;
}

.related-surfaces-heading {
    font-family: "SimplerMono";
    font-size: 0.75em;
    text-transform: uppercase;
    opacity: 0.7;
}

.related-surface {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.related-surface:hover .related-surface-label {
    text-decoration: underline;
}

.related-surface-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    flex: 0 0 auto;
    border: 1px solid #ccc;
}

.related-surface-label {
    font-family: "SimplerMono";
    font-size: 0.85em;
}

/* Edition preview: metadata section + continuous transcription/translation */
.ms-edition-meta-section,
.ms-edition-text {
    margin: 24px 0;
    border-top: 1px solid #d8d3c8;
    padding-top: 16px;
}
.ms-edition-section-title {
    font-family: "SimplerMono";
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 12px;
}
.edition-entry {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #efece5;
}
.edition-entry:last-child {
    border-bottom: none;
}
.edition-he {
    margin-bottom: 6px;
    line-height: 1.7;
}
.edition-en {
    color: #444;
    line-height: 1.6;
}
.edition-surface {
    font-family: "SimplerMono";
    font-size: 0.85rem;
    margin: 20px 0 10px;
}

.ms-feature-list {
    list-style: none;
    margin: 20px 0;
}

.ms-feature-list-item a {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: "SimplerMono";
    max-width: 400px;
    padding: 2px 0;
}

.ms-feature-list-item .feature-zone {
    flex: 0 0 auto;
    font-weight: bold;
}

.ms-feature-list-item .feature-text {
    flex: 1 1 auto;
    min-width: 0;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* classification chips, only when populated */
.ms-feature-list-item .feature-type:empty,
.ms-feature-list-item .feature-class:empty { display: none; }
.ms-feature-list-item .feature-type,
.ms-feature-list-item .feature-class {
    flex: 0 0 auto;
    color: #555;
    font-size: .85em;
}

.ms-feature-list-item a:hover {
    background-color: rgba( 0, 0, 0, .05 );
    font-weight: bold;
}
.ms-feature-list-item a:hover .feature-text { color: #333; }

/* ---- Feature tree view (hierarchy from zoneName numbering) ---- */
ul.ms-feature-tree { list-style: none; margin: 0; padding: 0; }
/* the root list keeps the same top/bottom spacing as the other tabs' content */
.ms-feature-list.ms-feature-tree { margin: 20px 0; }
ul.ms-feature-tree ul.ms-feature-tree {
    margin-inline-start: 9px;
    padding-inline-start: 8px;
    border-inline-start: 1px solid #eaeaea;
}
.ms-feature-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
}
/* leaves with no toggle align under their toggled siblings */
.ms-feature-leaf > .ms-feature-row { padding-inline-start: 18px; }
.ms-feature-row > .ms-feature-list-item a,
.ms-feature-row > a { flex: 1 1 auto; min-width: 0; padding: 1px 0; }
.ms-feature-toggle {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    align-self: center;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    color: #888;
    line-height: 1;
}
.ms-feature-branch > .ms-feature-row > .ms-feature-toggle::before { content: "▾"; }
.ms-feature-branch.collapsed > .ms-feature-row > .ms-feature-toggle::before { content: "▸"; }
.ms-feature-branch.collapsed > ul.ms-feature-tree { display: none; }
.ms-feature-group {
    font-family: "SimplerMono";
    font-weight: bold;
    color: #444;
    cursor: default;
    padding: 1px 0;
}

/* the currently-selected object's row, highlighted in the Features tab */
.ms-feature-list-item.current-feature > .ms-feature-row {
    background-color: var(--highlight-color);
}

button.ms-map-toolbar-item {
    border: none;
    padding: 0;
}

.ms-map-toolbar-item-colors {
    background-color: transparent;
    display: flex;
    width: auto;
    gap: 0 4px;
    margin-inline-start: -6px;
}

.ms-map-toolbar-draw-color label {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}

.ms-map-toolbar-toggle input {
    position: absolute;
    appearance: none;
    top: 0; left: 0; right: 0; bottom: 0;
}

.ms-search-box {
    display: flex;
    overflow: hidden;
    width: auto;
    justify-content: flex-start;
}

.ms-map-toolbar-item.reset-button {
    width: fit-content;
    padding: 0 5px;
}

.ms-search-box .search-field {
    background-color: transparent;
    border: none;
    display: none;
}

.ms-search-box .search-field.show {
    display: block;
}

.ms-search-box label {
    flex: 1;
    width: 20px; height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ms-search-box:has(.search-field:focus) .search-field {
    display: block;
}

body.compare-page .page-intro,
.page-title {
    font-size: 21px;
    line-height: 1.333;
    font-weight: bold;
    margin-bottom: 1rem;
}

.page-intro {
    margin: 60px 0 30px;
}

.page-intro > p {
    max-width: 60ch;
}

.manuscript-list {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 210px, 1fr ) );
    gap: 20px;
}

body.home-page .manuscript-list {
    grid-template-columns: repeat( auto-fill, minmax( 160px, 1fr ) );
}

.compare-control,
.research-control,
.manuscripts-control {
    margin: 30px 0;
    font-family: "SimplerMono";
    display: flex;
    flex-wrap: wrap;
    gap: 10px 17px;
    justify-content: space-between;
    align-items: center;
}

.compare-control,
.research-filters,
.manuscripts-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 17px;
}

/* "More filters" expansion toggle */
.manuscripts-filters-more {
    display: inline-flex;
    align-items: center;
}
.manuscripts-filters-more input {
    position: absolute;
    opacity: 0;
    width: 0;
    pointer-events: none;
}
.manuscripts-filters-more label {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    background-color: #e0e0e0;
    padding: 2px 8px;
}
.manuscripts-filters-more label::after {
    content: " ▾";
}
.manuscripts-filters-more input:checked + label::after {
    content: " ▴";
}
.manuscripts-filters-extra {
    display: none;
}
.manuscripts-filters:has( .more-filters-toggle:checked ) .manuscripts-filters-extra {
    display: contents;
}

/* Ontology feature filters (/features page) */
.features-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 17px;
    margin-bottom: 14px;
}
.features-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}
.features-filters select {
    appearance: none;
    background-color: #e0e0e0;
    color: black;
    border: none;
    cursor: pointer;
    padding: 2px 5px;
}
.features-filter-search {
    padding: 2px 6px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: inherit;
}
.features-filter-annotated {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.features-empty {
    padding: 24px 0;
    color: var(--muted-text-color);
}

.compare-control {
    position: relative;
    z-index: 1000;
    margin: 0;
    margin-top: -20px;
}

body.home-page .manuscripts-control {
    display: flex;
}

.research-count,
.features-count,
.manuscripts-count {
    width: fit-content;
    margin-inline-start: auto;
}

.manuscript-item {
    font-family: "SimplerMono";
    position: relative;
}

.manuscript-item .manuscript-thumbnail {
    aspect-ratio: 21 / 26;
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 10px;
}

.manuscript-item .manuscript-thumbnail img {
    position: absolute;
    width: 100%;
    object-fit: cover;
    transform: scale(1.75);
    transition: transform 500ms;
}

.manuscript-item:hover .manuscript-thumbnail img {
    transform: scale(3.5);
}

body.compare-page .manuscript-item:not(:hover) .manuscript-thumbnail {
    opacity: 0.5;
}

.manuscripts-compare-form .manuscript-item > input[type="checkbox"] {
    position: absolute;
    appearance: none;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 100;
}

.manuscripts-compare-form .manuscript-item > label {
    position: absolute;
    top: 10px; right: 10px;
    width: 20px; height: 20px;
    border: 1px solid black;
    border-radius: 20px;
    width: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: white;
    z-index: 10;
}

.manuscripts-compare-form .manuscript-item > input[type="checkbox"]:checked + label::before {
    content: "✔︎";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 20px;
}

.feature-list h2 {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.333;
}

.subfeature-item {
    margin-inline-start: 36px;
}

.feature-item .empty {
    padding: 20px 0 40px;
}

/* small inline spinner while a feature's count is loading */
.feature-count.loading::after {
    content: "";
    display: inline-block;
    width: 11px; height: 11px;
    border: 2px solid rgba( 0, 0, 0, .15 );
    border-top-color: rgba( 0, 0, 0, .5 );
    border-radius: 50%;
    animation: ms-spin .8s linear infinite;
    vertical-align: -1px;
}

.feature-results-placeholder {
    display: flex;
    justify-content: center;
    margin: 40px;
}

.feature-results-placeholder::before {
    content: "";
    display: block;
    width: 44px; height: 44px;
    border: 4px solid rgba( 0, 0, 0, .15 );
    border-top-color: rgba( 0, 0, 0, .55 );
    border-radius: 50%;
    animation: ms-spin .8s linear infinite;
}

.crosshair-cursor,
.crosshair-cursor .leaflet-interactive {
    cursor: crosshair !important;
}

@keyframes mulShdSpin {
  0%,
  100% {
    box-shadow: 0 -3em 0 0.2em,
    2em -2em 0 0em, 3em 0 0 -1em,
    2em 2em 0 -1em, 0 3em 0 -1em,
    -2em 2em 0 -1em, -3em 0 0 -1em,
    -2em -2em 0 0;
  }
  12.5% {
    box-shadow: 0 -3em 0 0, 2em -2em 0 0.2em,
    3em 0 0 0, 2em 2em 0 -1em, 0 3em 0 -1em,
    -2em 2em 0 -1em, -3em 0 0 -1em,
    -2em -2em 0 -1em;
  }
  25% {
    box-shadow: 0 -3em 0 -0.5em,
    2em -2em 0 0, 3em 0 0 0.2em,
    2em 2em 0 0, 0 3em 0 -1em,
    -2em 2em 0 -1em, -3em 0 0 -1em,
    -2em -2em 0 -1em;
  }
  37.5% {
    box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em,
     3em 0em 0 0, 2em 2em 0 0.2em, 0 3em 0 0em,
     -2em 2em 0 -1em, -3em 0em 0 -1em, -2em -2em 0 -1em;
  }
  50% {
    box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em,
     3em 0 0 -1em, 2em 2em 0 0em, 0 3em 0 0.2em,
     -2em 2em 0 0, -3em 0em 0 -1em, -2em -2em 0 -1em;
  }
  62.5% {
    box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em,
     3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 0,
     -2em 2em 0 0.2em, -3em 0 0 0, -2em -2em 0 -1em;
  }
  75% {
    box-shadow: 0em -3em 0 -1em, 2em -2em 0 -1em,
    3em 0em 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em,
    -2em 2em 0 0, -3em 0em 0 0.2em, -2em -2em 0 0;
  }
  87.5% {
    box-shadow: 0em -3em 0 0, 2em -2em 0 -1em,
    3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em,
    -2em 2em 0 0, -3em 0em 0 0, -2em -2em 0 0.2em;
  }
}


.feature-results-list {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 150px, 1fr ) );
    gap: 20px;
    margin: 10px 0;
}

.feature_def-page .feature-results-list {
    grid-template-columns: repeat( auto-fill, minmax( 90px, 1fr ) );
}

.ms-object-info .feature-results-list {
    grid-template-columns: repeat( auto-fill, minmax( 75px, 1fr ) );
}

.feature-results-list .feature-item figure img {
    height: 150px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* Diagram result cards: crop + slightly zoom in to hide the frazzled
   manuscript edges (matches the old manuscript-thumbnail behavior). */
.feature-results-list .diagram-result-item .diagram-thumbnail {
    aspect-ratio: 21 / 26;
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 10px;
}
.feature-results-list .diagram-result-item .diagram-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale( 1.75 );
    transition: transform 500ms;
}
.feature-results-list .diagram-result-item:hover .diagram-thumbnail img {
    transform: scale( 3.5 );
}
.feature-results-list .diagram-result-item .diagram-thumbnail.thumbnail-missing {
    min-height: 0;
}

.manuscripts-search-form input[type="search"] {
    background-color: rgba( 0, 0, 0, .1 );
    color: black;
    font-weight: bold;
    font-family: "Simpler", sans-serif;
    font-size: 24px;
    border: none;
    padding: 2px 8px;
}

.sr-text {
    border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* SVG display of search results */
.ilanitem {
	fill: #ffffff;
	stroke: #fff;
	stroke-width: 20;
	fill-opacity: 0;
	stroke-opacity: 0;
	pointer-events: visiblePainted;
}

.ilanitem.current {
    fill: var(--highlight-color);
    fill-opacity: 1;
}

.ms-container .ms-object-nav-link {
    color: var(--muted-text-color);
}

.ms-container .ms-object-nav-link:hover {
    color: var(--secondary-text-color);
}

/* "Annotated version" link(s) for a module block: point to the diagram(s) that
   annotate the same module class in full. */
.ms-container .ms-object-annot-link {
    color: var(--secondary-text-color);
    text-decoration: underline;
}

.ms-container .ms-object-annot-link:hover {
    text-decoration: none;
}

/* Highlight the continuation / previous text elements in orange only on hover:
   over the object tab's nav links, or over the current object on the map
   (which lights up both its previous and next). */
.ms-container:has(.nav-link-next:hover) .ilanitem.next,
.ms-container:has(.nav-link-prev:hover) .ilanitem.prev,
.ms-container:has(.nav-link-connected:hover) .ilanitem.connected,
.ms-container:has(.ilanitem.current:hover) .ilanitem.prev,
.ms-container:has(.ilanitem.current:hover) .ilanitem.next,
.ms-container:has(.ilanitem.current:hover) .ilanitem.connected {
    fill: var(--secondary-color);
    fill-opacity: 1;
}

.ms-object-rel-label { color: var(--muted-text-color); }

svg polyline.ilanitem {
	pointer-events: visibleStroke;
}

.leaflet-overlay-pane {
    mix-blend-mode: color;
}

.leaflet-freehand-pane {
    z-index: 600;
    pointer-events: none;
}

.leaflet-freehand-pane svg {
    max-width: none !important;
    max-height: none !important;
}

.ms-container:has(.show-outlines-toggle:checked) .ms-map .leaflet-overlay-pane {
    mix-blend-mode: normal;
}

.ms-container:has(.show-outlines-toggle:checked) .ms-map svg .ilanitem {
	fill: #ffffff;
	stroke: var(--highlight-color);
	stroke-width: 5;
	fill-opacity: 0.1;
	stroke-opacity: 1;
	stroke-linejoin: round;
}


.ilanitem:hover {

}


.ms-map:not(.crosshair-cursor) svg circle.ilanitem:hover,
.ms-map:not(.crosshair-cursor) svg rect.ilanitem:hover,
.ms-map:not(.crosshair-cursor) svg ellipse.ilanitem:hover,
.ms-map:not(.crosshair-cursor) svg polygon.ilanitem:hover,
.ms-map:not(.crosshair-cursor) svg path.ilanitem:hover,
svg circle.ilanitem.highlighted,
svg rect.ilanitem.highlighted,
svg ellipse.ilanitem.highlighted,
svg polygon.ilanitem.highlighted,
svg path.ilanitem.highlighted {
	fill: var(--highlight-color);
	fill-opacity: 0.55;
	/* filter: url("#hover-shadow"); */
	transform: translate3d(0, 0, 0);
	transition-duration: 100ms;
	fill-rule: evenodd;
}

.ms-map:not(.crosshair-cursor) svg polyline.ilanitem:hover,
svg polyline.ilanitem.highlighted {
	stroke-width: 25;
	stroke: var(--highlight-color);
	fill: none;
	stroke-opacity: 1;
	pointer-events: visibleStroke;
	/* filter: url("#hover-shadow"); */
	stroke-linecap: round;
}


svg circle.ilanitem-active, svg rect.ilanitem-active, svg ellipse.ilanitem-active,
	svg polygon.ilanitem-active {
	fill: var(--highlight-color);
	fill-opacity: 0.5;
	/* filter: url("#blurFilter"); */
	fill-rule: evenodd;
}

svg polyline.ilanitem-active {
	stroke-width: 25;
	stroke: var(--highlight-color);
	fill: none;
	stroke-linecap: round;
	stroke-opacity: 0.5;
	/* filter: url("#blurFilterStroke"); */
}

.ilanItemHighlight {
	stroke: #0BFF2B;
	stroke-width: 5;
	stroke-opacity: 1;
}

svg circle.ilanItemHighlight, svg rect.ilanItemHighlight, svg ellipse.ilanItemHighlight,
	svg polygon.ilanItemHighlight {
	fill: #0BFF2B;
	fill-opacity: 0.2;
}

.research-list-header,
.research-item > a {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.4fr;
    gap: 0 30px;
    margin: 0 -20px;
    padding: 20px;
    align-items: start;
}

.research-item > a:hover {
    background-color: rgba( 0, 0, 0, .1 );
}

.research-list-header {
    font-family: "SimplerMono", monospace;
    padding-bottom: 10px;
}

.research-title {
    font-size: 30px;
    line-height: 1.2;
}

.research-title h2 {
    font-weight: bold;
    /* font-size: 1.35rem; */
    /* line-height: 1.2; */
    margin-bottom: 8px;
}

.research-title-cite {
    /* font-size: 0.85rem; */
}

.research-title-year {
    /* font-family: "SimplerMono", monospace; */
    /* font-size: 12px; */
    margin-top: 40px;
}

.research-summary {
    font-size: 0.85rem;
}

.research-preview img.research-thumbnail {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.about-content {
    padding-bottom: 80px;
}

.about-team-list > h2 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.team-member-item {
    display: grid;
    grid-template-columns: 500px 360px minmax(0, 1fr);
    gap: 0 22px;
    align-items: start;
    margin: 0 0 80px;
}

.team-member-profile {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.team-member-profile img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    filter: grayscale(1);
}

.team-member-name {
    font-weight: bold;
    font-size: 30px;
    line-height: 1.15;
}

.team-member-role {
    font-size: 30px;
    line-height: 1.15;
    margin-top: 8px;
}

.team-member-bio p {
    max-width: 66ch;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 10px;
}

.team-member-bio a {
    text-decoration: underline;
}

.team-member-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    font-family: "Simpler", sans-serif;
    font-weight: bold;
    font-size: 12px;
}

.team-member-links a {
    text-decoration: underline;
}

.about-content-col img {
    max-width: 250px;
    margin: 0 0 10px;
}

.about-content-col figcaption {
    font-family: "SimplerMono", monospace;
    font-size: 12px;
}

.about-content-header .article-title,
.about-content-col h2 {
    font-size: 1.9rem;
    font-weight: bold;
    line-height: 1.2;
    margin: 0 0 20px;
}

.about-content-col h2:not(:first-child) {
    margin-top: 30px;
}

.about-content-col p,
.about-content-col li,
.about-content-col blockquote,
.about-content-col blockquote footer {
    font-size: 14px;
    line-height: 20px;
}

.about-content-col p {
    margin: 0 0 10px;
    max-width: 66ch;
}

.about-content-col blockquote {
    max-width: 66ch;
}

.about-content-col a {
    text-decoration: underline;
}

body.page-the-book .about-content-col figure,
body.page-the-book .about-content-col blockquote {
    margin-bottom: 40px;
}

body.page-the-book .about-content-col figcaption {
    text-align: center;
}

.pdf-embed {
    height: 75vh;
    min-height: 460px;
    margin: 20px 0;
}

.research-article-media iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.research-article-header,
.research-article-content {
    max-width: 63ch;
}

.research-article-title-block,
.research-article-metadata,
.research-article-content,
.research-article-related {
    margin-bottom: 30px;
}

.research-article-footer > * {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 63ch;
}

.research-article-related-title,
.research-article-links-title {
    white-space: nowrap;
    font-family: "SimplerMono";
    min-width: 110px;
}

.research-article-related-maps-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.research-article-related-maps-list-item a {
    display: flex;
    max-width: 180px;
    gap: 0 10px;
}

.research-article-related-maps-list-item-image {
    flex: 0 0 80px;
}

.research-article-related-maps-list-item-image img {
    object-fit: cover;
    width: 80px;
    height: 80px;
}

.research-preview img {
    max-width: 200px;
}

.leaflet-container {
    background: white;
}

.content-gallery {
    margin: 20px 0 40px;
    position: relative;
}

/* Side (non-current) thumbnails: smaller + grayscale.
   Flickity owns the cell's `transform` (translateX), so the scale goes on
   the inner <figure>, which Flickity leaves alone. */
.content-gallery-item {
    width: 34%;
    padding: 0 10px;
    filter: grayscale(1);
    opacity: 0.9;
    transition: opacity 0.35s ease, filter 0.35s ease;
}

/* Current (middle) image: full size + colour */
.content-gallery-item.is-selected {
    filter: none;
    opacity: 1;
    position: relative;
    z-index: 2;
}

.content-gallery-item > figure {
    width: fit-content;
    margin: 0 auto;
    transform: scale(0.42);
    transform-origin: center center;
    transition: transform 0.35s ease;
}

.content-gallery-item.is-selected > figure {
    transform: scale(1);
}

.content-gallery-item img {
    max-height: 560px;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    display: block;
}

.content-gallery-item figcaption {
    font-family: "SimplerMono", monospace;
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
}

.content-gallery-caption {
    text-align: center;
    font-family: "SimplerMono", monospace;
    font-size: 12px;
    margin-top: 15px;
}

/* Prev/next arrows sit as thumbnails' captions above each side image */
.content-gallery .flickity-prev-next-button {
    width: 40px;
    height: 40px;
    top: 13%;
    transform: none;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.content-gallery .flickity-prev-next-button:hover {
    background: transparent;
}

.content-gallery .flickity-prev-next-button.previous {
    left: 17%;
    margin-left: -20px;
}

.content-gallery .flickity-prev-next-button.next {
    right: 17%;
    margin-right: -20px;
}

.content-gallery .flickity-prev-next-button .flickity-button-icon {
    fill: #1a1a1a;
}

.content-gallery .flickity-prev-next-button:disabled {
    display: none;
}

/* ── Diagram block: minimal leaflet-iiif preview ─────────────────────────── */
.diagram-embed {
    position: relative;
    margin: 0 0 40px;
}

.diagram-embed-map {
    width: 100%;
    height: 60vh;
    min-height: 380px;
    background: #f4f4f4;
    z-index: 0;
}

.diagram-embed-map.leaflet-container,
.diagram-embed-map .leaflet-container {
    background: #f4f4f4;
}

/* Minimal preview: no zoom/rotate/attribution controls. */
.diagram-embed-map .leaflet-control-container {
    display: none;
}

/* Prominent button in the top-left corner; the rest of the map stays
   interactive (pan / wheel-zoom). */
.diagram-embed-open {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 600;
    display: inline-flex;
    text-decoration: none;
}

.diagram-embed-open-label {
    font-family: "SimplerMono", monospace;
    font-size: 13px;
    padding: 8px 14px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 5px rgba( 0, 0, 0, 0.3 );
    transition: background 0.2s ease;
}

.diagram-embed-open:hover .diagram-embed-open-label {
    background: #000;
}

.diagram-embed-caption {
    font-family: "SimplerMono", monospace;
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
}

/* Interim (tablet) breakpoint: photo left, name/role + bio stacked right */
@media ( min-width: 801px ) and ( max-width: 1200px ) {
    .team-member-item {
        grid-template-columns: minmax(240px, 400px) minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        column-gap: 30px;
        margin-bottom: 60px;
    }
    .team-member-profile {
        grid-column: 1;
        grid-row: 1 / 3;
    }
    .team-member-title {
        grid-column: 2;
        grid-row: 1;
        margin-bottom: 20px;
    }
    .team-member-bio {
        grid-column: 2;
        grid-row: 2;
    }
    .team-member-name,
    .team-member-role {
        font-size: 26px;
    }
}

@media ( max-width: 800px ) {
    .content-gallery-item {
        width: 80%;
        padding: 0 10px;
    }
}

@media ( max-width: 800px ) {
    .site-header {
        margin: 20px;
        display: block;
        height: auto;
    }
    .main-menu {
        flex-wrap: wrap;
        gap: 0 20px;
        margin: 20px 0;
    }
    body:not(.manuscript-page) main {
        margin: 20px;
    }
    .team-member-item {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }
    .team-member-profile {
        order: -1;
        max-width: 280px;
    }
    .team-member-title {
        order: -2;
    }

    .research-list-header {
        display: none;
    }
    .research-item > a {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .research-preview img.research-thumbnail {
        max-width: 320px;
    }

    .about-content-text {
        margin-bottom: 40px;
    }

    .research-menu,
    .about-menu {
        flex-direction: column;
        gap: 0 10px;
    }

    .page-intro {
        display: flex;
        justify-content: space-between;
        text-align: end;
    }
}

@media ( min-width: 800px ) {

    .research-article-columns {
        display: flex;
        gap: 0 20px;
    }

    .research-article-columns > * {
        flex: 1;
    }

    .about-content {
        display: flex;
        gap: 0 40px;
        margin-top: 40px;
    }

    .about-content > * {
        flex: 1;
    }

}

/* About > The Project: two 6-column text columns on the 18-col grid,
   separated by a single empty grid column (per Figma layout grid). */
@media ( min-width: 1200px ) {
    body.page-project .about-content {
        display: grid;
        grid-template-columns: repeat(18, 1fr);
        gap: 0 20px;
    }

    body.page-project .about-content-col:nth-child(1) {
        grid-column: 1 / span 6;
    }

    body.page-project .about-content-col:nth-child(2) {
        grid-column: 8 / span 6;
    }

    /* About > The Book & Ilan Genre — three-column rows:
       title (3) | image (5) | gap (1) | text (7) */
    :is( body.page-the-book, body.page-ilan ) .about-content:has( > .about-content-col:nth-child(3) ) {
        display: grid;
        grid-template-columns: repeat(18, 1fr);
        gap: 0 20px;
    }

    :is( body.page-the-book, body.page-ilan ) .about-content:has( > .about-content-col:nth-child(3) ) .about-content-col:nth-child(1) {
        grid-column: 1 / span 3;
    }

    :is( body.page-the-book, body.page-ilan ) .about-content:has( > .about-content-col:nth-child(3) ) .about-content-col:nth-child(2) {
        grid-column: 4 / span 5;
    }

    :is( body.page-the-book, body.page-ilan ) .about-content:has( > .about-content-col:nth-child(3) ) .about-content-col:nth-child(3) {
        grid-column: 10 / span 7;
    }

    /* About > The Book & Ilan Genre — 1/3 + 2/3 rows: label (3) | content (13) */
    :is( body.page-the-book, body.page-ilan ) .about-content:has( > .about-content-col[data-width="2/3"] ) {
        display: grid;
        grid-template-columns: repeat(18, 1fr);
        gap: 0 20px;
    }

    :is( body.page-the-book, body.page-ilan ) .about-content:has( > .about-content-col[data-width="2/3"] ) .about-content-col:nth-child(1) {
        grid-column: 1 / span 3;
    }

    :is( body.page-the-book, body.page-ilan ) .about-content:has( > .about-content-col[data-width="2/3"] ) .about-content-col:nth-child(2) {
        grid-column: 4 / span 13;
    }

    :is( body.page-the-book, body.page-ilan ) .about-content:has( > .about-content-col:nth-child(3) ) img,
    :is( body.page-the-book, body.page-ilan ) .about-content:has( > .about-content-col[data-width="2/3"] ) img {
        max-width: 100%;
    }

    /* Research > The Poppers Ilan intro — three-column rows on the 18-col grid:
       h2 (4) | gap | content (5) | gap | content (7), reaching the grid edge. */
    body.page-the-poppers-ilan .about-content:has( > .about-content-col:nth-child(3) ) {
        display: grid;
        grid-template-columns: repeat(18, 1fr);
        gap: 0 20px;
    }

    body.page-the-poppers-ilan .about-content:has( > .about-content-col:nth-child(3) ) .about-content-col:nth-child(1) {
        grid-column: 1 / span 4;
    }

    body.page-the-poppers-ilan .about-content:has( > .about-content-col:nth-child(3) ) .about-content-col:nth-child(2) {
        grid-column: 6 / span 5;
    }

    body.page-the-poppers-ilan .about-content:has( > .about-content-col:nth-child(3) ) .about-content-col:nth-child(3) {
        grid-column: 12 / span 7;
    }

    body.page-the-poppers-ilan .about-content:has( > .about-content-col:nth-child(3) ) img {
        max-width: 100%;
    }

    /* Research > The Poppers Ilan intro — 1/3 + 2/3 rows:
       h2 (4) | gap | content (13, uniting the 5 + 7 columns). */
    body.page-the-poppers-ilan .about-content:has( > .about-content-col[data-width="2/3"] ) {
        display: grid;
        grid-template-columns: repeat(18, 1fr);
        gap: 0 20px;
    }

    body.page-the-poppers-ilan .about-content:has( > .about-content-col[data-width="2/3"] ) .about-content-col:nth-child(1) {
        grid-column: 1 / span 4;
    }

    body.page-the-poppers-ilan .about-content:has( > .about-content-col[data-width="2/3"] ) .about-content-col:nth-child(2) {
        grid-column: 6 / span 13;
    }

    body.page-the-poppers-ilan .about-content:has( > .about-content-col[data-width="2/3"] ) img {
        max-width: 100%;
    }
}

@media (hover: hover) {
    input[type="submit"]:hover,
    button:hover {
        background-color: rgba( 0, 0, 0, .2 );
    }
    .main-menu a:hover,
    .research-menu a:hover,
    .about-menu a:hover {
        color: black;
    }
    .team-member-links a:hover {
        text-decoration: none;
    }
}

/* ════════════════════════════════════════════════════════════
   Features page — ontology graph fixed in the background
   ════════════════════════════════════════════════════════════ */

/* Fixed, full-viewport graph layer sitting behind page content.
   The iframe lives inside <main> (which is pointer-events:none so empty
   areas pass through), so it must re-enable pointer-events to stay
   interactive in the space beside the list. */
#vowl-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    margin: 0;
    z-index: 0;                /* behind the content column, above page bg */
    background: transparent;
    pointer-events: auto;
}

/* Keep the header above the graph, with a solid backdrop so the nav
   stays clean over the graph. */
body.features-page .site-header,
body.feature_def-page .site-header {
    position: relative;
    z-index: 2;
    background: #fff;
}

/* main spans full width but lets clicks in empty areas reach the
   graph behind; only the actual content column captures events. */
body.features-page main,
body.feature_def-page main {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

/* The feature list and intro live in a left-hand column that fades from
   solid white into transparency on the right, so the column blends with
   the page while the graph stays visible — and interactive — beside it. */
body.features-page .page-intro,
body.features-page .features-container,
body.feature_def-page .page-intro,
body.feature_def-page .features-container {
    pointer-events: auto;
    position: relative;
    max-width: 460px;
    background: linear-gradient( to right,
        #fff 0%,
        #fff 78%,
        rgba( 255, 255, 255, 0 ) 100% );
}

body.features-page .page-intro,
body.feature_def-page .page-intro { padding-bottom: 8px; }
body.features-page .features-container,
body.feature_def-page .features-container { padding: 8px 28px 60px 0; }

/* Fill the page's inline-start margin (the gap between the viewport edge and
   the list column) with opaque white so the background graph doesn't peek
   through beside the list. Sits above the iframe (z-index 0), below content. */
body.features-page main::before,
body.feature_def-page main::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: -40px;   /* == main's margin */
    inline-size: 40px;
    background: #fff;
    z-index: 1;
    pointer-events: none;
}

html[dir="rtl"] body.features-page .page-intro,
html[dir="rtl"] body.features-page .features-container,
html[dir="rtl"] body.feature_def-page .page-intro,
html[dir="rtl"] body.feature_def-page .features-container {
    background: linear-gradient( to left,
        #fff 0%,
        #fff 78%,
        rgba( 255, 255, 255, 0 ) 100% );
}

html[dir="rtl"] body.features-page .features-container,
html[dir="rtl"] body.feature_def-page .features-container {
    padding: 8px 0 60px 28px;
}

/* Brief highlight when a feature is opened from the graph. */
@keyframes feature-flash {
    0%   { background-color: var( --highlight-color, #FFF371 ); }
    100% { background-color: transparent; }
}
.feature-item.feature-flash > a { animation: feature-flash 1.4s ease-out; border-radius: 3px; }
.feature-list.is-loading { opacity: .55; transition: opacity .15s; }

/* On narrow screens the column would cover the graph entirely;
   fade the graph back so it reads as a subtle texture instead. */
@media ( max-width: 820px ) {
    body.features-page .page-intro,
    body.features-page .features-container,
    body.feature_def-page .page-intro,
    body.feature_def-page .features-container { max-width: none; }
    #vowl-bg { opacity: .35; pointer-events: none; }
}

/* Graceful fallback for missing / broken thumbnails */
.thumbnail-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    margin-bottom: 10px;
    background: repeating-conic-gradient( #f1eee7 0 25%, #e7e3da 0 50% ) 0 0 / 20px 20px;
}
.thumbnail-missing img { display: none; }
.thumbnail-missing::after {
    content: "No image";
    font-size: .75rem;
    color: #9a948a;
    letter-spacing: .03em;
}
.manuscript-item .manuscript-thumbnail.thumbnail-missing { min-height: 0; }

/* TEI rendering in the object / feature panel */
.tei-div, .tei-body { display: inline; }
.tei-ab, .tei-p { margin: 0 0 .5em; }
.tei-commentary { position: relative; }
.tei-note-marker { cursor: help; color: #0a58ca; font-weight: bold; padding: 0 1px; }
.tei-note-tip {
    display: none;
    position: absolute;
    z-index: 30;
    inset-inline-start: 0;
    top: 1.5em;
    width: 220px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba( 0, 0, 0, .15 );
    font-size: .8rem;
    line-height: 1.4;
    color: #333;
    text-align: start;
    white-space: normal;
}
.tei-commentary:hover .tei-note-tip { display: block; }
.tei-quote { text-decoration: underline; cursor: help; }
.tei-term { color: #0a58ca; text-decoration: underline dotted; cursor: pointer; }
.tei-damage { color: #999; }
.tei-list { margin: 4px 0; padding-inline-start: 18px; }
.tei-table { border-collapse: collapse; margin: 6px 0; }
.tei-table td { border: 1px solid #bbb; padding: 2px 6px; }
