@charset "UTF-8";
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
   ========================================================================== */
/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */
html {
  line-height: 1.15; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
}

/* Sections
   ========================================================================== */
/**
 * Remove the margin in all browsers.
 */
body {
  margin: 0;
}

/**
 * Render the `main` element consistently in IE.
 */
main {
  display: block;
}

/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Firefox, and Safari.
 */
h1 {
  font-size: 2em;
  margin: 0 0;
}

/* Grouping content
   ========================================================================== */
/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Show the overflow in Edge and IE.
 */
hr {
  box-sizing: content-box; /* 1 */
  height: 0; /* 1 */
  overflow: visible; /* 2 */
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
pre {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/* Text-level semantics
   ========================================================================== */
/**
 * Remove the gray background on active links in IE 10.
 */
a {
  background-color: transparent;
}

/**
 * 1. Remove the bottom border in Chrome 57-
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */
abbr[title] {
  border-bottom: none; /* 1 */
  text-decoration: underline; /* 2 */
  text-decoration: underline dotted; /* 2 */
}

/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */
b,
strong {
  font-weight: bolder;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
code,
kbd,
samp {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/**
 * Add the correct font size in all browsers.
 */
small {
  font-size: 80%;
}

/**
 * Prevent `sub` and `sup` elements from affecting the line height in
 * all browsers.
 */
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/* Embedded content
   ========================================================================== */
/**
 * Remove the border on images inside links in IE 10.
 */
img {
  border-style: none;
}

/* Forms
   ========================================================================== */
/**
 * 1. Change the font styles in all browsers.
 * 2. Remove the margin in Firefox and Safari.
 */
button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-size: 100%; /* 1 */
  line-height: 1.15; /* 1 */
  margin: 0; /* 2 */
}

/**
 * Show the overflow in IE.
 * 1. Show the overflow in Edge.
 */
button,
input { /* 1 */
  overflow: visible;
}

/**
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 * 1. Remove the inheritance of text transform in Firefox.
 */
button,
select { /* 1 */
  text-transform: none;
}

/**
 * Correct the inability to style clickable types in iOS and Safari.
 */
button,
[type=button],
[type=reset],
[type=submit] {
  -webkit-appearance: button;
}

/**
 * Remove the inner border and padding in Firefox.
 */
button::-moz-focus-inner,
[type=button]::-moz-focus-inner,
[type=reset]::-moz-focus-inner,
[type=submit]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

/**
 * Restore the focus styles unset by the previous rule.
 */
button:-moz-focusring,
[type=button]:-moz-focusring,
[type=reset]:-moz-focusring,
[type=submit]:-moz-focusring {
  outline: 1px dotted ButtonText;
}

/**
 * Correct the padding in Firefox.
 */
fieldset {
  padding: 0.35em 0.75em 0.625em;
}

/**
 * 1. Correct the text wrapping in Edge and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 * 3. Remove the padding so developers are not caught out when they zero out
 *    `fieldset` elements in all browsers.
 */
legend {
  box-sizing: border-box; /* 1 */
  color: inherit; /* 2 */
  display: table; /* 1 */
  max-width: 100%; /* 1 */
  padding: 0; /* 3 */
  white-space: normal; /* 1 */
}

/**
 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
 */
progress {
  vertical-align: baseline;
}

/**
 * Remove the default vertical scrollbar in IE 10+.
 */
textarea {
  overflow: auto;
}

/**
 * 1. Add the correct box sizing in IE 10.
 * 2. Remove the padding in IE 10.
 */
[type=checkbox],
[type=radio] {
  box-sizing: border-box; /* 1 */
  padding: 0; /* 2 */
}

/**
 * Correct the cursor style of increment and decrement buttons in Chrome.
 */
[type=number]::-webkit-inner-spin-button,
[type=number]::-webkit-outer-spin-button {
  height: auto;
}

/**
 * 1. Correct the odd appearance in Chrome and Safari.
 * 2. Correct the outline style in Safari.
 */
[type=search] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/**
 * Remove the inner padding in Chrome and Safari on macOS.
 */
[type=search]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/**
 * 1. Correct the inability to style clickable types in iOS and Safari.
 * 2. Change font properties to `inherit` in Safari.
 */
::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/* Interactive
   ========================================================================== */
/*
 * Add the correct display in Edge, IE 10+, and Firefox.
 */
details {
  display: block;
}

/*
 * Add the correct display in all browsers.
 */
details > summary {
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

summary {
  display: list-item;
}

details > summary {
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

/* Misc
   ========================================================================== */
/**
 * Add the correct display in IE 10+.
 */
template {
  display: none;
}

/**
 * Add the correct display in IE 10.
 */
[hidden] {
  display: none;
}

@keyframes score-pulse {
  0% {
    color: inherit;
    text-shadow: none;
    filter: brightness(1);
  }
  30% {
    color: #fff;
    text-shadow: 0 0 10px rgb(120, 200, 255), 0 0 20px rgb(0, 150, 255), 0 0 30px rgb(0, 150, 255);
    filter: brightness(1.4);
  }
  100% {
    color: inherit;
    text-shadow: none;
    filter: brightness(1);
  }
}
/**
 * Set up a decent box model on the root element
 */
html {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/**
 * Make all elements from the DOM inherit from the parent box-sizing
 * Since `*` has a specificity of 0, it does not override the `html` value
 * making all elements inheriting from the root box-sizing value
 * See: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
 */
*,
*::before,
*::after {
  box-sizing: inherit;
}

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

/**
 * Basic styles for links
 */
a {
  color: inherit;
  text-decoration: none;
  border-bottom: 0.5px solid currentColor;
  font-weight: 100;
  transition: border-bottom-color 0.2s ease;
}
a:hover, a:active {
  border-bottom-color: red;
}

p {
  margin-top: 0;
  margin-bottom: 1em;
}

/**
 * Basic styles for lists
 */
body {
  background-color: #fff;
}

h3 {
  margin: 0;
  margin-bottom: 0.5em;
}

/**p
 * Basic typography style for copy text
 */
body {
  color: rgb(0, 0, 0);
  font-weight: 300;
  font-family: "EB Garamond", serif;
  font-size: 18px;
  font-weight: 300;
}

p, li, summary {
  font-size: 1em;
  line-height: 1.6;
}

.header a {
  text-decoration: none;
}

figcaption {
  font-size: 0.8em;
  font-style: italic;
}

h1 {
  font-size: 3vw;
  margin: 1em 0;
}

.underlined {
  text-decoration: underline;
}

footer {
  height: 1em;
}

/******************************************** */
/* menu */
.header {
  max-width: 800px; /* 1 */
  margin-left: auto; /* 2 */
  margin-right: auto; /* 2 */
  padding-left: 20px; /* 3 */
  padding-right: 20px; /* 3 */
  padding-top: 1em;
  width: 100%; /* 1 */
  display: flex;
  flex-direction: column;
}
.menu-header {
  position: fixed;
  right: 1px;
  height: calc(1em + 3vw);
  display: flex;
  flex-direction: row;
  justify-content: right;
  padding: 0 1rem 0 1rem;
  z-index: 20;
}

/* menu - hide h1 */
h1 {
  display: inline-block;
}

main {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.essay-list {
  padding-left: 1.4em;
  margin-left: 0;
}

.plain-list {
  list-style: none;
  padding-left: 1.4em;
}

main ol + p,
main ul + p {
  margin-top: 1em;
}

.abstract-carousel {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 1rem auto;
}

.abstract-slide {
  display: none;
  background: #f5f5f5;
  border-left: 3px solid #999;
  padding: 1rem;
  border-radius: 0.3rem;
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
}

/* Show slide based on radio input */
#abstract1:checked ~ .slide1,
#abstract2:checked ~ .slide2,
#abstract3:checked ~ .slide3,
#abstract4:checked ~ .slide4 {
  display: block;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .abstract-slide {
    background: #222;
    border-left: 3px solid #555;
    color: #eee;
  }
}
/*
 Styling
*/
.handle > label:before {
  content: "▶";
  display: inline-block;
  margin-right: 10px;
  font-size: 0.58em;
  line-height: 1.556em;
  vertical-align: middle;
}

.accordion > input[type=checkbox]:checked ~ .handle > label:before {
  content: "▼";
}

.book-page {
  background: #ffffff;
  color: #000000;
  font-family: "EB Garamond", "Georgia", serif;
  font-size: 1.05em;
  line-height: 1.7;
  padding: 1rem 1rem 1rem 2rem;
  border: 1px solid #eaeaea;
  border-radius: 6px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.06);
  max-width: 60ch;
  margin: 2rem auto;
  position: relative;
}
.book-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.03) 100%);
  pointer-events: none;
  z-index: 1;
}
.book-page p, .book-page li {
  margin-bottom: 1.2em;
}
.book-page em {
  font-style: italic;
}
.book-page strong {
  font-weight: bold;
}
.book-page a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.book-page a:hover {
  text-decoration-style: wavy;
}

.book-page--aristotle {
  border-left: 3px solid rgba(180, 140, 60, 0.5);
}

.book-meta {
  margin-top: 0.5rem;
  font-size: 0.72em;
  font-style: italic;
  line-height: 1.4;
  text-align: right;
}
.book-meta a {
  color: inherit;
  border-bottom: 1px solid currentColor;
  text-decoration: none;
}
.book-meta a:hover {
  opacity: 1;
}

.book-meta-author {
  display: inline;
  opacity: 0.65;
}

.book-meta-ref {
  display: none;
  opacity: 0.55;
}

body:has(#toggle-ci:checked) .book-meta-ref {
  display: inline;
}

body.dark-mode .book-page {
  background: #1a1a1a;
  color: #f5f5f5;
  border: 1px solid #333;
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05), 0 1px 2px rgba(255, 255, 255, 0.1);
}
body.dark-mode .book-page::before {
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0.04) 100%);
}

body.dark-mode .book-page--aristotle {
  border-left: 3px solid rgba(200, 160, 80, 0.6);
}

/* Section 3: per-source citation styling (book-page)
   These are additive modifiers layered on top of the existing
   .book-page / .book-page--aristotle rules in sass.css. Until this
   is folded into a _citations.scss partial, it lives here inline,
   same as the map-modal/stats-modal rules above.
   Poetics vs. Rhetoric: subtle (color + one border edge).
   Aristotle (ancient) vs. modern political quotation: pronounced. */
.book-page--poetics {
  --src-accent: #6b4a2f;
}

.book-page--rhetoric {
  --src-accent: #3d5a73;
}

.book-page--ethics {
  --src-accent: #5a6b3d;
}

.book-page--poetics,
.book-page--rhetoric,
.book-page--ethics {
  border-top: 3px double var(--src-accent);
  border-bottom: 3px double var(--src-accent);
}

.book-page--rhetoric {
  border-bottom: 1px solid var(--src-accent);
}

.book-page--ethics {
  border-top: 1px solid var(--src-accent);
}

/* Dark mode counterpart
   sass.css's body.dark-mode .book-page sets a flat 1px #333
   border on all sides, and body.dark-mode .book-page--aristotle
   adds a gold left accent on top of that — both are equal-
   specificity, two-class selectors (body.dark-mode + .book-page…),
   so without a same-tier override here they win over the plain
   .book-page--poetics/rhetoric/ethics rules above and the double
   top/bottom border disappears in dark mode, leaving just the
   stray gold left edge. This restores the same double-line
   treatment, in the same accent colors, for dark mode. */
body.dark-mode .book-page--poetics,
body.dark-mode .book-page--rhetoric,
body.dark-mode .book-page--ethics {
  border-top: 3px double var(--src-accent);
  border-bottom: 3px double var(--src-accent);
  border-left: 1px solid var(--src-accent);
  border-right: 1px solid var(--src-accent);
}

body.dark-mode .book-page--rhetoric {
  border-bottom: 1px solid var(--src-accent);
}

body.dark-mode .book-page--ethics {
  border-top: 1px solid var(--src-accent);
}

/* Mobile-only: double-line border, drawn by hand
   border-style: double is fine on desktop — this override is
   scoped to mobile only, where it isn't. Mobile Safari doesn't
   reliably render border-style: double: at certain fractional
   device-pixel-ratios the gap between the two lines balloons or
   the second line drops well below the box, which is exactly
   the artifact in the mobile screenshot (the second bottom line
   rendering several lines down, cutting through the footer text
   on the Ch. V.10 / NE card). Same rationale as swapping
   ::marker for ::before+counter above: don't trust a flaky
   cross-browser keyword, draw the line — but only where it's
   actually broken, so desktop keeps its original look untouched. */
@media (max-width: 600px) {
  .book-page--poetics,
  .book-page--rhetoric,
  .book-page--ethics {
    position: relative;
    border-top: 1px solid var(--src-accent);
    border-bottom: 1px solid var(--src-accent);
  }
  .book-page--poetics::before,
  .book-page--rhetoric::before,
  .book-page--ethics::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -3px;
    height: 1px;
    background: var(--src-accent);
  }
  .book-page--poetics::after,
  .book-page--rhetoric::after,
  .book-page--ethics::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 1px;
    background: var(--src-accent);
  }
  .book-page--rhetoric::before {
    display: none;
  } /* single top line only */
  .book-page--ethics::after {
    display: none;
  } /* single bottom line only */
  body.dark-mode .book-page--poetics,
  body.dark-mode .book-page--rhetoric,
  body.dark-mode .book-page--ethics {
    border-top: 1px solid var(--src-accent);
    border-bottom: 1px solid var(--src-accent);
  }
}
.book-page--modern {
  border: 1px solid var(--color-ink, #2a2a2a);
  border-left-width: 4px;
  border-style: solid;
}

.perseus-link {
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 0.68rem;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
  margin-left: 0.6em;
  opacity: 0.6;
}

.perseus-link:hover {
  opacity: 1;
}

/* Section 3: always-visible chapter number on citations
   Sits outside .book-meta-ref so it shows even when the
   #toggle-ci citation toggle is off (sass.css sets
   .book-meta-ref { display: none } by default). Matches
   .book-meta-author's opacity for visual consistency. */
.book-meta-chapter {
  display: inline;
  opacity: 0.65;
}

/* Tighten top gap before blockquotes */
.book-page {
  margin-top: 0.75rem;
}

.blockquote {
  box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
  padding-top: 1em;
  padding-bottom: 0.11em;
  margin-bottom: 2em;
}

.blockquote p {
  padding-left: 1.5em;
  padding-right: 1.5em;
}

.clip-image {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.clip-image:hover {
  transform: scale(1.01);
}
.clip-image::before, .clip-image::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 14px;
  background: repeating-linear-gradient(to right, transparent 0px, transparent 12px, #000 12px, #000 20px, transparent 20px, transparent 40px);
  z-index: 2;
  opacity: 0.85;
}
.clip-image::before {
  top: 0;
}
.clip-image::after {
  bottom: 0;
}
.clip-image video {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 3;
}
.clip-image figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.5em;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 0.9em;
  z-index: 2;
  pointer-events: none;
}

.click-carousel {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 960/475;
  margin: auto;
  overflow: hidden;
}
.click-carousel a {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.4s ease;
}
.click-carousel a figure {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
}
.click-carousel a figure img, .click-carousel a figure video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: pointer;
}
.click-carousel a figure figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 0.9em;
  padding: 0.5em;
  box-sizing: border-box;
  text-align: center;
}
.click-carousel a:target {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}
.click-carousel:not(:has(a:target)) #img1 {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

body, #menu-header, #menu-list {
  transition: background-color 0.4s ease, color 0.4s ease;
}

body.light-mode, #menu-list.light-mode {
  background-color: white;
  color: black;
}

body.dark-mode, #menu-list.dark-mode {
  background-color: black;
  color: white;
}

#toggleMode {
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  border: none;
  background-color: gray;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  border-radius: 5px;
}

.datebook-note {
  background-color: #fff;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 100% 1.5em;
  border: 1px solid #ccc;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-family: "Courier Prime", monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}
.datebook-note p {
  margin: 0;
}
.datebook-note::before {
  content: "✎ Datebook";
  display: block;
  font-size: 0.75rem;
  color: #555;
  margin-bottom: 0.5rem;
  font-style: italic;
}

body.dark-mode .datebook-note {
  background-color: #1e1e1e;
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  border-color: #444;
  color: #eee;
}
body.dark-mode .datebook-note::before {
  color: #aaa;
}

.epigraph-toggle {
  display: none !important;
}

.epigraph {
  position: relative;
  max-width: 42rem;
  margin: 2.5rem auto;
  padding: 1.25rem 1.5rem;
  font-size: 1.05em;
  line-height: 1.55;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.epigraph-body {
  display: grid;
  grid-template-rows: auto auto;
  cursor: pointer;
}

.epigraph-face {
  grid-area: 1/1;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.epigraph-face a {
  pointer-events: auto;
}

.epigraph-original {
  opacity: 1;
}

.epigraph-translation {
  opacity: 0;
}

.epigraph-toggle:checked + .epigraph-body .epigraph-original {
  opacity: 0;
}

.epigraph-toggle:checked + .epigraph-body .epigraph-translation {
  opacity: 1;
}

.epigraph-toggle:checked + .epigraph-body .translate-hint {
  opacity: 0;
}

.translate-hint {
  grid-area: 2/1;
  display: block;
  margin-top: 0.6rem;
  font-size: 0.65em;
  font-style: italic;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.epigraph-source {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.72em;
  font-style: italic;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  opacity: 0.65;
}

.epigraph-source:hover {
  opacity: 1;
}

#hero-image-container {
  position: relative;
  width: 100%;
  height: auto;
  margin-bottom: 2em;
}

.hero-media {
  width: 768px;
  height: auto;
  aspect-ratio: 640/480;
  display: block;
  margin: 0 auto;
  object-fit: cover;
  object-position: top;
  background: #0a0a0a url("../full/gifs/landingdemo-poster.jpg") top center/cover no-repeat;
}

@media (max-width: 768px) {
  .hero-media {
    width: 100%;
  }
}
.hero-image-text {
  display: block;
  margin: 0;
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #f00;
  text-align: center;
  font-size: 6em;
  font-weight: normal;
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 768px) {
  .hero-image-text {
    font-size: 20cqw;
  }
}
#hero-media::-webkit-media-controls,
#hero-media::-webkit-media-controls-panel,
#hero-media::-webkit-media-controls-overlay-play-button,
#hero-media::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

.hint-text {
  font-size: 0.85em;
  font-style: italic;
  opacity: 0.65;
  margin-left: 0.45em;
  position: relative;
  top: -0.35em;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

details[open] > summary .hint-text {
  opacity: 0;
  pointer-events: none;
}

/* Section 3: tap-to-expand / tap-to-collapse hint text
   Two spans, toggled purely by the native details-element's
   open attribute. No JS required. */
details:not([open]) > summary .hint-collapse {
  display: none;
}

details[open] > summary .hint-expand {
  display: none;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.image-grid figure {
  position: relative;
  margin: 0;
  background-color: #000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border-radius: 8px;
  text-align: center;
  transition: box-shadow 0.3s ease;
  align-content: center;
}
.image-grid figure figcaption {
  padding: 0.5rem;
  font-size: 0.9rem;
  color: #444;
  background: rgba(255, 255, 255, 0.85);
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.image-grid figure:hover figcaption {
  opacity: 1;
}

.image-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.image-grid a {
  display: block;
  cursor: zoom-in;
  border-radius: 8px;
  overflow: hidden;
}

.image-grid.no-bg-grid figure:first-child {
  background-color: transparent;
  box-shadow: none;
}
.image-grid.no-bg-grid figure:first-child img,
.image-grid.no-bg-grid figure:first-child a {
  border-radius: 8px;
  overflow: hidden;
  display: block;
}

.image-grid video.video-thumb {
  aspect-ratio: 4/3;
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  background-color: #000;
}

.image-grid.image-grid--plain {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.image-grid.image-grid--plain figure figcaption {
  padding: 6px 4px 0;
  font-size: 0.9em;
  color: #555;
}

.image-grid img.img-max-300 {
  max-width: 300px;
}

.image-grid video.gif-loop {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.image-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 2rem;
}
.image-grid-2x2 figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.image-grid-2x2 figure img {
  width: 100%;
  height: auto;
  display: block;
}
.image-grid-2x2 figure figcaption {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: #444;
  background-color: #fafafa;
  text-align: center;
}

.letter {
  border: lightgrey double 10px;
  padding: 1em;
  margin: 15px 0px;
}

/* ----------------------------------------------------
   Deeply nested ordered list (depth override)
   Used where numeric registers would otherwise collide
----------------------------------------------------- */
ol.depth-3 {
  list-style: none;
  counter-reset: depth3;
  margin-left: 1.5em;
}

ol.depth-3 > li {
  counter-increment: depth3;
  position: relative;
  padding-left: 2.2em;
  margin-bottom: 0.75em;
}

ol.depth-3 > li::before {
  content: counter(depth3) " —";
  position: absolute;
  left: 0;
  font-weight: 600;
  opacity: 0.65;
}

.menu-btn {
  display: none;
}

.menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 2em;
  z-index: 20;
}

@media (max-width: 640px) {
  .menu-icon {
    font-size: 1.6em;
  }
}
.five-card-carousel {
  position: relative;
  max-width: 960px;
  aspect-ratio: 960/475;
  margin: auto;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
}
.five-card-carousel input[type=radio] {
  display: none;
}
.five-card-carousel .card {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.five-card-carousel .card img,
.five-card-carousel .card video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.five-card-carousel .card figcaption {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.5rem;
  font-size: 0.9rem;
  text-align: center;
}
.five-card-carousel #c1:checked ~ .card1,
.five-card-carousel #c2:checked ~ .card2,
.five-card-carousel #c3:checked ~ .card3,
.five-card-carousel #c4:checked ~ .card4,
.five-card-carousel #c5:checked ~ .card5 {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
.five-card-carousel .nav-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}
.five-card-carousel .nav-dots label {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s;
}
.five-card-carousel .nav-dots label:hover {
  background: #999;
}

.mini-album {
  position: relative;
  max-width: 600px;
  margin: 2rem auto;
  overflow: hidden;
  border: 2px solid #ccc;
  border-radius: 8px;
}
.mini-album input[type=radio] {
  display: none;
}
.mini-album .slides {
  display: flex;
  width: 400%;
  transition: transform 0.4s ease-in-out;
}
.mini-album .slide {
  width: 100%;
  flex-shrink: 0;
  display: none;
}
.mini-album .slide img {
  width: 100%;
  display: block;
}
.mini-album #slide1:checked ~ .slides .slide1,
.mini-album #slide2:checked ~ .slides .slide2,
.mini-album #slide3:checked ~ .slides .slide3,
.mini-album #slide4:checked ~ .slides .slide4 {
  display: block;
}
.mini-album .controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
}
.mini-album .controls label {
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.6);
  padding: 0.25em 0.5em;
  cursor: pointer;
  user-select: none;
}

#map-modal-toggle {
  display: none;
}

#map-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}
#map-modal-toggle:checked ~ #map-modal {
  display: flex;
}
#map-modal .modal-overlay {
  display: block;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
#map-modal .modal-box {
  position: relative;
  z-index: 201;
  margin: auto;
  max-width: min(36rem, 92vw);
  max-height: 88vh;
  overflow-y: auto;
}
#map-modal h2 {
  font-size: 1em;
  font-weight: normal;
  font-style: italic;
  margin: 0 0 1rem;
}

.docmap {
  line-height: 1.5;
}
.docmap ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.docmap ol ol {
  margin: 0.1rem 0 0.3rem 1.4rem;
}
.docmap li {
  margin: 0.15rem 0;
}
.docmap a {
  color: inherit;
  opacity: 0.45;
  border-bottom: 0;
  transition: opacity 0.3s ease;
}
.docmap a:hover, .docmap a:focus-visible {
  opacity: 1;
  border-bottom: 1px dotted currentColor;
}
.docmap li.lit > a {
  opacity: 1;
}
.docmap .docmap-num {
  font-style: italic;
  font-variant-numeric: oldstyle-nums;
  font-feature-settings: "onum" 1;
  margin-right: 0.3em;
}

.map-legend {
  margin-top: 1.25rem;
  font-size: 0.8em;
  font-style: italic;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  opacity: 0.7;
}

.docmap .docmap-part {
  margin: 0 0 1.1rem;
}
.docmap .docmap-part-title {
  display: block;
  font-weight: bold;
  margin-bottom: 0.3rem;
}
.docmap .docmap-group {
  margin: 0.5rem 0 0.2rem;
}
.docmap .docmap-group-title {
  display: block;
  font-style: italic;
  font-size: 0.85em;
  opacity: 0.8;
}
.docmap .docmap-part-title a,
.docmap a.docmap-away {
  opacity: 1;
}
.docmap .docmap-tally {
  margin-left: 0.5em;
  font-size: 0.75em;
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}
.docmap li.full > .docmap-tally {
  opacity: 1;
}

.magnifier-toggle input[type=checkbox] {
  display: none;
}
.magnifier-toggle label::after {
  content: " 🔍";
}
.magnifier-toggle input[type=checkbox]:checked + label::after {
  content: " 🔍";
}

marginalia {
  display: none;
  font-style: italic;
  color: darkred;
  margin-left: 0.5em;
}

body:has(#magnify-toggle:checked) .magnifier-zone * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' height='24' width='24'><circle cx='10' cy='10' r='9' stroke='black' stroke-width='2' fill='white'/><line x1='15' y1='15' x2='22' y2='22' stroke='black' stroke-width='2'/></svg>") 10 10, auto;
}
body:has(#magnify-toggle:checked) .magnifier-zone :hover > marginalia {
  display: inline;
}

.magnifier-toggle input[type=checkbox]:checked + label {
  color: #4caf50;
  filter: drop-shadow(0 0 2px #4caf50);
}

marginalia[data-type=ci],
marginalia[data-type=ch] {
  display: none;
}

#magnify-toggle:checked ~ main marginalia[data-type=pa] {
  display: inline;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 1ch;
  font-size: 1rem;
}
.meta-line a,
.meta-line span {
  display: inline;
}
.meta-line a:has(.meta-icon) {
  text-decoration: none;
}
.meta-line .magnifier-toggle {
  display: inline-flex;
  align-items: center;
}
.meta-line .magnifier-toggle input[type=checkbox] {
  display: none;
}
.meta-line .magnifier-toggle label {
  cursor: pointer;
  font-size: 1.1em;
  line-height: 1;
  margin-left: 0.5ch;
}

.magnifier-toggle {
  display: inline-flex;
  align-items: center;
}
.magnifier-toggle input[type=checkbox] {
  display: none;
}
.magnifier-toggle label {
  cursor: pointer;
  font-size: 1.1em;
  line-height: 1;
  margin-left: 0.5ch;
  transition: color 0.3s ease, filter 0.3s ease;
}

body:has(#magnify-toggle:checked) .magnifier-toggle label {
  color: #4caf50;
  filter: drop-shadow(0 0 2px #4caf50);
}

.meta-line img.meta-icon {
  display: block;
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  object-fit: contain;
  flex: 0 0 16px;
}

.meta-line a:has(img.meta-icon) {
  position: relative;
  display: inline-block;
  text-decoration: none !important;
  overflow: hidden;
}

/* Fallback for browsers without :has() */
.vvip-link {
  text-decoration: none !important;
}

.meta-line a:has(img.meta-icon) img.meta-icon {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  object-fit: contain !important;
  transition: filter 0.2s ease;
}

/* Dark mode: invert the vvip logo so it stays visible */
body.dark-mode img.meta-icon {
  filter: invert(1);
}

.meta-line a:has(img.meta-icon)::after {
  content: "";
  position: absolute;
  top: -30%;
  left: -80%;
  width: 45%;
  height: 160%;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.05) 35%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.05) 65%, transparent 100%);
  transform: skewX(-12deg);
  animation: vvip-sheen 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes vvip-sheen {
  0%, 65% {
    left: -80%;
  }
  85% {
    left: 140%;
  }
  100% {
    left: 140%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .meta-line a:has(img.meta-icon)::after {
    animation: none;
  }
}
.menu-header {
  position: fixed;
  top: 0rem;
  right: 0rem;
  z-index: 1000;
}

.menu-btn {
  display: none;
}

/* Hide menu icon when menu is open */
#menu-btn:checked + .menu-icon {
  display: none;
}

.menu-icon {
  font-size: 4rem;
  cursor: pointer;
  user-select: none;
  display: inline-block;
}

/* Collapsible menu panel */
.menu-grid {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  grid-auto-rows: min-content;
  gap: 0.25rem;
  padding: 0.25rem;
  width: 160px;
  max-width: 160px;
  background-color: #111;
  color: white;
  border-radius: 0.5rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

/* When the hamburger is toggled open */
#menu-btn:checked ~ .menu-grid {
  display: grid;
}

/* Expand height only when dossier is open */
.menu-grid details[open] {
  height: auto;
  max-height: 80vh;
  overflow-y: auto;
}

.menu-grid a,
.menu-grid button,
.menu-grid span,
.menu-grid label {
  color: white;
  text-decoration: none;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.4);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .menu-grid {
    background-color: rgba(0, 0, 0, 0.75);
    color: #eee;
    border: 1px solid rgba(255, 255, 255, 0.15);
  }
  .menu-grid a,
  .menu-grid button,
  .menu-grid span,
  .menu-grid label {
    color: #eee;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.4);
  }
}
/* Hide all marginalia by default */
body:has(#toggle-pa:checked) marginalia[data-type=pa],
body:has(#toggle-ci:checked) marginalia[data-type=ci],
body:has(#toggle-ch:checked) marginalia[data-type=ch],
body:has(#toggle-x:checked) marginalia[data-type=x] {
  display: inline;
}

/* Dark mode: toggle invisibles only if in dark mode AND checked */
#menu-btn:checked ~ .menu-grid {
  display: grid;
}

.dashboard-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-start;
}
.dashboard-row span,
.dashboard-row a,
.dashboard-row label {
  font-size: 1.2rem;
}
.dashboard-row .magnifier-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.menu-abstract, .menu-index, .menu-nav {
  border-top: 1px solid rgba(0, 0, 0, 0.3);
  padding-top: 0.4rem;
}

.menu-links {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(7, 1fr); /* 7 days/calendar style */
  gap: 0.15rem;
  padding: 0.2rem 0;
  margin: 0;
  list-style: none;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.1;
}

.menu-links li {
  background: #222;
  border-radius: 0.2rem;
  padding: 0.15rem 0.1rem; /* tighter horizontal padding */
  transition: background 0.1s ease;
  min-width: 1.5ch; /* force compact cells */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-links li a {
  display: block;
  color: #eee;
  text-decoration: none;
  font-size: inherit;
  line-height: inherit;
}

/* Base widget styles */
.widgets {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  justify-items: center;
  align-items: center;
}

/* Only show base by default */
.widgets:first-of-type {
  display: grid;
}

#tools-widgets {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  margin-top: -0.25rem;
  justify-items: center;
}

/* Base widget layout (top row) */
.widgets {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  justify-items: center;
  align-items: center;
}

/* Show base icons by default */
#base-widgets {
  display: grid;
}

/* Tools row, shown underneath when toggled */
#tools-widgets {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  margin-top: -0.25rem;
  justify-items: center;
}

/* Shared widget item styling */
.widgets span,
.widgets label,
#score {
  font-size: 1.1rem;
  padding: 0.3rem;
  width: 100%;
  max-width: 2.2rem;
  text-align: center;
  line-height: 1.2;
  background: none;
  border: none;
  cursor: pointer;
}

/* Optional: hide invisible-only icon unless in dark mode */
.dark-only {
  display: none;
}

body.dark-mode .dark-only {
  display: inline-block;
}

.dossier-dropdown {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 4.5rem; /* reserves space to avoid shifting layout */
  overflow: hidden;
}

.dossier-dropdown summary {
  cursor: pointer;
  font-weight: normal;
  font-size: 1.1rem;
  list-style: none;
  text-align: center;
  padding: 0;
}

.dossier-dropdown summary::-webkit-details-marker {
  display: none; /* hides the default arrow icon */
}

.dossier-dropdown[open] .menu-links {
  max-height: none;
  overflow: visible;
  display: grid;
}

/* Light / Dark Mode status icon */
#toggleMode::after {
  content: "💡"; /* default = light mode */
}

body.dark-mode #toggleMode::after {
  content: "🌙"; /* shows moon when in dark mode */
}

#toggleMode {
  all: unset; /* removes inherited borders, backgrounds, etc. */
  display: inline-block;
  font-size: 1.1rem;
  padding: 0.3rem;
  width: 100%;
  max-width: 2.2rem;
  text-align: center;
  line-height: 1.2;
  cursor: pointer;
  background: none;
  border: none;
}

/* Glow for active utility toggles */
body:has(#toggle-pa:checked) label[for=toggle-pa],
body:has(#toggle-ci:checked) label[for=toggle-ci],
body:has(#toggle-ch:checked) label[for=toggle-ch],
body:has(#toggle-x:checked) label[for=toggle-x],
body:has(#magnify-toggle:checked) label[for=magnify-toggle],
body:has(#magnify-toggle:checked) label[for=toggle-pa],
body:has(#toggle-pa:checked) label[for=magnify-toggle] {
  text-shadow: 0 0 10px rgb(120, 200, 255), 0 0 20px rgb(0, 150, 255), 0 0 30px rgb(0, 150, 255);
  filter: brightness(1.4);
}

body:has(#audio-toggle:checked) label[for=audio-toggle] {
  text-shadow: 0 0 10px rgb(120, 200, 255), 0 0 20px rgb(0, 150, 255), 0 0 30px rgb(0, 150, 255);
  filter: brightness(1.4);
}

/* Glow on hover for the light/dark toggle */
body.dark-mode #toggleMode {
  text-shadow: 0 0 10px rgb(120, 200, 255), 0 0 20px rgb(0, 150, 255), 0 0 30px rgb(0, 150, 255);
  filter: brightness(1.4);
}

/* ========== MODAL (INFO) ========== */
/* Hide modals by default */
#info-modal-toggle + #info-modal,
#abstract-toggle + #abstract-modal {
  display: none;
}

/* Show modals only when their checkboxes are checked */
#info-modal-toggle:checked + #info-modal,
#abstract-toggle:checked + #abstract-modal {
  display: flex;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Modal overlay background */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

/* Modal content box */
.modal-box {
  background: #fff;
  color: #111;
  padding: 1.5rem;
  border-radius: 0.5rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  z-index: 1001;
  position: relative;
  text-align: left;
  line-height: 1.5;
  font-size: 1rem;
}

/* Modal close button */
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 1.2rem;
  cursor: pointer;
  color: #333;
  background: none;
  border: none;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .modal-box {
    background: #111;
    color: #eee;
  }
  .modal-close {
    color: #eee;
  }
}
.widgets-row {
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.25rem;
  width: 100%;
}

#tools-widgets {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  justify-items: center;
  margin-top: -0.2rem;
}

#tools-toggle:checked ~ .widgets-row #tools-widgets {
  display: grid;
}

.widgets .version-tag {
  grid-column: 4;
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  max-width: none;
  padding: 0.3rem 0;
  opacity: 0.6;
  align-self: center;
}

/* Tracker: map + stats icons hidden until tracker-toggle is on */
#tracker-map-label,
#tracker-stats-label {
  display: none;
}

body:has(#tracker-toggle:checked) #tracker-map-label,
body:has(#tracker-toggle:checked) #tracker-stats-label {
  display: inline;
}

.modal {
  display: none;
}

#info-modal-toggle:checked ~ #info-modal,
#abstract-toggle:checked ~ #abstract-modal,
#modal-nietzsche:checked ~ #modal-nietzsche-box {
  display: block;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

#info-modal-toggle:checked ~ #info-modal .modal-overlay,
#abstract-toggle:checked ~ #abstract-modal .modal-overlay,
#modal-nietzsche:checked ~ #modal-nietzsche-box .modal-overlay {
  display: flex;
}

.modal-box {
  position: relative;
  max-width: 36rem;
  width: 90%;
  padding: 2rem 2.5rem;
  background: var(--bg, #fff);
  border-top: 1px solid rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.modal-close {
  display: block;
  margin-top: 1.25rem;
  font-size: 0.7em;
  font-style: italic;
  opacity: 0.5;
  cursor: pointer;
  text-align: right;
  letter-spacing: 0.04em;
}

.modal-close:hover {
  opacity: 1;
}

/* Info / Abstract / Nietzsche modal show rules
   Same fix as map/stats above: these three modals use the same
   checkbox-sibling pattern but had no matching display rule in
   this file, so absent an equivalent rule in sass.css they were
   rendering inline (open) instead of as hidden overlays. */
#info-modal {
  display: none;
}

#info-modal-toggle:checked ~ #info-modal {
  display: flex;
}

#abstract-modal {
  display: none;
}

#abstract-toggle:checked ~ #abstract-modal {
  display: flex;
}

#info-modal,
#abstract-modal,
#modal-nietzsche-box {
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
}
#info-modal .modal-overlay,
#abstract-modal .modal-overlay,
#modal-nietzsche-box .modal-overlay {
  display: block;
  position: absolute;
  inset: 0;
}
#info-modal .modal-box,
#abstract-modal .modal-box,
#modal-nietzsche-box .modal-box {
  z-index: 201;
  margin: auto;
  max-height: 88vh;
  overflow-y: auto;
}

.modal .modal-box.modal-box--scroll {
  max-height: 80vh;
  overflow-y: auto;
}

.movietitle {
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 0.04em;
  text-underline-offset: 0.08em;
  text-decoration-color: rgba(0, 0, 0, 0.25);
}

.grid-cell {
  justify-self: center;
  align-content: center;
  padding: 0 1em;
}

.menu-header {
  position: fixed;
  right: 1px;
  height: calc(1em + 3vw);
  display: flex;
  flex-direction: row;
  justify-content: right;
  padding: 0 1rem 0 1rem;
  z-index: 20;
}

.police-report {
  font-family: "Courier Prime", Courier, monospace;
  background-color: #f4f4f4;
  color: #111;
  border-left: 4px solid #444;
  padding: 1.5em;
  margin: 2em 0;
  max-width: 60ch;
  line-height: 1.4;
}

body.dark-mode .police-report {
  background-color: #1e1e1e;
  color: #ddd;
  border-left: 4px solid #888;
}

.quote-toggle {
  margin: 1.5rem 0;
  font-size: inherit;
}
.quote-toggle .clickable-word {
  cursor: pointer;
}
.quote-toggle .clickable-word .punctuation.collapsed {
  display: inline;
}
.quote-toggle .clickable-word .punctuation.expanded {
  display: none;
}
.quote-toggle[open] summary .punctuation.collapsed {
  display: none;
}
.quote-toggle[open] summary .punctuation.expanded {
  display: inline;
}
.quote-toggle ul {
  margin-top: inherit;
  padding-left: inherit;
  border-left: inherit;
  color: inherit;
}
.quote-toggle p {
  margin: 0.5em 0;
}

.widgets label[for=tracker-toggle] {
  position: relative;
  padding-right: 0.45em;
}
.widgets label[for=tracker-toggle]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.1em;
  width: 0.38em;
  height: 0.38em;
  border-radius: 50%;
  background: #c0392b;
}

body:has(#tracker-toggle:checked) .widgets label[for=tracker-toggle]::after {
  display: none;
}

body:has(#map-unlocked:checked) #tracker-map-label {
  display: inline;
}

body:has(#map-unlocked:not(:checked)) #tracker-map-label {
  display: none;
}

#survey {
  margin-top: 1rem;
}
#survey #survey-readout {
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 0.8em;
  line-height: 1.6;
  opacity: 0.75;
}

.radar-mute {
  display: none;
  cursor: pointer;
}

#tracker-toggle:checked ~ .widgets-row .radar-mute {
  display: inline-block;
}

.redact-toggle:not(:checked) + a {
  background-color: rgb(0, 0, 0);
  line-height: 140%;
  -webkit-transition: background-color 500ms ease-out;
  -moz-transition: background-color 500ms ease-out;
  -o-transition: background-color 500ms ease-out;
  transition: background-color 500ms ease-out;
  text-decoration: none;
  color: #000000;
}

.redact-toggle:checked + a {
  background-color: rgba(0, 0, 0, 0);
  line-height: 140%;
  -webkit-transition: background-color 500ms ease-out;
  -moz-transition: background-color 500ms ease-out;
  -o-transition: background-color 500ms ease-out;
  transition: background-color 500ms ease-out;
  text-decoration: none;
  color: #000000;
}

.scrapbook-img {
  max-width: 300px;
  margin: 2rem auto;
  padding: 8px;
  background: #fdfcf7;
  border: 1px solid #aaa;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.15);
  display: block;
  text-align: center;
  font-family: "Courier Prime", monospace;
}

.scrapbook-img img {
  width: 100%;
  height: auto;
  display: block;
}

.scrapbook-img.scrapbook-img--w100 {
  max-width: 100px;
}

.scrapbook-img.scrapbook-img--w600 {
  max-width: 600px;
}

.scriptexcerpt, .scriptexcerpt-left, .scriptexcerpt-center {
  font-family: "Courier Prime", monospace;
  padding: 0rem 1.5rem;
  border: 0px solid lightgrey;
  margin: 1.5rem 0;
  white-space: pre-line;
}

.scriptexcerpt-center {
  text-align: center;
}

.scriptexcerpt-left {
  text-align: left;
}

/* =========================================
   Map embeds (Google My Maps, dossier)
   ========================================= */
figure.map-embed {
  width: 100vw;
  max-width: 640px;
  margin: 2rem auto;
}
figure.map-embed iframe {
  width: 100%;
  aspect-ratio: 4/3;
  border: 0;
  display: block;
}

.title-header {
  text-align: center;
  position: absolute;
  top: 10px;
  color: #f00;
}

.trans {
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 0.04em;
  text-underline-offset: 0.08em;
  text-decoration-color: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.trans.is-translated {
  text-decoration-style: dashed;
  text-decoration-color: rgba(0, 0, 0, 0.4);
}

body.dark-mode .trans {
  text-decoration-color: rgba(255, 255, 255, 0.3);
}
body.dark-mode .trans.is-translated {
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

@keyframes trans-shimmer {
  0%, 96%, 100% {
    opacity: 1;
  }
  98% {
    opacity: 0.55;
  }
}
body.dark-mode .trans:not(.is-translated) {
  animation: trans-shimmer 12s ease-in-out infinite;
}

.transcript {
  border: black dashed 2px;
  margin-bottom: 1em;
  padding: 1em;
  margin-top: 1em;
}

.transcript p {
  padding-left: 1.5em;
  padding-right: 1.5em;
  text-indent: -50px;
  margin-left: 50px;
}

.transcript-name {
  font-weight: 900;
}

.unlock-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: #fff;
  padding: 0.6rem 1.25rem;
  font-family: "Courier Prime", monospace;
  font-size: 0.85rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  10% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
}
video[poster] {
  object-fit: cover;
  width: 100%;
}

.wraparound-carousel {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 960/475;
  margin: auto;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}
.wraparound-carousel input[type=radio] {
  display: none;
}
.wraparound-carousel .wrap-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.wraparound-carousel .wrap-slide img,
.wraparound-carousel .wrap-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.wraparound-carousel .wrap-slide figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  color: #444;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.wraparound-carousel .wrap-slide:hover figcaption {
  opacity: 1;
}
.wraparound-carousel #wrap1:checked ~ .slide1,
.wraparound-carousel #wrap2:checked ~ .slide2,
.wraparound-carousel #wrap3:checked ~ .slide3,
.wraparound-carousel #wrap4:checked ~ .slide4,
.wraparound-carousel #wrap5:checked ~ .slide5 {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
.wraparound-carousel .carousel-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.wraparound-carousel .carousel-nav label {
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  background: #ddd;
  border-radius: 4px;
  transition: background 0.3s;
}
.wraparound-carousel .carousel-nav label:hover {
  background: #bbb;
}

#welcome-message {
  position: fixed;
  top: 3.25rem;
  right: 1rem;
  background: #fff;
  color: #000;
  border: 1px solid #ccc;
  padding: 0.55rem 1.9rem 0.55rem 0.8rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  max-width: min(300px, 100vw - 3rem);
  font-family: system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8rem;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
#welcome-message p {
  margin: 0;
}
#welcome-message .welcome-logo {
  display: inline-block;
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: -2px;
  margin-right: 0.3em;
}
#welcome-message .welcome-sub {
  opacity: 0.7;
}
#welcome-message .welcome-arrow {
  display: inline-block;
  font-size: 1.1em;
  line-height: 1;
  margin-left: 0.15em;
}
#welcome-message a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
#welcome-message .welcome-close {
  position: absolute;
  top: 0.3rem;
  right: 0.5rem;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

#welcome-message.show {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 600px) {
  #welcome-message {
    top: 2.75rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}
/* Section 3 is locked permanently open: the mainline essay body
   shouldn't be collapsible. Kept as a <details open> (rather than a
   plain div) so any map.js logic keyed off details[open] still sees
   it as open; the summary is just de-clicked via pointer-events. */
summary.summary-locked-open {
  pointer-events: none;
  cursor: default;
}

/* Section 3: suppress auto-numbering on the 3a/3b/3c sublist
   The list items are manually labeled (3a., 3b., 3c.) in their
   own summary text, so the browser's decimal counter would be
   redundant/stacking (e.g. "1. 3a. ..."). Body text will sit
   between these sections eventually; they're asides off the
   main essay flow, not a strict numbered sequence — the "3a."
   labels are provisional markers, not list numbering. */
.essay-sublist {
  list-style: none;
}

/* Section 3a: numbered index of chapter walkthroughs
   Unlike the 3a/3b/3c aside-list above, this inner list (Ch. 9,
   Ch. 11, Ch. 13, The Tragic Mechanism) IS a sequential walk
   through the Poetics, so it gets real numbering. The Ch. 13
   sub-list (decent/wicked-success/etc.) stays unnumbered — it
   inherits plain .essay-sublist since those four aren't a
   sequence either, just parallel eliminated candidates. */
.essay-sublist--numbered {
  list-style: none;
  counter-reset: essay-num;
  padding-left: 2.6rem;
}

.essay-sublist--numbered > li {
  counter-increment: essay-num;
  position: relative;
  padding-left: 0.3rem;
}

/* Subtle oldstyle-figure touch on the sub-numbering markers:
   EB Garamond's text figures (onum) have the varied baseline —
   some numerals dipping below it — that gives numerals like
   "3" and "9" their small "boot" descender, softer and more
   bookish than lining figures. Sized and muted down slightly
   since this is a sub-numbering, not a top-level index.
   Uses ::before + counter rather than ::marker — ::marker's
   support for font-family/font-feature-settings is inconsistent
   across browsers (notably Safari), so it was silently falling
   back to the UA default marker. ::before is reliable. */
.essay-sublist--numbered > li::before {
  content: counter(essay-num) ".";
  position: absolute;
  left: -1.8rem;
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-variant-numeric: oldstyle-nums;
  font-feature-settings: "onum" 1;
  font-size: 0.85em;
  opacity: 0.6;
}

/* Section 3a, Ch. 13 sub-list: the four eliminated arcs
   Nested one level deeper than the Ch. 9/11/13/14 index above —
   a "sub-sub" numbering — so it's marked distinctly: monospace
   parenthesized figures rather than italic oldstyle periods,
   smaller and quieter than the parent list's markers. */
.essay-sublist--numbered-sub {
  counter-reset: essay-subnum;
  padding-left: 1.5rem;
}

.essay-sublist--numbered-sub > li {
  counter-increment: essay-subnum;
  position: relative;
}

.essay-sublist--numbered-sub > li::before {
  content: counter(essay-subnum) ")";
  position: absolute;
  left: -1.5rem;
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 0.72rem;
  opacity: 0.5;
}

/* Mobile: let indented content fill the frame
   On a narrow viewport, stacking margin-left on .essay-step,
   .essay-step-sub, .essay-aside, and the two numbered sub-lists
   eats a big share of an already-narrow column. Below 600px,
   swap the margin-based indent for a thin left border + small
   padding, so nesting still reads at a glance without shrinking
   the line length. This only covers the classes defined in this
   file's own <style> block — if .book-page or the 3a/3b/3c
   details/ol nesting also carry left padding from sass.css
   itself, that needs the equivalent treatment there; that
   source isn't part of this upload so I can't check/edit it
   from here. */
@media (max-width: 600px) {
  .essay-sublist--numbered {
    padding-left: 1.4rem;
  }
  .essay-sublist--numbered > li::before {
    left: -1.1rem;
  }
  .essay-sublist--numbered-sub {
    padding-left: 1rem;
  }
  .essay-sublist--numbered-sub > li::before {
    left: -1rem;
  }
}
details.fold {
  margin: 0.9rem 0;
}
details.fold > summary {
  cursor: pointer;
  font-size: 0.9em;
  font-style: italic;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
details.fold > summary:hover {
  opacity: 1;
}
details.fold > .fold-body {
  margin-top: 0.5rem;
  padding-left: 0.9rem;
  border-left: 1px solid var(--color-border, #ddd);
}

@media (max-width: 600px) {
  details.fold > .fold-body {
    padding-left: 0.6rem;
  }
}
#epigram-book-toggle {
  display: none;
}

#epigram-book {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}
#epigram-book-toggle:checked ~ #epigram-book {
  display: flex;
}
#epigram-book .modal-overlay {
  display: block;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
#epigram-book .modal-box {
  position: relative;
  z-index: 201;
  margin: auto;
  max-width: min(36rem, 92vw);
  max-height: 88vh;
  overflow-y: auto;
}
#epigram-book h2 {
  font-size: 1em;
  font-weight: normal;
  font-style: italic;
  margin: 0 0 1rem;
}

.epigram-book-list {
  margin: 0;
  padding-left: 1.4rem;
}
.epigram-book-list a,
.epigram-book-list label {
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.epigram-book-entry {
  margin: 0.4rem 0;
}
.epigram-book-entry:has(> .epi-have:not(:checked)) > a {
  visibility: hidden;
}

#epigram-book-label {
  display: none;
}

body:has(.epi-have:checked) #epigram-book-label {
  display: inline;
}

body:has(#epi-complete:checked) #epigram-book .modal-box {
  border-top: 3px double #b8963e;
  border-bottom: 3px double #b8963e;
}
body:has(#epi-complete:checked) #epigram-book-label {
  text-shadow: 0 0 6px rgba(184, 150, 62, 0.85);
}
body:has(#epi-complete:checked) #map-epi-label {
  color: #b8963e;
}

body {
  color: #000;
}

figure {
  position: relative;
  display: inline-block;
}

figure figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.5em;
  font-size: 0.9em;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  white-space: normal;
  overflow-wrap: break-word;
  max-width: 100%;
}

figure:hover figcaption {
  opacity: 1;
}

marginalia {
  display: none;
  color: #666;
  font-style: italic;
  font-size: 0.9em;
  margin-left: 0.3em;
}

body:has(#magnify-toggle:checked) marginalia[data-type=pa] {
  display: inline !important;
}

body:has(#magnify-toggle:checked) marginalia:not([data-type=pa]) {
  display: none !important;
}

body:has(#magnify-toggle:checked) .hidden-unless-magnified {
  display: inline !important;
}

body:has(#magnify-toggle:checked) .magnifier-zone * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' height='24' width='24'><circle cx='10' cy='10' r='9' stroke='black' stroke-width='2' fill='white'/><line x1='15' y1='15' x2='22' y2='22' stroke='black' stroke-width='2'/></svg>") 10 10, auto;
}

body:has(#magnify-toggle:checked) .magnifier-zone img {
  transition: transform 0.3s ease, object-position 0.3s ease;
  transform: scale(1.8);
  object-fit: cover;
  object-position: center center;
}

body:has(#magnify-toggle:checked) .magnifier-zone img:hover {
  cursor: zoom-in;
}

body:has(pa-toggle:checked) marginalia[data-type=pa] {
  display: inline !important;
}

body:has(ci-toggle:checked) marginalia[data-type=ci] {
  display: inline !important;
}

body:has(ch-toggle:checked) marginalia[data-type=ch] {
  display: inline !important;
}

body:has(x-toggle:checked) marginalia[data-type=x] {
  display: inline !important;
}

/*# sourceMappingURL=sass.css.map */
