/* The Modern Translation Project: one stylesheet for every page.
   Body text: Source Serif 4, self-hosted, so the measure below is stable.
   --measure is tuned by measuring real lines in the browser: with this font
   the longest line of body text stays at or under 70 characters. */

/* ---- Fonts ------------------------------------------------------------- */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/SourceSerif4-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/SourceSerif4-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/SourceSerif4-greek.woff2) format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url(fonts/SourceSerif4-Italic-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url(fonts/SourceSerif4-Italic-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url(fonts/SourceSerif4-Italic-greek.woff2) format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }

/* ---- Tokens ------------------------------------------------------------ */
:root {
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --base: 20px;
  --scale: 1;
  --measure: 26em;      /* body-text column: measured, see README "Checking line length" */
  --wide: 44rem;        /* library and contents pages */
  --gutter: 1.25rem;
  --bar: 3rem;

  --bg: #fbf9f4; --fg: #1f1c18; --muted: #6a645a; --faint: #8f887c;
  --rule: #e6e0d4; --surface: #f4f0e7; --accent: #8e3417; --accent-fg: #fff;
  --link: #8e3417; --mark: #f1dfd4;
  color-scheme: light;
}
:root[data-theme="sepia"] {
  --bg: #f3ead6; --fg: #3b3025; --muted: #6f604c; --faint: #8f7f68;
  --rule: #dfd1b4; --surface: #ebe0c7; --accent: #8a3a12; --link: #8a3a12; --mark: #e6cfb4;
}
:root[data-theme="dark"] {
  --bg: #151618; --fg: #dbd6cc; --muted: #a29b8f; --faint: #7d776d;
  --rule: #2d2f33; --surface: #1e2023; --accent: #e3a07f; --accent-fg: #1a1a1a;
  --link: #e3a07f; --mark: #3a2b24;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #151618; --fg: #dbd6cc; --muted: #a29b8f; --faint: #7d776d;
    --rule: #2d2f33; --surface: #1e2023; --accent: #e3a07f; --accent-fg: #1a1a1a;
    --link: #e3a07f; --mark: #3a2b24;
    color-scheme: dark;
  }
}
@media (max-width: 40rem) { :root { --base: 18px; --gutter: 1.1rem; } }

/* ---- Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--serif); font-size: calc(var(--base) * var(--scale));
  line-height: 1.6; font-kerning: normal; font-optical-sizing: auto;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: .15em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.25; font-weight: 600; text-wrap: balance; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.col { width: 100%; max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.col-wide { width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--bg); padding: .5rem 1rem; font-family: var(--sans); }
.skip:focus { left: .5rem; top: .5rem; }

/* ---- Top bar (UI in sans, sized independently of the reading size) ------ */
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  border-bottom: 1px solid var(--rule); font-family: var(--sans); font-size: 15px;
  transition: transform .25s ease;
}
.topbar.tb-hidden { transform: translateY(-100%); }
.topbar-in { display: flex; align-items: center; gap: .75rem; height: var(--bar); padding-inline: var(--gutter); max-width: 72rem; margin-inline: auto; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--fg); text-decoration: none; white-space: nowrap; letter-spacing: .01em; }
.crumbs { display: flex; gap: .45rem; align-items: center; min-width: 0; color: var(--muted); flex: 1; }
.crumbs::before { content: ""; width: 1px; height: 1.1em; background: var(--rule); margin-right: .2rem; }
.crumbs:empty::before { display: none; }
.crumbs a { color: var(--muted); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a:hover { color: var(--fg); }
.tools { display: flex; gap: .35rem; margin-left: auto; flex-shrink: 0; }
.crumbs { overflow: hidden; }
.tbtn { border: 1px solid var(--rule); background: transparent; border-radius: 6px; padding: .3rem .7rem; cursor: pointer; min-height: 2.1rem; font-size: 14px; color: var(--fg); }
.tbtn:hover { background: var(--surface); }
.tbtn.aa { font-family: var(--serif); font-size: 16px; padding-inline: .6rem; }
@media (pointer: coarse) { .tbtn { min-height: 44px; min-width: 44px; } }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
@media (max-width: 40rem) {
  .crumb-author { display: none; }
  .crumbs::before { display: none; }
  .brand { font-size: 16px; }
}
@media (max-width: 26rem) { .page-reader .brand { display: none; } }
@media (max-width: 40rem) { .brand-the { display: none; } }

/* ---- Home / author / work ------------------------------------------------ */
.intro { padding-top: 3.5rem; padding-bottom: 1rem; }
.intro h1 { font-size: 2.4em; margin: 0 0 .4rem; letter-spacing: -.01em; }
.lede { font-size: 1.2em; margin: 0 0 .75rem; color: var(--fg); }
.intro p, .continue-list { max-width: var(--measure); }
.note { color: var(--muted); margin: 0; font-size: .95em; }

.continue { margin-top: 1.5rem; }
.continue h2, .minor-h, .toc-h, .az h2, .source h2 {
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 .6rem;
}
.continue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.continue-list a { display: block; padding: .8rem 1rem; border: 1px solid var(--rule); border-radius: 8px; text-decoration: none; color: var(--fg); background: var(--surface); }
.continue-list a:hover { border-color: var(--accent); }
.continue-list strong { display: block; font-weight: 600; }
.continue-list span { color: var(--muted); font-size: .9em; }

.library { padding-top: 2rem; padding-bottom: 3rem; }
.jump { font-family: var(--sans); font-size: 14px; display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.jump a { color: var(--muted); }
.author { padding: 2.25rem 0 1rem; border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--bar) + .5rem); }
.author-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; }
.author-head h2, .author-head h1 { font-size: 1.75em; margin: 0; }
.author-head h2 a { color: var(--fg); text-decoration: none; }
.author-head h2 a:hover { color: var(--link); }
.dates { margin: 0; color: var(--muted); font-family: var(--sans); font-size: 14px; }
.author-blurb { color: var(--muted); margin: .4rem 0 1.25rem; max-width: var(--measure); }
.works { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; }
.work-card .wt { font-size: 1.25em; margin: 0 0 .2rem; }
.work-card .wt a { text-decoration: none; }
.work-card .wt a:hover { text-decoration: underline; }
.wsub { display: block; font-weight: 400; font-style: italic; font-size: .8em; color: var(--muted); margin-top: .1rem; }
.wb { margin: .3rem 0; max-width: var(--measure); }
.wm { margin: 0; font-family: var(--sans); font-size: 13.5px; color: var(--muted); }
.minor-h { margin-top: 2rem; }
.works-mini { list-style: none; margin: 0 0 1rem; padding: 0; columns: 2 18rem; column-gap: 2rem; }
.work-mini { break-inside: avoid; padding: .3rem 0; }
.work-mini a { text-decoration: none; }
.work-mini a:hover { text-decoration: underline; }
.mini-meta { display: block; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.library-total { font-family: var(--sans); font-size: 13px; color: var(--faint); margin-top: 2rem; }

.author-page { padding-top: 2.5rem; padding-bottom: 3rem; }
.author-page .author { border: 0; padding-top: 0; }
.author-page .author-head h1 { font-size: 2.2em; }

.work-head { padding-top: 3rem; }
.kicker { font-family: var(--sans); font-size: 14px; color: var(--muted); margin: 0 0 .5rem; }
.kicker a { color: var(--muted); }
.work-head h1 { font-size: 2.3em; margin: 0; letter-spacing: -.01em; }
.work-sub { font-style: italic; font-size: 1.15em; margin: .3rem 0 0; color: var(--muted); }
.byline { margin: .75rem 0 0; font-family: var(--sans); font-size: 15px; }
.work-blurb { margin: 1.25rem 0; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0 .75rem; }
.btn { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .55rem 1.1rem; border-radius: 8px; border: 1px solid var(--rule); font-family: var(--sans); font-size: 15px; font-weight: 600; text-decoration: none; color: var(--fg); background: var(--surface); }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { filter: brightness(1.08); }
.stats { font-family: var(--sans); font-size: 13.5px; color: var(--muted); margin: 0 0 1.5rem; }

.filter { margin: 1rem auto .5rem; font-family: var(--sans); }
.filter > * { font-size: 15px; }
.filter label { display: block; font-weight: 600; margin-bottom: .35rem; }
.filter input { width: 100%; font: inherit; font-size: 16px; padding: .6rem .8rem; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); color: var(--fg); }
.filter-empty { color: var(--muted); margin: .5rem 0 0; }

/* ---- Contents lists ------------------------------------------------------ */
.toc { font-family: var(--sans); }
.toc > ol, dialog .toc { font-size: 15px; }
.toc-full { padding-top: 1.5rem; padding-bottom: 1rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc .groups > li + li { margin-top: 20px; }
.group-name { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; margin: 0 0 .25rem; color: var(--fg); }
.toc .part { border-bottom: 1px solid var(--rule); }
.part-line { display: flex; align-items: center; gap: .75rem; min-height: 44px; padding: .35rem 0; }
.part-line > a, .part-line > .pname { text-decoration: none; color: var(--fg); font-weight: 500; flex: 1; min-width: 0; }
.part-line > a { align-self: stretch; display: flex; align-items: center; }
.part-line > a:hover { color: var(--link); text-decoration: underline; }
.toc summary:hover .pname { color: var(--link); }
.part-line .sub { color: var(--muted); font-weight: 400; margin-left: .35rem; }
.part-line .meta { color: var(--faint); font-size: 13px; white-space: nowrap; }
.toc details > summary { list-style: none; cursor: pointer; position: relative; padding-left: 1.4rem; }
.toc details > summary::-webkit-details-marker { display: none; }
.toc details > summary::before { content: ""; position: absolute; left: .2rem; top: calc(50% - .3rem); width: .45rem; height: .45rem; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
.toc details[open] > summary::before { transform: rotate(45deg); top: calc(50% - .4rem); }
.toc .part:not(:has(details)) .part-line { padding-left: 1.4rem; }
.pages { padding: 0 0 .6rem 24px !important; columns: 2 11rem; column-gap: 1.5rem; }
.pages li { break-inside: avoid; }
.pages a { display: flex; align-items: center; min-height: 36px; padding: 0 .5rem; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-variant-numeric: tabular-nums; }
.pages a:hover { color: var(--link); text-decoration: underline; }
.toc [aria-current="page"] { color: var(--fg); font-weight: 600; background: var(--mark); border-left: 2px solid var(--accent); border-radius: 0 4px 4px 0; padding-left: .5rem; }
.az { padding-top: 1.5rem; }
.az p { font-family: var(--sans); font-size: 14.5px; line-height: 1.9; margin: 0; }
.source { padding-top: 1.5rem; padding-bottom: 3rem; color: var(--muted); }
.source p { margin: 0; font-size: .95em; }

/* ---- Reading page --------------------------------------------------------- */
.reader { padding-bottom: 2rem; }
.page-head { padding-top: 2.75rem; padding-bottom: 1.25rem; }
.page-head .kicker { margin-bottom: .75rem; }
.group-kicker { font-family: var(--sans); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 0 0 .3rem; }
.page-head h1 { font-size: 2em; margin: 0; letter-spacing: -.005em; }
.page-head .subtitle { display: block; font-size: .55em; font-weight: 400; font-style: italic; color: var(--muted); margin-top: .25rem; letter-spacing: 0; }
.pageinfo { font-family: var(--sans); font-size: 13.5px; color: var(--muted); margin: .75rem 0 0; font-variant-numeric: tabular-nums; }

.text { hanging-punctuation: first; overflow-wrap: break-word; }
.text > * { scroll-margin-top: calc(var(--bar) + 1rem); }
.text p { margin: 0 0 .8em; position: relative; }
.text h2 { font-size: 1em; font-weight: 600; text-align: center; letter-spacing: .1em; text-transform: uppercase; font-family: var(--sans); font-size: 13.5px; color: var(--muted); margin: 2.6em 0 1.2em; }
.text h2:first-child { margin-top: 1em; }
.text p.argument { font-style: italic; color: var(--muted); margin: -.4em auto 1.6em; font-size: .95em; text-align: center; text-wrap: balance; max-width: var(--measure); }
.text blockquote { margin: 1.1em 0; padding-left: 1.1em; border-left: 2px solid var(--rule); }
.text blockquote p:last-child { margin-bottom: 0; }
.text .verse { margin: 1.1em 0 1.2em 1.25em; }
.text .verse p { margin: 0 0 .7em; }
.text em { font-style: italic; }

/* Section numbers: in the margin when there is room for them, else inline.
   The container query is in em, so it follows the reader's text size. */
.reader { container: reader / inline-size; }
.text a.sec { font-family: var(--sans); font-size: .58em; font-weight: 500; color: var(--faint); text-decoration: none; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.text a.sec:hover { color: var(--link); }
.text a.sec:target, .text a.sec.flash { color: var(--accent); font-weight: 700; }
.text a.sec:not(.lead) { margin-right: .1em; }
.text a.sec.lead { margin-right: .35em; }
@container reader (min-width: 35em) {
  .text a.sec.lead { position: absolute; right: calc(100% + 1.4em); top: .85em; line-height: 1; white-space: nowrap; margin: 0; }
  /* inside a quote, step back over its 1.1em indent and 2px border so the number sits in the
     margin with the others, not on the quote's rule (1.1em of the text = 1.1 / .58 = 1.9em here) */
  .text blockquote a.sec.lead { right: calc(100% + 1.4em + 1.9em + 2px); }
}

/* Note references */
sup.fn { line-height: 0; font-size: 1em; vertical-align: baseline; }
sup.fn a { font-family: var(--sans); font-size: .56em; font-weight: 600; text-decoration: none; position: relative; top: -.6em; padding: .2em .15em; margin-left: .05em; color: var(--link); border-radius: 3px; }
sup.fn a:hover, sup.fn a[aria-expanded="true"] { background: var(--mark); }
.note-pop { position: relative; max-width: var(--measure); margin: -.2em 0 1.1em; padding: .75em 2.4em .8em 1em; background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; font-size: .87em; line-height: 1.5; }
.note-pop:focus { outline: none; }
.note-pop:focus-visible { outline: 2px solid var(--accent); }
.pop-n { font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--muted); margin-right: .35em; letter-spacing: .03em; }
.pop-x { position: absolute; top: .3rem; right: .3rem; width: 2rem; height: 2rem; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 1.2rem; border-radius: 4px; font-family: var(--sans); }
.pop-x:hover { background: var(--rule); color: var(--fg); }

.endnotes { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: .87em; line-height: 1.5; color: var(--fg); }
.endnotes h2 { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .75rem; }
.endnotes ol { margin: 0; padding-left: 2.2em; max-width: var(--measure); }
.endnotes li { margin-bottom: .55em; scroll-margin-top: calc(var(--bar) + 1rem); }
.endnotes li::marker { font-family: var(--sans); font-size: .85em; color: var(--muted); }
.endnotes li:target { background: var(--mark); }
.endnotes .back { font-family: var(--sans); text-decoration: none; padding: 0 .25em; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 2.5rem; font-family: var(--sans); }
.pg { display: flex; flex-direction: column; gap: .15rem; padding: .85rem 1rem; border: 1px solid var(--rule); border-radius: 8px; text-decoration: none; color: var(--fg); min-height: 4rem; }
.pg:hover { border-color: var(--accent); }
.pg small { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pg span { font-size: 15px; font-weight: 600; line-height: 1.35; }
.pg.next { text-align: right; grid-column: 2; }
.pg.prev { grid-column: 1; }
@media (max-width: 40rem) {
  .page-head { padding-top: 28px; padding-bottom: .5rem; }
  .page-head .kicker { margin-bottom: .35rem; }
  .page-head h1 { font-size: 1.75em; margin-block: 0; }
  .pageinfo { margin-top: .5rem; }
  .text h2 { margin: 32px 0 0; }
  .text h2:first-child { margin-top: 16px; }
  .text h2 + p:not(.argument) { margin-top: 20px; }
  .text p.argument { margin: 10px auto 28px; line-height: 1.4; }
}
@media (max-width: 30rem) { .pager { grid-template-columns: 1fr; } .pg.next, .pg.prev { grid-column: auto; } .pg.next { order: -1; } }
.credit { font-family: var(--sans); font-size: 13px; color: var(--faint); margin-top: 2rem; }

/* Resume pill */
.resume { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 15; display: flex; align-items: center; gap: .25rem; background: var(--fg); color: var(--bg); border-radius: 999px; padding: .3rem .35rem .3rem 1rem; font-family: var(--sans); font-size: 14.5px; box-shadow: 0 6px 24px rgb(0 0 0 / .18); max-width: calc(100vw - 2rem); }
.resume-go { color: var(--bg); text-decoration: none; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: .35rem 0; }
.resume-go:hover { text-decoration: underline; }
.resume-x { border: 0; background: transparent; color: var(--bg); width: 2rem; height: 2rem; border-radius: 999px; cursor: pointer; font-size: 1.1rem; opacity: .75; }
.resume-x:hover { opacity: 1; background: rgb(127 127 127 / .3); }

/* ---- Dialogs --------------------------------------------------------------- */
dialog.sheet { border: 0; padding: 0; margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(26rem, 100vw); max-width: 100vw; background: var(--bg); color: var(--fg); box-shadow: -10px 0 40px rgb(0 0 0 / .2); overflow: auto; overscroll-behavior: contain; }
dialog.sheet::backdrop { background: rgb(20 18 15 / .35); }
dialog.sheet-small { height: fit-content; max-height: calc(100dvh - 2rem); margin: auto; border-radius: 12px; width: min(24rem, calc(100vw - 2rem)); padding-bottom: 1.25rem; }
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem .75rem 1.25rem; background: var(--bg); border-bottom: 1px solid var(--rule); }
.sheet-head h2 { font-size: 1.05rem; margin: 0; flex: 1; font-family: var(--serif); }
.sheet-head h2 a { color: var(--fg); text-decoration: none; }
.sheet-head h2 a:hover { text-decoration: underline; }
.x { border: 0; background: transparent; width: 2.4rem; height: 2.4rem; border-radius: 6px; cursor: pointer; font-size: 1.4rem; color: var(--muted); font-family: var(--sans); }
.x:hover { background: var(--surface); color: var(--fg); }
dialog .toc { padding: .5rem 1.25rem 2rem; }
.setting { padding: 1rem 1.25rem 0; font-family: var(--sans); }
.setting-name { margin: 0 0 .5rem; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.segs { display: flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.seg { flex: 1; border: 0; background: transparent; padding: .6rem .5rem; cursor: pointer; font-size: 15px; min-height: 2.75rem; }
.seg + .seg, .size-out + .seg { border-left: 1px solid var(--rule); }
.seg[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.seg:hover:not([aria-pressed="true"]) { background: var(--surface); }
.size .seg { flex: 0 0 4rem; font-family: var(--serif); font-size: 17px; }
.size-out { flex: 1; display: grid; place-items: center; border-left: 1px solid var(--rule); font-variant-numeric: tabular-nums; font-size: 15px; }

/* ---- About, footer ---------------------------------------------------------- */
.about { padding-top: 2.5rem; padding-bottom: 3rem; }
.about h1 { font-size: 2em; margin-top: 0; }
.about h2 { font-size: 1.2em; margin: 2em 0 .5em; }
.table-wrap { overflow-x: auto; }
.about table { border-collapse: collapse; font-family: var(--sans); font-size: 14px; width: 100%; }
.about th, .about td { text-align: left; padding: .45rem .6rem .45rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.about th { color: var(--muted); font-weight: 600; }
.site-foot { border-top: 1px solid var(--rule); font-family: var(--sans); font-size: 14px; color: var(--muted); text-align: center; padding: 1.5rem 1rem 2.5rem; }
.site-foot p { margin: 0; }
.site-foot a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .topbar { transition: none; } * { scroll-behavior: auto !important; } }
@media print {
  .topbar, .pager, .site-foot, .resume, .credit, dialog { display: none !important; }
  body { font-size: 12pt; background: #fff; color: #000; }
  .text a.sec.lead { position: static; }
}

/* ==== v2: translations, shelves, plays and dialogues ======================== */

/* Translation toggle in the top bar, and the line under the page title */
.tr-btn { display: inline-flex; align-items: center; gap: .35rem; max-width: 11em; }
.tr-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { width: .4rem; height: .4rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); flex: none; opacity: .7; }
@media (max-width: 26rem) { .tr-btn { max-width: 7.5em; } }
.tr-line { font-family: var(--sans); font-size: 13.5px; color: var(--muted); margin: .35rem 0 0; }
.linkish { border: 0; background: none; padding: 0; color: var(--link); text-decoration: underline; text-underline-offset: .15em; cursor: pointer; font: inherit; }
.linkish:hover { text-decoration-thickness: 2px; }
.toc-tr { display: block; font-family: var(--sans); font-size: 12.5px; font-weight: 400; color: var(--muted); margin-top: .1rem; }

/* Translation lists: dialog, work page cards */
.tr-dialog { padding: .25rem 1.25rem 2rem; font-family: var(--sans); font-size: 15px; }
.tr-items, .tr-cards { list-style: none; margin: 0; padding: 0; }
.tr-item, .tr-card { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.tr-item.is-current { background: linear-gradient(to right, var(--accent) 0 3px, transparent 3px); padding-left: .9rem; margin-left: -.9rem; }
.tr-name { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; margin: 0 0 .3rem; line-height: 1.3; }
.tr-card .tr-name { font-size: 1.15em; }
.tr-year { font-weight: 400; color: var(--muted); font-size: .9em; margin-left: .25rem; }
.badges { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 .5rem; }
.badge { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: .03em; padding: .15rem .5rem; border-radius: 999px; background: var(--surface); color: var(--muted); border: 1px solid var(--rule); }
.badge-now { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.badge-partial { color: var(--accent); border-color: var(--accent); background: transparent; }
.tr-style { margin: 0 0 .4rem; }
.tr-card .tr-style, .tr-card .tr-choose, .tr-card .tr-complete { font-family: var(--sans); font-size: 15px; line-height: 1.5; }
.tr-choose { margin: 0 0 .6rem; color: var(--muted); }
.tr-complete { margin: 0 0 .4rem; color: var(--accent); }
.tr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin: .5rem 0 0; font-family: var(--sans); font-size: 14.5px; }
.tr-more { color: var(--muted); }
.btn.small { min-height: 2.5rem; padding: .4rem .9rem; font-size: 14.5px; }
.tr-sample { margin: .5rem 0 .6rem; padding: 0 0 0 .9rem; border-left: 2px solid var(--rule); }
.tr-sample p { margin: 0; font-style: italic; color: var(--muted); font-size: .95em; line-height: 1.5; }
.tr-only { font-family: var(--sans); font-size: 14.5px; color: var(--muted); background: var(--surface); border-radius: 8px; padding: .6rem .8rem; margin: .5rem 0 1rem; }
.section-h { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 2rem 0 .4rem; }
.translations { padding-bottom: .5rem; }
.toc-note { font-family: var(--sans); font-size: 13.5px; color: var(--muted); margin: 0 0 .5rem; }

/* Translation page: the facts */
.facts { display: grid; grid-template-columns: minmax(7rem, max-content) 1fr; gap: .55rem 1.25rem; margin: 1.75rem 0 1.25rem; font-family: var(--sans); font-size: 15px; line-height: 1.5; }
.facts dt { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: .15rem; }
.facts dd { margin: 0; }
.facts .bio { display: block; color: var(--muted); }
.facts .lic { color: var(--muted); }
@media (max-width: 30rem) { .facts { grid-template-columns: 1fr; gap: .1rem; } .facts dd { margin-bottom: .6rem; } }
.tr-sample-wide { margin: 1rem 0; }
.tr-sample-wide figcaption { font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.tr-sample-wide blockquote { margin: 0; padding-left: 1rem; border-left: 2px solid var(--rule); font-style: italic; }
.tr-sample-wide blockquote p { margin: 0; max-width: var(--measure); }
.tr-others { font-family: var(--sans); font-size: 15px; }

/* Home: find a book, shelves, compact author rows */
.find { margin: 0 0 1rem; font-family: var(--sans); }
.find label { display: block; font-size: 15px; font-weight: 600; margin-bottom: .35rem; }
.find input { width: 100%; max-width: 30rem; font: inherit; font-size: 16px; padding: .65rem .85rem; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); color: var(--fg); min-height: 44px; }
.find-empty { color: var(--muted); margin: .6rem 0 0; font-size: 15px; }
.shelf { padding-top: 1.5rem; scroll-margin-top: calc(var(--bar) + .5rem); }
.shelf > h2 { font-size: 1.5em; margin: .5rem 0 .25rem; padding-bottom: .4rem; border-bottom: 2px solid var(--fg); }
.lib-authors { list-style: none; margin: 0; padding: 0; }
.lib-author { padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.la-name { margin: 0 0 .25rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .75rem; }
.la-name a { font-size: 1.2em; font-weight: 600; color: var(--fg); text-decoration: none; }
.la-name a:hover { color: var(--link); text-decoration: underline; }
.la-works { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .15rem 0; max-width: var(--measure); }
.la-works li { display: inline; }
.la-works li:not(:last-child):not(.last-vis)::after { content: "·"; color: var(--faint); margin: 0 .55rem; }
.la-works a { text-decoration: none; }
.la-works a:hover { text-decoration: underline; }
/* shorter works: a second run-in list in smaller type. --measure is in em,
   so the smaller font keeps the same characters per line. */
.la-minor { font-size: .84em; line-height: 1.5; margin-top: .3rem; }
.la-minor-box { margin-top: .45rem; }
.la-minor-box .la-minor { margin-top: .1rem; }
.la-minor-h { margin: 0; font-family: var(--sans); font-size: 12px; letter-spacing: .02em; color: var(--muted); }
.la-minor-box:not(:has(li:not([hidden]))) { display: none; }
.la-series { margin-top: .35rem; }
.la-series summary { cursor: pointer; width: max-content; max-width: 100%;
  font-family: var(--sans); font-size: 14px; color: var(--muted); }
.la-series summary:hover { color: var(--link); }
.la-series .la-minor { margin-top: .35rem; }
.finding .la-series { display: none; }
.shelf-h { font-size: 1.3em; margin: 2rem 0 .75rem; padding-bottom: .3rem; border-bottom: 2px solid var(--fg); }
.series { list-style: none; }
.series-many { margin: 1.5rem 0 1rem; }
.series-note { color: var(--muted); margin: 0 0 .8rem; max-width: var(--measure); }
.lw-n { color: var(--muted); font-size: .85em; white-space: nowrap; }
.series-name { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6rem; }

/* Plays and dialogues: speakers, stage directions; long verse lines hang */
.text h3 { font-size: 1.05em; font-weight: 600; margin: 2em 0 .8em; }
.text .speaker { font-family: var(--sans); font-size: .78em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.text p.speech > .speaker { margin-right: .4em; }
.text .verse .speaker, .text p.speaker.solo { display: block; margin: 0 0 .15em; }
.text .verse.speech { margin-left: 0; }
.text .verse.speech > p:not(.speaker) { margin-left: 1.25em; }
.text .stage, .text .l.stage { font-style: italic; color: var(--muted); }
.text p.stage { margin-left: 1.25em; }
.text .verse .l { display: block; padding-left: 1.5em; text-indent: -1.5em; }
.text a.sec, .text h2 { scroll-margin-top: calc(var(--bar) + 1rem); }
.text .gap, .endnotes .gap { color: var(--muted); letter-spacing: .15em; padding: 0 .1em; }
/* Line numbers in verse hang beside their own line, not the stanza's top */
.text .verse .l { position: relative; }

/* Astra review 2: calmer translation panel, search that explains itself, compact phone header */
.tr-dialog { font-size: 15.5px; line-height: 1.5; padding: .5rem 1.25rem 2rem; }
.tr-item { padding: 1.1rem 0; }
.tr-item .tr-style { margin-bottom: .45rem; }
.badge-suggested { color: var(--fg); border-color: var(--fg); background: transparent; }
.find-row { display: flex; gap: .5rem; align-items: stretch; max-width: 30rem; }
.find-row input { flex: 1; min-width: 0; }
.find-clear { border: 1px solid var(--rule); background: var(--bg); border-radius: 8px; padding: 0 .9rem; cursor: pointer; font-family: var(--sans); font-size: 15px; min-height: 44px; }
.find-clear:hover { background: var(--surface); }
.find-count { font-family: var(--sans); font-size: 14px; color: var(--muted); margin: .5rem 0 0; }
.lw-why { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-left: .45rem; }
.jump { position: sticky; top: var(--bar); z-index: 5; background: var(--bg); padding-top: .5rem; }
.shelf { scroll-margin-top: calc(var(--bar) + 3rem); }
@media (max-width: 40rem) {
  .tools { gap: 4px; }
  .tbtn { padding: .3rem 10px; }
  .tr-btn { max-width: 8.5em; }
}

/* ---- Translation notes (the project's own modern translations) -------- */
sup.fn.tn a { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--muted);
  border: 1px solid var(--rule); background: var(--surface); padding: .1em .3em; font-size: .6em; }
sup.fn.tn a:hover, sup.fn.tn a[aria-expanded="true"] { background: var(--mark); color: var(--link); }
.endnotes.tnotes { margin-top: 1.25rem; padding-top: .9rem; border-top: 1px dashed var(--rule); }
.endnotes.tnotes h2 { font-style: italic; text-transform: none; letter-spacing: .02em; font-family: var(--serif); font-weight: 400; font-size: 14px; }
.endnotes.tnotes ol { list-style-type: lower-alpha; }
.endnotes.tnotes li { color: var(--muted); }
.endnotes.tnotes li::marker { font-family: var(--serif); font-style: italic; }

/* Pictures placed by § (modern Alexander). Captions and credits stay out of the narrated text. */
article.text .fig {
  box-sizing: border-box;
  width: min(44rem, calc(100vw - 2 * var(--gutter)));
  max-width: none;
  margin: 2rem 0 2.25rem;
  margin-inline-start: calc((100% - min(44rem, calc(100vw - 2 * var(--gutter)))) / 2);
  color: var(--fg);
}
.fig img { display: block; width: 100%; height: auto; max-height: 78vh; object-fit: contain; margin-inline: auto; background: var(--surface); }
.fig figcaption { margin: .65rem auto 0; max-width: 65ch; font-family: var(--sans); font-size: .8rem; font-style: normal; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.fig .credit { display: block; margin-top: .35rem; font-size: .9em; }
.fig .ai-label { font-weight: 600; }
.picture-credits { margin-block: 2.5rem; overflow-wrap: anywhere; }
.picture-credits li { margin-block: .8rem; }
.picture-credits p { white-space: pre-wrap; }
.fig a:focus-visible, .picture-credits a:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
[data-theme="dark"] .fig:not(.fig-map) img { filter: brightness(.92); }
.fig-map img { filter: none; }
.figures-compare .fig, .figures-compare .picture-credits { display: none; }
@media print {
  article.text .fig { width: 100%; max-width: 100%; margin-inline: 0; break-inside: avoid; page-break-inside: avoid; }
  .fig img { max-height: 70vh; filter: none !important; }
  .fig, .picture-credits { display: block !important; }
  .picture-credits li { break-inside: avoid; }
}
