@charset "UTF-8";
/* foundation ✴ Theme Components and Templates */
/* SCSS Variables — Unified Classical Scriptorium & Book Codex Theme */
:root {
  --book-bg: #1e1e20;
  --book-bg-alpha: rgba(30, 30, 32, 0.94);
  --book-surface: #272629;
  --book-surface-alt: #313035;
  --sidebar-bg: #18181a;
  --book-text: #d6cfc5;
  --book-text-muted: #9c958a;
  --book-muted: var(--book-text-muted);
  --book-text-dim: #787268;
  --book-border: #3d3934;
  --book-border-dark: #544f47;
  --book-border-light: #2c2b2e;
  --book-link: #de836e;
  --book-accent: var(--book-link);
  --book-link-hover: #f5a492;
  --book-link-visited: #c97864;
  --book-quote-bg: rgba(255, 255, 255, 0.04);
  --book-quote-border: #4d4841;
  --book-code-bg: #29282b;
  --book-code-text: #d6cfc5;
  --book-max-width: 46rem;
  --book-scroll-offset: 8.5rem;
  --book-font-serif: 'EB Garamond', Garamond, 'Palatino Linotype', Palatino, 'Georgia', 'Times New Roman', serif;
  --book-font-display: 'EB Garamond', Garamond, 'Georgia', serif;
  --book-font-mono: 'Fira Code', ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --geom-font-sans: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  --bg-color: var(--book-bg);
  --bg: var(--book-surface);
  --bg-alt-color: var(--book-surface);
  --text-color: var(--book-text);
  --text-muted: var(--book-text-muted);
  --text-muted-alpha: var(--book-border);
  --heading-color: #e4dfd7;
  --link-color: var(--book-link);
  --link-hover-color: var(--book-link-hover);
  --border-color: var(--book-border);
  --color-success: #5ec27e;
  --color-warning: #e8b85a;
  --color-danger: #e06c60;
  --color-info: #7aa2f7;
  --color-note: var(--book-link);
  --color-tooltip: #e8b85a;
  --color-muted: var(--book-text-muted);
  --color-property: #de836e;
  --color-guide: rgba(222, 131, 110, 0.2);
  --color-key: var(--book-surface);
  --color-key-dark: var(--book-bg);
  --color-key-light: var(--book-surface-alt);
  --color-key-lighter: var(--book-text);
  --fitz: .5em;
  --fitz-2: calc(var(--fitz) * 2);
  --fitz-half: calc(var(--fitz) / 2);
  --col: 16rem;
  --col-2: calc(var(--col) * 2);
  --col-3: calc(var(--col) * 3);
  --bp-small: 40em;
  --bp-medium: 60em;
  --bp-large: 80em;
  --bp-xlarge: 96em;
  --bp-xxlarge: 108em;
  --offset: 1rem;
  --font-primary: var(--book-font-serif);
  --font-display: var(--book-font-display);
  --font-code: var(--book-font-mono);
  --font-icon: 'photon-icon';
  --bullet: '✴';
}

/* fonts *****************************/
@font-face {
  font-family: 'photon-icon';
  src: url("../fonts/photon-icon/photon-icon.woff2") format("woff2"), url("../fonts/photon-icon/photon-icon.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Fira Sans';
  src: local("Fira Sans Regular"), url("../fonts/Fira_Sans/FiraSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Fira Sans';
  src: local("Fira Sans Regular Italic"), url("../fonts/Fira_Sans/FiraSans-RegularItalic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: 'Fira Sans';
  src: local("Fira Sans Bold"), url("../fonts/Fira_Sans/FiraSans-Bold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Fira Sans';
  src: local("Fira Sans Bold Italic"), url("../fonts/Fira_Sans/FiraSans-BoldItalic.ttf") format("truetype");
  font-weight: 600;
  font-style: italic;
}

@font-face {
  font-family: 'Fira Sans Condensed';
  src: local("Fira Sans Condensed Regular"), url("../fonts/Fira_Sans_Condensed/FiraSansCondensed-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fira Sans Condensed';
  src: local("Fira Sans Condensed Regular Italic"), url("../fonts/Fira_Sans_Condensed/FiraSansCondensed-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Fira Sans Condensed';
  src: local("Fira Sans Condensed Bold"), url("../fonts/Fira_Sans_Condensed/FiraSansCondensed-Bold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fira Sans Condensed';
  src: local("Fira Sans Condensed Bold Italic"), url("../fonts/Fira_Sans_Condensed/FiraSansCondensed-BoldItalic.ttf") format("truetype");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Fira Code';
  src: local("Fira Code Regular"), url("../fonts/Fira_Code/static/FiraCode-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Fira Code';
  src: local("Fira Code Bold"), url("../fonts/Fira_Code/static/FiraCode-Bold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

/* base elements *****************************/
/* elements/reset *****************************/
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
div,
header,
nav,
main,
aside,
footer,
article,
section,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li,
dl,
dt,
dd,
blockquote,
figure,
figcaption,
pre,
table,
th,
td,
form,
fieldset,
legend,
input,
textarea,
button {
  margin: 0;
  padding: 0;
}

section, header, footer, main, .asides {
  background: var(--bg-alt-color);
  margin: var(--fitz);
  padding: var(--fitz);
}

/* elements/headings *****************************/
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2em;
  line-height: 1.5;
  color: var(--heading-color);
  display: block;
}

h1 a.headerlink, h2 a.headerlink, h3 a.headerlink, h4 a.headerlink, h5 a.headerlink, h6 a.headerlink {
  font-size: 0.8em;
  opacity: 0.3;
  padding-left: 0.5em;
  transition: opacity 0.2s ease-in-out;
}

h1 a.headerlink:hover, h2 a.headerlink:hover, h3 a.headerlink:hover, h4 a.headerlink:hover, h5 a.headerlink:hover, h6 a.headerlink:hover {
  opacity: 1;
}

/* elements/blocks *****************************/
p, div,
dl, dd, dt,
details, summary {
  display: block;
  font-feature-settings: 'kern' 1, 'onum' 1, 'liga' 1;
}

dl {
  padding: var(--fitz-half);
  margin: var(--fitz-half);
  grid-gap: var(--fitz-half);
  grid-template-columns: auto 1fr;
}

dl dt {
  font-weight: 700;
  grid-column: 1 / 2;
  padding-right: var(--fitz-half);
}

dl dt::after {
  content: ':';
}

dl dd {
  grid-column: 2 / 3;
}

hr {
  border-top: 1px solid var(--link-color);
}

.line-block {
  margin-bottom: var(--fitz-half, 0.75rem);
}

.note-item {
  margin-bottom: 1.15rem;
  padding: 0.15rem 0 0.15rem 0.85rem;
  border-left: 2px solid rgba(255, 255, 255, 0.15);
}

.note-item > p {
  margin-top: 0;
  margin-bottom: 0.45rem;
}

.note-item > p:last-child {
  margin-bottom: 0;
}

.note-item > ul,
.note-item > ol,
.note-item > blockquote {
  margin-top: 0.35rem;
  margin-bottom: 0.45rem;
}

.note-item > :last-child {
  margin-bottom: 0;
}

/* elements/lists *****************************/
ul, ol, li {
  margin-left: 1em;
}

ul {
  list-style: disc outside;
}

ol {
  list-style: decimal outside;
}

li {
  font-feature-settings: 'kern' 1, 'onum' 1, 'liga' 1;
}

/* elements/blockquotes *****************************/
blockquote {
  display: block;
  padding: var(--fitz-2);
}

blockquote > blockquote {
  font-style: italic;
}

blockquote p {
  position: relative;
  margin-bottom: 0;
  overflow: visible;
}

/* elements/code *****************************/
pre,
code,
kbd,
samp {
  padding: 0.1em 0.3em;
  font-family: var(--font-code);
  font-size: 0.9em;
  line-height: 1.5;
  font-weight: 400;
  color: var(--book-code-text, #d6cfc5);
  background: var(--book-code-bg, #29282b);
  border-radius: 3px;
}

code {
  height: auto;
}

pre code {
  padding: 0;
  background: transparent;
  display: block;
}

pre {
  display: block;
  background: transparent;
  padding: 0;
}

div.highlight {
  background: var(--book-code-bg, #29282b);
  border: 1px solid var(--book-border, #3d3934);
  padding: 0.85rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  overflow-x: auto;
}

/* elements/a *****************************/
a {
  color: var(--link-color);
  text-decoration: none;
  background: none;
}

a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

/* elements/inline *****************************/
b,
strong {
  font-weight: inherit;
  font-weight: bolder;
}

em,
i {
  font-style: italic;
}

cite {
  font-style: italic;
}

mark {
  --bg: var(--link-color);
  background: var(--bg);
}

abbr[title] {
  border-bottom: 0;
  text-decoration: underline;
  text-decoration: underline dotted;
}

small {
  line-height: 1;
  font-size: 0.8em;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -.25em;
}

sup {
  top: -.5em;
}

/* elements/figure *****************************/
img {
  border-style: none;
  display: block;
}

figure {
  height: auto;
  display: block;
}

figure > img {
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}

figure > figcaption {
  width: 100%;
}

/* elements/tables *****************************/
table {
  --border-color: var(--text-color);
  max-width: 100%;
}

th,
td {
  padding: calc( var(--fitz) / 2);
}

th {
  font-weight: 700;
  text-align: right;
}

.viewcode-link .pre {
  display: none;
}

.viewcode-link::after {
  content: "{}";
  font-family: "Fira Code", monospace;
  font-weight: bold;
  font-size: 1rem;
  display: inline-block;
  vertical-align: middle;
  padding: 0 0.2em;
}

/* elements/forms *****************************/
button,
input {
  font-family: var(--font-primary);
  font-size: 100%;
  line-height: 1.15;
  overflow: visible;
}

button {
  text-transform: none;
}

[type="checkbox"] {
  box-sizing: border-box;
  padding: 0;
}

[type="search"] {
  outline-offset: -2px;
}

[hidden] {
  display: none;
}

input[type=text],
input[type=search] {
  display: block;
  box-sizing: border-box;
  padding: 0.45em 0.75em;
  outline: 0 none;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: none;
  text-align: left;
  color: var(--text-color);
  background: var(--bg-alt-color);
  appearance: none;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  line-height: 1.4;
  width: 100%;
  max-width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

input[type=text]::placeholder,
input[type=search]::placeholder {
  color: var(--color-muted);
  opacity: 1;
}

input[type=text]:hover,
input[type=search]:hover {
  border-color: color-mix(in oklch, var(--border-color), var(--text-color) 30%);
}

input[type=text]:focus,
input[type=search]:focus {
  color: var(--heading-color);
  border-color: var(--link-color);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--link-color), transparent 75%);
  outline: none;
}

input[type="checkbox"],
input[type="radio"] {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
  --color: var(--color-key-dark);
}

.form-group {
  margin-bottom: 1rem;
}

input[type=submit] {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  border: 0 none;
  border-radius: .5em;
  color: var(--color-key-lighter);
  background: var(--color-key);
  padding: .5em;
  margin: .5em 0;
  text-decoration: none;
}

input[type=submit]:hover {
  background: var(--link-hover-color);
}

label {
  display: block;
  font-weight: bold;
  font-family: var(--font-primary);
  margin-bottom: 0.5rem;
  color: var(--color-key-lighter);
  background: var(--link-color);
}

button {
  border: 0 none;
  border-radius: .5em;
  color: var(--color-key-lighter);
  background: var(--color-key);
  padding: .5em;
  margin: .5em;
  text-decoration: none;
}

button:hover {
  background: var(--color-key-light);
  text-decoration: none;
}

button[type="submit"] {
  color: var(--color-key-lighter);
  background: var(--link-color);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  cursor: pointer;
}

button[type="submit"]:hover {
  background: var(--color-key-light);
}

/* elements/admonitions *****************************/
.admonition {
  border-left: 5px solid var(--text-color);
  background-color: var(--bg-alt-color);
  padding: var(--fitz);
  margin: var(--fitz-2) 0;
}

.admonition .admonition-title {
  color: var(--text-color);
  font-weight: bold;
}

.admonition p {
  margin: 0;
}

.admonition.todo {
  border-color: var(--color-danger);
}

.admonition.todo .admonition-title {
  color: var(--color-danger);
}

.admonition.note {
  border-color: var(--color-note);
}

.admonition.note .admonition-title {
  color: var(--color-note);
}

.admonition.warning, .admonition.attention, .admonition.caution, .admonition.important {
  border-color: var(--color-warning);
}

.admonition.warning .admonition-title, .admonition.attention .admonition-title, .admonition.caution .admonition-title, .admonition.important .admonition-title {
  color: var(--color-warning);
}

.admonition.danger, .admonition.error {
  border-color: var(--color-danger);
}

.admonition.danger .admonition-title, .admonition.error .admonition-title {
  color: var(--color-danger);
}

.admonition.hint, .admonition.tip {
  border-color: var(--color-success);
}

.admonition.hint .admonition-title, .admonition.tip .admonition-title {
  color: var(--color-success);
}

/* elements/api *****************************/
dl.py dt.sig {
  font-family: var(--font-code);
  font-size: 0;
}

dl.py dt.sig > * {
  font-size: 1rem;
}

dl.py dt.sig .sig-prename {
  display: none;
  color: var(--color-muted);
}

dl.py dt.sig .sig-name {
  font-weight: bold;
  color: var(--color-warning);
}

dl.py dt.sig .sig-param {
  display: block;
  margin-left: 2rem;
}

dl.py dt.sig .sig-param::after {
  content: ",";
}

dl.py dt.sig .sig-param:last-of-type::after {
  content: "";
}

dl.py em.property {
  color: var(--color-property);
  font-style: normal;
}

dl.py dd {
  padding: 1rem 1rem 1rem 2rem;
  margin-left: 0;
}

article:not(.excerpt) {
  display: flex;
  flex-flow: column nowrap;
}

article:not(.excerpt) nav.context {
  grid-area: context;
  width: 100%;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: flex-start;
}

article:not(.excerpt) nav.context div {
  min-width: 4em;
}

article:not(.excerpt) nav.context a {
  --offset: 1.2em;
}

article:not(.excerpt) nav.context a.prev {
  justify-content: flex-start;
}

article:not(.excerpt) nav.context a.prev::before {
  padding-top: .1em;
  font-family: var(--font-icon);
  content: "<";
  text-align: left;
}

article:not(.excerpt) nav.context a.next {
  justify-content: flex-end;
  padding-left: var(--fitz);
  padding-right: var(--offset);
  text-align: right;
  border-right: 1px solid var(--border-color);
}

article:not(.excerpt) nav.context a.next:hover {
  font-weight: bold;
  width: var(--offset);
  margin-right: calc(var(--offset) * -1);
  display: inline-block;
  text-align: right;
}

article:not(.excerpt) nav.breadcrumbs {
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
  text-align: center;
}

article:not(.excerpt) nav.breadcrumbs a {
  display: block;
}

article:not(.excerpt) nav.breadcrumbs a::before {
  font-family: var(--font-icon);
  content: "^";
  padding: 0 .25em;
}

article:not(.excerpt) > figure {
  overflow: hidden;
  display: flex;
  flex-flow: column nowrap;
  cursor: pointer;
}

article:not(.excerpt) > figure > img {
  max-width: 100%;
  height: 100%;
  margin: 0 auto;
  object-position: center;
}

article:not(.excerpt) > figure.modal {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: black;
}

article:not(.excerpt) > figure.modal > img {
  max-height: none;
}

article:not(.excerpt) > header {
  grid-area: article-header;
  display: flex;
  flex-flow: column;
}

article:not(.excerpt) > header > h1 {
  font-size: 1.4em;
  line-height: 1;
}

article:not(.excerpt) > header > h2 {
  font-variant: normal;
  text-transform: uppercase;
  font-weight: 700;
  font-size: .9em;
  letter-spacing: .1em;
  margin-top: var(--fitz-half);
}

article:not(.excerpt) > header > h2 ~ h2 {
  margin-top: var(--fitz);
}

article:not(.excerpt) > .content {
  grid-area: content;
}

article:not(.excerpt) > .content > * + * {
  margin-top: var(--fitz);
}

article:not(.excerpt) > .content p {
  margin-bottom: var(--fitz);
}

article:not(.excerpt) > .content h1,
article:not(.excerpt) > .content > h2,
article:not(.excerpt) > .content > h3,
article:not(.excerpt) > .content > h4,
article:not(.excerpt) > .content > h5,
article:not(.excerpt) > .content > h6 {
  margin-top: var(--fitz-2);
}

article:not(.excerpt) > .content h1 {
  border-bottom: 1px solid var(--link-color);
  margin-bottom: var(--fitz-2);
}

article:not(.excerpt) > .content > .summary {
  border-top: 1px solid var(--link-color);
  padding-top: var(--fitz-2);
  border-bottom: 1px solid var(--link-color);
  padding-bottom: var(--fitz-2);
  margin-bottom: var(--fitz-2);
  font-size: 1.1em;
}

article:not(.excerpt) > .content > .summary ul,
article:not(.excerpt) > .content > .summary li {
  margin: var(--fitz);
}

article:not(.excerpt) > .content a {
  display: inline;
}

article:not(.excerpt) > .content blockquote {
  padding: 0.75rem 1.25rem;
  margin: 0.75rem 0 var(--fitz) 0;
  background: var(--book-surface-alt);
  border-left: 3px solid var(--book-accent);
  border-radius: 0 6px 6px 0;
  color: var(--book-text);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.12em;
  line-height: 1.55;
}

article:not(.excerpt) > .content blockquote > *:last-child {
  margin-bottom: 0;
}

article:not(.excerpt) > .content blockquote > *:last-child > *:last-child {
  margin-bottom: 0;
}

article:not(.excerpt) > .content blockquote > blockquote {
  font-style: italic;
  list-style-type: '~';
  padding-top: .5em;
  font-size: 1em;
}

article:not(.excerpt) > .content blockquote > ul {
  font-style: italic;
  list-style-type: square;
  padding-top: .5em;
}

article:not(.excerpt) > .content img {
  max-width: 100%;
}

article:not(.excerpt) > footer {
  grid-area: article-footer;
  display: flex;
  flex-flow: column;
  justify-content: space-between;
}

article:not(.excerpt) > footer > aside ul, article:not(.excerpt) > footer > aside li,
article:not(.excerpt) > footer > nav ul,
article:not(.excerpt) > footer > nav li {
  display: flex;
  flex-wrap: wrap;
}

article:not(.excerpt) > footer > aside.article-categories a,
article:not(.excerpt) > footer > nav.article-categories a {
  text-transform: uppercase;
}

article:not(.excerpt) > footer > aside.article-tags a,
article:not(.excerpt) > footer > nav.article-tags a {
  font-style: italic;
}

article:not(.excerpt) > .gallery {
  grid-area: gallery;
  padding: var(--fitz);
}

article:not(.excerpt) > .gallery > .panel {
  grid-area: panel;
  display: none;
  background-position: center;
  background-size: contain;
  width: 100%;
  height: 100%;
}

article:not(.excerpt) > .gallery > .list {
  grid-area: list;
  display: flex;
  flex-flow: row wrap;
}

article:not(.excerpt) > .gallery > .list > figure {
  flex-basis: 5em;
  padding: var(--fitz);
  overflow: hidden;
  height: 100%;
  min-height: 5em;
}

article:not(.excerpt) > .gallery > .list > figure > img {
  height: 100%;
  min-height: 5em;
  object-fit: cover;
  object-position: center;
}

article:not(.excerpt) > .gallery > .list > figure > figcaption {
  text-align: center;
}

article:not(.excerpt) > .gallery.modal {
  position: fixed;
  z-index: 10;
  background: black;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-areas: " panel " " list ";
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 10em;
}

article:not(.excerpt) > .gallery.modal > .panel {
  display: block;
}

article:not(.excerpt) > .gallery.modal > .list {
  flex-wrap: nowrap;
}

article:not(.excerpt) > .gallery.modal > .list > figure {
  flex-basis: auto;
}

article:not(.excerpt) > .gallery.modal > .list > figure > img {
  width: 100%;
  object-fit: contain;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-family: "Fira Sans Condensed", sans-serif;
  font-size: 0.78rem;
  line-height: 1.25;
  color: var(--book-muted);
}

.meta .date {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  background: color-mix(in srgb, var(--book-accent) 12%, var(--book-surface));
  border: 1px solid color-mix(in srgb, var(--book-accent) 30%, var(--book-border));
  color: var(--book-accent);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.meta .author {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  background: var(--book-surface);
  border: 1px solid var(--book-border);
  color: var(--book-muted);
  font-weight: 500;
}

.meta .category,
.meta .tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.meta .category a,
.meta .tags a {
  display: inline-block;
  padding: 0.08rem 0.42rem;
  border-radius: 3px;
  background: var(--book-surface);
  border: 1px solid var(--book-border);
  color: var(--book-muted);
  text-decoration: none;
  transition: all 0.15s ease;
}

.meta .category a:hover,
.meta .tags a:hover {
  color: var(--book-accent);
  border-color: var(--book-accent);
}

.meta .category a {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  font-size: 0.72rem;
}

.meta .tags a::before {
  content: "#";
  opacity: 0.65;
  margin-right: 0.08em;
}

article.excerpt {
  padding: 1rem 1.15rem;
  margin: 0;
  background: var(--book-surface-alt);
  border: 1px solid var(--book-border);
  border-radius: 6px;
  display: flex;
  flex-flow: column nowrap;
  gap: 0.65rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

article.excerpt:hover {
  border-color: color-mix(in srgb, var(--book-accent) 45%, var(--book-border));
}

article.excerpt > .content {
  display: flex;
  flex-flow: column nowrap;
  align-items: stretch;
  gap: 0.65rem;
}

article.excerpt > .content > figure {
  flex: 0 0 auto;
  width: 100%;
  height: 11rem;
  overflow: hidden;
  margin: 0;
  padding: 0.5rem;
  background: var(--book-surface);
  border: 1px solid color-mix(in srgb, var(--book-border) 65%, transparent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

article.excerpt > .content > figure a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

article.excerpt > .content > figure img,
article.excerpt > .content > figure svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

article.excerpt > .content > section {
  flex: 1;
  min-width: 0;
}

article.excerpt > .content > section h2 {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.28;
  margin: 0 0 0.35rem 0;
}

article.excerpt > .content > section h2 a {
  color: var(--book-text);
  text-decoration: none;
}

article.excerpt > .content > section h2 a:hover {
  color: var(--book-accent);
}

article.excerpt > .content > section p,
article.excerpt > .content > section blockquote,
article.excerpt > .content > section .enunciation {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--book-muted);
}

article.excerpt > footer {
  display: flex;
  justify-content: flex-start;
  margin-top: auto;
  padding-top: 0.55rem;
  border-top: 1px solid color-mix(in srgb, var(--book-border) 65%, transparent);
}

article.excerpt .article-share {
  display: none;
}

.collection {
  display: grid;
  gap: 0.9rem;
  margin: 1rem 0 1.5rem 0;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
}

.collection > header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 0.35rem 0;
  border-bottom: 1px solid var(--book-border);
}

.collection > header h1 {
  margin: 0;
  border: none;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.45rem;
  color: var(--book-text);
}

.collection .collection-controls {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-bottom: 0.15rem;
}

.collection .collection-controls button {
  background: var(--book-surface-alt);
  border: 1px solid var(--book-border);
  color: var(--book-muted);
  padding: 0.28rem 0.42rem;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.collection .collection-controls button:hover, .collection .collection-controls button.active {
  background: color-mix(in srgb, var(--book-accent) 14%, var(--book-surface-alt));
  border-color: var(--book-accent);
  color: var(--book-accent);
}

.collection .collection-controls button svg {
  display: block;
}

.collection > article.excerpt {
  container-type: inline-size;
  container-name: excerpt;
  min-width: 0;
}

.collection.layout-cards {
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
}

.collection.layout-cards > article.excerpt .content {
  flex-direction: column;
  align-items: stretch;
  text-align: left;
}

.collection.layout-cards > article.excerpt .content figure {
  width: 100%;
  height: 11rem;
  max-width: none;
}

.collection.layout-banners {
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.collection.layout-banners > article.excerpt .content {
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
  gap: 1.1rem;
}

.collection.layout-banners > article.excerpt .content figure {
  width: 8.5rem;
  height: 8.5rem;
  flex: 0 0 8.5rem;
  max-width: none;
  margin: 0;
}

.collection.layout-list {
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--book-border);
  border-radius: 6px;
  overflow: hidden;
}

.collection.layout-list > .collection-controls {
  padding: 0.45rem 0.75rem;
  margin: 0;
  background: var(--book-surface-alt);
  border-bottom: 1px solid var(--book-border);
}

.collection.layout-list > article.excerpt {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.9rem;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--book-border);
  border-radius: 0;
  background: var(--book-surface);
  gap: 0.85rem;
}

.collection.layout-list > article.excerpt:last-child {
  border-bottom: none;
}

.collection.layout-list > article.excerpt:hover {
  background: var(--book-surface-alt);
}

.collection.layout-list > article.excerpt .content {
  flex: 1;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  min-width: 0;
  text-align: left;
}

.collection.layout-list > article.excerpt .content figure {
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  max-width: none;
  margin: 0;
  padding: 0.2rem;
}

.collection.layout-list > article.excerpt .content section {
  flex: 1;
  min-width: 0;
}

.collection.layout-list > article.excerpt .content section h2 {
  font-size: 1.05rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collection.layout-list > article.excerpt .content section p,
.collection.layout-list > article.excerpt .content section blockquote,
.collection.layout-list > article.excerpt .content section .enunciation {
  display: none;
}

.collection.layout-list > article.excerpt footer {
  margin: 0;
  padding: 0;
  border: none;
  flex-shrink: 0;
}

/* layout *****************************/
html {
  height: 100%;
  max-width: 100%;
  background: var(--book-bg);
  color: var(--book-text);
  font-family: var(--book-font-serif);
  line-height: 1.6;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body {
  background-color: var(--book-bg);
  color: var(--book-text);
  padding: 0;
  margin: 0;
  min-height: 100vh;
}

body > header {
  grid-area: header;
  container-type: inline-size;
  container-name: header;
  display: flex;
  flex-flow: column nowrap;
  gap: 0.75rem;
  justify-content: flex-start;
  align-items: stretch;
  padding: 1.15rem 0.9rem 0.75rem;
  background-color: var(--sidebar-bg);
  border-bottom: 1px solid var(--book-border-light);
}

@media (min-width: 48em) and (orientation: landscape) {
  body > header {
    border-bottom: none;
  }
}

body > header > .logo {
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--book-border);
}

body > header > .logo a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 0.2rem;
  text-decoration: none;
}

body > header > .logo a img {
  height: 3.1rem;
  width: auto;
  margin: 0 auto;
  border-radius: 4px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

body > header > .logo a:hover img {
  opacity: 0.92;
}

body > header > .logo a h1 {
  font-family: var(--book-font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--book-text);
  text-align: center;
  margin: 0;
}

body > header > .logo .org-repo {
  font-family: var(--book-font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--book-text);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: center;
}

body > header > .logo .org-repo .org {
  color: var(--book-text-muted);
  font-weight: 500;
}

body > header > .logo .org-repo .repo {
  color: var(--book-text);
  font-weight: 600;
}

body > header > nav {
  order: 2;
  width: 100%;
  display: flex;
  flex-flow: column nowrap;
  align-items: stretch;
}

body > header > nav h1 {
  display: none;
}

body > header > .motto {
  display: none;
}

body nav {
  display: flex;
  flex-flow: column nowrap;
  align-items: stretch;
}

body nav label {
  align-self: stretch;
  cursor: pointer;
  display: flex;
  margin: 0;
  padding: 0.4rem 0.65rem;
  justify-content: center;
  align-items: center;
  font-size: 0;
  color: var(--book-text-muted);
  background: var(--book-surface);
  border: 1px solid var(--book-border);
  border-radius: 4px;
}

body nav label::after {
  display: block;
  text-align: center;
  font-size: 1rem;
  font-family: var(--font-icon);
  content: '≡';
}

body nav label:hover {
  color: var(--book-link-hover);
  background: var(--book-surface-alt);
  border-color: var(--book-border-dark);
}

body nav input,
body nav input[type="checkbox"] {
  display: none !important;
}

body nav input:checked ~ label::after,
body nav input[type="checkbox"]:checked ~ label::after {
  content: '×';
}

body nav input:checked ~ ul,
body nav input[type="checkbox"]:checked ~ ul {
  display: flex;
}

body nav ul {
  display: none;
  flex-direction: column;
  gap: 0.22rem;
  width: 100%;
  margin: 0.4rem 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body nav ul li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body nav a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.38rem 0.7rem;
  border-radius: 4px;
  border: 1px solid transparent;
  font-family: var(--book-font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--book-text-muted);
  text-decoration: none !important;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

body nav a:hover {
  color: var(--book-link-hover);
  background-color: var(--book-surface);
  border-color: var(--book-border-light);
  text-decoration: none !important;
}

body nav a[aria-selected="true"], body nav a[aria-current="page"], body nav a[aria-current="true"], body nav a.is-active {
  color: var(--book-text);
  font-weight: 600;
  background-color: var(--book-surface);
  border: 1px solid var(--book-border);
  border-left: 3px solid var(--geom-accent, #e8b85a);
  padding-left: calc(0.7rem - 2px);
}

@media (min-width: 48em) {
  body nav label {
    display: none !important;
  }
  body nav ul {
    display: flex;
    margin-top: 0 !important;
  }
}

body > main {
  display: flex;
  flex-flow: column nowrap;
}

body > main > article {
  padding: var(--fitz-2);
}

body > footer {
  grid-area: footer;
  display: flex;
  flex-flow: column nowrap;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem 1.15rem;
  border-top: 1px solid var(--book-border);
  background-color: var(--sidebar-bg);
  font-family: var(--book-font-serif);
  font-size: 0.85rem;
  color: var(--book-text-dim);
}

body > footer hr {
  display: none;
}

body > footer .footer-nav {
  width: 100%;
}

body > footer .footer-nav ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

body > footer .footer-nav ul li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body > footer .footer-nav ul li a {
  display: flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  border: 1px solid transparent;
  font-family: var(--book-font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--book-text-muted);
  text-decoration: none !important;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

body > footer .footer-nav ul li a:hover {
  color: var(--book-link-hover);
  background-color: var(--book-surface);
  border-color: var(--book-border-light);
  text-decoration: none !important;
}

body > footer .footer-nav ul li a[aria-selected="true"], body > footer .footer-nav ul li a[aria-current="page"], body > footer .footer-nav ul li a[aria-current="true"], body > footer .footer-nav ul li a.is-active {
  color: var(--book-text);
  font-weight: 600;
  background-color: var(--book-surface);
  border: 1px solid var(--book-border);
  border-left: 3px solid var(--geom-accent, #e8b85a);
  padding-left: calc(0.65rem - 2px);
}

body > footer div[role="contentinfo"] {
  text-align: center;
  font-size: 0.78rem;
  color: var(--book-text-dim);
}

body > footer div[role="contentinfo"] p {
  margin: 0;
}

body > .asides {
  grid-area: asides;
  display: flex;
  flex-flow: column nowrap;
  gap: 1.15rem;
  padding: 1.15rem 0.9rem;
  background-color: var(--sidebar-bg);
}

body > .asides > aside {
  padding: 0;
  margin: 0;
}

body > .asides > aside > h3 {
  font-family: var(--book-font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--book-text-muted);
  margin: 0 0 0.45rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--book-border);
}

body > .asides > aside > ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

body > .asides > aside > ul > li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body > .asides > aside > ul > li > a {
  display: flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 4px;
  border: 1px solid transparent;
  font-family: var(--book-font-serif);
  font-size: 0.94rem;
  line-height: 1.32;
  color: var(--book-text-muted);
  text-decoration: none !important;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

body > .asides > aside > ul > li > a:hover {
  color: var(--book-link-hover);
  background-color: var(--book-surface);
  border-color: var(--book-border-light);
  text-decoration: none !important;
}

body > .asides > aside > ul > li > a[aria-selected="true"], body > .asides > aside > ul > li > a[aria-current="page"], body > .asides > aside > ul > li > a[aria-current="true"], body > .asides > aside > ul > li > a.is-active {
  color: var(--book-text);
  font-weight: 600;
  background-color: var(--book-surface);
  border: 1px solid var(--book-border);
  border-left: 3px solid var(--geom-accent, #e8b85a);
  padding-left: calc(0.65rem - 2px);
}

body .highlighted {
  background: color-mix(in oklch, var(--color-warning), transparent 68%);
  color: var(--heading-color);
  border-bottom: 1px solid color-mix(in oklch, var(--color-warning), transparent 30%);
  padding: 0.05em 0.22em;
  border-radius: 3px;
  font-weight: 500;
}

body #searchbox .search-field,
body .aside-search .search-field,
body .search-form .search-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

body #searchbox input[type="text"],
body #searchbox input[type="search"],
body #searchbox input[name="q"],
body .aside-search input[type="text"],
body .aside-search input[type="search"],
body .aside-search input[name="q"],
body .search-form input[type="text"],
body .search-form input[type="search"],
body .search-form input[name="q"] {
  box-sizing: border-box;
  width: 100%;
  padding: 0.45em 2.25em 0.45em 0.75em;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-alt-color);
  color: var(--text-color);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

body #searchbox input[type="text"]::placeholder,
body #searchbox input[type="search"]::placeholder,
body #searchbox input[name="q"]::placeholder,
body .aside-search input[type="text"]::placeholder,
body .aside-search input[type="search"]::placeholder,
body .aside-search input[name="q"]::placeholder,
body .search-form input[type="text"]::placeholder,
body .search-form input[type="search"]::placeholder,
body .search-form input[name="q"]::placeholder {
  color: var(--color-muted);
  opacity: 1;
}

body #searchbox input[type="text"]:hover,
body #searchbox input[type="search"]:hover,
body #searchbox input[name="q"]:hover,
body .aside-search input[type="text"]:hover,
body .aside-search input[type="search"]:hover,
body .aside-search input[name="q"]:hover,
body .search-form input[type="text"]:hover,
body .search-form input[type="search"]:hover,
body .search-form input[name="q"]:hover {
  border-color: color-mix(in oklch, var(--border-color), var(--text-color) 30%);
}

body #searchbox input[type="text"]:focus,
body #searchbox input[type="search"]:focus,
body #searchbox input[name="q"]:focus,
body .aside-search input[type="text"]:focus,
body .aside-search input[type="search"]:focus,
body .aside-search input[name="q"]:focus,
body .search-form input[type="text"]:focus,
body .search-form input[type="search"]:focus,
body .search-form input[name="q"]:focus {
  outline: none;
  color: var(--heading-color);
  border-color: var(--link-color);
  background: color-mix(in oklch, var(--bg-alt-color), black 15%);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--link-color), transparent 75%);
}

body #searchbox input[type="text"]::-webkit-search-cancel-button,
body #searchbox input[type="search"]::-webkit-search-cancel-button,
body #searchbox input[name="q"]::-webkit-search-cancel-button,
body .aside-search input[type="text"]::-webkit-search-cancel-button,
body .aside-search input[type="search"]::-webkit-search-cancel-button,
body .aside-search input[name="q"]::-webkit-search-cancel-button,
body .search-form input[type="text"]::-webkit-search-cancel-button,
body .search-form input[type="search"]::-webkit-search-cancel-button,
body .search-form input[name="q"]::-webkit-search-cancel-button {
  cursor: pointer;
  filter: invert(0.7);
}

body #searchbox .search-submit,
body .aside-search .search-submit,
body .search-form .search-submit {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--color-muted);
  padding: 0.35em;
  margin: 0;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

body #searchbox .search-submit:hover, body #searchbox .search-submit:focus-visible,
body .aside-search .search-submit:hover,
body .aside-search .search-submit:focus-visible,
body .search-form .search-submit:hover,
body .search-form .search-submit:focus-visible {
  color: var(--link-hover-color);
  background: color-mix(in oklch, var(--link-color), transparent 88%);
  outline: none;
}

body #searchbox .search-submit svg,
body .aside-search .search-submit svg,
body .search-form .search-submit svg {
  display: block;
}

body #searchbox .highlight-link,
body .aside-search .highlight-link,
body .search-form .highlight-link {
  margin: 0.55em 0 0;
  padding: 0;
  text-align: left;
  font-size: 0.85em;
}

body #searchbox .highlight-link a,
body .aside-search .highlight-link a,
body .search-form .highlight-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.25em 0.65em;
  border-radius: 4px;
  background: color-mix(in oklch, var(--color-warning), transparent 82%);
  border: 1px solid color-mix(in oklch, var(--color-warning), transparent 55%);
  color: var(--heading-color);
  text-decoration: none;
  font-size: 0.9em;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

body #searchbox .highlight-link a::before,
body .aside-search .highlight-link a::before,
body .search-form .highlight-link a::before {
  content: "×";
  font-weight: 700;
  font-size: 1.1em;
  line-height: 1;
}

body #searchbox .highlight-link a:hover,
body .aside-search .highlight-link a:hover,
body .search-form .highlight-link a:hover {
  background: color-mix(in oklch, var(--color-warning), transparent 70%);
  border-color: var(--color-warning);
  text-decoration: none;
}

body .search-page-form {
  max-width: 36em;
  margin-bottom: 1.5em;
}

body .search-page-form .search-field input[name="q"] {
  font-size: 1.05rem;
  padding: 0.55em 2.5em 0.55em 0.85em;
}

body #search-results h2 {
  margin-top: 0;
  margin-bottom: 0.4em;
  font-size: 1.35em;
}

body #search-results .search-summary {
  color: var(--color-muted);
  font-size: 0.95em;
  margin-top: 0;
  margin-bottom: 1.25em;
}

body #search-results ul.search {
  list-style: none;
  margin: 0;
  padding: 0;
}

body #search-results .search li {
  margin: 0;
  padding: 1.15em 0;
  border-bottom: 1px solid var(--border-color);
  list-style: none;
}

body #search-results .search li:first-child {
  border-top: 1px solid var(--border-color);
}

body #search-results .search li > a {
  font-size: 1.15em;
  font-weight: 600;
  margin-bottom: 0.3em;
  display: inline-block;
}

body #search-results .search li > span {
  color: var(--color-muted);
  font-size: 0.88em;
  margin-left: 0.35em;
}

body #search-results .context {
  color: var(--text-color);
  font-size: 0.92em;
  line-height: 1.55;
  margin: 0.3em 0 0;
  opacity: 0.9;
}

@media (min-width: 48em) and (orientation: landscape) {
  body {
    display: grid;
    grid-template-areas: " header main " " asides main " " footer main ";
    grid-template-columns: var(--col) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
  }
  body > header {
    flex-flow: column nowrap;
    align-items: stretch;
    justify-content: flex-start;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--book-border-light);
  }
  body > header > nav {
    flex-flow: column nowrap;
    align-items: stretch;
    justify-content: flex-start;
  }
  body > .asides {
    flex-flow: column nowrap;
    align-items: stretch;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--book-border-light);
  }
  body > footer {
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--book-border-light);
  }
}

@media (min-width: 72em) and (orientation: landscape) {
  body {
    grid-template-areas: " header main asides" " footer main asides";
    grid-template-columns: var(--col) minmax(0, 1fr) var(--col);
    grid-template-rows: 1fr auto;
  }
  body > .asides {
    border-right: none;
    border-left: 1px solid var(--book-border-light);
  }
}

/* =========================================================================
   Geometor Interactive Diagrams & Classical Scriptorium Monograph Theme
   Typography: Classical Roman Serif (EB Garamond)
   Palette: Nocturnal warm parchment / soft charcoal (low-glare scholarly theme)
   Layout: Centered reading column limited on large viewports (46rem)
   ========================================================================= */
/* -------------------------------------------------------------------------
   1. Book Codex Variables & Container Layout ("Website in a Website")
   ------------------------------------------------------------------------- */
@keyframes book-target-fade {
  0%, 40% {
    background-color: rgba(212, 175, 55, 0.08);
  }
  100% {
    background-color: transparent;
  }
}

:root {
  --geom-font-sans: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  --geom-fg: #18181b;
  --geom-bg: #ffffff;
  --geom-point-stroke: #ffffff;
  --geom-poly-fill: #000000;
  --geom-accent: #c88a1e;
  --geom-accent-bg: rgba(200, 138, 30, 0.12);
  --geom-accent-border: rgba(200, 138, 30, 0.55);
  --geom-assert: #16a34a;
  --geom-assert-bg: rgba(22, 163, 74, 0.10);
  --geom-assert-border: rgba(22, 163, 74, 0.50);
  --geom-coincide: #0891b2;
  --geom-coincide-bg: rgba(8, 145, 178, 0.12);
  --geom-coincide-border: rgba(8, 145, 178, 0.55);
}

@media (prefers-color-scheme: dark) {
  :root {
    --geom-fg: #d6cfc5;
    --geom-bg: transparent;
    --geom-point-stroke: #1e1e20;
    --geom-poly-fill: #d6cfc5;
    --geom-accent: #e8b85a;
    --geom-accent-bg: rgba(232, 184, 90, 0.12);
    --geom-accent-border: rgba(232, 184, 90, 0.55);
    --geom-assert: #5ec27e;
    --geom-assert-bg: rgba(94, 194, 126, 0.12);
    --geom-assert-border: rgba(94, 194, 126, 0.55);
    --geom-coincide: #38bdf8;
    --geom-coincide-bg: rgba(56, 189, 248, 0.14);
    --geom-coincide-border: rgba(56, 189, 248, 0.60);
  }
}

:root,
body.is-book-page,
article.book-layout,
article.book-reading-pane {
  --book-bg: #1e1e20;
  --book-bg-alpha: rgba(30, 30, 32, 0.94);
  --book-surface: #272629;
  --book-surface-alt: #313035;
  --book-text: #d6cfc5;
  --book-text-muted: #9c958a;
  --book-text-dim: #787268;
  --book-border: #3d3934;
  --book-border-dark: #544f47;
  --book-border-light: #2c2b2e;
  --book-link: #de836e;
  --book-link-hover: #f5a492;
  --book-link-visited: #c97864;
  --book-quote-bg: rgba(255, 255, 255, 0.04);
  --book-quote-border: #4d4841;
  --book-code-bg: #29282b;
  --book-code-text: #d6cfc5;
  --book-max-width: 46rem;
  /* ~736px, optimal 65-75 characters per line */
  --book-scroll-offset: 8.5rem;
  --book-font-serif: 'EB Garamond', Garamond, 'Palatino Linotype', Palatino, 'Georgia', 'Times New Roman', serif;
  --book-font-display: 'EB Garamond', Garamond, 'Georgia', serif;
  --book-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --geom-font-sans: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  /* Geometric SVG Palette (Light lines matching text on dark codex background) */
  --geom-fg: var(--book-text, #d6cfc5);
  --geom-bg: transparent;
  --geom-point-stroke: var(--book-bg, #1e1e20);
  --geom-poly-fill: var(--book-text, #d6cfc5);
  --geom-accent: #e8b85a;
  --geom-accent-bg: rgba(232, 184, 90, 0.12);
  --geom-accent-border: rgba(232, 184, 90, 0.55);
  --geom-assert: #5ec27e;
  --geom-assert-bg: rgba(94, 194, 126, 0.12);
  --geom-assert-border: rgba(94, 194, 126, 0.55);
  --geom-coincide: #38bdf8;
  --geom-coincide-bg: rgba(56, 189, 248, 0.14);
  --geom-coincide-border: rgba(56, 189, 248, 0.60);
}

body.light-mode,
[data-theme="light"] {
  --geom-fg: #18181b;
  --geom-bg: #ffffff;
  --geom-point-stroke: #ffffff;
  --geom-poly-fill: #000000;
  --geom-accent: #c88a1e;
  --geom-accent-bg: rgba(200, 138, 30, 0.12);
  --geom-accent-border: rgba(200, 138, 30, 0.55);
  --geom-assert: #16a34a;
  --geom-assert-bg: rgba(22, 163, 74, 0.10);
  --geom-assert-border: rgba(22, 163, 74, 0.50);
  --geom-coincide: #0891b2;
  --geom-coincide-bg: rgba(8, 145, 178, 0.12);
  --geom-coincide-border: rgba(8, 145, 178, 0.55);
}

@media print {
  body.is-book-page,
article.book-layout,
article.book-reading-pane,
:root {
    --geom-fg: #000000;
    --geom-bg: #ffffff;
    --geom-point-stroke: #ffffff;
    --geom-poly-fill: #000000;
    --geom-accent: #b47814;
    --geom-assert: #15803d;
    --geom-coincide: #0e7490;
  }
}

main.book-main {
  width: 100%;
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
}

/* Fix inline-size container collapse and keep book reading pane a clean single column */
article.book-layout,
article.book-reading-pane {
  width: 100% !important;
  max-width: var(--book-max-width) !important;
  margin: 0 auto !important;
  padding: 0 1.75rem 3.5rem !important;
  box-sizing: border-box;
  display: flex !important;
  flex-flow: column nowrap !important;
  color: var(--book-text);
  font-family: var(--book-font-serif);
  font-feature-settings: "locl" 0, "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

article.book-layout > header,
article.book-layout > .content,
article.book-layout > footer,
article.book-reading-pane > header,
article.book-reading-pane > .content,
article.book-reading-pane > footer {
  width: 100% !important;
  flex: 0 0 auto !important;
  order: unset !important;
  padding: 0 !important;
  margin: 0;
}

@container article (min-width: 60em) {
  article.book-layout,
article.book-reading-pane {
    flex-flow: column nowrap !important;
  }
  article.book-layout > .content,
article.book-layout > header,
article.book-layout > footer,
article.book-reading-pane > .content,
article.book-reading-pane > header,
article.book-reading-pane > footer {
    flex: 0 0 auto !important;
    width: 100% !important;
    order: unset !important;
  }
}

@container article (min-width: 80em) {
  article.book-layout > .content,
article.book-reading-pane > .content {
    flex: 0 0 auto !important;
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  article.book-layout,
article.book-reading-pane {
    padding: 0 1rem 2.5rem !important;
  }
}

/* -------------------------------------------------------------------------
   2. Sticky Book Codex Masthead (header.book-header)
   ------------------------------------------------------------------------- */
header.book-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  background-color: var(--book-bg-alpha);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--book-border);
  padding: 0.45rem 0.65rem 0.4rem !important;
  margin-bottom: 1.5rem !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
  box-sizing: border-box;
}

.book-header-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  line-height: 1.25;
  text-align: center;
}

.book-header-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.45rem;
}

.book-portal-link {
  font-family: var(--book-font-mono);
  font-size: 0.76rem;
  color: var(--book-text-muted) !important;
  text-decoration: none !important;
  padding: 0.08rem 0.38rem;
  border-radius: 3px;
  background-color: var(--book-surface);
  border: 1px solid var(--book-border);
  transition: all 0.15s ease;
}

.book-portal-link:hover {
  color: var(--book-link-hover) !important;
  border-color: var(--book-border-dark);
}

.book-header-sep {
  color: var(--book-border-dark);
  font-size: 0.85rem;
  user-select: none;
}

.book-title-link {
  font-family: var(--book-font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--book-text) !important;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.book-title-link:hover {
  color: var(--book-link) !important;
}

.book-subtitle {
  font-family: var(--book-font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--book-text-muted);
}

.book-header-breadcrumbs,
.book-header-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.book-crumb-link {
  font-family: var(--book-font-display);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--book-text-muted) !important;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.book-crumb-link:hover {
  color: var(--book-link-hover) !important;
}

.book-crumb-sep {
  color: var(--book-border-dark);
  font-size: 0.78rem;
  user-select: none;
}

.book-badge {
  font-family: var(--book-font-mono);
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--book-border);
  background: var(--book-surface);
  color: var(--book-text-muted);
}

.book-badge.canonical-badge {
  font-weight: 700;
  color: var(--book-text);
}

/* Second Row of Book Header: [← Prev] | Chapter Title + Track Switcher | [Next →] */
.book-header-nav {
  display: grid;
  grid-template-columns: minmax(4.5rem, 1fr) auto minmax(4.5rem, 1fr);
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.28rem;
  border-top: 1px solid var(--book-border-light);
}

.book-nav-prev {
  text-align: left;
}

.book-nav-next {
  text-align: right;
}

.book-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  text-align: center;
}

.book-doc-title {
  text-align: center;
  font-family: var(--book-font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--book-text);
  line-height: 1.2;
}

.book-nav-btn {
  font-family: var(--book-font-serif);
  font-size: 0.84rem;
  color: var(--book-link) !important;
  text-decoration: none !important;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  background-color: var(--book-surface);
  border: 1px solid var(--book-border);
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  line-height: 1.25;
}

.book-nav-btn:hover {
  background-color: var(--book-surface-alt);
  color: var(--book-link-hover) !important;
  border-color: var(--book-border-dark);
  text-decoration: none !important;
}

article.book-layout nav,
.book-tracks-nav {
  display: flex !important;
  flex-flow: row wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.3rem;
  font-family: var(--book-font-serif);
  font-size: 0.84rem;
  line-height: 1.2;
}

article.book-layout nav a,
.book-tracks-nav a {
  display: inline-flex !important;
  flex-basis: auto !important;
  width: auto !important;
}

article.book-layout nav a::before, article.book-layout nav a::after,
.book-tracks-nav a::before,
.book-tracks-nav a::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  flex: none !important;
}

.book-track-item {
  color: var(--book-link) !important;
  text-decoration: none !important;
  padding: 0.06rem 0.4rem !important;
  border-radius: 3px;
  transition: all 0.15s ease;
  font-weight: 400;
  line-height: 1.2;
}

.book-track-item:hover {
  color: var(--book-link-hover) !important;
  background-color: var(--book-surface);
  text-decoration: none !important;
}

.book-track-item.is-active {
  color: var(--book-text) !important;
  font-weight: 600;
  background-color: var(--book-surface);
  border: 1px solid var(--book-border);
  cursor: default;
}

.book-track-sep {
  color: var(--book-border-dark);
  font-size: 0.75rem;
  user-select: none;
}

/* -------------------------------------------------------------------------
   3. Scholarly Monograph Typography (.book-reading-pane .book-content)
   ------------------------------------------------------------------------- */
.book-reading-pane .book-content,
.folio-book-page {
  font-family: var(--book-font-serif);
  font-size: 1.16rem;
  line-height: 1.72;
  color: var(--book-text);
  hyphens: auto;
  -webkit-hyphens: auto;
  text-rendering: optimizeLegibility;
  font-feature-settings: "locl" 0, "kern" 1, "liga" 1;
  /* Anchor scroll margin for sticky header */
  /* Headings */
  /* Chapter Subtitle Rubric (.. rubric::) */
  /* Paragraphs & Classical 2em First-Line Indentation (for folio-book-page) */
  /* Explicit resets where first-line paragraph indentation is NOT desired */
  /* Line Blocks (e.g. mathematical arrays, verse, or title blocks) */
  /* Blockquotes (Smaller-type set-off passages & quotations) */
  /* Links inside Book Content */
  /* Lists */
  /* Horizontal Rules / Section Dividers */
  /* Tables (Translation Notes, Comparative Apparatus, Scan Inventory) */
  /* Chapter Table of Contents (.. contents:: / Conspectus Capitis) */
  /* Front Matter / 1954 Monograph Title Page Reconstruction (.title-page) */
  /* Conspectus Totius Operis (Book Index Table of Contents) */
  /* Scroll offset for sticky book header and :target highlights */
  /* Semantic Apparatus Links & Spans (:cite:, :term:, :person:) */
  /* Footnotes (Docutils HTML5 aside.footnote & inline a.footnote-reference) */
}

.book-reading-pane .book-content p, .book-reading-pane .book-content div, .book-reading-pane .book-content li, .book-reading-pane .book-content dd, .book-reading-pane .book-content dt, .book-reading-pane .book-content th, .book-reading-pane .book-content td,
.folio-book-page p,
.folio-book-page div,
.folio-book-page li,
.folio-book-page dd,
.folio-book-page dt,
.folio-book-page th,
.folio-book-page td {
  font-feature-settings: "locl" 0, "kern" 1, "liga" 1;
}

.book-reading-pane .book-content h1, .book-reading-pane .book-content h2, .book-reading-pane .book-content h3, .book-reading-pane .book-content h4, .book-reading-pane .book-content h5, .book-reading-pane .book-content h6,
.book-reading-pane .book-content section[id],
.book-reading-pane .book-content span[id],
.book-reading-pane .book-content aside.footnote[id],
.folio-book-page h1,
.folio-book-page h2,
.folio-book-page h3,
.folio-book-page h4,
.folio-book-page h5,
.folio-book-page h6,
.folio-book-page section[id],
.folio-book-page span[id],
.folio-book-page aside.footnote[id] {
  scroll-margin-top: var(--book-scroll-offset);
}

.book-reading-pane .book-content h1, .book-reading-pane .book-content h2, .book-reading-pane .book-content h3, .book-reading-pane .book-content h4, .book-reading-pane .book-content h5, .book-reading-pane .book-content h6,
.folio-book-page h1,
.folio-book-page h2,
.folio-book-page h3,
.folio-book-page h4,
.folio-book-page h5,
.folio-book-page h6 {
  font-family: var(--book-font-serif) !important;
  color: var(--book-text) !important;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  text-indent: 0 !important;
  border-bottom: none !important;
  clear: both;
}

.book-reading-pane .book-content h1 a.headerlink, .book-reading-pane .book-content h2 a.headerlink, .book-reading-pane .book-content h3 a.headerlink, .book-reading-pane .book-content h4 a.headerlink, .book-reading-pane .book-content h5 a.headerlink, .book-reading-pane .book-content h6 a.headerlink,
.folio-book-page h1 a.headerlink,
.folio-book-page h2 a.headerlink,
.folio-book-page h3 a.headerlink,
.folio-book-page h4 a.headerlink,
.folio-book-page h5 a.headerlink,
.folio-book-page h6 a.headerlink {
  font-size: 0.72em;
  color: var(--book-text-dim) !important;
  text-decoration: none !important;
  opacity: 0;
  padding-left: 0.4em;
  transition: opacity 0.15s ease;
}

.book-reading-pane .book-content h1:hover a.headerlink, .book-reading-pane .book-content h2:hover a.headerlink, .book-reading-pane .book-content h3:hover a.headerlink, .book-reading-pane .book-content h4:hover a.headerlink, .book-reading-pane .book-content h5:hover a.headerlink, .book-reading-pane .book-content h6:hover a.headerlink,
.folio-book-page h1:hover a.headerlink,
.folio-book-page h2:hover a.headerlink,
.folio-book-page h3:hover a.headerlink,
.folio-book-page h4:hover a.headerlink,
.folio-book-page h5:hover a.headerlink,
.folio-book-page h6:hover a.headerlink {
  opacity: 0.65;
}

.book-reading-pane .book-content h1,
.folio-book-page h1 {
  font-size: 2.15rem !important;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-align: center;
  margin-top: 1.75rem !important;
  margin-bottom: 0.85rem !important;
}

.book-reading-pane .book-content p.rubric,
.folio-book-page p.rubric {
  font-family: var(--book-font-serif);
  font-size: 1.22rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--book-text-muted);
  text-align: center !important;
  text-indent: 0 !important;
  margin-top: -0.35rem !important;
  margin-bottom: 1.4rem !important;
  line-height: 1.35;
}

.book-reading-pane .book-content h2,
.folio-book-page h2 {
  font-size: 1.48rem !important;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-align: center;
  margin-top: 2.1rem !important;
  margin-bottom: 0.9rem !important;
}

.book-reading-pane .book-content h3,
.folio-book-page h3 {
  font-size: 1.25rem !important;
  line-height: 1.35;
  text-align: left;
  margin-top: 1.75rem !important;
  margin-bottom: 0.45rem !important;
}

.book-reading-pane .book-content h3 em,
.folio-book-page h3 em {
  font-weight: 400;
  font-style: italic;
}

.book-reading-pane .book-content h4,
.folio-book-page h4 {
  font-size: 1.12rem !important;
  font-style: italic;
  text-align: left;
  margin-top: 1.25rem !important;
  margin-bottom: 0.45rem !important;
}

.book-reading-pane .book-content h5, .book-reading-pane .book-content h6,
.folio-book-page h5,
.folio-book-page h6 {
  font-size: 1.05rem !important;
  font-style: italic;
  text-align: left;
  margin-top: 1rem !important;
  margin-bottom: 0.4rem !important;
}

.book-reading-pane .book-content p,
.folio-book-page p {
  text-indent: 2em;
  margin-top: 0 !important;
  margin-bottom: 0.45em !important;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.book-reading-pane .book-content:not(.folio-book-page) p,
.folio-book-page:not(.folio-book-page) p {
  text-indent: 0 !important;
  margin-bottom: 0.85em !important;
  text-align: left;
}

.book-reading-pane .book-content blockquote p,
.book-reading-pane .book-content li p,
.book-reading-pane .book-content table p,
.book-reading-pane .book-content th p,
.book-reading-pane .book-content td p,
.book-reading-pane .book-content aside.footnote p,
.book-reading-pane .book-content .footnote-list p,
.book-reading-pane .book-content .footnotes p,
.book-reading-pane .book-content p.rubric,
.book-reading-pane .book-content figcaption p,
.book-reading-pane .book-content img.folio-initial-cap + p,
.book-reading-pane .book-content .no-indent,
.book-reading-pane .book-content .title-page p,
.book-reading-pane .book-content .work-toc p,
.book-reading-pane .book-content .chapter-toc p,
.book-reading-pane .book-content .admonition p,
.book-reading-pane .book-content .note p,
.book-reading-pane .book-content p:has(> strong:first-child),
.folio-book-page blockquote p,
.folio-book-page li p,
.folio-book-page table p,
.folio-book-page th p,
.folio-book-page td p,
.folio-book-page aside.footnote p,
.folio-book-page .footnote-list p,
.folio-book-page .footnotes p,
.folio-book-page p.rubric,
.folio-book-page figcaption p,
.folio-book-page img.folio-initial-cap + p,
.folio-book-page .no-indent,
.folio-book-page .title-page p,
.folio-book-page .work-toc p,
.folio-book-page .chapter-toc p,
.folio-book-page .admonition p,
.folio-book-page .note p,
.folio-book-page p:has(> strong:first-child) {
  text-indent: 0 !important;
}

.book-reading-pane .book-content .line-block,
.folio-book-page .line-block {
  margin: 0.85em 0 0.85em 2em !important;
  line-height: 1.55;
}

.book-reading-pane .book-content .line-block .line,
.folio-book-page .line-block .line {
  text-indent: 0 !important;
}

.book-reading-pane .book-content .line-block .line-block,
.folio-book-page .line-block .line-block {
  margin: 0 0 0 1.5em !important;
}

.book-reading-pane .book-content blockquote,
.folio-book-page blockquote {
  margin: 1.25em 0 !important;
  padding: 0.75em 1.4em !important;
  border: none !important;
  border-left: 3px solid var(--book-quote-border) !important;
  background-color: var(--book-quote-bg) !important;
  color: var(--book-text) !important;
  font-size: 0.95em !important;
  font-style: normal;
  line-height: 1.65;
  border-radius: 0 4px 4px 0;
}

.book-reading-pane .book-content blockquote p,
.folio-book-page blockquote p {
  text-indent: 0 !important;
  margin: 0.35em 0 !important;
  text-align: justify;
}

.book-reading-pane .book-content blockquote p:first-child,
.folio-book-page blockquote p:first-child {
  margin-top: 0 !important;
}

.book-reading-pane .book-content blockquote p:last-child,
.folio-book-page blockquote p:last-child {
  margin-bottom: 0 !important;
}

.book-reading-pane .book-content a,
.folio-book-page a {
  color: var(--book-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.book-reading-pane .book-content a:hover,
.folio-book-page a:hover {
  color: var(--book-link-hover);
  text-decoration-thickness: 1.5px;
}

.book-reading-pane .book-content ul, .book-reading-pane .book-content ol,
.folio-book-page ul,
.folio-book-page ol {
  margin: 0.85rem 0 1.15rem !important;
  padding-left: 1.75rem;
}

.book-reading-pane .book-content ol.arabic.simple,
.folio-book-page ol.arabic.simple {
  margin: 0.35rem 0 !important;
}

.book-reading-pane .book-content li,
.folio-book-page li {
  margin: 0.3rem 0;
  line-height: 1.65;
}

.book-reading-pane .book-content li::marker,
.folio-book-page li::marker {
  color: var(--book-text-muted);
}

.book-reading-pane .book-content hr,
.book-reading-pane .book-content hr.docutils,
.folio-book-page hr,
.folio-book-page hr.docutils {
  border: 0 !important;
  height: 1px;
  background: var(--book-border);
  margin: 2.25rem auto !important;
  width: 50%;
}

.book-reading-pane .book-content table,
.book-reading-pane .book-content table.docutils,
.folio-book-page table,
.folio-book-page table.docutils {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0 !important;
  font-size: 0.94rem;
}

.book-reading-pane .book-content table th, .book-reading-pane .book-content table td,
.book-reading-pane .book-content table.docutils th,
.book-reading-pane .book-content table.docutils td,
.folio-book-page table th,
.folio-book-page table td,
.folio-book-page table.docutils th,
.folio-book-page table.docutils td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--book-border);
  text-align: left !important;
  vertical-align: top;
}

.book-reading-pane .book-content table th,
.book-reading-pane .book-content table.docutils th,
.folio-book-page table th,
.folio-book-page table.docutils th {
  font-family: var(--book-font-serif);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  font-weight: 600;
  text-transform: uppercase;
  background-color: var(--book-surface);
  border-bottom: 2px solid var(--book-border-dark);
  color: var(--book-text);
}

.book-reading-pane .book-content table tr:hover td,
.book-reading-pane .book-content table.docutils tr:hover td,
.folio-book-page table tr:hover td,
.folio-book-page table.docutils tr:hover td {
  background-color: var(--book-surface);
}

.book-reading-pane .book-content .chapter-toc,
.book-reading-pane .book-content nav.contents.local,
.book-reading-pane .book-content nav.contents,
.folio-book-page .chapter-toc,
.folio-book-page nav.contents.local,
.folio-book-page nav.contents {
  margin: 2rem 0 2.5rem !important;
  background-color: var(--book-surface);
  border: 1px solid var(--book-border);
  border-left: 3px solid var(--book-border-dark);
  border-radius: 5px;
  padding: 0.75rem 1.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.book-reading-pane .book-content .chapter-toc p,
.book-reading-pane .book-content nav.contents.local p,
.book-reading-pane .book-content nav.contents p,
.folio-book-page .chapter-toc p,
.folio-book-page nav.contents.local p,
.folio-book-page nav.contents p {
  margin: 0 !important;
  text-indent: 0 !important;
  text-align: left !important;
}

.book-reading-pane .book-content .chapter-toc p.topic-title,
.book-reading-pane .book-content nav.contents.local p.topic-title,
.book-reading-pane .book-content nav.contents p.topic-title,
.folio-book-page .chapter-toc p.topic-title,
.folio-book-page nav.contents.local p.topic-title,
.folio-book-page nav.contents p.topic-title {
  font-family: var(--book-font-display);
  font-weight: 600;
  font-size: 0.92rem !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--book-text);
  margin: 0.25rem 0 0.65rem 0 !important;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--book-border);
  text-align: left !important;
}

.book-reading-pane .book-content .chapter-toc > ul,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list,
.book-reading-pane .book-content nav.contents.local > ul,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list,
.book-reading-pane .book-content nav.contents > ul,
.book-reading-pane .book-content nav.contents .chapter-toc-list,
.folio-book-page .chapter-toc > ul,
.folio-book-page .chapter-toc .chapter-toc-list,
.folio-book-page nav.contents.local > ul,
.folio-book-page nav.contents.local .chapter-toc-list,
.folio-book-page nav.contents > ul,
.folio-book-page nav.contents .chapter-toc-list {
  list-style: none !important;
  margin: 0.65rem 0 0.25rem !important;
  padding: 0 !important;
  column-count: 2;
  column-gap: 2.2rem;
}

@media (max-width: 720px) {
  .book-reading-pane .book-content .chapter-toc > ul,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list,
.book-reading-pane .book-content nav.contents.local > ul,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list,
.book-reading-pane .book-content nav.contents > ul,
.book-reading-pane .book-content nav.contents .chapter-toc-list,
.folio-book-page .chapter-toc > ul,
.folio-book-page .chapter-toc .chapter-toc-list,
.folio-book-page nav.contents.local > ul,
.folio-book-page nav.contents.local .chapter-toc-list,
.folio-book-page nav.contents > ul,
.folio-book-page nav.contents .chapter-toc-list {
    column-count: 1;
  }
}

.book-reading-pane .book-content .chapter-toc > ul > li,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li,
.book-reading-pane .book-content nav.contents.local > ul > li,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li,
.book-reading-pane .book-content nav.contents > ul > li,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li,
.folio-book-page .chapter-toc > ul > li,
.folio-book-page .chapter-toc .chapter-toc-list > li,
.folio-book-page nav.contents.local > ul > li,
.folio-book-page nav.contents.local .chapter-toc-list > li,
.folio-book-page nav.contents > ul > li,
.folio-book-page nav.contents .chapter-toc-list > li {
  margin: 0 0 0.85rem 0 !important;
  line-height: 1.45;
  list-style: none !important;
}

.book-reading-pane .book-content .chapter-toc > ul > li > p > a,
.book-reading-pane .book-content .chapter-toc > ul > li > a,
.book-reading-pane .book-content .chapter-toc > ul > li .toc-parent-link,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > p > a,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > a,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .toc-parent-link,
.book-reading-pane .book-content nav.contents.local > ul > li > p > a,
.book-reading-pane .book-content nav.contents.local > ul > li > a,
.book-reading-pane .book-content nav.contents.local > ul > li .toc-parent-link,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > p > a,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > a,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .toc-parent-link,
.book-reading-pane .book-content nav.contents > ul > li > p > a,
.book-reading-pane .book-content nav.contents > ul > li > a,
.book-reading-pane .book-content nav.contents > ul > li .toc-parent-link,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > p > a,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > a,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .toc-parent-link,
.folio-book-page .chapter-toc > ul > li > p > a,
.folio-book-page .chapter-toc > ul > li > a,
.folio-book-page .chapter-toc > ul > li .toc-parent-link,
.folio-book-page .chapter-toc .chapter-toc-list > li > p > a,
.folio-book-page .chapter-toc .chapter-toc-list > li > a,
.folio-book-page .chapter-toc .chapter-toc-list > li .toc-parent-link,
.folio-book-page nav.contents.local > ul > li > p > a,
.folio-book-page nav.contents.local > ul > li > a,
.folio-book-page nav.contents.local > ul > li .toc-parent-link,
.folio-book-page nav.contents.local .chapter-toc-list > li > p > a,
.folio-book-page nav.contents.local .chapter-toc-list > li > a,
.folio-book-page nav.contents.local .chapter-toc-list > li .toc-parent-link,
.folio-book-page nav.contents > ul > li > p > a,
.folio-book-page nav.contents > ul > li > a,
.folio-book-page nav.contents > ul > li .toc-parent-link,
.folio-book-page nav.contents .chapter-toc-list > li > p > a,
.folio-book-page nav.contents .chapter-toc-list > li > a,
.folio-book-page nav.contents .chapter-toc-list > li .toc-parent-link {
  font-family: var(--book-font-serif);
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--book-text);
  text-decoration: none !important;
  display: block;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  transition: all 0.12s ease;
}

.book-reading-pane .book-content .chapter-toc > ul > li > p > a:hover,
.book-reading-pane .book-content .chapter-toc > ul > li > a:hover,
.book-reading-pane .book-content .chapter-toc > ul > li .toc-parent-link:hover,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > p > a:hover,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > a:hover,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .toc-parent-link:hover,
.book-reading-pane .book-content nav.contents.local > ul > li > p > a:hover,
.book-reading-pane .book-content nav.contents.local > ul > li > a:hover,
.book-reading-pane .book-content nav.contents.local > ul > li .toc-parent-link:hover,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > p > a:hover,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > a:hover,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .toc-parent-link:hover,
.book-reading-pane .book-content nav.contents > ul > li > p > a:hover,
.book-reading-pane .book-content nav.contents > ul > li > a:hover,
.book-reading-pane .book-content nav.contents > ul > li .toc-parent-link:hover,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > p > a:hover,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > a:hover,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .toc-parent-link:hover,
.folio-book-page .chapter-toc > ul > li > p > a:hover,
.folio-book-page .chapter-toc > ul > li > a:hover,
.folio-book-page .chapter-toc > ul > li .toc-parent-link:hover,
.folio-book-page .chapter-toc .chapter-toc-list > li > p > a:hover,
.folio-book-page .chapter-toc .chapter-toc-list > li > a:hover,
.folio-book-page .chapter-toc .chapter-toc-list > li .toc-parent-link:hover,
.folio-book-page nav.contents.local > ul > li > p > a:hover,
.folio-book-page nav.contents.local > ul > li > a:hover,
.folio-book-page nav.contents.local > ul > li .toc-parent-link:hover,
.folio-book-page nav.contents.local .chapter-toc-list > li > p > a:hover,
.folio-book-page nav.contents.local .chapter-toc-list > li > a:hover,
.folio-book-page nav.contents.local .chapter-toc-list > li .toc-parent-link:hover,
.folio-book-page nav.contents > ul > li > p > a:hover,
.folio-book-page nav.contents > ul > li > a:hover,
.folio-book-page nav.contents > ul > li .toc-parent-link:hover,
.folio-book-page nav.contents .chapter-toc-list > li > p > a:hover,
.folio-book-page nav.contents .chapter-toc-list > li > a:hover,
.folio-book-page nav.contents .chapter-toc-list > li .toc-parent-link:hover {
  color: var(--book-link);
  background-color: var(--book-surface-alt);
  text-decoration: none !important;
}

.book-reading-pane .book-content .chapter-toc > ul > li > ul,
.book-reading-pane .book-content .chapter-toc > ul > li .chapter-toc-sublist,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > ul,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .chapter-toc-sublist,
.book-reading-pane .book-content nav.contents.local > ul > li > ul,
.book-reading-pane .book-content nav.contents.local > ul > li .chapter-toc-sublist,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > ul,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .chapter-toc-sublist,
.book-reading-pane .book-content nav.contents > ul > li > ul,
.book-reading-pane .book-content nav.contents > ul > li .chapter-toc-sublist,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > ul,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .chapter-toc-sublist,
.folio-book-page .chapter-toc > ul > li > ul,
.folio-book-page .chapter-toc > ul > li .chapter-toc-sublist,
.folio-book-page .chapter-toc .chapter-toc-list > li > ul,
.folio-book-page .chapter-toc .chapter-toc-list > li .chapter-toc-sublist,
.folio-book-page nav.contents.local > ul > li > ul,
.folio-book-page nav.contents.local > ul > li .chapter-toc-sublist,
.folio-book-page nav.contents.local .chapter-toc-list > li > ul,
.folio-book-page nav.contents.local .chapter-toc-list > li .chapter-toc-sublist,
.folio-book-page nav.contents > ul > li > ul,
.folio-book-page nav.contents > ul > li .chapter-toc-sublist,
.folio-book-page nav.contents .chapter-toc-list > li > ul,
.folio-book-page nav.contents .chapter-toc-list > li .chapter-toc-sublist {
  list-style: none !important;
  margin: 0.3rem 0 0.45rem 0.55rem !important;
  padding: 0 0 0 0.7rem !important;
  border-left: 1px solid var(--book-border);
}

.book-reading-pane .book-content .chapter-toc > ul > li > ul > li,
.book-reading-pane .book-content .chapter-toc > ul > li .chapter-toc-sublist > li,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > ul > li,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li,
.book-reading-pane .book-content nav.contents.local > ul > li > ul > li,
.book-reading-pane .book-content nav.contents.local > ul > li .chapter-toc-sublist > li,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > ul > li,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li,
.book-reading-pane .book-content nav.contents > ul > li > ul > li,
.book-reading-pane .book-content nav.contents > ul > li .chapter-toc-sublist > li,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > ul > li,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .chapter-toc-sublist > li,
.folio-book-page .chapter-toc > ul > li > ul > li,
.folio-book-page .chapter-toc > ul > li .chapter-toc-sublist > li,
.folio-book-page .chapter-toc .chapter-toc-list > li > ul > li,
.folio-book-page .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li,
.folio-book-page nav.contents.local > ul > li > ul > li,
.folio-book-page nav.contents.local > ul > li .chapter-toc-sublist > li,
.folio-book-page nav.contents.local .chapter-toc-list > li > ul > li,
.folio-book-page nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li,
.folio-book-page nav.contents > ul > li > ul > li,
.folio-book-page nav.contents > ul > li .chapter-toc-sublist > li,
.folio-book-page nav.contents .chapter-toc-list > li > ul > li,
.folio-book-page nav.contents .chapter-toc-list > li .chapter-toc-sublist > li {
  margin: 0.2rem 0 !important;
  line-height: 1.4;
  break-inside: avoid;
  page-break-inside: avoid;
  list-style: none !important;
}

.book-reading-pane .book-content .chapter-toc > ul > li > ul > li > p > a,
.book-reading-pane .book-content .chapter-toc > ul > li > ul > li > a,
.book-reading-pane .book-content .chapter-toc > ul > li > ul > li .toc-sub-link,
.book-reading-pane .book-content .chapter-toc > ul > li .chapter-toc-sublist > li > p > a,
.book-reading-pane .book-content .chapter-toc > ul > li .chapter-toc-sublist > li > a,
.book-reading-pane .book-content .chapter-toc > ul > li .chapter-toc-sublist > li .toc-sub-link,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > ul > li > p > a,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > ul > li > a,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > ul > li .toc-sub-link,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > p > a,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > a,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li .toc-sub-link,
.book-reading-pane .book-content nav.contents.local > ul > li > ul > li > p > a,
.book-reading-pane .book-content nav.contents.local > ul > li > ul > li > a,
.book-reading-pane .book-content nav.contents.local > ul > li > ul > li .toc-sub-link,
.book-reading-pane .book-content nav.contents.local > ul > li .chapter-toc-sublist > li > p > a,
.book-reading-pane .book-content nav.contents.local > ul > li .chapter-toc-sublist > li > a,
.book-reading-pane .book-content nav.contents.local > ul > li .chapter-toc-sublist > li .toc-sub-link,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > ul > li > p > a,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > ul > li > a,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > ul > li .toc-sub-link,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > p > a,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > a,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li .toc-sub-link,
.book-reading-pane .book-content nav.contents > ul > li > ul > li > p > a,
.book-reading-pane .book-content nav.contents > ul > li > ul > li > a,
.book-reading-pane .book-content nav.contents > ul > li > ul > li .toc-sub-link,
.book-reading-pane .book-content nav.contents > ul > li .chapter-toc-sublist > li > p > a,
.book-reading-pane .book-content nav.contents > ul > li .chapter-toc-sublist > li > a,
.book-reading-pane .book-content nav.contents > ul > li .chapter-toc-sublist > li .toc-sub-link,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > ul > li > p > a,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > ul > li > a,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > ul > li .toc-sub-link,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > p > a,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > a,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .chapter-toc-sublist > li .toc-sub-link,
.folio-book-page .chapter-toc > ul > li > ul > li > p > a,
.folio-book-page .chapter-toc > ul > li > ul > li > a,
.folio-book-page .chapter-toc > ul > li > ul > li .toc-sub-link,
.folio-book-page .chapter-toc > ul > li .chapter-toc-sublist > li > p > a,
.folio-book-page .chapter-toc > ul > li .chapter-toc-sublist > li > a,
.folio-book-page .chapter-toc > ul > li .chapter-toc-sublist > li .toc-sub-link,
.folio-book-page .chapter-toc .chapter-toc-list > li > ul > li > p > a,
.folio-book-page .chapter-toc .chapter-toc-list > li > ul > li > a,
.folio-book-page .chapter-toc .chapter-toc-list > li > ul > li .toc-sub-link,
.folio-book-page .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > p > a,
.folio-book-page .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > a,
.folio-book-page .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li .toc-sub-link,
.folio-book-page nav.contents.local > ul > li > ul > li > p > a,
.folio-book-page nav.contents.local > ul > li > ul > li > a,
.folio-book-page nav.contents.local > ul > li > ul > li .toc-sub-link,
.folio-book-page nav.contents.local > ul > li .chapter-toc-sublist > li > p > a,
.folio-book-page nav.contents.local > ul > li .chapter-toc-sublist > li > a,
.folio-book-page nav.contents.local > ul > li .chapter-toc-sublist > li .toc-sub-link,
.folio-book-page nav.contents.local .chapter-toc-list > li > ul > li > p > a,
.folio-book-page nav.contents.local .chapter-toc-list > li > ul > li > a,
.folio-book-page nav.contents.local .chapter-toc-list > li > ul > li .toc-sub-link,
.folio-book-page nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > p > a,
.folio-book-page nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > a,
.folio-book-page nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li .toc-sub-link,
.folio-book-page nav.contents > ul > li > ul > li > p > a,
.folio-book-page nav.contents > ul > li > ul > li > a,
.folio-book-page nav.contents > ul > li > ul > li .toc-sub-link,
.folio-book-page nav.contents > ul > li .chapter-toc-sublist > li > p > a,
.folio-book-page nav.contents > ul > li .chapter-toc-sublist > li > a,
.folio-book-page nav.contents > ul > li .chapter-toc-sublist > li .toc-sub-link,
.folio-book-page nav.contents .chapter-toc-list > li > ul > li > p > a,
.folio-book-page nav.contents .chapter-toc-list > li > ul > li > a,
.folio-book-page nav.contents .chapter-toc-list > li > ul > li .toc-sub-link,
.folio-book-page nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > p > a,
.folio-book-page nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > a,
.folio-book-page nav.contents .chapter-toc-list > li .chapter-toc-sublist > li .toc-sub-link {
  font-family: var(--book-font-serif);
  font-size: 0.86rem;
  color: var(--book-text-muted);
  text-decoration: none !important;
  display: block;
  padding: 0.12rem 0.3rem;
  border-radius: 3px;
  transition: all 0.12s ease;
}

.book-reading-pane .book-content .chapter-toc > ul > li > ul > li > p > a:hover,
.book-reading-pane .book-content .chapter-toc > ul > li > ul > li > a:hover,
.book-reading-pane .book-content .chapter-toc > ul > li > ul > li .toc-sub-link:hover,
.book-reading-pane .book-content .chapter-toc > ul > li .chapter-toc-sublist > li > p > a:hover,
.book-reading-pane .book-content .chapter-toc > ul > li .chapter-toc-sublist > li > a:hover,
.book-reading-pane .book-content .chapter-toc > ul > li .chapter-toc-sublist > li .toc-sub-link:hover,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > ul > li > p > a:hover,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > ul > li > a:hover,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > ul > li .toc-sub-link:hover,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > p > a:hover,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > a:hover,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li .toc-sub-link:hover,
.book-reading-pane .book-content nav.contents.local > ul > li > ul > li > p > a:hover,
.book-reading-pane .book-content nav.contents.local > ul > li > ul > li > a:hover,
.book-reading-pane .book-content nav.contents.local > ul > li > ul > li .toc-sub-link:hover,
.book-reading-pane .book-content nav.contents.local > ul > li .chapter-toc-sublist > li > p > a:hover,
.book-reading-pane .book-content nav.contents.local > ul > li .chapter-toc-sublist > li > a:hover,
.book-reading-pane .book-content nav.contents.local > ul > li .chapter-toc-sublist > li .toc-sub-link:hover,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > ul > li > p > a:hover,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > ul > li > a:hover,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > ul > li .toc-sub-link:hover,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > p > a:hover,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > a:hover,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li .toc-sub-link:hover,
.book-reading-pane .book-content nav.contents > ul > li > ul > li > p > a:hover,
.book-reading-pane .book-content nav.contents > ul > li > ul > li > a:hover,
.book-reading-pane .book-content nav.contents > ul > li > ul > li .toc-sub-link:hover,
.book-reading-pane .book-content nav.contents > ul > li .chapter-toc-sublist > li > p > a:hover,
.book-reading-pane .book-content nav.contents > ul > li .chapter-toc-sublist > li > a:hover,
.book-reading-pane .book-content nav.contents > ul > li .chapter-toc-sublist > li .toc-sub-link:hover,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > ul > li > p > a:hover,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > ul > li > a:hover,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > ul > li .toc-sub-link:hover,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > p > a:hover,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > a:hover,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .chapter-toc-sublist > li .toc-sub-link:hover,
.folio-book-page .chapter-toc > ul > li > ul > li > p > a:hover,
.folio-book-page .chapter-toc > ul > li > ul > li > a:hover,
.folio-book-page .chapter-toc > ul > li > ul > li .toc-sub-link:hover,
.folio-book-page .chapter-toc > ul > li .chapter-toc-sublist > li > p > a:hover,
.folio-book-page .chapter-toc > ul > li .chapter-toc-sublist > li > a:hover,
.folio-book-page .chapter-toc > ul > li .chapter-toc-sublist > li .toc-sub-link:hover,
.folio-book-page .chapter-toc .chapter-toc-list > li > ul > li > p > a:hover,
.folio-book-page .chapter-toc .chapter-toc-list > li > ul > li > a:hover,
.folio-book-page .chapter-toc .chapter-toc-list > li > ul > li .toc-sub-link:hover,
.folio-book-page .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > p > a:hover,
.folio-book-page .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > a:hover,
.folio-book-page .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li .toc-sub-link:hover,
.folio-book-page nav.contents.local > ul > li > ul > li > p > a:hover,
.folio-book-page nav.contents.local > ul > li > ul > li > a:hover,
.folio-book-page nav.contents.local > ul > li > ul > li .toc-sub-link:hover,
.folio-book-page nav.contents.local > ul > li .chapter-toc-sublist > li > p > a:hover,
.folio-book-page nav.contents.local > ul > li .chapter-toc-sublist > li > a:hover,
.folio-book-page nav.contents.local > ul > li .chapter-toc-sublist > li .toc-sub-link:hover,
.folio-book-page nav.contents.local .chapter-toc-list > li > ul > li > p > a:hover,
.folio-book-page nav.contents.local .chapter-toc-list > li > ul > li > a:hover,
.folio-book-page nav.contents.local .chapter-toc-list > li > ul > li .toc-sub-link:hover,
.folio-book-page nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > p > a:hover,
.folio-book-page nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > a:hover,
.folio-book-page nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li .toc-sub-link:hover,
.folio-book-page nav.contents > ul > li > ul > li > p > a:hover,
.folio-book-page nav.contents > ul > li > ul > li > a:hover,
.folio-book-page nav.contents > ul > li > ul > li .toc-sub-link:hover,
.folio-book-page nav.contents > ul > li .chapter-toc-sublist > li > p > a:hover,
.folio-book-page nav.contents > ul > li .chapter-toc-sublist > li > a:hover,
.folio-book-page nav.contents > ul > li .chapter-toc-sublist > li .toc-sub-link:hover,
.folio-book-page nav.contents .chapter-toc-list > li > ul > li > p > a:hover,
.folio-book-page nav.contents .chapter-toc-list > li > ul > li > a:hover,
.folio-book-page nav.contents .chapter-toc-list > li > ul > li .toc-sub-link:hover,
.folio-book-page nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > p > a:hover,
.folio-book-page nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > a:hover,
.folio-book-page nav.contents .chapter-toc-list > li .chapter-toc-sublist > li .toc-sub-link:hover {
  color: var(--book-link);
  background-color: var(--book-surface-alt);
  text-decoration: none !important;
}

.book-reading-pane .book-content .chapter-toc > ul > li > ul > li > ul,
.book-reading-pane .book-content .chapter-toc > ul > li .chapter-toc-sublist > li > ul,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > ul > li > ul,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > ul,
.book-reading-pane .book-content nav.contents.local > ul > li > ul > li > ul,
.book-reading-pane .book-content nav.contents.local > ul > li .chapter-toc-sublist > li > ul,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > ul > li > ul,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > ul,
.book-reading-pane .book-content nav.contents > ul > li > ul > li > ul,
.book-reading-pane .book-content nav.contents > ul > li .chapter-toc-sublist > li > ul,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > ul > li > ul,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > ul,
.folio-book-page .chapter-toc > ul > li > ul > li > ul,
.folio-book-page .chapter-toc > ul > li .chapter-toc-sublist > li > ul,
.folio-book-page .chapter-toc .chapter-toc-list > li > ul > li > ul,
.folio-book-page .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > ul,
.folio-book-page nav.contents.local > ul > li > ul > li > ul,
.folio-book-page nav.contents.local > ul > li .chapter-toc-sublist > li > ul,
.folio-book-page nav.contents.local .chapter-toc-list > li > ul > li > ul,
.folio-book-page nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > ul,
.folio-book-page nav.contents > ul > li > ul > li > ul,
.folio-book-page nav.contents > ul > li .chapter-toc-sublist > li > ul,
.folio-book-page nav.contents .chapter-toc-list > li > ul > li > ul,
.folio-book-page nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > ul {
  list-style: none !important;
  margin: 0.15rem 0 0.25rem 0 !important;
  padding: 0 0 0 0.75rem !important;
  border-left: none;
}

.book-reading-pane .book-content .chapter-toc > ul > li > ul > li > ul > li,
.book-reading-pane .book-content .chapter-toc > ul > li .chapter-toc-sublist > li > ul > li,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > ul > li > ul > li,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > ul > li,
.book-reading-pane .book-content nav.contents.local > ul > li > ul > li > ul > li,
.book-reading-pane .book-content nav.contents.local > ul > li .chapter-toc-sublist > li > ul > li,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > ul > li > ul > li,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > ul > li,
.book-reading-pane .book-content nav.contents > ul > li > ul > li > ul > li,
.book-reading-pane .book-content nav.contents > ul > li .chapter-toc-sublist > li > ul > li,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > ul > li > ul > li,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > ul > li,
.folio-book-page .chapter-toc > ul > li > ul > li > ul > li,
.folio-book-page .chapter-toc > ul > li .chapter-toc-sublist > li > ul > li,
.folio-book-page .chapter-toc .chapter-toc-list > li > ul > li > ul > li,
.folio-book-page .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > ul > li,
.folio-book-page nav.contents.local > ul > li > ul > li > ul > li,
.folio-book-page nav.contents.local > ul > li .chapter-toc-sublist > li > ul > li,
.folio-book-page nav.contents.local .chapter-toc-list > li > ul > li > ul > li,
.folio-book-page nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > ul > li,
.folio-book-page nav.contents > ul > li > ul > li > ul > li,
.folio-book-page nav.contents > ul > li .chapter-toc-sublist > li > ul > li,
.folio-book-page nav.contents .chapter-toc-list > li > ul > li > ul > li,
.folio-book-page nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > ul > li {
  margin: 0.15rem 0 !important;
  line-height: 1.38;
  break-inside: avoid;
  page-break-inside: avoid;
  list-style: none !important;
}

.book-reading-pane .book-content .chapter-toc > ul > li > ul > li > ul > li > p > a,
.book-reading-pane .book-content .chapter-toc > ul > li > ul > li > ul > li > a,
.book-reading-pane .book-content .chapter-toc > ul > li .chapter-toc-sublist > li > ul > li > p > a,
.book-reading-pane .book-content .chapter-toc > ul > li .chapter-toc-sublist > li > ul > li > a,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > ul > li > ul > li > p > a,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > ul > li > ul > li > a,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > p > a,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > a,
.book-reading-pane .book-content nav.contents.local > ul > li > ul > li > ul > li > p > a,
.book-reading-pane .book-content nav.contents.local > ul > li > ul > li > ul > li > a,
.book-reading-pane .book-content nav.contents.local > ul > li .chapter-toc-sublist > li > ul > li > p > a,
.book-reading-pane .book-content nav.contents.local > ul > li .chapter-toc-sublist > li > ul > li > a,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > ul > li > ul > li > p > a,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > ul > li > ul > li > a,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > p > a,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > a,
.book-reading-pane .book-content nav.contents > ul > li > ul > li > ul > li > p > a,
.book-reading-pane .book-content nav.contents > ul > li > ul > li > ul > li > a,
.book-reading-pane .book-content nav.contents > ul > li .chapter-toc-sublist > li > ul > li > p > a,
.book-reading-pane .book-content nav.contents > ul > li .chapter-toc-sublist > li > ul > li > a,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > ul > li > ul > li > p > a,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > ul > li > ul > li > a,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > p > a,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > a,
.folio-book-page .chapter-toc > ul > li > ul > li > ul > li > p > a,
.folio-book-page .chapter-toc > ul > li > ul > li > ul > li > a,
.folio-book-page .chapter-toc > ul > li .chapter-toc-sublist > li > ul > li > p > a,
.folio-book-page .chapter-toc > ul > li .chapter-toc-sublist > li > ul > li > a,
.folio-book-page .chapter-toc .chapter-toc-list > li > ul > li > ul > li > p > a,
.folio-book-page .chapter-toc .chapter-toc-list > li > ul > li > ul > li > a,
.folio-book-page .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > p > a,
.folio-book-page .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > a,
.folio-book-page nav.contents.local > ul > li > ul > li > ul > li > p > a,
.folio-book-page nav.contents.local > ul > li > ul > li > ul > li > a,
.folio-book-page nav.contents.local > ul > li .chapter-toc-sublist > li > ul > li > p > a,
.folio-book-page nav.contents.local > ul > li .chapter-toc-sublist > li > ul > li > a,
.folio-book-page nav.contents.local .chapter-toc-list > li > ul > li > ul > li > p > a,
.folio-book-page nav.contents.local .chapter-toc-list > li > ul > li > ul > li > a,
.folio-book-page nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > p > a,
.folio-book-page nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > a,
.folio-book-page nav.contents > ul > li > ul > li > ul > li > p > a,
.folio-book-page nav.contents > ul > li > ul > li > ul > li > a,
.folio-book-page nav.contents > ul > li .chapter-toc-sublist > li > ul > li > p > a,
.folio-book-page nav.contents > ul > li .chapter-toc-sublist > li > ul > li > a,
.folio-book-page nav.contents .chapter-toc-list > li > ul > li > ul > li > p > a,
.folio-book-page nav.contents .chapter-toc-list > li > ul > li > ul > li > a,
.folio-book-page nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > p > a,
.folio-book-page nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > a {
  font-family: var(--book-font-serif);
  font-size: 0.82rem;
  color: var(--book-text-muted);
  opacity: 0.9;
  text-decoration: none !important;
  display: block;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  transition: all 0.12s ease;
}

.book-reading-pane .book-content .chapter-toc > ul > li > ul > li > ul > li > p > a:hover,
.book-reading-pane .book-content .chapter-toc > ul > li > ul > li > ul > li > a:hover,
.book-reading-pane .book-content .chapter-toc > ul > li .chapter-toc-sublist > li > ul > li > p > a:hover,
.book-reading-pane .book-content .chapter-toc > ul > li .chapter-toc-sublist > li > ul > li > a:hover,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > ul > li > ul > li > p > a:hover,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li > ul > li > ul > li > a:hover,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > p > a:hover,
.book-reading-pane .book-content .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > a:hover,
.book-reading-pane .book-content nav.contents.local > ul > li > ul > li > ul > li > p > a:hover,
.book-reading-pane .book-content nav.contents.local > ul > li > ul > li > ul > li > a:hover,
.book-reading-pane .book-content nav.contents.local > ul > li .chapter-toc-sublist > li > ul > li > p > a:hover,
.book-reading-pane .book-content nav.contents.local > ul > li .chapter-toc-sublist > li > ul > li > a:hover,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > ul > li > ul > li > p > a:hover,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li > ul > li > ul > li > a:hover,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > p > a:hover,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > a:hover,
.book-reading-pane .book-content nav.contents > ul > li > ul > li > ul > li > p > a:hover,
.book-reading-pane .book-content nav.contents > ul > li > ul > li > ul > li > a:hover,
.book-reading-pane .book-content nav.contents > ul > li .chapter-toc-sublist > li > ul > li > p > a:hover,
.book-reading-pane .book-content nav.contents > ul > li .chapter-toc-sublist > li > ul > li > a:hover,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > ul > li > ul > li > p > a:hover,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li > ul > li > ul > li > a:hover,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > p > a:hover,
.book-reading-pane .book-content nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > a:hover,
.folio-book-page .chapter-toc > ul > li > ul > li > ul > li > p > a:hover,
.folio-book-page .chapter-toc > ul > li > ul > li > ul > li > a:hover,
.folio-book-page .chapter-toc > ul > li .chapter-toc-sublist > li > ul > li > p > a:hover,
.folio-book-page .chapter-toc > ul > li .chapter-toc-sublist > li > ul > li > a:hover,
.folio-book-page .chapter-toc .chapter-toc-list > li > ul > li > ul > li > p > a:hover,
.folio-book-page .chapter-toc .chapter-toc-list > li > ul > li > ul > li > a:hover,
.folio-book-page .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > p > a:hover,
.folio-book-page .chapter-toc .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > a:hover,
.folio-book-page nav.contents.local > ul > li > ul > li > ul > li > p > a:hover,
.folio-book-page nav.contents.local > ul > li > ul > li > ul > li > a:hover,
.folio-book-page nav.contents.local > ul > li .chapter-toc-sublist > li > ul > li > p > a:hover,
.folio-book-page nav.contents.local > ul > li .chapter-toc-sublist > li > ul > li > a:hover,
.folio-book-page nav.contents.local .chapter-toc-list > li > ul > li > ul > li > p > a:hover,
.folio-book-page nav.contents.local .chapter-toc-list > li > ul > li > ul > li > a:hover,
.folio-book-page nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > p > a:hover,
.folio-book-page nav.contents.local .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > a:hover,
.folio-book-page nav.contents > ul > li > ul > li > ul > li > p > a:hover,
.folio-book-page nav.contents > ul > li > ul > li > ul > li > a:hover,
.folio-book-page nav.contents > ul > li .chapter-toc-sublist > li > ul > li > p > a:hover,
.folio-book-page nav.contents > ul > li .chapter-toc-sublist > li > ul > li > a:hover,
.folio-book-page nav.contents .chapter-toc-list > li > ul > li > ul > li > p > a:hover,
.folio-book-page nav.contents .chapter-toc-list > li > ul > li > ul > li > a:hover,
.folio-book-page nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > p > a:hover,
.folio-book-page nav.contents .chapter-toc-list > li .chapter-toc-sublist > li > ul > li > a:hover {
  color: var(--book-link);
  background-color: var(--book-surface-alt);
  text-decoration: none !important;
}

.book-reading-pane .book-content .chapter-toc .chapter-toc-details summary,
.book-reading-pane .book-content nav.contents.local .chapter-toc-details summary,
.book-reading-pane .book-content nav.contents .chapter-toc-details summary,
.folio-book-page .chapter-toc .chapter-toc-details summary,
.folio-book-page nav.contents.local .chapter-toc-details summary,
.folio-book-page nav.contents .chapter-toc-details summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.book-reading-pane .book-content .chapter-toc .chapter-toc-details summary::-webkit-details-marker,
.book-reading-pane .book-content nav.contents.local .chapter-toc-details summary::-webkit-details-marker,
.book-reading-pane .book-content nav.contents .chapter-toc-details summary::-webkit-details-marker,
.folio-book-page .chapter-toc .chapter-toc-details summary::-webkit-details-marker,
.folio-book-page nav.contents.local .chapter-toc-details summary::-webkit-details-marker,
.folio-book-page nav.contents .chapter-toc-details summary::-webkit-details-marker {
  display: none;
}

.book-reading-pane .book-content .chapter-toc .chapter-toc-summary,
.book-reading-pane .book-content nav.contents.local .chapter-toc-summary,
.book-reading-pane .book-content nav.contents .chapter-toc-summary,
.folio-book-page .chapter-toc .chapter-toc-summary,
.folio-book-page nav.contents.local .chapter-toc-summary,
.folio-book-page nav.contents .chapter-toc-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0;
}

.book-reading-pane .book-content .chapter-toc .chapter-toc-title,
.book-reading-pane .book-content nav.contents.local .chapter-toc-title,
.book-reading-pane .book-content nav.contents .chapter-toc-title,
.folio-book-page .chapter-toc .chapter-toc-title,
.folio-book-page nav.contents.local .chapter-toc-title,
.folio-book-page nav.contents .chapter-toc-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--book-font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--book-text);
}

.book-reading-pane .book-content .chapter-toc .chapter-toc-title .toc-icon,
.book-reading-pane .book-content nav.contents.local .chapter-toc-title .toc-icon,
.book-reading-pane .book-content nav.contents .chapter-toc-title .toc-icon,
.folio-book-page .chapter-toc .chapter-toc-title .toc-icon,
.folio-book-page nav.contents.local .chapter-toc-title .toc-icon,
.folio-book-page nav.contents .chapter-toc-title .toc-icon {
  color: var(--book-link);
  font-size: 1.05rem;
  font-weight: 700;
}

.book-reading-pane .book-content .chapter-toc .chapter-toc-badge,
.book-reading-pane .book-content nav.contents.local .chapter-toc-badge,
.book-reading-pane .book-content nav.contents .chapter-toc-badge,
.folio-book-page .chapter-toc .chapter-toc-badge,
.folio-book-page nav.contents.local .chapter-toc-badge,
.folio-book-page nav.contents .chapter-toc-badge {
  font-size: 0.78rem;
  color: var(--book-text-muted);
  background-color: var(--book-surface-alt);
  border: 1px solid var(--book-border);
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
}

.book-reading-pane .book-content .chapter-toc .chapter-toc-list,
.book-reading-pane .book-content nav.contents.local .chapter-toc-list,
.book-reading-pane .book-content nav.contents .chapter-toc-list,
.folio-book-page .chapter-toc .chapter-toc-list,
.folio-book-page nav.contents.local .chapter-toc-list,
.folio-book-page nav.contents .chapter-toc-list {
  padding-top: 0.75rem !important;
  border-top: 1px solid var(--book-border);
}

.book-reading-pane .book-content .title-page,
.folio-book-page .title-page {
  max-width: 42rem;
  margin: 1.5rem auto 2.75rem !important;
  padding: 1.5rem 1.25rem;
  text-align: center;
  border-top: 1px solid var(--book-border);
  border-bottom: 1px solid var(--book-border);
  background-color: rgba(255, 255, 255, 0.015);
  border-radius: 4px;
}

.book-reading-pane .book-content .title-page .line-block,
.folio-book-page .title-page .line-block {
  margin: 0 auto !important;
  text-align: center !important;
  letter-spacing: 0.08em;
  line-height: 1.85;
  font-size: 0.98rem;
  color: var(--book-text-muted);
}

.book-reading-pane .book-content .title-page a,
.folio-book-page .title-page a {
  color: var(--book-text) !important;
  font-weight: 600;
  text-decoration: none !important;
  border-bottom: 1px dotted var(--book-border-dark);
}

.book-reading-pane .book-content .title-page a:hover,
.folio-book-page .title-page a:hover {
  color: var(--book-link-hover) !important;
  border-bottom-color: var(--book-link-hover);
}

.book-reading-pane .book-content section#conspectus-totius-operis,
.folio-book-page section#conspectus-totius-operis {
  max-width: 42rem;
  margin: 1.5rem auto 2.5rem !important;
  text-align: center;
}

.book-reading-pane .book-content section#conspectus-totius-operis h2,
.folio-book-page section#conspectus-totius-operis h2 {
  margin-bottom: 0.2rem !important;
}

.book-reading-pane .book-content section#conspectus-totius-operis h3,
.folio-book-page section#conspectus-totius-operis h3 {
  text-align: center !important;
  font-size: 1.22rem !important;
  letter-spacing: 0.04em;
  margin-top: 2rem !important;
  margin-bottom: 0.2rem !important;
}

.book-reading-pane .book-content section#conspectus-totius-operis p,
.folio-book-page section#conspectus-totius-operis p {
  text-align: center !important;
  text-indent: 0 !important;
  margin-bottom: 0.35rem !important;
}

.book-reading-pane .book-content section#conspectus-totius-operis p em,
.folio-book-page section#conspectus-totius-operis p em {
  color: var(--book-text-muted);
  font-size: 1.02rem;
}

.book-reading-pane .book-content section#conspectus-totius-operis p a,
.folio-book-page section#conspectus-totius-operis p a {
  text-decoration: none !important;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
}

.book-reading-pane .book-content section#conspectus-totius-operis p a:hover,
.folio-book-page section#conspectus-totius-operis p a:hover {
  background-color: var(--book-surface);
}

.book-reading-pane .book-content section[id],
.book-reading-pane .book-content h1[id],
.book-reading-pane .book-content h2[id],
.book-reading-pane .book-content h3[id],
.book-reading-pane .book-content h4[id],
.book-reading-pane .book-content ol[id],
.book-reading-pane .book-content li[id],
.book-reading-pane .book-content p[id],
.book-reading-pane .book-content aside.footnote[id],
.book-reading-pane .book-content span[id],
.book-reading-pane .book-content a[id],
.folio-book-page section[id],
.folio-book-page h1[id],
.folio-book-page h2[id],
.folio-book-page h3[id],
.folio-book-page h4[id],
.folio-book-page ol[id],
.folio-book-page li[id],
.folio-book-page p[id],
.folio-book-page aside.footnote[id],
.folio-book-page span[id],
.folio-book-page a[id] {
  scroll-margin-top: 6.5rem;
}

.book-reading-pane .book-content section:target,
.book-reading-pane .book-content ol[id]:target,
.book-reading-pane .book-content li[id]:target,
.book-reading-pane .book-content p[id]:target,
.book-reading-pane .book-content aside.footnote:target,
.folio-book-page section:target,
.folio-book-page ol[id]:target,
.folio-book-page li[id]:target,
.folio-book-page p[id]:target,
.folio-book-page aside.footnote:target {
  background-color: transparent;
  border-radius: 4px;
  animation: book-target-fade 2.4s ease-out forwards;
}

.book-reading-pane .book-content span[id]:target + h2,
.book-reading-pane .book-content span[id]:target + h3,
.book-reading-pane .book-content span[id]:target + h4,
.book-reading-pane .book-content span[id]:target + ol,
.book-reading-pane .book-content span[id]:target + p,
.book-reading-pane .book-content span[id]:target + ul > li:first-child,
.folio-book-page span[id]:target + h2,
.folio-book-page span[id]:target + h3,
.folio-book-page span[id]:target + h4,
.folio-book-page span[id]:target + ol,
.folio-book-page span[id]:target + p,
.folio-book-page span[id]:target + ul > li:first-child {
  background-color: transparent;
  border-radius: 4px;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  animation: book-target-fade 2.4s ease-out forwards;
}

.book-reading-pane .book-content a.citation-ref,
.book-reading-pane .book-content .citation-ref,
.folio-book-page a.citation-ref,
.folio-book-page .citation-ref {
  color: var(--book-text) !important;
  text-decoration: none !important;
  border-bottom: 1px dotted rgba(222, 131, 110, 0.55);
  cursor: pointer;
  padding: 0 0.08em;
  border-radius: 2px;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.book-reading-pane .book-content a.citation-ref:hover,
.book-reading-pane .book-content .citation-ref:hover,
.folio-book-page a.citation-ref:hover,
.folio-book-page .citation-ref:hover {
  color: var(--book-link-hover) !important;
  border-bottom: 1px solid var(--book-link);
  background-color: rgba(222, 131, 110, 0.12);
  text-decoration: none !important;
}

.book-reading-pane .book-content a.citation-ref:target,
.book-reading-pane .book-content .citation-ref:target,
.folio-book-page a.citation-ref:target,
.folio-book-page .citation-ref:target {
  background-color: rgba(222, 131, 110, 0.24);
  border-bottom: 1px solid var(--book-link);
  outline: 1px solid rgba(222, 131, 110, 0.45);
}

.book-reading-pane .book-content a.term-ref,
.book-reading-pane .book-content .term-ref,
.book-reading-pane .book-content .glossary-term,
.folio-book-page a.term-ref,
.folio-book-page .term-ref,
.folio-book-page .glossary-term {
  color: var(--book-text) !important;
  text-decoration: none !important;
  border-bottom: 1px dotted rgba(212, 175, 55, 0.5);
  cursor: pointer;
  padding: 0 0.08em;
  border-radius: 2px;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.book-reading-pane .book-content a.term-ref:hover,
.book-reading-pane .book-content .term-ref:hover,
.book-reading-pane .book-content .glossary-term:hover,
.folio-book-page a.term-ref:hover,
.folio-book-page .term-ref:hover,
.folio-book-page .glossary-term:hover {
  color: #f3d478 !important;
  border-bottom: 1px solid var(--book-accent-gold);
  background-color: rgba(212, 175, 55, 0.12);
  text-decoration: none !important;
}

.book-reading-pane .book-content a.term-ref:target,
.book-reading-pane .book-content .term-ref:target,
.book-reading-pane .book-content .glossary-term:target,
.folio-book-page a.term-ref:target,
.folio-book-page .term-ref:target,
.folio-book-page .glossary-term:target {
  background-color: rgba(212, 175, 55, 0.24);
  border-bottom: 1px solid var(--book-accent-gold);
  outline: 1px solid rgba(212, 175, 55, 0.45);
}

.book-reading-pane .book-content a.person-ref,
.book-reading-pane .book-content .person-ref,
.folio-book-page a.person-ref,
.folio-book-page .person-ref {
  color: var(--book-text) !important;
  text-decoration: none !important;
  font-variant: small-caps;
  letter-spacing: 0.03em;
  border-bottom: 1px dotted rgba(156, 149, 138, 0.5);
  cursor: pointer;
  padding: 0 0.08em;
  border-radius: 2px;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.book-reading-pane .book-content a.person-ref:hover,
.book-reading-pane .book-content .person-ref:hover,
.folio-book-page a.person-ref:hover,
.folio-book-page .person-ref:hover {
  color: var(--book-link-hover) !important;
  border-bottom: 1px solid var(--book-link);
  background-color: rgba(222, 131, 110, 0.1);
  text-decoration: none !important;
}

.book-reading-pane .book-content a.person-ref:target,
.book-reading-pane .book-content .person-ref:target,
.folio-book-page a.person-ref:target,
.folio-book-page .person-ref:target {
  background-color: rgba(222, 131, 110, 0.22);
  border-bottom: 1px solid var(--book-link);
  outline: 1px solid rgba(222, 131, 110, 0.45);
}

.book-reading-pane .book-content a.footnote-reference,
.folio-book-page a.footnote-reference {
  font-size: 0.78em;
  vertical-align: super;
  line-height: 0;
  text-decoration: none !important;
  color: var(--book-link) !important;
  padding: 0 0.12em;
  font-weight: 600;
}

.book-reading-pane .book-content a.footnote-reference:hover,
.folio-book-page a.footnote-reference:hover {
  color: var(--book-link-hover) !important;
  text-decoration: underline !important;
}

.book-reading-pane .book-content aside.footnote-list,
.folio-book-page aside.footnote-list {
  margin-top: 2.75rem !important;
  padding-top: 1.25rem;
  border-top: 1px solid var(--book-border);
}

.book-reading-pane .book-content aside.footnote,
.folio-book-page aside.footnote {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 0.4rem;
  align-items: baseline;
  font-size: 0.92rem;
  line-height: 1.58;
  color: var(--book-text-muted);
  margin: 0.5rem 0 !important;
}

.book-reading-pane .book-content aside.footnote:first-of-type,
.folio-book-page aside.footnote:first-of-type {
  margin-top: 2.25rem !important;
  padding-top: 1.25rem;
  border-top: 1px solid var(--book-border);
}

aside.footnote-list .book-reading-pane .book-content aside.footnote:first-of-type, aside.footnote-list .folio-book-page aside.footnote:first-of-type {
  margin-top: 0.5rem !important;
  padding-top: 0;
  border-top: none;
}

.book-reading-pane .book-content aside.footnote > .label,
.folio-book-page aside.footnote > .label {
  font-family: var(--book-font-serif);
  font-weight: 600;
  color: var(--book-link);
  text-align: right;
  padding-right: 0.25rem;
  white-space: nowrap;
}

.book-reading-pane .book-content aside.footnote > .label a,
.folio-book-page aside.footnote > .label a {
  text-decoration: none !important;
  color: var(--book-link) !important;
}

.book-reading-pane .book-content aside.footnote > p,
.folio-book-page aside.footnote > p {
  grid-column: 2;
  text-indent: 0 !important;
  margin: 0 0 0.3rem 0 !important;
  text-align: justify;
}

@media (max-width: 640px) {
  .book-header-nav {
    grid-template-columns: auto 1fr auto;
    gap: 0.25rem;
  }
  .book-nav-btn .nav-label {
    display: none;
  }
  .book-reading-pane .book-content {
    font-size: 1.08rem;
  }
  .book-reading-pane .book-content h1 {
    font-size: 1.75rem !important;
  }
  .book-reading-pane .book-content h2 {
    font-size: 1.32rem !important;
  }
  .book-reading-pane .book-content p {
    text-align: left;
    text-indent: 1.5em;
  }
}

/* -------------------------------------------------------------------------
   4. Book Codex Footer (footer.book-footer)
   ------------------------------------------------------------------------- */
footer.book-footer {
  margin-top: 3rem !important;
  padding-top: 1.5rem !important;
  border-top: 1px solid var(--book-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

footer.book-footer .meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  font-family: var(--book-font-mono);
  font-size: 0.78rem;
  color: var(--book-text-muted);
  text-align: center;
}

footer.book-footer .meta span.category,
footer.book-footer .meta span.tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

footer.book-footer .meta a {
  color: var(--book-text-muted) !important;
  text-decoration: none !important;
  background: var(--book-surface);
  border: 1px solid var(--book-border);
  border-radius: 3px;
  padding: 0.08rem 0.4rem;
  transition: all 0.15s ease;
}

footer.book-footer .meta a:hover {
  color: var(--book-link-hover) !important;
  border-color: var(--book-border-dark);
  background: var(--book-surface-alt);
}

.book-footer-ornament {
  font-size: 1.15rem;
  color: var(--book-border-dark);
  line-height: 1;
  user-select: none;
}

.book-footer-nav {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(4.5rem, 1fr) auto minmax(4.5rem, 1fr);
  align-items: center;
  gap: 0.5rem;
}

.book-toc-link {
  font-family: var(--book-font-display);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--book-text-muted) !important;
  text-decoration: none !important;
}

.book-toc-link:hover {
  color: var(--book-link-hover) !important;
}

/* -------------------------------------------------------------------------
   5. Classical Proposition & Proof Structural Blocks (Euclid / Pacioli)
   ------------------------------------------------------------------------- */
.enunciation {
  font-style: italic;
  text-indent: 0 !important;
  margin-top: 0.5em;
  margin-bottom: 1.15em;
  text-align: center !important;
  hyphens: none;
  -webkit-hyphens: none;
}

.enunciation p {
  text-indent: 0 !important;
  text-align: center !important;
  hyphens: none;
  -webkit-hyphens: none;
}

.assertion {
  text-align: center !important;
  text-indent: 0 !important;
  margin-top: 0.35em;
  margin-bottom: 0.35em;
  clear: both;
}

.sub-clause {
  text-indent: 3.5em !important;
  margin-top: 0.15em;
  margin-bottom: 0.15em;
  text-align: left;
}

.justification {
  float: right;
  text-indent: 0 !important;
  font-style: normal;
  font-size: 0.95em;
  letter-spacing: 0.02em;
}

a.justification,
a.justification-link {
  color: var(--book-link, #de836e) !important;
  text-decoration: none !important;
  border-bottom: 1px dotted rgba(222, 131, 110, 0.55);
  border-radius: 2px;
  padding: 0 2px;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

a.justification:hover,
a.justification-link:hover {
  color: var(--book-link-hover, #f5a492) !important;
  border-bottom: 1px solid var(--book-link, #de836e);
  background-color: rgba(222, 131, 110, 0.12);
  text-decoration: none !important;
}

.qed {
  text-align: right;
  text-indent: 0 !important;
  margin-top: 0.6em;
  margin-bottom: 0.6em;
  padding-right: 1.5em;
  font-style: normal;
}

.porism,
.lemma,
.scholium {
  margin: 0.75em 0;
  padding-left: 1em;
  border-left: 2px solid rgba(113, 113, 122, 0.35);
}

.porism-title,
.lemma-title,
.scholium-title {
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  margin-bottom: 0.25em;
}

.folio-milestone {
  font-size: 0.75em;
  color: #71717a;
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  margin: 0.4em 0;
  clear: both;
}

.folio-milestone a.folio-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.folio-milestone a.folio-link:hover {
  color: var(--book-link, #d4a038);
  text-decoration: underline;
}

img.folio-initial-cap {
  float: left;
  width: 4.5rem;
  height: auto;
  margin: 0.18rem 0.95rem 0.35rem 0;
  padding: 3px;
  background-color: #ffffff;
  border: 1px solid var(--book-border, #3d3934);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.book-reading-pane .book-content figure:not(.photon-svg) {
  margin: 1.35rem auto;
  text-align: center;
  clear: both;
}

.book-reading-pane .book-content figure:not(.photon-svg) img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--book-border, #3d3934);
  border-radius: 6px;
  padding: 4px;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.book-reading-pane .book-content figure:not(.photon-svg) figcaption {
  margin-top: 0.45rem;
  font-size: 0.94rem;
  font-style: italic;
  color: var(--book-text-muted, #9c958a);
  text-align: center;
}

.book-reading-pane .book-content figure:not(.photon-svg) figcaption p {
  text-indent: 0 !important;
  text-align: center !important;
  margin: 0.15rem 0 !important;
}

sup.line-num {
  font-size: 0.75em;
  line-height: 0;
  vertical-align: baseline;
  position: relative;
  top: -0.4em;
  color: #71717a;
  margin-right: 0.15em;
}

/* Responsive Side-by-Side / Floating Diagram Layouts */
figure.photon-svg {
  background: var(--geom-bg, transparent);
  border: 1px solid var(--book-border, #3d3934);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.16);
  user-select: none;
  margin: 0.75em auto;
  width: fit-content;
  max-width: 100%;
}

figure.photon-svg svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

figure.photon-picture.diagram-right,
figure.photon-svg.diagram-right {
  float: right;
  clear: right;
  margin: 0.25em 0 1.25em 1.5em;
  max-width: 50%;
}

@media (max-width: 640px) {
  figure.photon-picture.diagram-right,
figure.photon-svg.diagram-right,
.euclid-figure-container {
    float: none;
    max-width: 100%;
    margin: 0.75em auto;
  }
}

/* Global Base Styles for Inlined Geometric SVGs (Light/Dark Mode via --geom-* vars) */
svg.euclid-graphic {
  font-family: var(--geom-font-sans, "Fira Sans Condensed", "Fira Sans", sans-serif);
  font-style: normal;
  font-weight: 700;
  background-color: var(--geom-bg, transparent);
  /* Frontispiece Manuscript Overlay (0003.g1) */
}

svg.euclid-graphic.euclid-thumbnail {
  pointer-events: none;
}

svg.euclid-graphic .geom-line,
svg.euclid-graphic .line,
svg.euclid-graphic .element,
svg.euclid-graphic .graphic-seg {
  stroke: var(--geom-fg, #d6cfc5);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke 0.15s ease, stroke-width 0.15s ease;
}

svg.euclid-graphic .geom-bold {
  stroke: var(--geom-fg, #d6cfc5);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke 0.15s ease, stroke-width 0.15s ease;
}

svg.euclid-graphic .geom-circle,
svg.euclid-graphic .geom-curve,
svg.euclid-graphic .geom-ellipse {
  stroke: var(--geom-fg, #d6cfc5);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke 0.15s ease, stroke-width 0.15s ease;
}

svg.euclid-graphic .geom-arc {
  stroke: var(--geom-fg, #d6cfc5);
  stroke-width: 1.6;
  stroke-linecap: round;
  fill: none;
  transition: stroke 0.15s ease, stroke-width 0.15s ease;
}

svg.euclid-graphic .geom-dashed,
svg.euclid-graphic .geom-line-dashed,
svg.euclid-graphic .geom-arc-dashed,
svg.euclid-graphic .geom-aux,
svg.euclid-graphic .geom-Auxiliary,
svg.euclid-graphic .geom-construction {
  stroke: var(--geom-fg, #d6cfc5);
  stroke-width: 1.5;
  stroke-dasharray: 4, 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke 0.15s ease, stroke-width 0.15s ease;
}

svg.euclid-graphic .geom-arc-dotted {
  stroke: var(--geom-fg, #d6cfc5);
  stroke-width: 1.5;
  stroke-dasharray: 2.5, 2.5;
  stroke-linecap: round;
  fill: none;
  transition: stroke 0.15s ease, stroke-width 0.15s ease;
}

svg.euclid-graphic .geom-ray {
  stroke: var(--geom-fg, #d6cfc5);
  stroke-width: 1.3;
  stroke-linecap: round;
  fill: none;
  opacity: 0.85;
  transition: stroke 0.15s ease, stroke-width 0.15s ease;
}

svg.euclid-graphic .geom-tick {
  stroke: var(--geom-fg, #d6cfc5);
  stroke-width: 1.5;
  stroke-linecap: round;
  fill: none;
}

svg.euclid-graphic .grid-line {
  stroke: var(--geom-fg, #d6cfc5);
  stroke-width: 0.9;
  stroke-linecap: round;
  fill: none;
  opacity: 0.65;
}

svg.euclid-graphic .geom-polygon,
svg.euclid-graphic .poly,
svg.euclid-graphic .graphic-poly {
  fill: var(--geom-poly-fill, #d6cfc5);
  fill-opacity: 0.04;
  stroke: none;
  transition: fill-opacity 0.15s ease, fill 0.15s ease, stroke 0.15s ease;
}

svg.euclid-graphic .geom-polygon-bordered,
svg.euclid-graphic .geom-polygon-stroked,
svg.euclid-graphic .geom-space {
  fill: var(--geom-poly-fill, #d6cfc5);
  fill-opacity: 0.04;
  stroke: var(--geom-fg, #d6cfc5);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill-opacity 0.15s ease, stroke 0.15s ease, stroke-width 0.15s ease;
}

svg.euclid-graphic .geom-polygon-gnomon {
  fill: var(--geom-poly-fill, #d6cfc5);
  fill-opacity: 0.14;
  stroke: none;
  transition: fill-opacity 0.15s ease, stroke 0.15s ease;
}

svg.euclid-graphic .wedge,
svg.euclid-graphic .angle,
svg.euclid-graphic .graphic-wedge {
  fill: var(--geom-accent, #e8b85a);
  fill-opacity: 0.24;
  stroke: var(--geom-accent, #e8b85a);
  stroke-width: 2;
  stroke-linejoin: round;
  transition: opacity 0.12s ease, fill-opacity 0.12s ease;
}

svg.euclid-graphic .geom-ang-arc {
  fill: none !important;
  stroke: var(--geom-assert, #5ec27e);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

svg.euclid-graphic .geom-tick-mark {
  stroke: var(--geom-assert, #5ec27e);
  stroke-width: 1.8;
  stroke-linecap: round;
  fill: none;
}

svg.euclid-graphic .geom-point,
svg.euclid-graphic .point {
  fill: var(--geom-fg, #d6cfc5);
  stroke: var(--geom-point-stroke, #1e1e20);
  stroke-width: 1;
  transition: fill 0.15s ease, r 0.15s ease;
}

svg.euclid-graphic .geom-dot {
  fill: var(--geom-fg, #d6cfc5);
  stroke: none;
  transition: fill 0.15s ease, r 0.15s ease;
}

svg.euclid-graphic .geom-label,
svg.euclid-graphic .label,
svg.euclid-graphic .lbl {
  font-family: var(--geom-font-sans, "Fira Sans Condensed", "Fira Sans", sans-serif);
  font-size: 14.5px;
  font-weight: 700;
  font-style: normal;
  fill: var(--geom-fg, #d6cfc5);
  stroke: none;
  user-select: none;
}

svg.euclid-graphic .geom-label-roman {
  font-family: var(--geom-font-sans, "Fira Sans Condensed", "Fira Sans", sans-serif);
  font-size: 14.5px;
  font-weight: 700;
  font-style: normal;
  fill: var(--geom-fg, #d6cfc5);
  stroke: none;
  user-select: none;
}

svg.euclid-graphic .geom-label-sm {
  font-family: var(--geom-font-sans, "Fira Sans Condensed", "Fira Sans", sans-serif);
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  fill: var(--geom-fg, #d6cfc5);
  stroke: none;
  user-select: none;
}

svg.euclid-graphic .geom-label-sub {
  font-family: var(--geom-font-sans, "Fira Sans Condensed", "Fira Sans", sans-serif);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  fill: var(--geom-fg, #d6cfc5);
  stroke: none;
}

svg.euclid-graphic[data-graphic-id="0003.g1"] {
  --geom-fg: #000000;
  --geom-point-stroke: #ffffff;
}

svg.euclid-graphic[data-graphic-id="0003.g1"] .facsimile-frame {
  stroke: var(--book-border, #3d3934);
  stroke-width: 2;
  fill: none;
}

svg.euclid-graphic[data-graphic-id="0003.g1"] .geom-line,
svg.euclid-graphic[data-graphic-id="0003.g1"] .geom-circle {
  opacity: 0.25;
}

svg.euclid-graphic[data-graphic-id="0003.g1"] .geom-point {
  opacity: 0.35;
}

svg.euclid-graphic[data-graphic-id="0003.g1"] .geom-label {
  opacity: 0;
}

/* Interactive Geometric Text References (Gold) */
.geom-ref,
.geom-interactive-ref,
.katex.geom-interactive-ref {
  font-family: var(--geom-font-sans, "Fira Sans Condensed", "Fira Sans", sans-serif);
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.01em;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  border-bottom: 1.5px dotted var(--geom-accent-border, rgba(232, 184, 90, 0.55));
  border-radius: 2px;
  padding: 0 1px;
  transition: all 0.15s ease-in-out;
}

.geom-ref sub,
.geom-ref sup,
.geom-interactive-ref sub,
.geom-interactive-ref sup,
.katex.geom-interactive-ref sub,
.katex.geom-interactive-ref sup {
  font-size: 0.75em;
  line-height: 0;
}

.geom-ref:hover,
.geom-interactive-ref:hover,
.katex.geom-interactive-ref:hover {
  border-bottom: 1.5px solid var(--geom-accent, #e8b85a) !important;
}

/* Active Element Highlight: Turning text GOLD without glow */
.geom-highlight-text,
.geom-highlight-text *,
.katex.geom-highlight-text,
.katex.geom-highlight-text * {
  color: var(--geom-accent, #e8b85a) !important;
  background-color: var(--geom-accent-bg, rgba(232, 184, 90, 0.12)) !important;
  border-radius: 3px;
  transition: color 0.1s ease-in-out, background-color 0.1s ease-in-out;
}

/* Interactive Assertion / Equality References (Green) & Coincidence References (Cyan) */
.geom-eq-ref {
  cursor: pointer;
  position: relative;
  border-bottom: 1.5px dotted var(--geom-assert-border, rgba(94, 194, 126, 0.55));
  border-radius: 2px;
  padding: 0 1px;
  transition: all 0.15s ease-in-out;
}

.geom-eq-ref:hover {
  border-bottom: 1.5px solid var(--geom-assert, #5ec27e) !important;
}

.geom-coincide-ref {
  border-bottom: 1.5px dashed var(--geom-coincide-border, rgba(56, 189, 248, 0.6));
}

.geom-coincide-ref:hover {
  border-bottom: 1.5px solid var(--geom-coincide, #38bdf8) !important;
}

.geom-assert-block {
  cursor: pointer;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  transition: background-color 0.15s ease-in-out;
}

.geom-assert-block-active {
  background-color: var(--geom-assert-bg, rgba(94, 194, 126, 0.12));
}

.geom-coincide-block-active {
  background-color: var(--geom-coincide-bg, rgba(56, 189, 248, 0.14)) !important;
}

.geom-assert-text,
.geom-assert-text *,
.katex.geom-assert-text,
.katex.geom-assert-text * {
  color: var(--geom-assert, #5ec27e) !important;
  background-color: var(--geom-assert-bg, rgba(94, 194, 126, 0.12)) !important;
  border-bottom-color: var(--geom-assert, #5ec27e) !important;
  border-radius: 3px;
  transition: color 0.1s ease-in-out, background-color 0.1s ease-in-out;
}

.geom-coincide-text,
.geom-coincide-text *,
.katex.geom-coincide-text,
.katex.geom-coincide-text * {
  color: var(--geom-coincide, #38bdf8) !important;
  background-color: var(--geom-coincide-bg, rgba(56, 189, 248, 0.14)) !important;
  border-bottom-color: var(--geom-coincide, #38bdf8) !important;
}

/* Hidden/Toggleable Semantic Overlay Elements in SVG */
svg.euclid-graphic .geom-overlay,
svg.euclid-graphic #highlights > * {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, stroke 0.12s ease, fill-opacity 0.12s ease;
}

/* Active Element Highlight in SVG: GOLD */
svg.euclid-graphic [data-ref]:hover,
svg.euclid-graphic .highlight,
svg.euclid-graphic .geom-highlight-active {
  opacity: 1 !important;
  stroke: var(--geom-accent, #e8b85a) !important;
  stroke-opacity: 1 !important;
  filter: none !important;
  cursor: pointer;
  transition: opacity 0.1s ease, stroke 0.1s ease;
}

svg.euclid-graphic polygon:hover,
svg.euclid-graphic polygon.highlight,
svg.euclid-graphic polygon.geom-highlight-active,
svg.euclid-graphic path.polygon.geom-highlight-active,
svg.euclid-graphic path.geom-polygon.geom-highlight-active,
svg.euclid-graphic path.wedge.geom-highlight-active,
svg.euclid-graphic path.angle.geom-highlight-active {
  opacity: 1 !important;
  fill: var(--geom-accent, #e8b85a) !important;
  fill-opacity: 0.22 !important;
  stroke: var(--geom-accent, #e8b85a) !important;
  stroke-opacity: 1 !important;
  stroke-width: 1.5px !important;
  filter: none !important;
}

svg.euclid-graphic circle.geom-point:hover,
svg.euclid-graphic circle.point:hover,
svg.euclid-graphic #points circle:hover,
svg.euclid-graphic circle.geom-point.geom-highlight-active,
svg.euclid-graphic circle.point.geom-highlight-active,
svg.euclid-graphic #points circle.geom-highlight-active {
  opacity: 1 !important;
  fill: var(--geom-accent, #e8b85a) !important;
  fill-opacity: 1 !important;
  stroke: none !important;
  stroke-width: 0 !important;
  filter: none !important;
}

svg.euclid-graphic text:hover,
svg.euclid-graphic text.highlight,
svg.euclid-graphic text.geom-highlight-active,
svg.euclid-graphic text.geom-highlight-active *,
svg.euclid-graphic text.geom-highlight-active tspan,
svg.euclid-graphic text.geom-label.geom-highlight-active,
svg.euclid-graphic text.label.geom-highlight-active {
  opacity: 1 !important;
  fill: var(--geom-accent, #e8b85a) !important;
  stroke: none !important;
  stroke-width: 0 !important;
  filter: none !important;
}

/* Secondary highlight for endpoints/labels when a segment, angle, or polygon is hovered (GOLD) */
svg.euclid-graphic .geom-highlight-secondary {
  opacity: 1 !important;
  stroke: var(--geom-accent, #e8b85a) !important;
  filter: none !important;
  transition: opacity 0.1s ease, stroke 0.1s ease, fill 0.1s ease;
}

svg.euclid-graphic text.geom-highlight-secondary,
svg.euclid-graphic text.geom-highlight-secondary tspan,
svg.euclid-graphic tspan.geom-highlight-secondary {
  opacity: 1 !important;
  fill: var(--geom-accent, #e8b85a) !important;
  stroke: none !important;
  stroke-width: 0 !important;
  filter: none !important;
}

svg.euclid-graphic circle.geom-point.geom-highlight-secondary,
svg.euclid-graphic circle.point.geom-highlight-secondary,
svg.euclid-graphic #points circle.geom-highlight-secondary {
  opacity: 1 !important;
  fill: var(--geom-accent, #e8b85a) !important;
  fill-opacity: 1 !important;
  stroke: none !important;
  stroke-width: 0 !important;
  filter: none !important;
}

/* Active Assertion / Equality Highlight in SVG: GREEN + Center Tick Markers */
svg.euclid-graphic .geom-assert-active {
  opacity: 1 !important;
  stroke: var(--geom-assert, #5ec27e) !important;
  stroke-opacity: 1 !important;
  filter: none !important;
  transition: opacity 0.1s ease, stroke 0.1s ease;
}

svg.euclid-graphic polygon.geom-assert-active,
svg.euclid-graphic path.polygon.geom-assert-active,
svg.euclid-graphic path.geom-polygon.geom-assert-active,
svg.euclid-graphic path.wedge.geom-assert-active,
svg.euclid-graphic path.angle.geom-assert-active {
  opacity: 1 !important;
  fill: var(--geom-assert, #5ec27e) !important;
  fill-opacity: 0.22 !important;
  stroke: var(--geom-assert, #5ec27e) !important;
  stroke-opacity: 1 !important;
  stroke-width: 1.5px !important;
  filter: none !important;
}

svg.euclid-graphic path.geom-ang-arc.geom-assert-active {
  opacity: 1 !important;
  fill: none !important;
  stroke: var(--geom-assert, #5ec27e) !important;
  stroke-width: 1.8px !important;
}

svg.euclid-graphic path.geom-assert-active.geom-tick-1 {
  marker-mid: url(#geom-tick-1) !important;
}

svg.euclid-graphic path.geom-assert-active.geom-tick-2 {
  marker-mid: url(#geom-tick-2) !important;
}

svg.euclid-graphic path.geom-assert-active.geom-tick-3 {
  marker-mid: url(#geom-tick-3) !important;
}

svg.euclid-graphic circle.geom-point.geom-assert-active,
svg.euclid-graphic circle.point.geom-assert-active,
svg.euclid-graphic #points circle.geom-assert-active,
svg.euclid-graphic circle.geom-point.geom-assert-secondary,
svg.euclid-graphic circle.point.geom-assert-secondary,
svg.euclid-graphic #points circle.geom-assert-secondary {
  opacity: 1 !important;
  fill: var(--geom-assert, #5ec27e) !important;
  fill-opacity: 1 !important;
  stroke: none !important;
  stroke-width: 0 !important;
  filter: none !important;
}

svg.euclid-graphic text.geom-assert-active,
svg.euclid-graphic text.geom-assert-active *,
svg.euclid-graphic text.geom-assert-active tspan,
svg.euclid-graphic text.geom-assert-secondary,
svg.euclid-graphic text.geom-assert-secondary *,
svg.euclid-graphic text.geom-assert-secondary tspan {
  opacity: 1 !important;
  fill: var(--geom-assert, #5ec27e) !important;
  stroke: none !important;
  stroke-width: 0 !important;
  filter: none !important;
}

/* Active Coincidence / Superposition Highlight in SVG: CYAN + Concentric Target Rings */
svg.euclid-graphic .geom-coincide-active {
  opacity: 1 !important;
  stroke: var(--geom-coincide, #38bdf8) !important;
  stroke-width: 2.4px !important;
  stroke-opacity: 1 !important;
}

svg.euclid-graphic polygon.geom-coincide-active,
svg.euclid-graphic path.polygon.geom-coincide-active,
svg.euclid-graphic path.geom-polygon.geom-coincide-active,
svg.euclid-graphic path.wedge.geom-coincide-active,
svg.euclid-graphic path.angle.geom-coincide-active {
  opacity: 1 !important;
  fill: var(--geom-coincide, #38bdf8) !important;
  fill-opacity: 0.24 !important;
  stroke: var(--geom-coincide, #38bdf8) !important;
  stroke-dasharray: 5, 2.5 !important;
  stroke-width: 1.8px !important;
}

svg.euclid-graphic circle.geom-point.geom-coincide-active,
svg.euclid-graphic circle.point.geom-coincide-active,
svg.euclid-graphic #points circle.geom-coincide-active,
svg.euclid-graphic circle.geom-point.geom-coincide-secondary,
svg.euclid-graphic circle.point.geom-coincide-secondary,
svg.euclid-graphic #points circle.geom-coincide-secondary {
  opacity: 1 !important;
  fill: var(--geom-coincide, #38bdf8) !important;
  fill-opacity: 1 !important;
}

svg.euclid-graphic text.geom-coincide-active,
svg.euclid-graphic text.geom-coincide-active *,
svg.euclid-graphic text.geom-coincide-active tspan,
svg.euclid-graphic text.geom-coincide-secondary,
svg.euclid-graphic text.geom-coincide-secondary *,
svg.euclid-graphic text.geom-coincide-secondary tspan {
  opacity: 1 !important;
  fill: var(--geom-coincide, #38bdf8) !important;
}

svg.euclid-graphic circle.geom-coincide-ring {
  fill: none !important;
  stroke: var(--geom-coincide, #38bdf8) !important;
  pointer-events: none !important;
  opacity: 0.92 !important;
}

svg.euclid-graphic circle.geom-coincide-ring-inner {
  stroke-width: 1.5px !important;
}

svg.euclid-graphic circle.geom-coincide-ring-outer {
  stroke-width: 1.1px !important;
  stroke-dasharray: 2.5, 2.5 !important;
  opacity: 0.72 !important;
}

/* Inline Figure Wrapper in Book Page */
.euclid-figure-container {
  float: right;
  clear: right;
  margin: 0.25em 0 1.25em 1.5em;
  max-width: 52%;
  background: var(--geom-bg, transparent);
  border: 1px solid var(--book-border, #3d3934);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.16);
  user-select: none;
  transition: max-width 0.2s ease, border-color 0.15s ease;
}

.euclid-figure-container:hover {
  border-color: var(--book-border-dark, #544f47);
}

.euclid-figure-container .figure-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--book-border, #3d3934);
}

.euclid-figure-container .figure-btn {
  font-size: 10px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--book-text-muted, #9c958a);
  background: transparent;
  transition: all 0.15s ease;
  border: none;
  cursor: pointer;
}

.euclid-figure-container .figure-btn:hover {
  color: var(--book-text, #d6cfc5);
  background: var(--book-surface, #272629);
}

.euclid-figure-container .figure-btn.active {
  color: var(--book-link, #de836e);
  background: var(--book-surface-alt, #313035);
  font-weight: 600;
}

.euclid-figure-container.python-mode {
  min-width: 340px;
  max-width: 62%;
}

.euclid-figure-container .figure-svg-wrapper svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.euclid-figure-container .figure-python-wrapper {
  background: #09090b;
  color: #e4e4e7;
  border-radius: 6px;
  border: 1px solid #27272a;
  padding: 8px 10px;
  max-height: 300px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.5;
  text-align: left;
  user-select: text;
}

.euclid-figure-container .figure-caption {
  font-size: 11px;
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  color: var(--book-text-muted, #9c958a);
  text-align: center;
  margin-top: 6px;
}

/* -------------------------------------------------------------------------
   6. Book Codex Collections (Propositions & Chapters Gallery)
   ------------------------------------------------------------------------- */
.book-reading-pane .book-content .collection {
  margin-top: 1.25rem;
  font-size: 1rem;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
}

.book-reading-pane .book-content .collection > * {
  background: transparent;
  padding: 0;
}

.book-reading-pane .book-content .collection .collection-controls {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
  padding: 0;
  background: transparent;
}

.book-reading-pane .book-content .collection .collection-controls button.layout-btn {
  background: var(--book-surface);
  border: 1px solid var(--book-border);
  color: var(--book-text-muted);
  padding: 0.3rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.book-reading-pane .book-content .collection .collection-controls button.layout-btn:hover, .book-reading-pane .book-content .collection .collection-controls button.layout-btn.active {
  background: var(--book-surface-alt);
  color: var(--book-link-hover);
  border-color: var(--book-border-dark);
}

.book-reading-pane .book-content .collection > article.excerpt {
  background: var(--book-surface);
  border: 1px solid var(--book-border);
  border-radius: 6px;
  padding: 1rem;
  margin: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.book-reading-pane .book-content .collection > article.excerpt:hover {
  border-color: var(--book-border-dark);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.book-reading-pane .book-content .collection > article.excerpt > .content {
  margin-bottom: 0;
  gap: 0.75rem;
}

.book-reading-pane .book-content .collection > article.excerpt > .content > figure {
  background: var(--book-bg, #1e1e20);
  border: 1px solid var(--book-border, #3d3934);
  border-radius: 6px;
  padding: 0.5rem;
  box-sizing: border-box;
  max-width: none;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-reading-pane .book-content .collection > article.excerpt > .content > figure a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.book-reading-pane .book-content .collection > article.excerpt > .content > figure img,
.book-reading-pane .book-content .collection > article.excerpt > .content > figure svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.book-reading-pane .book-content .collection > article.excerpt > .content > section {
  min-width: 0;
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
}

.book-reading-pane .book-content .collection > article.excerpt > .content > section h2 {
  font-family: var(--book-font-display) !important;
  font-size: 1.18rem !important;
  font-weight: 600;
  line-height: 1.3 !important;
  margin: 0 0 0.4rem 0 !important;
  text-indent: 0 !important;
}

.book-reading-pane .book-content .collection > article.excerpt > .content > section h2 a {
  color: var(--book-link) !important;
  text-decoration: none !important;
}

.book-reading-pane .book-content .collection > article.excerpt > .content > section h2 a:hover {
  color: var(--book-link-hover) !important;
  text-decoration: underline !important;
}

.book-reading-pane .book-content .collection > article.excerpt > .content > section .enunciation,
.book-reading-pane .book-content .collection > article.excerpt > .content > section p {
  text-indent: 0 !important;
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--book-text);
  margin: 0 !important;
  text-align: left !important;
  hyphens: auto;
}

.book-reading-pane .book-content .collection > article.excerpt > .content > section .enunciation p {
  margin-bottom: 0.25rem !important;
}

.book-reading-pane .book-content .collection > article.excerpt > .content > section .enunciation p:last-child {
  margin-bottom: 0 !important;
}

.book-reading-pane .book-content .collection > article.excerpt > footer {
  display: none !important;
}

.book-reading-pane .book-content .collection.layout-cards {
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
  gap: 1rem;
}

.book-reading-pane .book-content .collection.layout-cards > article.excerpt > .content {
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  text-align: center !important;
}

.book-reading-pane .book-content .collection.layout-cards > article.excerpt > .content > figure {
  width: 100%;
  height: 11.5rem;
  margin: 0 auto 0.25rem auto;
}

.book-reading-pane .book-content .collection.layout-cards > article.excerpt > .content > section {
  width: 100%;
}

.book-reading-pane .book-content .collection.layout-cards > article.excerpt > .content > section h2,
.book-reading-pane .book-content .collection.layout-cards > article.excerpt > .content > section .enunciation,
.book-reading-pane .book-content .collection.layout-cards > article.excerpt > .content > section p {
  text-align: center !important;
  hyphens: none;
}

.book-reading-pane .book-content .collection.layout-banners {
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.book-reading-pane .book-content .collection.layout-banners > article.excerpt > .content {
  flex-direction: row !important;
  align-items: flex-start !important;
  text-align: left !important;
  gap: 1.15rem;
}

.book-reading-pane .book-content .collection.layout-banners > article.excerpt > .content > figure {
  width: 9.5rem;
  height: 8rem;
  margin: 0;
}

.book-reading-pane .book-content .collection.layout-banners > article.excerpt > .content > section {
  flex: 1;
}

.book-reading-pane .book-content .collection.layout-banners > article.excerpt > .content > section h2 {
  text-align: left !important;
}

@media (max-width: 560px) {
  .book-reading-pane .book-content .collection.layout-banners > article.excerpt > .content {
    flex-direction: column !important;
  }
  .book-reading-pane .book-content .collection.layout-banners > article.excerpt > .content > figure {
    width: 100%;
    height: 10rem;
  }
}

.book-reading-pane .book-content .collection.layout-list {
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.book-reading-pane .book-content .collection.layout-list > article.excerpt {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--book-border);
}

.book-reading-pane .book-content .collection.layout-list > article.excerpt > .content {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.9rem;
}

.book-reading-pane .book-content .collection.layout-list > article.excerpt > .content > figure {
  width: 4.5rem;
  height: 4.5rem;
  padding: 0.25rem;
  margin: 0;
}

.book-reading-pane .book-content .collection.layout-list > article.excerpt > .content > section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.book-reading-pane .book-content .collection.layout-list > article.excerpt > .content > section h2 {
  font-size: 1.05rem !important;
  margin: 0 !important;
  text-align: left !important;
  white-space: normal;
  overflow: visible;
}

.book-reading-pane .book-content .collection.layout-list > article.excerpt > .content > section .enunciation,
.book-reading-pane .book-content .collection.layout-list > article.excerpt > .content > section p {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--book-text-muted);
}

/* -------------------------------------------------------------------------
   16. Graphviz Dependency Diagrams (.graphviz)
   ------------------------------------------------------------------------- */
div.graphviz {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 1.25rem 0;
  padding: 0.75rem;
  background-color: var(--book-surface, rgba(0, 0, 0, 0.15));
  border: 1px solid var(--book-border, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
  overflow-x: auto;
}

div.graphviz object.graphviz,
div.graphviz svg.graphviz {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* -------------------------------------------------------------------------
   17. Pseudocode Construction Steps (.geom-step) & Step-by-Step SVG Player
   ------------------------------------------------------------------------- */
.geom-steps-viewport {
  max-height: clamp(14rem, 36vh, 22rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0.35rem 0 1.5rem;
  padding: 0.45rem 0.55rem;
  background-color: rgba(0, 0, 0, 0.16);
  border: 1px solid var(--book-border, #3d3934);
  border-radius: 6px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.22);
  scrollbar-width: thin;
  scrollbar-color: var(--book-border-dark, #544f47) transparent;
}

.geom-steps-viewport:focus, .geom-steps-viewport:focus-visible {
  outline: 1px solid rgba(232, 184, 90, 0.45);
  border-color: var(--book-border-dark, #544f47);
}

.geom-steps-viewport::-webkit-scrollbar {
  width: 6px;
}

.geom-steps-viewport::-webkit-scrollbar-track {
  background: transparent;
}

.geom-steps-viewport::-webkit-scrollbar-thumb {
  background-color: var(--book-border-dark, #544f47);
  border-radius: 3px;
}

figure.photon-svg:has(+ .geom-steps-viewport) {
  margin-bottom: 0.35rem !important;
}

.geom-step {
  position: relative;
  text-indent: 0 !important;
  text-align: left !important;
  padding: 0.28rem 0.55rem 0.28rem 5.4rem;
  margin: 0.22rem 0;
  border-radius: 4px;
  border-left: 2.5px solid var(--book-border, #3d3934);
  background-color: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  line-height: 1.55;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.geom-step p {
  text-indent: 0 !important;
  text-align: left !important;
  margin: 0.15rem 0 !important;
}

.geom-step:hover {
  background-color: var(--book-surface, rgba(255, 255, 255, 0.04));
  border-left-color: var(--book-border-dark, #544f47);
}

.geom-step.geom-step-active {
  background-color: rgba(232, 184, 90, 0.11);
  border-left-color: var(--geom-accent, #e8b85a);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.geom-step.geom-step-assert.geom-step-active, .geom-step.geom-step-conclude.geom-step-active {
  background-color: rgba(94, 194, 126, 0.11);
  border-left-color: var(--geom-assert, #5ec27e);
}

.geom-step.geom-step-future {
  opacity: 0.52;
}

.geom-step-badge {
  display: inline-block;
  width: 4.5rem;
  margin-left: -4.85rem;
  margin-right: 0.35rem;
  font-family: var(--book-font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: right;
  color: var(--book-text-muted, #9c958a);
  user-select: none;
  vertical-align: baseline;
}

.geom-step-badge.geom-badge-given, .geom-step-badge.geom-badge-let {
  color: #93c5fd;
}

.geom-step-badge.geom-badge-construct {
  color: var(--geom-accent, #e8b85a);
}

.geom-step-badge.geom-badge-intersect {
  color: #f9a8d4;
}

.geom-step-badge.geom-badge-assert {
  color: var(--geom-assert, #5ec27e);
}

.geom-step-badge.geom-badge-conclude, .geom-step-badge.geom-badge-qed, .geom-step-badge.geom-badge-qef {
  color: #c4b5fd;
}

.geom-step-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--book-border, #3d3934);
  font-family: var(--book-font-mono, monospace);
  font-size: 0.72rem;
  color: var(--book-text-muted, #9c958a);
  user-select: none;
}

.geom-step-player .geom-step-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.geom-step-player .geom-step-btn {
  background: var(--book-surface, #272629);
  border: 1px solid var(--book-border, #3d3934);
  color: var(--book-text, #d6cfc5);
  border-radius: 3px;
  padding: 0.12rem 0.42rem;
  font-family: var(--book-font-mono, monospace);
  font-size: 0.72rem;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.12s ease;
}

.geom-step-player .geom-step-btn:hover {
  background: var(--book-surface-alt, #313035);
  border-color: var(--book-border-dark, #544f47);
  color: var(--geom-accent, #e8b85a);
}

.geom-step-player .geom-step-btn.is-active {
  background: rgba(232, 184, 90, 0.16);
  border-color: var(--geom-accent, #e8b85a);
  color: var(--geom-accent, #e8b85a);
  font-weight: 600;
}

.geom-step-player .geom-step-status {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding: 0 0.25rem;
}

svg.euclid-graphic .geom-step-hidden:not(.geom-highlight-active):not(.geom-highlight-secondary):not(.geom-assert-active):not(.geom-assert-secondary) {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* -------------------------------------------------------------------------
   18. Formal Proposition Signatures (.geom-signature) & Function Calls (.geom-fn)
   ------------------------------------------------------------------------- */
.geom-signature {
  margin: 0.55rem 0 0.75rem;
  padding: 0.55rem 0.85rem;
  background-color: var(--book-surface, #272629);
  border: 1px solid var(--book-border, #3d3934);
  border-left: 3px solid var(--geom-accent, #e8b85a);
  border-radius: 5px;
  font-family: var(--book-font-mono, monospace);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--book-text, #d6cfc5);
  text-indent: 0 !important;
  text-align: left !important;
}

.geom-signature.geom-signature-theorem, .geom-signature.geom-signature-cn, .geom-signature.geom-signature-def, .geom-signature.geom-signature-rule {
  border-left-color: var(--geom-assert, #5ec27e);
}

.geom-signature p,
.geom-signature .line-block,
.geom-signature .line {
  text-indent: 0 !important;
  text-align: left !important;
  margin: 0.12rem 0 !important;
}

.geom-signature .line-block {
  margin: 0 !important;
}

.geom-fn,
a.geom-fn {
  font-family: var(--book-font-mono, monospace);
  font-size: 0.88em;
  font-weight: 600;
  font-style: normal;
  color: var(--book-link, #de836e) !important;
  background-color: rgba(222, 131, 110, 0.1);
  border: 1px solid rgba(222, 131, 110, 0.34);
  border-radius: 3px;
  padding: 0.04rem 0.34rem;
  text-decoration: none !important;
  white-space: nowrap;
  transition: color 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.geom-fn:hover,
a.geom-fn:hover {
  color: var(--book-link-hover, #f5a492) !important;
  background-color: rgba(222, 131, 110, 0.22);
  border-color: var(--book-link, #de836e);
  text-decoration: none !important;
}

.geom-fn.geom-fn-def,
a.geom-fn.geom-fn-def {
  color: var(--geom-accent, #e8b85a) !important;
  background-color: rgba(232, 184, 90, 0.12);
  border-color: rgba(232, 184, 90, 0.42);
}

.geom-rule-just {
  float: right;
  text-indent: 0 !important;
  font-family: var(--book-font-mono, monospace);
  font-size: 0.78rem;
  font-style: normal;
  letter-spacing: 0.01em;
  color: var(--book-text-muted, #9c958a);
  margin-left: 0.65rem;
}

.geom-rule-just .geom-because {
  color: var(--geom-assert, #5ec27e);
  font-weight: 700;
  margin-right: 0.1rem;
}

.geom-rule-just a.geom-rule,
.geom-rule-just span.geom-rule {
  font-family: var(--book-font-mono, monospace);
  font-size: 0.78rem;
  color: var(--book-link, #de836e) !important;
  text-decoration: none !important;
  border-bottom: 1px dotted rgba(222, 131, 110, 0.55);
  border-radius: 2px;
  padding: 0 2px;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.geom-rule-just a.geom-rule:hover,
.geom-rule-just span.geom-rule:hover {
  color: var(--book-link-hover, #f5a492) !important;
  border-bottom: 1px solid var(--book-link, #de836e);
  background-color: rgba(222, 131, 110, 0.12);
  text-decoration: none !important;
}

/* -------------------------------------------------------------------------
   19. Collapsible Scholarly Apparatus Blocks (details.book-collapse) & Notes (.note-item)
   ------------------------------------------------------------------------- */
details.book-collapse {
  margin: 0.75rem 0 1.25rem;
  background-color: var(--book-surface, #272629);
  border: 1px solid var(--book-border, #3d3934);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

details.book-collapse:hover {
  border-color: var(--book-border-dark, #544f47);
}

details.book-collapse > summary.book-collapse-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 0.15s ease;
}

details.book-collapse > summary.book-collapse-summary::-webkit-details-marker {
  display: none;
}

details.book-collapse > summary.book-collapse-summary:hover {
  background-color: var(--book-surface-alt, #313035);
}

details.book-collapse .book-collapse-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--book-font-display, "Cormorant Garamond", Georgia, serif);
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--book-text, #d6cfc5);
}

details.book-collapse .book-collapse-title .collapse-icon {
  display: inline-block;
  color: var(--book-link, #de836e);
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.15s ease;
}

details.book-collapse .book-collapse-badge {
  font-family: var(--book-font-mono, monospace);
  font-size: 0.75rem;
  color: var(--book-text-muted, #9c958a);
  background-color: var(--book-surface-alt, #313035);
  border: 1px solid var(--book-border, #3d3934);
  padding: 0.12rem 0.55rem;
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

details.book-collapse[open] > summary.book-collapse-summary {
  border-bottom: 1px solid var(--book-border, #3d3934);
  background-color: rgba(255, 255, 255, 0.02);
}

details.book-collapse[open] .collapse-icon {
  transform: rotate(90deg);
}

details.book-collapse .book-collapse-body {
  padding: 0.75rem 1rem;
  font-size: 0.98rem;
  line-height: 1.6;
}

details.book-collapse .book-collapse-body p {
  text-indent: 0 !important;
  text-align: left !important;
  margin: 0.3rem 0 !important;
}

details.book-collapse .book-collapse-body ul,
details.book-collapse .book-collapse-body ol {
  margin: 0.2rem 0 !important;
  padding-left: 1.25rem;
}

details.book-collapse .book-collapse-body li {
  margin-bottom: 0.32rem;
  line-height: 1.55;
}

details.book-collapse .book-collapse-body li p {
  margin: 0 !important;
}

details.book-collapse .book-collapse-body.line-catalog p,
details.book-collapse .book-collapse-body .line-catalog p {
  font-family: var(--book-font-mono, monospace);
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--book-text, #d6cfc5);
}

.book-reading-pane .book-content .note-item {
  margin: 0.65rem 0;
  padding: 0.35rem 0.85rem;
  border-left: 2px solid var(--book-border-dark, #544f47);
  background-color: rgba(255, 255, 255, 0.015);
  border-radius: 0 4px 4px 0;
}

.book-reading-pane .book-content .note-item p {
  text-indent: 0 !important;
  text-align: left !important;
  margin: 0.25rem 0 !important;
}
