:root {
  --ink: #1f2328;
  --muted: #667085;
  --accent: #7a4b12;
  --accent-soft: #f5ead9;
  --line: #e4e7ec;
  --mark: #ffe9a8;
  --bg: #fbfaf8;
}
* { box-sizing: border-box; }
/* Make the `hidden` attribute reliably win over element display rules
   (e.g. .more, .match-nav set display:block/flex, which would otherwise
   override the UA [hidden] rule and keep the element visible). */
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
body.source-split-open { margin-right: 50vw; }
.source-reader-pane {
  position: fixed; inset: 0 0 0 auto; z-index: 100; width: 50vw;
  background: #e9e6e1; border-left: 1px solid var(--line);
  box-shadow: -5px 0 18px rgba(31, 35, 40, 0.14);
}
.source-reader-pane-toolbar {
  height: 2.75rem; display: flex; align-items: center; justify-content: space-between;
  padding: 0.35rem 0.65rem; background: #fff; border-bottom: 1px solid var(--line);
}
.source-reader-pane-toolbar button {
  border: 1px solid var(--line); border-radius: 7px; padding: 0.3rem 0.6rem;
  background: #fff; color: var(--ink); cursor: pointer;
}
.source-reader-pane-toolbar button:hover { background: var(--accent-soft); }
.source-reader-pane-toolbar a { font-size: 0.78rem; }
.source-reader-pane iframe {
  display: block; width: 100%; height: calc(100% - 2.75rem); border: 0; background: #e9e6e1;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
mark { background: var(--mark); padding: 0 1px; border-radius: 2px; }

.history-nav {
  position: absolute; top: 0.75rem; left: 0.85rem;
  display: flex; gap: 0.35rem;
}
.machine-access {
  margin: 2rem auto 1rem; max-width: 72rem; padding: 0 1rem;
  text-align: right; font-size: 0.72rem;
}
.machine-access a { color: var(--muted); }
.history-nav button, .history-button {
  width: 2rem; height: 2rem; padding: 0;
  border: 1px solid var(--line); border-radius: 7px;
  background: #fff; color: var(--ink); cursor: pointer; font-size: 1rem;
}
.history-nav button:hover, .history-button:hover { background: var(--accent-soft); }

.site-header { text-align: center; padding: 2.2rem 1rem 0.6rem; }
.site-header h1 { margin: 0; font-size: 1.5rem; letter-spacing: 0.02em; }
.site-header h1 a { color: var(--ink); }
.site-header h1 a:hover { text-decoration: none; }
.stats { color: var(--muted); font-size: 0.85rem; margin: 0.3rem 0 0; }

.search-bar { max-width: 44rem; margin: 1rem auto 0; padding: 0 1rem; }
#q {
  width: 100%; font-size: 1.1rem; padding: 0.65rem 0.9rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  outline: none;
}
#q:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.controls { display: flex; gap: 1.2rem; margin-top: 0.5rem; color: var(--muted); font-size: 0.85rem; }
.controls select { font-size: 0.85rem; }

main { max-width: 44rem; margin: 0 auto 4rem; padding: 0 1rem; }
.summary { color: var(--muted); font-size: 0.85rem; min-height: 1.2em; margin: 0.9rem 0 0.4rem; }
.collapsible-section {
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  margin: 0.65rem 0; overflow: hidden;
}
.collapsible-section > summary {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.72rem 0.85rem; cursor: pointer; color: var(--ink);
  font-size: 0.95rem; font-weight: 600; list-style: none;
}
.collapsible-section > summary::-webkit-details-marker { display: none; }
.collapsible-section > summary::after {
  content: "+"; margin-left: auto; color: var(--accent); font-size: 1.15rem;
}
.collapsible-section[open] > summary {
  border-bottom: 1px solid var(--line); background: var(--accent-soft);
}
.collapsible-section[open] > summary::after { content: "−"; }
.collapsible-section > .empty-note { padding: 0 0.85rem; }
.definition-section > .definition-list,
.definition-section > .definition-groups,
.theosophical-glossary-section > .theosophical-glossary-list,
.external-sources-section > .external-source-list,
.biblical-background-section > .biblical-background-list,
.thesaurus-section > .thesaurus-list { margin: 0.65rem 0.75rem; }
.corpus-section > .summary { margin-left: 0.85rem; margin-right: 0.85rem; }
.corpus-section > #results { padding: 0 0.7rem; }
.corpus-section .doc-card:first-child { margin-top: 0.55rem; }
.corpus-section > .more { margin-bottom: 0.85rem; }
.collapsible-section > summary:hover {
  background: var(--accent-soft);
}

/* ---------------- glossary enrichment ---------------- */
.glossary { margin-top: 1rem; }
/* No margin of its own: the section cards inside carry 0.65rem margins that
   collapse through this wrapper, keeping every card gap identical. */
.other-results { margin-top: 0; }
.glossary > h1 {
  font: 600 1.45rem/1.25 Georgia, "Times New Roman", serif;
  margin: 1.2rem 0 1rem;
}
.glossary > h2 { font-size: 1rem; margin: 1.4rem 0 0.55rem; }
.glossary > h3, .thesaurus-section > h3 {
  color: var(--muted); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.05em; margin: 1rem 0 0.4rem;
}
.thesaurus-section > h3 { margin-left: 0.85rem; margin-right: 0.85rem; }
.glossary-alternatives, .empty-note, .relation-explanation {
  color: var(--muted); font-size: 0.86rem;
}
.editorial-note {
  border-left: 3px solid var(--accent); margin: 0.65rem 0;
  padding: 0.2rem 0.9rem;
}
.editorial-note > h2 { margin: 0 0 0.35rem; font-size: 0.95rem; }
.editorial-note > p {
  margin: 0; font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem; line-height: 1.6;
}
.ai-definition-summary {
  border: 1px solid #d7b98d; border-radius: 9px;
  background: var(--accent-soft); margin: 0.65rem 0; padding: 0.8rem 0.9rem;
}
.ai-definition-summary > h2 {
  margin: 0 0 0.45rem; font-size: 0.95rem;
}
.ai-definition-summary-text {
  margin: 0; font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem; line-height: 1.6;
}
.ai-definition-sense-list { display: grid; gap: 0.75rem; }
.ai-definition-sense {
  border-top: 1px solid #d7b98d; padding-top: 0.7rem;
}
.ai-definition-sense:first-child { border-top: 0; padding-top: 0; }
.ai-definition-sense > h3 {
  margin: 0 0 0.25rem; color: var(--accent); font-size: 0.88rem;
}
.ai-definition-sense-evidence {
  display: block; margin: 0.25rem 0 0; color: var(--accent); font-size: 0.7rem;
  text-decoration: underline; text-underline-offset: 0.12rem;
}
.ai-definition-summary-meta {
  margin: 0.55rem 0 0; color: var(--muted); font-size: 0.72rem;
}
.text-button {
  border: 0; padding: 0; background: none; color: var(--accent);
  font: inherit; cursor: pointer; text-align: inherit;
}
.text-button:hover { text-decoration: underline; }
.definition-list, .evidence-list { display: grid; gap: 0.55rem; }
.definition-groups { display: grid; gap: 0.55rem; }
.definition-group {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: #fff;
}
.definition-group > summary {
  display: flex; align-items: center; gap: 0.65rem; list-style: none;
  color: var(--muted); cursor: pointer; padding: 0.65rem 0.75rem;
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em;
}
.definition-group > summary::-webkit-details-marker { display: none; }
.definition-group > summary::after {
  content: "+"; margin-left: auto; color: var(--accent); font-size: 1rem;
}
.definition-group[open] > summary {
  border-bottom: 1px solid var(--line); background: var(--accent-soft);
}
.definition-group[open] > summary::after { content: "−"; }
.definition-group > summary:hover { background: var(--accent-soft); }
.definition-group > .definition-list {
  padding: 0.65rem 0.7rem; background: #faf9f7;
}
.definition-group-note {
  color: var(--muted); font-size: 0.75rem; margin: 0;
}
.theosophical-glossary-list { display: grid; gap: 0.65rem; }
.theosophical-glossary-entry {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: #fff;
}
.theosophical-glossary-headword {
  margin: 0; padding: 0.65rem 0.8rem; color: var(--accent);
  background: #faf9f7; border-bottom: 1px solid var(--line);
  font: 600 1rem/1.35 Georgia, "Times New Roman", serif;
  text-transform: none; letter-spacing: normal;
}
.theosophical-glossary-spellings {
  margin: 0; padding: 0.5rem 0.8rem 0; color: var(--muted);
  font-size: 0.75rem;
}
.theosophical-glossary-passages { display: grid; }
.theosophical-glossary-passage {
  padding: 0.75rem 0.8rem; border-top: 1px solid var(--line);
}
.theosophical-glossary-passage:first-child { border-top: 0; }
.theosophical-glossary-text {
  margin: 0; white-space: pre-wrap; font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem; line-height: 1.6;
}
.theosophical-glossary-metadata {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.65rem;
  margin: 0.5rem 0 0; color: var(--muted); font-size: 0.72rem;
}
.theosophical-glossary-provenance {
  display: inline-block; padding: 0.1rem 0.45rem; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
/* Dioses Atómicos sits inside the bibliographic section as one author group;
   only its "author's own glossary" block keeps a look of its own. */
.dioses-atomicos-glossary { padding: 0.75rem 0.85rem; }
.dioses-atomicos-glossary + .dioses-atomicos-glossary,
.dioses-atomicos-glossary + .external-source-quotes { border-top: 1px solid var(--line); }
.dioses-atomicos-glossary > h3 {
  margin: 0; color: var(--accent);
  font: 600 1rem/1.35 Georgia, "Times New Roman", serif;
  text-transform: none; letter-spacing: normal;
}
.dioses-atomicos-english {
  margin: 0.15rem 0 0; color: var(--muted); font-size: 0.75rem;
}
.dioses-atomicos-definition-label {
  margin: 0.65rem 0 0; color: var(--muted); font-size: 0.72rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.035em;
}
.dioses-atomicos-definition {
  margin: 0.5rem 0 0; font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem; line-height: 1.6;
}
.external-source-list { display: grid; gap: 0.75rem; min-width: 0; }
.external-source-author {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: #fff; min-width: 0;
}
.external-source-author-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.75rem 0.85rem; cursor: pointer; color: var(--accent);
  font: 600 1rem/1.35 Georgia, "Times New Roman", serif;
  background: #faf9f7;
}
.external-source-author-heading:hover { background: var(--accent-soft); }
.external-source-author-count {
  flex: none; padding: 0.12rem 0.5rem; border-radius: 99px;
  color: var(--muted); background: #fff; border: 1px solid var(--line);
  font: 600 0.7rem/1.35 system-ui, sans-serif;
}
.external-source-author[open] > .external-source-author-heading {
  border-bottom: 1px solid var(--line);
}
.external-source-quotes {
  display: grid; gap: 0.65rem; padding: 0.75rem; min-width: 0;
}
.external-source-entry {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: #fff; padding-top: 0.75rem;
}
.external-source-title {
  margin: 0 0.8rem; color: var(--accent);
  font: 600 1rem/1.35 Georgia, "Times New Roman", serif;
}
.external-source-subtitle,
.external-source-edition {
  margin: 0.18rem 0.8rem 0; color: var(--muted); font-size: 0.72rem;
}
.external-source-relationship {
  display: inline-block; margin: 0.55rem 0.8rem 0; padding: 0.13rem 0.5rem;
  border-radius: 99px; background: var(--accent-soft); color: var(--accent);
  font-size: 0.7rem; font-weight: 600;
}
.external-source-attribution {
  margin: 0.4rem 0.8rem 0; color: var(--muted); font-size: 0.72rem;
}
.external-source-exact-definition {
  margin: 0.7rem 0.8rem 0; padding-left: 0.75rem;
  border-left: 3px solid var(--accent); font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
}
.external-source-exact-context {
  display: inline-block; margin: 0.35rem 0.8rem 0;
  color: var(--accent); font-size: 0.75rem;
}
.external-source-summary { padding: 0.7rem 0.85rem; background: var(--accent-soft); }
.external-source-summary-label {
  margin: 0; color: var(--muted); font-size: 0.72rem; font-weight: 600;
}
.external-source-summary > p:last-child,
.external-source-passage-text {
  margin: 0.45rem 0 0; font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem; line-height: 1.6;
}
.original-language-term {
  margin: 0; padding: 0.55rem 0.85rem; color: var(--muted); font-size: 0.8rem;
}
.original-language-value { color: var(--text); font-size: 0.9rem; }
.original-language-also { color: var(--muted); }
.original-language-toggle > summary {
  padding: 0.5rem 0.85rem; color: var(--accent); font-size: 0.75rem;
  cursor: pointer; list-style: none;
}
.original-language-toggle > summary::-webkit-details-marker { display: none; }
.original-language-toggle > summary::before { content: "▸ "; }
.original-language-toggle[open] > summary::before { content: "▾ "; }
.original-language-toggle > .original-language-term { padding-top: 0; }
.external-source-edition { margin-bottom: 0.7rem; }
.external-source-passage {
  padding: 0.8rem 0.85rem; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; min-width: 0;
}
.external-source-reader-card {
  display: block; min-width: 0; color: inherit; cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease,
              box-shadow 120ms ease;
}
.external-source-reader-card:hover,
.external-source-reader-card:focus-visible {
  background: var(--accent-soft); border-color: #d7b98d;
  box-shadow: 0 1px 3px rgba(52, 35, 18, 0.08);
  text-decoration: none; outline: none;
}
.external-source-context {
  overflow-wrap: anywhere;
}
.external-source-passage-text {
  margin: 0; padding-left: 0.8rem; border-left: 3px solid var(--accent);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.external-source-passage-text mark {
  background: var(--mark); color: inherit; border-radius: 2px; padding: 0 0.04em;
}
/* Gurdjieff sits inside the bibliographic section as one author group; each
   aligned entry opens with its spelling and edition notes, then quotes. */
.gurdjieff-entry + .gurdjieff-entry { border-top: 1px solid var(--line); }
.gurdjieff-entry > .external-source-quotes { margin-top: 0.45rem; }
.gurdjieff-english-headword,
.gurdjieff-edition {
  margin: 0; padding: 0.5rem 0.85rem 0; color: var(--muted);
  font-size: 0.75rem; line-height: 1.35;
}
.gurdjieff-english-headword + .gurdjieff-edition,
.gurdjieff-edition + .gurdjieff-edition { padding-top: 0.25rem; }
.biblical-background-list { display: grid; gap: 0.65rem; }
.biblical-background-entry {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: #fff;
}
.biblical-background-heading {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.65rem;
  padding: 0.6rem 0.8rem; background: #faf9f7;
  border-bottom: 1px solid var(--line);
}
.biblical-background-status, .biblical-background-scope {
  display: inline-block; padding: 0.12rem 0.5rem; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 0.72rem; font-weight: 600;
}
.biblical-background-scope { background: #f1f3f5; color: var(--muted); }
.biblical-background-ai-summary, .biblical-background-forms {
  margin: 0; padding: 0.65rem 0.8rem 0;
}
.biblical-background-ai-label {
  margin: 0 0 0.25rem; color: var(--muted); font-size: 0.7rem;
  font-weight: 600; letter-spacing: 0.02em;
}
.biblical-background-note {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif; line-height: 1.6;
}
.biblical-background-forms { color: var(--muted); font-size: 0.75rem; }
.biblical-reference-list { display: grid; margin-top: 0.55rem; }
.biblical-reference {
  padding: 0.65rem 0.8rem; border-top: 1px solid var(--line);
}
.biblical-reference > h4,
.biblical-samael-evidence > h4 {
  margin: 0 0 0.3rem; color: var(--accent); font-size: 0.78rem;
}
.biblical-reference-text {
  margin: 0; white-space: pre-wrap;
  font-family: Georgia, "Times New Roman", serif; line-height: 1.55;
}
.biblical-reference-witness {
  margin: 0.35rem 0 0; color: var(--muted); font-size: 0.7rem;
}
.biblical-samael-evidence {
  display: grid; gap: 0.55rem; padding: 0.65rem 0.8rem;
  border-top: 1px solid var(--line);
}
.biblical-nonsupporting-evidence { background: #faf9f7; }
.samael-passage-card {
  display: block; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 0.75rem 0.85rem;
  transition: background-color 120ms ease, border-color 120ms ease,
              box-shadow 120ms ease;
}
.samael-passage-card:hover, .samael-passage-card:focus-visible {
  background: var(--accent-soft); border-color: #d7b98d;
  box-shadow: 0 1px 3px rgba(52, 35, 18, 0.08); text-decoration: none;
  outline: none;
}
.samael-passage-text {
  display: block; font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem; line-height: 1.55; white-space: pre-wrap;
}
.citation {
  display: block; color: var(--accent); font-size: 0.73rem;
  margin-top: 0.35rem; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.thesaurus-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.45rem; align-items: start;
}
.thesaurus-term {
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--ink); overflow: hidden;
}
.thesaurus-term[open] { grid-column: 1 / -1; border-color: #d7b98d; }
.thesaurus-term-summary {
  position: relative; list-style: none; padding: 0.55rem 2rem 0.55rem 0.7rem;
  cursor: pointer; text-align: left;
}
.thesaurus-term-summary::-webkit-details-marker { display: none; }
.thesaurus-term-summary::after {
  content: "+"; position: absolute; right: 0.7rem; top: 50%;
  color: var(--accent); font-size: 1rem; transform: translateY(-50%);
}
.thesaurus-term[open] > .thesaurus-term-summary::after { content: "−"; }
.thesaurus-term-summary:hover,
.thesaurus-term-summary:focus-visible { background: var(--accent-soft); outline: none; }
.thesaurus-name { display: block; color: var(--accent); font-weight: 600; }
.thesaurus-detail { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 0.12rem; }
.thesaurus-evidence {
  display: grid; gap: 0.65rem; padding: 0.75rem;
  border-top: 1px solid var(--line); background: #faf9f7;
}
.thesaurus-evidence > h4 {
  margin: 0.2rem 0 -0.25rem; color: var(--accent); font-size: 0.78rem;
}
.thesaurus-evidence-explanation {
  margin: 0; color: var(--muted); font-size: 0.78rem;
}
.thesaurus-evidence-passages { display: grid; gap: 0.55rem; }
.relation-title { display: flex; flex-wrap: wrap; align-items: baseline; }
.relation-target { font-weight: 600; }
.doc-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 0.8rem; overflow: hidden;
}
.doc-heading {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.75rem 0.85rem;
  cursor: pointer; color: var(--accent); background: #faf9f7;
  font: 600 1rem/1.35 Georgia, "Times New Roman", serif;
}
.doc-card[open] > .doc-heading {
  border-bottom: 1px solid var(--line); background: var(--accent-soft);
}
.doc-heading:hover { background: var(--accent-soft); }
.doc-result-count {
  flex: none; margin-left: auto; padding: 0.12rem 0.5rem; border-radius: 99px;
  color: var(--muted); background: #fff; border: 1px solid var(--line);
  font: 600 0.7rem/1.35 system-ui, sans-serif;
}
.doc-title { min-width: 0; }
.doc-passages { display: grid; gap: 0.55rem; padding: 0.65rem 0.85rem 0.8rem; }
.corpus-passage-card { font-size: 0.92rem; }

.more {
  display: block; margin: 1rem auto; padding: 0.5rem 1.2rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--accent); font-size: 0.9rem; cursor: pointer;
}
.more:hover { background: var(--accent-soft); }

#browse h2 { font-size: 0.95rem; color: var(--muted); margin: 1.6rem 0 0.5rem; }
#browse a { display: block; padding: 0.18rem 0; font-size: 0.92rem; }

/* ---------------- reader ---------------- */
.reader-bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1rem;
  background: rgba(251, 250, 248, 0.95); backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 1rem; font-size: 0.9rem;
}
.reader-history { display: flex; gap: 0.3rem; flex: 0 0 auto; }
.doc-label { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-nav { margin-left: auto; display: flex; align-items: center; gap: 0.4rem; color: var(--muted); font-size: 0.8rem; }
.match-nav button {
  border: 1px solid var(--line); background: #fff; border-radius: 6px;
  cursor: pointer; padding: 0.1rem 0.5rem; color: var(--accent);
}
.match-nav button:hover { background: var(--accent-soft); }

.doc {
  max-width: 42rem; margin: 0 auto 6rem; padding: 1.5rem 1.2rem;
  font-family: Georgia, "Times New Roman", serif; font-size: 1.06rem; line-height: 1.72;
}
.doc h1 { font-size: 1.45rem; text-align: center; line-height: 1.3; margin: 1rem 0 2rem; }
.doc h2 { font-size: 1.2rem; text-align: center; margin: 2.6rem 0 1rem; letter-spacing: 0.04em; }
.doc h3 { font-size: 1.08rem; text-align: center; margin: 2.2rem 0 0.9rem; letter-spacing: 0.03em; }
.doc h4 { font-size: 0.98rem; text-align: center; margin: 1.8rem 0 0.7rem; letter-spacing: 0.03em; color: #3a3f45; }
.doc p { margin: 0 0 0.85em; position: relative; }
.doc hr { border: none; text-align: center; margin: 1.4em 0; }
.doc hr::after { content: "· · ·"; color: var(--muted); letter-spacing: 0.6em; }

.doc p .anchor {
  position: absolute; left: -1.5rem; top: 0; color: var(--line);
  font-family: -apple-system, sans-serif; font-size: 0.8rem;
  opacity: 0; text-decoration: none;
}
.doc p:hover .anchor { opacity: 1; color: var(--accent); }
.doc p.flash { animation: flash 2.2s ease-out; }
.original-reader-bar { gap: 0.75rem; }
.original-reader-search {
  display: flex; gap: 0.35rem; margin-left: auto; min-width: min(26rem, 36vw);
}
.original-reader-search input {
  min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 6px;
  padding: 0.35rem 0.5rem; font: inherit;
}
.original-reader-search button {
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
  padding: 0.35rem 0.55rem; cursor: pointer;
}
.original-document-metadata {
  color: var(--muted); text-align: center; font-size: 0.86rem;
  margin: -1.2rem auto 2rem !important; max-width: 46rem;
}
.original-paragraph-location {
  display: block; color: var(--muted); font-size: 0.72rem; margin-top: 0.2rem;
}
.original-language-passages { margin: 0.4rem 0 0.8rem; }
.original-language-passages > summary {
  color: var(--accent); cursor: pointer; font-size: 0.82rem; font-weight: 650;
}
.original-language-passage {
  border-left: 3px solid var(--line); margin: 0.65rem 0; padding-left: 0.75rem;
}
.original-language-passage blockquote { margin: 0 0 0.25rem; white-space: pre-wrap; }
.original-language-passage-meta { color: var(--muted); font-size: 0.75rem; }
@media (max-width: 760px) {
  .original-reader-bar { flex-wrap: wrap; }
  .original-reader-search { order: 3; min-width: 100%; }
}
@keyframes flash {
  0%, 35% { background: var(--mark); }
  100% { background: transparent; }
}
