/* ============================================================================
   pgreader.css — PG Reader overhaul: Room 1 (Page) + Room 2 (Edition) + masthead.
   Spec: PG_READER_OVERHAUL_SPEC.md. Concatenate/link this AFTER pg.css and after
   prdl-system.css (build_site.py's CSS chain) so these rules win the cascade at
   equal specificity without needing !important — several rules here deliberately
   re-open breakpoints already set in pg.override.css (e.g. the ≤1100px facs-width
   rule) and rely on source order, not specificity, to take precedence.

   ROOM STATE CONTRACT: <html data-room="pages"|"edition"> (default = pages when the
   attribute is absent). .pg-room1 shows unless data-room="edition"; .pg-room2 shows
   only when data-room="edition" — mirrors the existing .g-page/#pageView on/off
   pattern already used site-wide, so it composes with the same JS idiom.

   Assumes the reading-page template no longer wraps content in the old
   .app > .sidebar + .main frame — .pg-mast sits at the top of <body>, followed
   directly by .pg-room1 or .pg-room2. The old .sidebar nav tree (by-volume/by-
   author browser) is superseded on THIS page by the masthead pills + Contents
   drawer per spec; it is not referenced here (still fine for index.html/search.html).

   ── KILL LIST — template surgery should STOP EMITTING these ──
     .layerseg / .layerseg button / #layFacs      old Reading·Facsimile·Page pill row
     .display-controls / html.dc-compact          old stacked sticky toolbar
     html.g-split #enLane (float/sticky pane)      → replaced by .room1-grid (.ocr-col/.en-col)
     html.g-split, html.g-en root-class lane flips → replaced by html[data-room] + .pg-room1/.pg-room2
   Everything else the recon flagged KEEP is reused UNCHANGED and not redefined
   below: .modeseg buttons (relocated inside .ocr-head, not restyled), .facs /
   .facs-head / .facs-stage / .facs-resizer / .facs-light (only repositioned — see
   Room 1 §facsimile), .pv-* (page view), .ct-* (ΚΛΕΙΣ Contents drawer), .en-*
   (English typography), .div-head / .division / .col-range / .foliomark,
   #contBtn / #facsBtn / .theme-fab / #szRange / .szb (recolored for the dark
   masthead bar only), .axis-tabs (landing page, untouched).
   ============================================================================ */

:root{--mast-h:48px;--facs-w:min(40vw,600px)}

/* ── MASTHEAD — one calm row, both rooms ───────────────────────────────────── */
.pg-mast{position:sticky;top:0;z-index:150;display:flex;align-items:center;gap:.55rem;
  height:var(--mast-h);padding:0 .9rem;background:var(--masthead);color:var(--masthead-ink);
  font-family:var(--font-ui);font-size:.78rem;box-shadow:0 1px 0 rgba(0,0,0,.25);overflow:visible}
.pg-mast a{color:inherit}
.pg-mast>*{flex:0 0 auto}
/* R35: .pg-mast>* (0,1,1) was beating .pg-title's flex:1 1 auto (0,1,0) — the title never
   shrank, so long work titles overflowed the bar instead of ellipsizing. */
.pg-mast>.pg-title{flex:1 1 auto;min-width:0}
/* R84p (walkthrough): the title was the bar's ONLY shrinkable item — at 1440px it
   collapsed to "Me…". Floor it at a readable width above the drawer breakpoint and
   make the search field cede space first (it re-widens on focus anyway). */
@media (min-width:701px){
  .pg-mast>.pg-title{min-width:9rem;flex-wrap:nowrap}
  /* the FLOOR lives on the wrapper — a floored input inside a 0-width wrapper
     overflows and paints over the view switch (caught: invisible English pill) */
  .pg-mast .pg-search{flex:0 1 auto;min-width:5.5rem}
  .pg-mast .pg-search input{width:100%;max-width:11rem;min-width:0}   /* (0,2,1) beats the base width:11rem below */
}
.pg-logo{font-family:var(--font-display);font-size:1.1rem;letter-spacing:.02em;opacity:.92;padding-right:.15rem}
.pg-logo:hover{opacity:1;text-decoration:none}
.pg-vol-pill{position:relative;border:1px solid color-mix(in oklab,var(--masthead-ink) 35%,transparent);
  border-radius:var(--radius-full);background:transparent;color:inherit;font:inherit;padding:.22rem .65rem;
  cursor:pointer;transition:background .14s,border-color .14s}
.pg-vol-pill:hover{background:color-mix(in oklab,var(--masthead-ink) 12%,transparent);border-color:var(--masthead-ink)}
.pg-author{opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:11rem}
.pg-author:hover{opacity:1;text-decoration:underline}
.pg-title{flex:1 1 auto;min-width:0;display:flex;align-items:baseline;gap:.4rem;overflow:hidden}
.pg-title-en{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pg-title-la{opacity:.66;font-style:italic;font-size:.92em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* masthead search: typeahead over nav.json (authors + EN titles) */
.pg-search{position:relative}
.pg-search input{width:11rem;border:1px solid color-mix(in oklab,var(--masthead-ink) 30%,transparent);
  border-radius:var(--radius-full);background:color-mix(in oklab,var(--masthead-ink) 10%,var(--masthead));
  color:var(--masthead-ink);font:inherit;padding:.3rem .8rem;transition:width .18s var(--ease),background .14s,color .14s}
.pg-search input::placeholder{color:color-mix(in oklab,var(--masthead-ink) 55%,transparent)}
.pg-search input:focus{width:17rem;background:var(--card);color:var(--fg);outline:none}
/* a11y: the rule above kills the focus ring for EVERY focus (mouse click included, by design —
   avoids a ring flash while the field widens); :focus-visible restores it for keyboard users,
   who otherwise had no visible indicator on this control at all. */
.pg-search input:focus-visible{outline:2px solid var(--accent,#8a6d3b);outline-offset:2px}
.pg-search-menu,.pg-vol-menu{position:absolute;top:calc(100% + 7px);right:0;width:20rem;max-width:80vw;
  max-height:60vh;overflow-y:auto;background:var(--card);color:var(--fg);border:1px solid var(--border);
  border-radius:var(--radius-md);box-shadow:0 14px 40px -18px rgba(0,0,0,.5);z-index:5;display:none}
.pg-search-menu.open,.pg-vol-menu.open{display:block}
.pg-vol-menu{right:auto;left:0;width:16rem;padding:.4rem}
.pg-search-item{display:block;padding:.4rem .8rem;text-decoration:none;color:var(--fg);
  border-bottom:1px solid var(--border);font-size:.85rem}
.pg-search-item:last-child{border-bottom:0}
.pg-search-item:hover,.pg-search-item.sel{background:var(--hl)}
.pg-search-item b{color:var(--accent)}
.pg-search-item .pg-si-meta{display:block;color:var(--muted);font-size:.78rem}
.pg-goto{display:flex;gap:.4rem;align-items:center;padding:.4rem .5rem;border-top:1px solid var(--border);margin-top:.2rem}
.pg-goto input{width:4.6rem;border:1px solid var(--border);border-radius:6px;padding:.22rem .45rem;
  font:inherit;background:var(--bg);color:var(--fg)}


/* facsimile / size / theme / contents controls recolored for the dark masthead bar
   (mechanics untouched — #facsBtn/.theme-fab/.szb/#contBtn keep their existing JS) */
.pg-mast #facsBtn,.pg-mast .szb,.pg-mast .theme-fab,.pg-mast #contBtn{
  border-color:color-mix(in oklab,var(--masthead-ink) 35%,transparent);background:transparent;color:var(--masthead-ink)}
.pg-mast #facsBtn:hover:not(.active),.pg-mast .szb:hover,.pg-mast .theme-fab:hover,.pg-mast #contBtn:hover{
  color:#fff;border-color:var(--masthead-ink);background:color-mix(in oklab,var(--masthead-ink) 12%,transparent)}
.pg-mast #facsBtn.active{background:var(--accent);border-color:var(--accent);color:#fff}
.pg-mast #szRange{accent-color:var(--accent)}

/* overflow "⋯" menu — everything that isn't in the primary row lives here:
   View (English only · OCR only), print/export, related, keyboard help, etc. */
.pg-more{position:relative}
.pg-more>button{border:1px solid color-mix(in oklab,var(--masthead-ink) 35%,transparent);background:transparent;
  color:var(--masthead-ink);border-radius:var(--radius-md);width:1.9rem;height:1.7rem;cursor:pointer;
  font:inherit;line-height:1;transition:background .14s,border-color .14s}
.pg-more>button:hover{background:color-mix(in oklab,var(--masthead-ink) 12%,transparent);border-color:var(--masthead-ink)}
.pg-more-menu{position:absolute;top:calc(100% + 7px);right:0;min-width:12rem;background:var(--card);color:var(--fg);
  border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:0 14px 40px -18px rgba(0,0,0,.5);
  padding:.3rem;display:none;z-index:5}
.pg-more-menu.open{display:block}
.pg-more-menu button,.pg-more-menu a{display:block;width:100%;text-align:left;border:0;background:none;
  color:var(--fg);font:inherit;font-size:.85rem;padding:.42rem .6rem;border-radius:6px;cursor:pointer;text-decoration:none}
.pg-more-menu button:hover,.pg-more-menu a:hover{background:var(--hl);color:var(--accent)}
.pg-more-menu hr{border:0;border-top:1px solid var(--border);margin:.3rem 0}

@media(max-width:700px){
  .pg-mast{gap:.35rem;padding:0 .6rem}
  .pg-author,.pg-vol-pill,.pg-search input,.pg-title-la{display:none}
  .pg-search-menu{right:-.6rem}
  /* R37 (mobile walkthrough): the work title must be ONE clipped line inside the bar —
     it was wrapping into fragments painting above/below the masthead. */
  .pg-mast>.pg-title{display:block;min-width:0;max-height:var(--mast-h);
    line-height:var(--mast-h);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .pg-title-en{display:inline;white-space:nowrap}
  /* R37: phone reading size — desktop 19px reads enormous on a 390px viewport */
  html{--read-fs:16.5px}
  .pg-room1{padding:.9rem .85rem 3.5rem}
}

/* ============================================================================
   ROOM 1 — THE PAGE: OCR ‖ English, paginated by column opening, facsimile
   slide-in panel. Default room; hidden only when data-room="edition".
   ============================================================================ */
.pg-room1{padding:1.6rem clamp(1rem,3vw,2.4rem) 4rem;max-width:1440px;margin:0 auto}
/* NOTE: room state is driven by html.g-room-page / html.g-room-edition CLASSES (pgreader.js) over a
   single-copy DOM in which the Edition body lives INSIDE .pg-room1 — the template's state-bridge rules
   handle the show/hide. The old data-room attribute contract is retired; never reintroduce
   `html[data-room="edition"] .pg-room1{display:none}` — it would hide the Edition text itself. */

.room1-grid{display:grid;grid-template-columns:minmax(0,var(--ocr-w,1fr)) 7px minmax(0,var(--en-w,1fr));align-items:start}
.ocr-col,.en-col{min-width:0}
.ocr-col{padding-right:1.3rem}
.en-col{padding-left:1.3rem}

/* OCR column header: hosts the relocated sub-bar [Greek · Latin · Both · Page].
   .en-head mirrors it (empty title/provenance chip) purely so both columns'
   sticky rows share one height/offset — the "one shared pagination rhythm". */
.ocr-head,.en-head{position:sticky;top:var(--mast-h);z-index:8;display:flex;align-items:center;gap:.5rem;
  min-height:2.2rem;padding:.35rem .1rem;margin-bottom:.7rem;
  background:var(--bg);
  border-bottom:1px solid var(--border);font:.7rem/1.2 var(--font-ui);letter-spacing:.05em;
  text-transform:uppercase;color:var(--muted)}
.ocr-head .modeseg,.en-head .modeseg{margin-left:auto;text-transform:none;letter-spacing:0}
.ocr-head .modeseg button,.en-head .modeseg button{padding:.14rem .5rem;font-size:.72rem}

/* draggable splitter between the two columns (persisted --ocr-w/--en-w via JS) */
.splitter{position:relative;width:7px;align-self:stretch;background:var(--border);border-radius:4px;
  cursor:col-resize;transition:background .15s;touch-action:none}
.splitter:hover,.splitter.drag{background:var(--accent)}
.splitter::after{content:'⋮';position:sticky;top:50vh;display:block;text-align:center;
  color:var(--card);font-size:.7rem;line-height:1;pointer-events:none}
@media(pointer:coarse){.splitter{width:11px}}

/* opening separators — the shared "PG {vol}:{col}–{col}" rhythm, a quiet centered rule */
.opening-sep{display:flex;align-items:center;gap:.7rem;margin:2.1rem 0 1.1rem;color:var(--muted);
  scroll-margin-top:calc(var(--mast-h) + 3.4rem)}
.opening-sep:first-child{margin-top:.2rem}
.opening-sep::before,.opening-sep::after{content:'';flex:1;height:1px;background:var(--border)}
.opening-sep b{font:600 .72rem/1 var(--font-ui);letter-spacing:.08em;text-transform:uppercase;
  white-space:nowrap;font-variant-numeric:tabular-nums}

/* facsimile panel: same .facs/.facs-head/.facs-stage/.facs-resizer/.facs-light element and
   JS contract as before — only its top offset + default width change for Room 1's masthead.
   (.facs is exclusive to the reading-page slide-in panel; the standalone facsimile browser
   page uses .facs-pg for its images, so this is safe to set unconditionally.) */
.facs,.facs-resizer{top:var(--mast-h)}

/* ============================================================================
   ROOM 2 — THE EDITION: diplomatic clean text, own divisions, no page chrome.
   Shown only when data-room="edition"; entirely replaces Room 1's grid/facsimile.
   ============================================================================ */
/* (.pg-room2 wrapper retired — Edition markup lives inside .pg-room1; see note above) */

.edition{font-family:var(--font-body);line-height:1.78}  /* centering lives in the state bridge */
.edition h1{font-family:var(--font-display);font-size:2rem;font-weight:400;color:var(--fg);
  text-wrap:balance;margin:.2rem 0 .3rem}
/* division headings/list reuse .division/.div-head as-is; only the anchor offset changes */
.edition .division{scroll-margin-top:calc(var(--mast-h) + 3.6rem)}

.edition-prov{display:flex;gap:.55rem;align-items:baseline;max-width:42rem;margin:0 auto 1.6rem;
  padding:.6rem .9rem;border:1px solid var(--border);border-radius:var(--radius-md);
  background:color-mix(in oklch,var(--accent) 8%,var(--bg));font:.82rem/1.5 var(--font-ui);color:var(--fg)}
.edition-prov b{color:var(--accent2)}

/* persistent affordance back to Room 1 — sticky so it survives scrolling a long division */
.edition-back{position:sticky;top:calc(var(--mast-h) + .6rem);z-index:4;display:inline-flex;
  max-width:42rem;margin:0 auto 1.2rem;left:0}
.edition-back a{display:inline-flex;align-items:center;gap:.4rem;color:var(--muted);
  border:1px solid var(--border);border-radius:var(--radius-full);background:var(--card);
  padding:.32rem .85rem;font:600 .82rem/1.3 var(--font-ui);transition:color .14s,border-color .14s,background .14s}
.edition-back a:hover{color:var(--accent);border-color:var(--accent);background:var(--hl);text-decoration:none}

/* ============================================================================
   MOBILE (<880px) — English first, a bottom thumb bar, facsimile full-screen.
   TWO layers: (1) plain @media basics that pre-style before pgreader.js runs
   (no cramped two-column FOUC); (2) html.g-mobile rules — pgreader.js adds the
   class at the SAME 880px breakpoint (matchMedia), and their higher specificity
   (html.g-mobile.… ) beats the inline STATE BRIDGE, which loads after this file.
   880px matches the .pv-spread.pv-two grid breakpoint, so the class and these
   @media rules flip together — no dead zone.
   ============================================================================ */
@media(max-width:880px){
  .pg-room1{padding:1.1rem .9rem calc(64px + env(safe-area-inset-bottom))}
  .room1-grid{display:flex;flex-direction:column}
  .splitter{display:none}
  .en-col{order:1;padding-left:0;margin-bottom:1.7rem}
  .ocr-col{order:2;padding-right:0}
  .en-head{display:none} /* English has no sub-modes; its header row only existed for column-height parity */

  /* OCR column becomes a native <details> — template renders it `open` by default so
     desktop (where .ocr-col summary is display:none, see below) always shows content;
     only here does the triangle/summary become visible and collapse actually engage. */
  .ocr-col{border:1px solid var(--border);border-radius:var(--radius-md);background:var(--card);overflow:hidden}
  .ocr-col summary{display:flex;align-items:center;gap:.5rem;cursor:pointer;list-style:none;
    padding:.7rem .9rem;font:600 .82rem/1.2 var(--font-ui);color:var(--muted)}
  .ocr-col summary::-webkit-details-marker{display:none}
  .ocr-col summary::before{content:'▸';transition:transform .15s;color:var(--accent)}
  .ocr-col[open] summary::before{transform:rotate(90deg)}
  .ocr-col .ocr-head{position:static;margin:0 .9rem .6rem;backdrop-filter:none}
  .ocr-col:not([open]) .ocr-head,.ocr-col:not([open])>*:not(summary){display:none}

  .edition-back{position:static}
}
@media(min-width:881px){.ocr-col summary{display:none}}

/* ── html.g-mobile (pgreader.js, <880px) — beats the inline STATE BRIDGE ─────── */
/* view widths: English full-bleed with edge padding; + Greek stacks the two columns
   full-width (no grid, no splitter). Specificity html.g-mobile.g-view-* (0,3,1)/(0,3,0)
   overrides the bridge's html.g-view-* (0,2,1)/(0,2,0). */
html.g-mobile.g-view-en .en-col{max-width:100%;margin:0;padding:0 1.05rem}
html.g-mobile.g-view-both .room1-grid{display:flex;flex-direction:column;max-width:none;margin:0}
/* R84d: 'none' released the desktop cap but let vtx content size the lane to the
   VIEWPORT (392px in a 390px shell) — Both view scrolled sideways on every phone.
   100% releases the px cap identically while staying container-true. */
html.g-mobile.g-view-both .en-col,html.g-mobile.g-view-both .ocr-col{max-width:100%}
html.g-mobile .pg-shell{padding-bottom:calc(58px + env(safe-area-inset-bottom))}

/* masthead slims to Π · title · #pgOpening · ⋯ — the rest stays in the DOM (reachable
   via the thumb bar / the ⋯ menu) but leaves the top bar. */
html.g-mobile .pg-vol-pill,
html.g-mobile .pg-author,
html.g-mobile #contBtn,
html.g-mobile .pg-search,
html.g-mobile #facsBtn,
html.g-mobile #szDn,
html.g-mobile #szRange,
html.g-mobile #szUp,
html.g-mobile #thBtn{display:none!important}
html.g-mobile .pg-mast{gap:.4rem;padding:0 .6rem}
html.g-mobile .pg-title-la{display:none}

/* the ⋯-menu mobile-only block (Show page image / theme / size), injected by JS */
.pg-more-mob{display:none}
html.g-mobile .pg-more-menu .pg-more-mob{display:block}
.pg-more-mob .pmm-size{display:flex;align-items:center;gap:.4rem;padding:.42rem .6rem}
.pg-more-mob .pmm-size .pmm-size-lb{color:var(--muted);font-size:.8rem;margin-right:auto}
.pg-more-mob .pmm-size button{width:auto;display:inline-flex;align-items:center;justify-content:center;
  min-width:2.1rem;border:1px solid var(--border);border-radius:6px;padding:.2rem .5rem;
  color:var(--fg);font-variant-numeric:tabular-nums}

/* floating buttons get out of the thumb bar's way; the notebook opener (top-right,
   z-600) would sit over the ⋯ button, so both recede on the phone (notebook stays
   reachable from the ⋯ menu, scroll-to-top by scrolling). */
html.g-mobile .nb-toggle,html.g-mobile .scroll-top{display:none}
html.g-mobile .resume-chip{bottom:calc(66px + env(safe-area-inset-bottom))}

/* ── bottom thumb bar (JS-injected on every width; shown only under g-mobile) ── */
.pg-thumb{position:fixed;left:0;right:0;bottom:0;z-index:120;display:none;
  align-items:stretch;justify-content:space-around;font-family:var(--font-ui);
  background:color-mix(in oklch,var(--bg) 90%,var(--card));border-top:1px solid var(--border);
  padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -8px 26px -20px rgba(0,0,0,.5);
  -webkit-backdrop-filter:saturate(1.4) blur(10px);backdrop-filter:saturate(1.4) blur(10px)}
html.g-mobile .pg-thumb{display:flex}
html.g-mobile .pg-thumb.is-hidden{display:none}   /* the facsimile overlay owns the screen */
.pg-thumb-b{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:.16rem;min-height:52px;border:0;background:none;color:var(--muted);cursor:pointer;
  font:600 .62rem/1.05 var(--font-ui);padding:.4rem .15rem;-webkit-tap-highlight-color:transparent;
  transition:color .13s var(--ease-strong)}
.pg-thumb-b .pg-thumb-ic{font-size:1.12rem;line-height:1;font-weight:400}
.pg-thumb-b .pg-thumb-lb{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.pg-thumb-b.on{color:var(--accent)}
.pg-thumb-b:active{transform:scale(.93)}
.pg-thumb-b:focus-visible{outline:2px solid var(--accent);outline-offset:-3px;border-radius:8px}

/* ── facsimile as a full-screen overlay on the phone (fixed inset 0, ✕ top-right) ── */
html.g-mobile .facs{left:0;width:100vw;--facs-w:100vw;border-left:0;z-index:200}  /* above the masthead (150) */
html.g-mobile .facs-resizer{display:none}
html.g-mobile .facs-head{flex-wrap:wrap;gap:.2rem;padding:.5rem .5rem;padding-right:2.8rem;position:relative}
/* R67 mobile nit: at 390px the last lane button ("English") wrapped to a lonely second
   row — tighter buttons keep the whole strip on one line down to small phones */
html.g-mobile .facs-head button{padding:0 .45rem;font-size:.8rem;letter-spacing:0}
html.g-mobile .facs-head .facs-nav button{padding:0 .3rem}
html.g-mobile .facs-head #facsFol{font-size:.8rem}
html.g-mobile .facs-close{display:flex;align-items:center;justify-content:center;position:absolute;
  top:.35rem;right:.4rem;margin:0;width:2.2rem;height:2.2rem;font-size:1.35rem;color:var(--fg);
  background:var(--card);border:1px solid var(--border);border-radius:9px;z-index:3}
html.g-mobile .facs-foot{padding-bottom:calc(.6rem + env(safe-area-inset-bottom))}

/* ============================================================================
   DARK THEME — every rule above already resolves entirely through the shared
   tokens (--bg/--card/--fg/--border/--muted/--accent/--accent2/--sidebar/--hl/
   --masthead/--masthead-ink), which prdl-system.css already re-tones under
   [data-theme="dark"] — so nothing above needs a dark override to stay correct.
   The masthead intentionally stays near-black in BOTH themes (--masthead barely
   changes light→dark by design); these two rules are the only genuine dark-only
   *adjustments* (not color substitutions), both still expressed via tokens only.
   ============================================================================ */
[data-theme="dark"] .pg-mast{box-shadow:0 1px 0 rgba(255,255,255,.07)}
[data-theme="dark"] .splitter::after{color:var(--fg)}
/* audit fixes — three spots used a var(--token, #hardcoded-light-mode-hex) fallback
   where --token (--ink / --muted-2) was never actually DEFINED anywhere, in any theme,
   so the light-mode fallback hex rendered unchanged even under [data-theme="dark"]: */
/* 5a: .en-h (pg.override.css) — near-black ink on the dark background (≈1.09:1) */
[data-theme="dark"] .en-h{color:var(--fg)}
/* 5b: .vtx-col.vtx-la — the muted Latin body text (≈1.81:1); --muted is the dark
   palette's muted-LIGHT token (light gray on this theme's dark ground, ≥7:1 here) */
[data-theme="dark"] .vtx-col.vtx-la{color:var(--muted)}
/* 5c: the masthead's Facsimile/Edition arms deliberately go "ink dark" instead of
   accent when active (.pg-vfacs.on/.pg-vedn.on{background:var(--fg,#2d2927)}) —
   in light mode --fg is near-black (readable white-on-dark); in dark mode --fg IS
   the near-white text color, so the chip rendered as a pale-cream-on-white blur.
   Invert to the dark background + light text so the "ink" chip still reads as
   its own distinct dark arm, consistent with the other active arms. */
[data-theme="dark"] .pg-viewseg .pg-vfacs.on,
[data-theme="dark"] .pg-viewseg .pg-vedn.on{background:var(--bg);color:var(--fg)}

/* ============================================================================
   PRINT — Room 1 prints its two columns side by side; all chrome recedes.
   (Complements, does not duplicate, the existing @media print block in pg.theme.css.)
   ============================================================================ */
@media print{
  .pg-mast,.splitter,.ocr-head,.en-head,.pg-more-menu,.pg-search-menu,.pg-thumb,
  .pg-vol-menu,.edition-back,#contBtn,.facs,.facs-resizer{display:none!important}
  .pg-room1{padding:0;max-width:100%}
  .room1-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:0 1.6rem}
  .ocr-col,.en-col{padding:0!important}
  .ocr-col{border:0;background:none}
  .opening-sep{margin:1.1rem 0 .6rem}
  .edition-prov{display:none}
}

/* ============================================================================
   CRAFT POLISH — press feedback, easing, focus, motion discipline.
   Strong ease-out (cubic-bezier(.23,1,.32,1)) for entries; iOS drawer curve
   (cubic-bezier(.32,.72,0,1)) for the facsimile slide-in; exits faster than
   enters; everything gated for prefers-reduced-motion.
   ============================================================================ */
:root{--ease-strong:cubic-bezier(.23,1,.32,1);--ease-drawer:cubic-bezier(.32,.72,0,1)}

/* press feedback — every masthead / segmented control acknowledges the click */
.pg-mast button:active,.ocr-head .modeseg button:active,.pg-vol-pill:active,.edition-back a:active{
  transform:scale(.96)}
.pg-mast button,.ocr-head .modeseg button,
.pg-vol-pill,.edition-back a{transition-property:background,border-color,color,opacity,transform;
  transition-duration:.14s;transition-timing-function:var(--ease-strong)}

/* keyboard focus — visible ring on the dark masthead and the light body alike */
.pg-mast :focus-visible,.splitter:focus-visible,.edition-back a:focus-visible{
  outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}

/* facsimile panel: keep the legacy full off-canvas slide (translateX(101%) in pg.css),
   upgraded to the drawer curve; the exit is faster than the entry. */
.facs{transition:transform .34s var(--ease-drawer)}
.app:not(.with-facs) .facs{transition-duration:.22s}

/* opening indicator + pagination counters never shift layout */
#pgOpening,#facsPageNum,#colJump,.pg-goto input{font-variant-numeric:tabular-nums}

/* reading comfort: balanced headings, no orphans in the English prose */
.edition .div-head,.en-work,.en-h{text-wrap:balance}
.en-page p,.edition .blk{text-wrap:pretty}

/* generous hit areas on the compact masthead icon buttons (40px minimum) */
.pg-mast .szb,.pg-more>button{position:relative}
.pg-mast .szb::after,.pg-more>button::after{content:'';position:absolute;inset:-8px}

/* summary caret + drawer transitions honor reduced motion */
@media (prefers-reduced-motion: reduce){
  .facs{transition:none}
  .pg-mast button,.ocr-head .modeseg button,
  .pg-vol-pill,.edition-back a{transition:none}
  .pg-mast button:active,.ocr-head .modeseg button:active,.pg-vol-pill:active,.edition-back a:active{transform:none}
  .pg-search input{transition:none}
}

/* ── ΚΛΕΙΣ drawer legibility (user 2026-07-03) ──────────────────────────────
   One quiet explainer, a "col. N" citation chip per chapter, the Key's own
   section headings, and an English gloss (from our translation) under each
   Greek label. The list should read like a table of contents, not raw data. */
.ct-kleis-note{margin:.2rem .6rem .55rem;padding:.5rem .65rem;border:1px solid var(--border);
  border-radius:var(--radius-md);background:color-mix(in oklch,var(--accent) 7%,var(--bg));
  font:.74rem/1.5 var(--font-ui);color:var(--muted)}
.ct-kleis-note b{color:var(--accent2);font-weight:700}
.ct-sec{margin:.85rem .6rem .3rem;font:600 .64rem/1.2 var(--font-ui);letter-spacing:.11em;
  text-transform:uppercase;color:color-mix(in srgb,var(--muted) 88%,transparent)}
/* ── R68 TOC anatomy — one grammar for every contents row ────────────────────
   ┌ label block (primary, 2-line clamp · gloss, 1-line · destination, 1-line) ┐ nnn
   The column is a bare right-hand numeral in tabular figures — the book's own
   page-number idiom — never a bordered chip repeated a hundred times. */
.ct-item{display:flex;align-items:flex-start;gap:.6rem;color:var(--fg)}
.ct-item .ct-lab{display:block;flex:1 1 auto;min-width:0}
.ct-item .ct-t{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;overflow-wrap:break-word}
.ct-item .ct-gr,.ct-item .ct-la{display:block;margin-top:.08rem;font-size:.86em;line-height:1.35;
  color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ct-item .ct-la{font-style:italic}
.ct-item .ct-gr{font-family:var(--font-ui)}
.ct-item .ct-col{flex:0 0 auto;margin-left:auto;font:450 .72rem/1 var(--font-ui);
  color:color-mix(in srgb,var(--muted) 82%,transparent);font-variant-numeric:tabular-nums;
  white-space:nowrap;padding-top:.22rem;transition:color .14s var(--ease)}
.ct-item.ct-cur .ct-col{color:var(--accent)}
.ct-item.ct-kleis .ct-en{display:block;margin-top:.12rem;font:.76rem/1.4 var(--font-ui);
  color:var(--muted);font-style:normal}
.ct-item.ct-kleis.ct-cur{background:var(--hl)}

/* ============================================================================
   SIDEBAR SHELL (v2, PG_READER_V2_SPEC) — the persistent orientation rail, like
   PLD: a TEXT radio group (room/view) + Contents + footer, sticky at the side ≥1100px.
   NOTE: every g-view-*/g-room-* MODE layout (grid swaps, centering, per-view widths)
   lives in the template's state-bridge <style> — the single source of truth. This
   file defines only the sidebar's visual primitives + the desktop grid frame.
   ============================================================================ */
.pg-shell{display:block}
@media(min-width:1100px){
  .pg-shell{display:grid;grid-template-columns:16.5rem minmax(0,1fr);align-items:start}
}
.pg-side{display:none}
@media(min-width:1100px){
  .pg-side{display:flex;flex-direction:column;gap:1.1rem;position:sticky;top:var(--mast-h);align-self:start;
    max-height:calc(100vh - var(--mast-h));overflow-y:auto;overscroll-behavior:contain;
    padding:1.25rem 1rem 1.4rem 1.2rem;border-right:1px solid var(--border);
    background:color-mix(in oklch,var(--bg) 96%,var(--card));font-family:var(--font-ui)}
}
.pg-side-h{font:700 .66rem/1.2 var(--font-ui);letter-spacing:.09em;text-transform:uppercase;
  color:var(--muted);margin-bottom:.55rem}

/* the TEXT radios: a quiet vertical list; the active row takes the accent */
.pg-radios{display:flex;flex-direction:column;gap:.08rem}
.pg-radio{display:flex;align-items:baseline;gap:.5rem;padding:.34rem .5rem;border-radius:7px;cursor:pointer;
  font-size:.78rem;line-height:1.35;color:var(--fg);transition:background .13s var(--ease-strong),color .13s}
.pg-radio:hover{background:var(--hl)}
.pg-radio input{margin:0;accent-color:var(--accent);flex:0 0 auto;position:relative;top:.12rem}
.pg-radio .pgr-lab{min-width:0}
.pg-radio.on{color:var(--accent);font-weight:600}
.pg-radio.on .pgr-note{color:var(--accent)}
.pgr-note{display:block;font-size:.68rem;font-weight:400;color:var(--muted);letter-spacing:0;text-wrap:pretty}

/* the sidebar Contents REUSES the drawer's .ct-* classes (ct-item/ct-col/ct-en/ct-sec/
   ct-kleis-note); only container-scoped sizing differs to fit the narrow rail. */
#sideContents{font-size:.8rem;margin:-.2rem -.2rem 0}
#sideContents .ct-list{overflow:visible;padding:0}
#sideContents a.ct-item{color:var(--fg);display:flex;align-items:flex-start;gap:.55rem;
  padding:.4rem .55rem;font-family:var(--font-greek);
  font-size:.8rem;line-height:1.4;white-space:normal;border-bottom:0;border-radius:7px;
  transition:background .14s var(--ease)}
#sideContents a.ct-item::before{content:none}
#sideContents a.ct-item.ct-kleis{padding-left:.55rem;-webkit-line-clamp:none;display:flex}
/* hover is a wash, not a recolour — text that changes colour under the pointer
   reads as flicker when scanning a long list */
#sideContents a.ct-item:hover{background:var(--hl);box-shadow:none}
#sideContents a.ct-item.ct-cur{background:var(--hl);box-shadow:inset 2px 0 0 var(--accent)}
#sideContents a.ct-item.ct-cur .ct-t{font-weight:600;color:var(--accent2,var(--fg))}
#sideContents .ct-kleis-note{margin:.1rem .1rem .5rem}
.ct-la{color:var(--muted);font-style:italic;font-size:.86em}

.pg-side-foot{margin-top:auto;display:flex;flex-direction:column;gap:.25rem;padding-top:.9rem;
  border-top:1px solid var(--border)}
.pgs-foot-link{font:.78rem/1.3 var(--font-ui);color:var(--muted);text-decoration:none;padding:.22rem .1rem}
.pgs-foot-link:hover{color:var(--accent);text-decoration:underline}

/* the ☰ Contents button is ONLY the mobile drawer opener now — hidden on the desktop rail */
@media(min-width:1100px){.side-only-mobile{display:none!important}}

/* the opening indicator lives in the masthead now — visible in every mode */
.pg-mast .pg-opening{color:var(--masthead-ink);opacity:.75;font:600 .74rem/1 var(--font-ui,system-ui);
  font-variant-numeric:tabular-nums;white-space:nowrap}

/* ============================================================================
   EDITION DEMOTION (all widths, user 2026-07-04) — the diplomatic Greek edition is
   supplementary, not a peer text choice. In the sidebar TEXT group it becomes a quiet,
   link-like row set off by a hairline divider, with a muted sublabel; it still drives
   setRoom('edition') (pgreader.js tags the label .pg-radio-edition + sets its copy).
   ============================================================================ */
.pg-radio-edition{margin-top:.5rem;padding-top:.6rem;border-top:1px solid var(--border)}
.pg-radio-edition input{position:absolute;width:0;height:0;opacity:0;pointer-events:none}   /* link, not a radio dot */
.pg-radio-edition .pgr-lab{color:var(--muted);font-weight:500;font-size:.74rem;line-height:1.35;
  transition:color .13s var(--ease-strong)}
.pg-radio-edition:hover{background:var(--hl)}
.pg-radio-edition:hover .pgr-lab,.pg-radio-edition.on .pgr-lab{color:var(--accent)}
.pg-radio-edition .pgr-note{color:var(--muted);font-size:.64rem;margin-top:.05rem}
.pg-radio-edition.on .pgr-note{color:var(--accent)}

/* the demoted edition entry inside the mobile Contents sheet — a final row below the
   list (spec §Edition). Hidden when the SAME list relocates to the desktop sidebar
   (there the demoted radio already carries it). */
.ct-edition-row{display:block;margin:.5rem .1rem 0;padding:.65rem .6rem;border-top:1px solid var(--border);
  color:var(--muted);font:.9rem/1.3 var(--font-ui);text-decoration:none}
.ct-edition-row:hover{color:var(--accent);background:var(--hl)}
#sideContents .ct-edition-row{display:none}

/* ============================================================================
   SIDEBAR v3 (user 2026-07-04) — the ONE contents list carries three calm sections:
   THIS WORK (the existing per-work contents) · IN THIS VOLUME · BY THIS AUTHOR. The
   two cross-work groups collapse (<details>, closed by default) so nothing beyond the
   current work adds noise. One type scale; small-caps .ct-sec section labels, quieter
   .ct-subsec for the natural sub-groups inside THIS WORK. Separation by spacing + a
   single top hairline (the same idiom as .pg-side-foot / .ct-edition-row) — no boxes.
   Rows reuse .ct-item; the volume/PG chips reuse .ct-col (tabular-nums).
   ============================================================================ */
/* THIS WORK — the current work's English short title leads the list (a title, so it
   keeps title-case + the foreground ink; the two category labels below stay small-caps) */
.ct-sec-work{margin:.1rem .6rem .25rem;font:700 .8rem/1.25 var(--font-ui);letter-spacing:.01em;
  text-transform:none;color:var(--fg);text-wrap:balance}

/* quieter sub-headings for a group's natural sections (ΚΛΕΙΣ sections · Edition contents ·
   Migne's spine) — smaller + lighter than a .ct-sec so the hierarchy reads at a glance */
.ct-subsec{margin:.6rem .6rem .12rem;font:600 .62rem/1.2 var(--font-ui);letter-spacing:.06em;
  text-transform:uppercase;color:color-mix(in oklch,var(--muted) 80%,transparent)}

/* IN THIS VOLUME · BY THIS AUTHOR — a quiet collapsible; the <summary> IS the heading.
   R68: in-rail separators whisper (62%) like every other calm-luxe hairline */
.ct-grp-vol,.ct-grp-auth{margin-top:.7rem;padding-top:.6rem;
  border-top:1px solid color-mix(in srgb,var(--border) 62%,transparent)}
.ct-fold{display:flex;align-items:center;gap:.45rem;cursor:pointer;list-style:none;
  margin:0 .6rem .15rem;padding:.15rem 0;font:700 .68rem/1.2 var(--font-ui);letter-spacing:.09em;
  text-transform:uppercase;color:var(--muted);transition:color .16s var(--ease-strong)}
.ct-fold::-webkit-details-marker{display:none}
.ct-fold::before{content:'\25b8';font-size:.72em;line-height:1;color:var(--accent);
  transition:transform .16s var(--ease-strong)}
details[open]>.ct-fold::before{transform:rotate(90deg)}
.ct-fold:hover{color:var(--accent)}
.ct-fold:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:5px}
.ct-fold .ct-count{margin-left:auto;font:600 .66rem/1 var(--font-ui);letter-spacing:0;
  text-transform:none;color:var(--muted);font-variant-numeric:tabular-nums}

/* the two quiet action links: whole-volume continuous scroll + author overflow */
.ct-volscroll,.ct-more{display:block;margin:.15rem .6rem .4rem;padding:.16rem 0;
  font:.73rem/1.35 var(--font-ui);color:var(--muted);text-decoration:none;
  transition:color .14s var(--ease-strong)}
.ct-volscroll:hover,.ct-more:hover{color:var(--accent)}
.ct-volscroll:focus-visible,.ct-more:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:5px}

/* narrow-rail sizing so the new pieces match #sideContents' tighter gutter */
#sideContents .ct-sec-work{margin:.05rem .1rem .25rem}
#sideContents .ct-subsec{margin:.5rem .1rem .1rem}
#sideContents .ct-grp-vol,#sideContents .ct-grp-auth{margin-top:.6rem;padding-top:.55rem}
#sideContents .ct-fold{margin:0 .1rem .12rem}
#sideContents .ct-volscroll,#sideContents .ct-more{margin:.1rem .1rem .35rem}

@media (prefers-reduced-motion: reduce){
  .ct-fold,.ct-fold::before,.ct-volscroll,.ct-more{transition:none}
}

/* mobile masthead search: hidden on desktop (full search box lives there), one tap on the phone */
.pg-msearch{display:none}
html.g-mobile .pg-msearch{display:flex;align-items:center;justify-content:center;width:2.2rem;height:2.2rem;
  font-size:1.25rem;line-height:1;color:var(--masthead-ink,inherit);text-decoration:none;border-radius:8px;opacity:.85}
html.g-mobile .pg-msearch:active{transform:scale(.96)}

/* ── control polish (TFR parity pass, 2026-07-04): uniform heights, quiet secondaries,
      tabular digits, focus rings, one radius ── */
.pg-mast button,.pg-mast .pg-goto input,.pg-search input,.pg-more>button,
.pg-thumb button{height:32px;box-sizing:border-box}
.pg-goto input,#colJump,.pv-bar,.ct-col,.nt-colchip,.pg-opening{font-variant-numeric:tabular-nums}
.pg-mast button{border-radius:7px}.pg-search input{border-radius:7px}
.pg-more-menu{border-radius:7px}
.pg-mast button:focus-visible,.pg-side input:focus-visible,.pg-thumb button:focus-visible,
.ct-item:focus-visible,a.pgs-foot-link:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* quiet secondaries: borderless until hover; active state = accent dot, not a filled box */
.pg-mast .pg-more>button{border-color:transparent;background:transparent}
.pg-mast .pg-more>button:hover{border-color:var(--border)}
.pg-thumb button{position:relative;border:0;background:transparent}
.pg-thumb button.on::after{content:'';position:absolute;left:50%;transform:translateX(-50%);
  bottom:4px;width:4px;height:4px;border-radius:999px;background:var(--accent)}

/* the facsimile close must be unmissable */
.facs .facs-close{display:flex;align-items:center;justify-content:center;   /* pg.css hides it — the old design's leftover that made the pane feel un-closeable */
  font-size:1.05rem;min-width:40px;min-height:32px;position:relative}
.facs-close::after{content:'';position:absolute;inset:-8px}

/* facsimile toggle in the TEXT group + unmistakable masthead active state */
.pg-facs-row{margin-top:.35rem;padding-top:.45rem;border-top:1px solid var(--border)}
#facsBtn.active{background:var(--accent);color:#fff;border-color:var(--accent)}

/* ── facsimile, made native (user 2026-07-04: "integrate facsimile to the whole interface,
      make it natural"): the panel wears the reader's own idiom — quiet chrome, one slim
      header, hairline separation, no bolted-on footers ── */
.facs{background:var(--bg);border-left:1px solid var(--border);box-shadow:none}
.facs-head{display:flex;align-items:center;gap:.35rem;padding:.4rem .6rem;border-bottom:1px solid var(--border);
  background:transparent;flex-wrap:nowrap;overflow:hidden}
.facs-head button{height:32px;border:1px solid transparent;background:transparent;border-radius:7px;
  color:var(--muted);font:600 .74rem var(--font-ui,system-ui);cursor:pointer;padding:0 .5rem}
.facs-head button:hover{border-color:var(--border);color:var(--fg)}
.facs-head button:active{transform:scale(.96)}
#facsFol{font:700 .8rem var(--font-ui,system-ui);font-variant-numeric:tabular-nums;color:var(--fg);
  white-space:nowrap;margin-right:.15rem}
.facs-nav{display:flex;align-items:center;gap:.1rem}
#facsPageNum{font:.72rem var(--font-ui,system-ui);font-variant-numeric:tabular-nums;color:var(--muted);
  min-width:3.2rem;text-align:center}
.facs-head .lbl{display:none}                    /* the long provenance label — noise in a header */
.facs-hint{display:none}                          /* the explainer paragraph — the panel explains itself */
#facsFoot{display:none}                           /* duplicate title bar at the bottom */
.facs-head .sld.izc{margin-left:auto}             /* zoom rides the right edge */
.facs-head .sld.izc input{width:4.5rem}
#facsImg{outline:1px solid rgba(0,0,0,.1);border-radius:3px;background:#fff}
html[data-theme="dark"] #facsImg{outline-color:rgba(255,255,255,.1)}
.facs-stage{padding:.6rem}
/* the pane sub-views (OCR / English overlays) inherit the same quiet idiom */
.facs .fk-ocr.on,.facs-head button.on{color:var(--accent);border-color:var(--accent)}

/* ── Round-5 §5.5 reading typography pass ── */
.en-col,.edition,.ocr-col,.pv-page{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
.en-col,.edition{text-wrap:pretty}
.en-col h1,.en-col h2,.en-col h3,.edition h1,.edition h2,.edition h3,.pg-title-en{text-wrap:balance}
::selection{background:color-mix(in oklab,var(--accent) 22%,transparent)}
@media(max-width:880px){.en-col{font-size:1.04rem;line-height:1.78}}

/* ── bookmarks ── */
#bmBtn{height:32px;min-width:36px;border:1px solid transparent;background:transparent;border-radius:7px;
  color:var(--masthead-ink,inherit);opacity:.75;font-size:1rem;cursor:pointer}
#bmBtn:hover{border-color:var(--border);opacity:1}
#bmBtn.on{color:var(--accent);opacity:1}
#bmBtn:active{transform:scale(.96)}
.ct-grp-bm summary.ct-sec{cursor:pointer;list-style:none}
.ct-grp-bm summary.ct-sec::-webkit-details-marker{display:none}
.ct-grp-bm .ct-count{font-weight:400;color:var(--muted);margin-left:.3rem;font-variant-numeric:tabular-nums}
.ct-item.ct-bm{position:relative;padding-right:2rem}
.bm-x{position:absolute;right:.3rem;top:50%;transform:translateY(-50%);width:1.5rem;height:1.5rem;
  border:0;background:transparent;color:var(--muted);font-size:1rem;cursor:pointer;border-radius:6px;opacity:0}
.ct-item.ct-bm:hover .bm-x{opacity:.8}
.bm-x:hover{color:var(--fg);background:var(--card)}

/* ── Greek OCR view, made clean (user 2026-07-04 screenshot): ONE control row, no duplicate
      segments, no boxed pages, quiet nav. Scoped to the v2 reader shell — the standalone
      facsimile pages keep their full toolkits. ── */
.pg-shell #displayBar{display:none}                                /* orphan Page·⌕ row */
.pg-shell #pvLayoutSeg,.pg-shell #pvColSeg{display:none}           /* dupes of the ocr-head segment */
.pg-shell .pv-bar{border:0;background:transparent;padding:.15rem 0;margin:0 0 .4rem;
  display:flex;justify-content:center}
.pg-shell .pv-nav{display:flex;align-items:center;gap:.3rem}
.pg-shell .pv-nav button{height:32px;border:1px solid transparent;background:transparent;border-radius:7px;
  color:var(--muted);font:600 .78rem var(--font-ui,system-ui);cursor:pointer;padding:0 .6rem}
.pg-shell .pv-nav button:hover{border-color:var(--border);color:var(--fg)}
.pg-shell #pvPageInd{font:.8rem var(--font-ui,system-ui);font-variant-numeric:tabular-nums;color:var(--fg);
  min-width:7rem;text-align:center}
.pg-shell .nav-strip{border:0;background:transparent;display:flex;gap:1.1rem;justify-content:center;
  padding:.3rem 0;margin:0 0 .3rem}
.pg-shell .nav-strip a{border:0;background:transparent;color:var(--muted);text-decoration:none;
  font:600 .78rem var(--font-ui,system-ui);padding:.3rem .2rem}
.pg-shell .nav-strip a:hover{color:var(--accent)}
.pg-shell .pv-page{border:0;background:transparent;box-shadow:none;padding:0 0 1.4rem;margin:0 0 1.2rem;
  border-bottom:1px solid var(--border)}
.pg-shell .pv-page .pv-chip{display:none}                          /* per-page provenance chip: once is enough */
.pg-shell .pv-page:first-of-type .pv-chip{display:inline-block;opacity:.7}
.pg-shell .ocr-head{border:0;background:var(--bg)}
/* the lane segment goes quiet: no dark fills — active = accent text over a hairline */
.pg-shell .modeseg button,.pg-shell .ocrf button{height:32px;border:1px solid transparent;background:transparent;
  border-radius:7px;color:var(--muted);font:600 .76rem var(--font-ui,system-ui);cursor:pointer;padding:0 .6rem}
.pg-shell .modeseg button:hover{border-color:var(--border);color:var(--fg)}
.pg-shell .modeseg button.active,.pg-shell .ocrf button.active{color:var(--accent);border-color:var(--accent);background:transparent}
/* OCR Greek reads like text, not print-out */
.pg-shell .pv-page{font-size:1.02em;line-height:1.72}

/* ── right edge: ONE quiet vertical idiom for Study + Research; no floating pill ── */
#pgRelBtn{display:none!important}                                   /* its function lives in the rail + r key */
.pg-shell .rr-tab{top:30%;background:var(--bg);color:var(--muted);border-color:var(--border);
  font:600 .68rem var(--font-ui,system-ui);letter-spacing:.12em;opacity:.85}
.pg-shell .rr-tab:hover{color:var(--accent);opacity:1}
.pg-shell .study-toggle{position:fixed;right:0;top:calc(30% + 118px);z-index:239;writing-mode:vertical-rl;
  text-orientation:mixed;padding:.85rem .42rem;min-height:44px;border:1px solid var(--border);border-right:0;
  border-radius:8px 0 0 8px;background:var(--bg);color:var(--muted);font:600 .68rem var(--font-ui,system-ui);
  letter-spacing:.12em;opacity:.85;cursor:pointer;box-shadow:none;transform:none}
.pg-shell .study-toggle:hover{color:var(--accent);opacity:1}

/* ═══ user 2026-07-05: reader density — "take up more space, less headspace/padding, more text
   than blank space." Three fixes, all shipped via the shared asset (no per-page rebuild): ═══ */

/* (1) THE BIG ONE — the reading column was collapsing to ~376px on wide screens because .pg-room1
   is a flex child of .app (display:flex) with no grow, so it shrank to content and margin:0 auto
   pushed ~280px of blank on each side. Make it fill the flex row. It still shrinks correctly (with
   no overflow) when the facsimile panel opens, because min-width:0 lets it give up space. */
.pg-room1{flex:1 1 auto;min-width:0}

/* (2) tighter reading frame — cut the head/side/foot padding so text dominates, not whitespace */
.pg-room1{padding:.55rem 1.35rem 2.4rem}
.pg-room1 .main{padding:.35rem 0 0}
.pg-shell .ocr-head{margin-bottom:.5rem}

/* (3) wider single-column caps + a gentle size bump (msg 1: "too small"). The doubled class lifts
   specificity above the inline state-bridge caps (html.g-view-en .en-col / .room1-grid). */
html.g-view-en.g-view-en .en-col{max-width:60rem}
html.g-view-ocr.g-view-ocr .room1-grid{max-width:78rem}
/* R49 (user: "I can't adjust the english font"): the old hard 20px here pinned every
   lane's TEXT while the masthead A−/A+ slider (--read-fs) and the EN pane's own A−/A+
   (--fzm-en) moved only containers. Every lane now derives from the reader size. */
.en-col,.en-page{font-size:calc(var(--read-fs,20px)*var(--fzm-en,1))}
.pg-shell .pv-page,.ocr-col .tx,.ocr-col .la{font-size:var(--read-fs,20px)}
@media(min-width:1600px){
  html.g-view-en.g-view-en .en-col{max-width:66rem}
  html.g-view-ocr.g-view-ocr .room1-grid{max-width:none}
}

/* ── UX Round-9 mobile ergonomics ── */
html.g-mobile .pg-thumb-b{font-size:.7rem}                      /* thumb labels were 9.9px */
html.g-mobile .pg-msearch{position:relative}
html.g-mobile .pg-msearch::after{content:'';position:absolute;inset:-8px}   /* msearch hit-slop to 44px+ */
html.g-mobile .ct-sec{font-size:.78rem}html.g-mobile .ct-subsec{font-size:.72rem}  /* mobile Contents legibility */

/* ══ Round-13: sidebar rhythm unification (user: "cluttered and unstructured") ══════════════
   ONE section-header voice (.pg-side-h, .ct-fold, .ct-sec), one spacing rhythm, quiet counts,
   calm radios. Pure override block — loaded last, no template change. */
.pg-side-h,.ct-fold{
  font:600 .66rem/1.3 var(--font-ui);letter-spacing:.09em;text-transform:uppercase;
  color:var(--muted);background:none}
.pg-side-sec{margin:0 0 1.15rem;padding-top:1.05rem;border-top:1px solid color-mix(in srgb,var(--border) 62%,transparent)}
.pg-side-sec:first-child{border-top:0;padding-top:.2rem}
.pg-side-h{margin:0 0 .5rem}
.ct-fold{padding:.42rem .1rem;cursor:pointer}

.ct-count{font:500 .68rem/1 var(--font-ui);color:var(--muted);opacity:.75;font-variant-numeric:tabular-nums;
  margin-left:.45rem;letter-spacing:0;text-transform:none}
/* radios: label carries the choice, captions live in the title tooltip */
.pg-radio{padding:.28rem 0}
.pg-radio .pgr-lab{font:500 .86rem/1.35 var(--font-ui)}
.pg-radio .pgr-sub,.pgr-lab small,.pg-radio-en .pgr-cap{display:none}
.pg-radio input:checked~.pgr-lab{color:var(--accent);font-weight:600}
/* the demoted edition row: one quiet line */
.pg-radio-edition .pgr-lab{font-size:.72rem;line-height:1.4;opacity:.85}
/* contents rows: single-line labels, Greek sub-line clamped, columns right-tucked */
#sideContents .ct-item{padding-top:.3rem;padding-bottom:.3rem}
#sideContents .ct-lab{display:block;overflow:hidden}
#sideContents .ct-gr{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  font-size:.74rem;opacity:.8}
#sideContents .ct-en{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#sideContents .ct-col{font-variant-numeric:tabular-nums;opacity:.7;border:0;background:none;padding:0}
/* ΚΛΕΙΣ note: one quiet line (JS now emits one line; keep it visually hushed) */
.ct-kleis-note{background:none!important;border:0!important;padding:.15rem .1rem .5rem!important;
  margin:0!important;font:italic .76rem/1.5 var(--font-ui)!important;color:var(--muted)!important}
.ct-kleis-note b{color:var(--muted)!important;font-weight:600}
/* side footer links: same quiet voice as headers */
.pg-side-foot{border-top:1px solid color-mix(in srgb,var(--border) 62%,transparent);margin-top:1rem;padding-top:.8rem}
/* R13b: the work-title row inside Contents is a TITLE, not a kicker */
#sideContents .ct-sec-work{font:600 .92rem/1.35 var(--font-display,serif)!important;
  letter-spacing:0!important;text-transform:none!important;color:var(--fg)!important;padding:.2rem .1rem .45rem!important}

/* ══ R16: edition-room English interleave + all-volumes tree + word lookup ══ */
.edn-en-btn{margin-left:.8rem;font:600 .74rem var(--font-ui);color:var(--muted);background:none;
  border:1px solid var(--border);border-radius:999px;padding:.22rem .7rem;cursor:pointer;
  transition:color .13s,border-color .13s}
.edn-en-btn:hover{color:var(--accent);border-color:var(--accent)}
.edn-en-btn.on{color:var(--accent);border-color:var(--accent);background:var(--accent-tint,rgba(0,0,0,.04))}
.edn-en{margin:1.1rem 0;padding:.8rem 1rem;border:1px solid var(--border);border-radius:10px;
  background:var(--card,#fffdfa);font:.92rem/1.7 var(--font-body,Georgia,serif);color:var(--fg)}
.edn-en-col{display:block;font:600 .66rem/1 var(--font-ui);letter-spacing:.07em;text-transform:uppercase;
  color:var(--muted);margin-bottom:.45rem}
/* all-volumes tree */
.ct-grp-allvol .av-wrap{padding:.2rem 0 .6rem}
.av-filter{width:100%;box-sizing:border-box;margin:.3rem 0 .5rem;padding:.45rem .65rem;
  border:1px solid var(--border);border-radius:8px;background:var(--card);color:var(--fg);
  font:.84rem var(--font-ui)}
.av-vol{border-bottom:1px solid var(--border)}
.av-vol summary.av-v{display:flex;align-items:baseline;gap:.5rem;padding:.3rem .15rem;cursor:pointer;
  list-style:none;font:600 .84rem var(--font-ui);color:var(--fg)}
.av-vol summary.av-v::-webkit-details-marker{display:none}
.av-vol summary.av-v:hover{color:var(--accent)}
.av-w{display:flex;align-items:baseline;gap:.6rem;padding:.28rem .15rem .28rem .9rem;
  text-decoration:none;color:var(--fg);font:.82rem/1.4 var(--font-ui)}
.av-w:hover{color:var(--accent)}
.av-w .ct-col{margin-left:auto;white-space:nowrap}
.av-none{color:var(--muted);font:italic .82rem var(--font-ui);padding:.4rem .15rem}
/* word lookup card */
.gk-lookup{position:absolute;z-index:700;width:260px;background:var(--card,#fffdfa);
  border:1px solid var(--border);border-radius:11px;box-shadow:0 6px 24px rgba(0,0,0,.14);
  padding:.75rem .9rem;font:.86rem/1.5 var(--font-ui)}
.gk-lookup b{display:block;font:600 1.15rem/1.3 var(--font-body,serif);margin:0 1.2rem .45rem 0}
.gk-lookup a{display:block;padding:.24rem 0;color:var(--accent);text-decoration:none}
.gk-lookup a:hover{text-decoration:underline}
.gk-lookup .gk-x{position:absolute;top:.4rem;right:.5rem;border:0;background:none;color:var(--muted);
  font-size:1rem;cursor:pointer;padding:.15rem .3rem}
.gk-lookup .gk-x:hover{color:var(--accent)}
/* R17b: masthead position chip doubles as go-to-col */
.pg-opening-btn{cursor:pointer;border:1px solid transparent;border-radius:7px;padding:.15rem .5rem;transition:border-color .13s}
.pg-opening-btn:hover,.pg-opening-btn:focus-visible{border-color:rgba(255,255,255,.35)}
.pg-opening-in{width:5.5rem;border:1px solid rgba(255,255,255,.4);border-radius:6px;background:rgba(255,255,255,.12);
  color:#fff;font:600 .82rem var(--font-ui,system-ui);padding:.15rem .45rem}
.pg-opening-in::placeholder{color:rgba(255,255,255,.6)}

/* ══ R18: reader feel — quiet English interleave + a splitter you can actually find ══ */
/* the edition English: no card box — a slim indented lane under a hairline, half the visual weight */
.edn-en{margin:.9rem 0 1.1rem 1.1rem;padding:.15rem 0 .15rem .95rem;border:0;border-left:2px solid var(--border);
  border-radius:0;background:none;font:.9rem/1.66 var(--font-body,Georgia,serif);color:var(--fg);opacity:.92}
.edn-en-col{display:inline;font:600 .64rem/1 var(--font-ui);letter-spacing:.06em;text-transform:uppercase;
  color:var(--muted);margin:0 .5rem 0 0}
/* the OCR ‖ English splitter (R19g rewrite): 14px hit area, ABOVE the panes (the English pane
   was overlapping it — drags fell through to text selection), painted as a thin center line. */
#pgSplit{position:relative;z-index:6;width:14px !important;cursor:col-resize;
  background:transparent !important;touch-action:none;user-select:none}
#pgSplit::before{content:'';position:absolute;top:0;bottom:0;left:6px;width:2px;
  background:var(--border);border-radius:2px;transition:background .13s,width .13s,left .13s}
#pgSplit:hover::before,#pgSplit:active::before{background:var(--accent);width:4px;left:5px}
/* R18b: the edition-English interleave belongs ONLY to the Edition room's clean-text display —
   it must never surface in the OCR / Page lanes (it was leaking there when .blk hid). */
.edn-en{display:none}
html.g-room-edition:not(.g-page) .edn-en{display:block}
/* R19: the sticky lane-control row must not be transparent — text was scrolling through it */
.modeseg, .pg-ctrls, .display-controls{background:var(--bg,#f6f3f2)!important}
.modeseg{border-bottom:1px solid var(--border);box-shadow:0 1px 0 rgba(0,0,0,.02)}
/* R19c: floating column chip (mast hidden) */
.pg-floatcol{position:fixed;right:1rem;bottom:6.4rem;z-index:70;font:600 .78rem var(--font-ui,system-ui);
  color:var(--fg);background:var(--card,#fffdfa);border:1px solid var(--border);border-radius:999px;
  padding:.4rem .8rem;cursor:pointer;box-shadow:0 3px 12px rgba(0,0,0,.09);font-variant-numeric:tabular-nums}
.pg-floatcol:hover{border-color:var(--accent);color:var(--accent)}
/* R19e: spine-fallback group matches the other collapsible groups */
.ct-grp-spine>summary.ct-fold{position:sticky;top:0;background:var(--card,#fffdfa);z-index:2}
.ct-grp-spine .ct-sec{padding-left:.35rem}

/* ══ R21b: the facing Latin page, integrated ═══════════════════════════════════════════════
   Page view: when a column's record carries both physical pages, each column is captioned so
   the reader always knows which page they are reading. Facsimile: the Latin twin is one tap
   away on a chip that appears only where it exists; the label follows the state. */
.pv-coltag{font:600 .64rem/1 var(--font-ui,system-ui);letter-spacing:.08em;text-transform:uppercase;
  color:var(--muted);padding:.15rem 0 .4rem;border-bottom:1px solid var(--border);margin-bottom:.65rem}
#facsAltBtn.active{border-color:var(--accent);color:var(--accent)}
#facsFol.facs-lat::after{content:' · Latin page';color:var(--muted)}

/* ══ R23: TOC readability + adjustable lanes + per-lane text size ══════════════════════════════
   Drawer rows: English label leads (sentence-cased by JS), clamped to two lines; the Greek
   incipit is one muted line; the col chip sits top-right. Section heads stay visible while
   scrolling the list. */
.ct-kleis{display:flex;align-items:flex-start;gap:.5rem}
.ct-kleis .ct-lab{flex:1;min-width:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;text-transform:none;line-height:1.35}
.ct-kleis .ct-gr,.ct-kleis .ct-en{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
  font-size:.86em;color:var(--muted);margin-top:.1rem}
.ct-kleis .ct-col{flex:none;font-variant-numeric:tabular-nums;color:var(--accent);font-size:.78em;
  padding-top:.1rem}
.ct-sec{position:sticky;top:0;z-index:2;background:var(--sidebar,var(--bg))}
/* the lane splitter earns a visible grip so "adjustable" is discoverable */
#pgSplit::after{content:'⋮';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  color:var(--muted);font-size:13px;line-height:1;pointer-events:none}
#pgSplit:hover::after{color:var(--accent)}
.ct-sc{font-variant:small-caps;letter-spacing:.02em}

#enCol{font-size:calc(var(--read-fs,19px)*var(--fzm-en,1))}
.en-head .fzc{display:inline-flex;gap:2px;margin-left:.4rem}
.en-head .fzc button{height:24px;min-width:26px;padding:0 4px;border:1px solid var(--border);border-radius:6px;
  background:transparent;color:var(--muted);font:600 .68rem var(--font-ui,system-ui);cursor:pointer}
.en-head .fzc button:hover{border-color:var(--accent);color:var(--accent)}

/* R26: several sections opening on one page render as ONE quiet group, not stacked shells */
.spine-subgrp{display:flex;flex-wrap:wrap;gap:.35rem .6rem;align-items:baseline;margin:1.1rem 0 .9rem;
  padding:.5rem .7rem;border:1px solid var(--border);border-radius:9px;background:color-mix(in oklch,var(--bg) 96%,var(--accent) 4%)}
.spine-subgrp .ss-chip{font:600 .78rem/1.4 var(--font-ui,system-ui);color:var(--fg)}
.spine-subgrp .ss-chip:not(:last-child)::after{content:' ·';color:var(--muted);margin-left:.55rem}

/* ══ R27 sidebar taste pass: one calm hierarchy — section heads set the rhythm, rows are
   quiet, chips recede. No new chrome, just order. ══════════════════════════════════════ */
.pg-side{font-size:.85rem}
.pg-side .pg-side-h{font:600 .68rem/1 var(--font-ui,system-ui);letter-spacing:.12em;text-transform:uppercase;
  color:var(--muted);margin:0 0 .55rem}
.pg-side .pg-side-sec{padding:.9rem .95rem;border-bottom:1px solid var(--border)}
.pg-side .pg-side-sec:last-child{border-bottom:0}
.ct-sec{font:600 .7rem/1.3 var(--font-ui,system-ui);letter-spacing:.09em;text-transform:uppercase;
  color:var(--muted);margin:.9rem 0 .35rem;padding:.25rem 0}
.ct-item{display:flex;gap:.5rem;align-items:baseline;padding:.34rem .45rem;border-radius:7px;
  line-height:1.4;color:var(--fg);text-decoration:none}
.ct-item:hover{background:color-mix(in oklch,var(--bg) 92%,var(--accent) 8%)}
.ct-item.ct-cur{background:color-mix(in oklch,var(--bg) 88%,var(--accent) 12%)}
.ct-kleis .ct-lab{font-size:.84rem}
.ct-kleis .ct-gr{font-size:.76rem;opacity:.8;margin-top:.12rem}
.ct-kleis .ct-col{font-size:.72rem;opacity:.9;min-width:3.2rem;text-align:right}
.ct-kleis-note{font:.72rem/1.5 var(--font-ui,system-ui);color:var(--muted);margin:.2rem 0 .5rem;
  padding:.35rem .5rem;border:1px solid var(--border);border-radius:7px;background:transparent}
.pg-radios .pg-radio{padding:.3rem .45rem;border-radius:7px}
.pg-radios .pg-radio:hover{background:color-mix(in oklch,var(--bg) 92%,var(--accent) 8%)}
.pgr-note{display:block;font-size:.72rem;color:var(--muted);letter-spacing:0;text-transform:none;margin-top:.1rem}
.ct-sec-t{cursor:pointer;user-select:none}
.ct-sec-t::before{content:'▾';display:inline-block;margin-right:.35rem;font-size:.7em;
  transition:transform .15s ease;color:var(--muted)}
.ct-sec-t.ct-closed::before{transform:rotate(-90deg)}
.ct-sec-t:hover{color:var(--fg)}

/* R42: work-nav footer — the consistent way onward from every work */
.work-nav{display:flex;justify-content:space-between;gap:1rem;max-width:72rem;margin:2.2rem auto 1rem;
  padding:1rem .2rem 0;border-top:1px solid var(--border)}
.work-nav a{flex:0 1 46%;text-decoration:none;color:var(--fg);padding:.6rem .8rem;border:1px solid var(--border);
  border-radius:10px;transition:border-color .14s}
.work-nav a:hover{border-color:var(--accent)}
.work-nav .wn-next{margin-left:auto;text-align:right}
.work-nav .wn-k{display:block;font:600 .68rem/1.3 var(--font-ui,system-ui);letter-spacing:.08em;
  text-transform:uppercase;color:var(--muted)}
.work-nav .wn-t{display:block;margin-top:.15rem;font:.9rem/1.4 var(--font-ui,system-ui);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:640px){.work-nav{flex-direction:column}.work-nav a{flex:1 1 auto}.work-nav .wn-next{margin-left:0;text-align:left}}

/* R44b: the volume tree marks the current WORK with its accent bar only — the background
   position highlight belongs to exactly one row, in the contents list. */
.ct-grp-vol .ct-item.ct-cur,.ct-grp-auth .ct-item.ct-cur,.ct-grp-spine .ct-item.ct-cur{background:none}

/* R48: while a deep-link pin is settling, hold the reading room out of sight — the reader
   sees the exact target column appear once, never the hunt from the top of the page.
   Revealed by pgreader.js on the first successful pin (hard cap 1.5s). */
html.pg-settling .pg-room1{visibility:hidden}

/* ── R49: professional reading pass (user: "clean, adjustable, professional, seamless") ── */
/* scripture quotations — the MT's *asterisk* markers now render as quiet italics */
.en-page .en-q,.en-lane .en-q{font-style:italic}
/* the reading MEASURE: the text stack caps at the adjustable --read-w (the ⇤/⇥ control),
   centered inside the wide pane — 88-char lines were past the comfortable ceiling */
.en-col .en-page,.en-col .en-prov,.en-col .en-work,.en-col .en-ai-note,.en-col .en-note{
  max-width:var(--read-w,72ch);margin-left:auto;margin-right:auto}
/* the settle veil reveals with a short fade, not a pop */
.pg-room1{transition:opacity .16s ease}
html.pg-settling .pg-room1{visibility:hidden;opacity:0}
@media (prefers-reduced-motion: reduce){.pg-room1{transition:none}}
/* R49: the size/width control's fallback host is the provenance line (English-only view) */
#enCol .en-prov{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}
#enCol .en-prov .fzc{margin-left:auto;display:inline-flex;gap:2px}
#enCol .en-prov .fzc button{height:24px;min-width:26px;min-height:24px;padding:0 4px;border:1px solid var(--border);
  border-radius:6px;background:transparent;color:var(--muted);font:600 .68rem var(--font-ui,system-ui);cursor:pointer}
#enCol .en-prov .fzc button:hover{border-color:var(--accent);color:var(--accent)}
/* R50: cross-doc sidebar rows name their destination; shells are invisible until filled */
.ct-item .ct-dest{display:block;margin-top:.1rem;font:400 .68rem/1.35 var(--font-ui);font-style:normal;
  color:color-mix(in srgb,var(--muted) 78%,transparent);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.en-page.en-shell{padding:0;margin:0;border:0;min-height:0}

/* R52 (user: mobile font much much smaller — entire paragraphs should fit): 14px default
   (JS boot matches), tighter leading, trimmed section padding; the size controls stay and
   get tap-safe targets. A saved reader size still wins on any device. */
@media(max-width:640px){
  .en-lane,.en-col .en-page,.en-page{line-height:1.52}
  .en-col .en-page{padding-left:.1rem;padding-right:.1rem}
  #enCol .en-prov .fzc button,.en-head .fzc button{min-height:36px;min-width:34px}
}

/* ── R53 live-audit fixes ── */
/* #2: the mobile masthead title collapsed to two characters — clamp to two full lines */
@media(max-width:700px){
  .pg-mast .pg-title,.pg-mast .pg-title-en{display:-webkit-box;-webkit-line-clamp:2;
    -webkit-box-orient:vertical;overflow:hidden;white-space:normal;line-height:1.22}
}
/* #5: the Study tab sat invisibly UNDER the open facsimile pane on phones — hide it there
   (it returns the moment the facsimile closes) */
@media(max-width:700px){
  body:has(.app.with-facs) .study-toggle{display:none}
}
/* R53b: the flex row crushed the clamped title to 31px — guarantee it a readable share */
@media(max-width:700px){.pg-mast .pg-title,.pg-mast .pg-title-en{min-width:96px}}

/* ── R54 item 8: keyboard shortcuts overlay ── */
.pg-keys{position:fixed;inset:0;z-index:400;background:rgba(30,25,20,.45);display:flex;align-items:center;justify-content:center}
.pg-keys .pgk-card{background:var(--card,#fff);border:1px solid var(--border);border-radius:12px;padding:1.2rem 1.5rem;max-width:22rem;box-shadow:0 18px 50px -18px rgba(0,0,0,.4)}
.pg-keys h3{margin:.1rem 0 .7rem;font:600 1rem var(--font-ui,system-ui)}
.pg-keys dl{display:grid;grid-template-columns:auto 1fr;gap:.35rem .9rem;font:.86rem/1.5 var(--font-ui,system-ui);margin:0 0 .9rem}
.pg-keys dt{font-weight:600;color:var(--accent);white-space:nowrap}
.pg-keys dd{margin:0;color:var(--fg)}
.pg-keys .pgk-x{min-height:36px;padding:0 1rem;border:1px solid var(--border);border-radius:8px;background:transparent;cursor:pointer}

/* ── R54 item 10: print pass — the reading text, nothing else ── */
@media print{
  .pg-mast,.pg-side,.facs,.facs-stage,.work-nav,.pg-floatcol,.study-toggle,.pg-keys,
  .ocr-head,.modeseg,#displayBar,.pg-bottom,.mobile-bar,.en-prov .fzc,.pg-radio,
  .ct-panel,#selPopup,.research-tab,.pg-more,.anchor-flash{display:none !important}
  body,.app,.pg-room1,.main{display:block;background:#fff;color:#000}
  .en-col,.en-page,.main{max-width:100% !important;font-size:11pt;line-height:1.5;font-family:Georgia,'Times New Roman',serif}
  .blk,.en-page,.division{break-inside:avoid-page}
  a{color:#000;text-decoration:none}
  .print-cite{display:block !important;margin-top:1.2em;padding-top:.6em;border-top:1pt solid #999;
    font:9pt/1.4 Georgia,serif;color:#333}
}
.print-cite{display:none}

/* ══ R57 · Contents elevation + one reading-view switch ══════════════════════ */
/* Contents: calm title, live filter, real hierarchy (lvl-1 heads / lvl-2 chapters) */
.ct-sec-vol{letter-spacing:.02em;text-transform:none;font-size:.8rem}
.ct-filter{margin:.15rem .6rem .4rem}
.ct-filter input{width:100%;box-sizing:border-box;font:inherit;font-size:.78rem;line-height:1.3;
  padding:.42rem .65rem;border:1px solid var(--border,rgba(0,0,0,.16));border-radius:8px;
  background:color-mix(in srgb,var(--card,#fff) 55%,var(--bg,#fff));color:var(--fg,inherit);
  outline:none;transition:border-color .15s var(--ease),box-shadow .15s var(--ease),background .15s var(--ease)}
.ct-filter input:hover{border-color:color-mix(in srgb,var(--accent,#8a6d3b) 35%,var(--border))}
.ct-filter input:focus-visible{border-color:var(--accent,#8a6d3b);background:var(--card,#fff);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--accent,#8a6d3b) 16%,transparent)}
.ct-filter input::placeholder{color:color-mix(in srgb,var(--muted) 75%,transparent)}
.ct-item[data-lvl="1"]{margin-top:.3rem}
.ct-item[data-lvl="1"] .ct-lab{font-weight:600}
.ct-item.ct-l2{padding-left:1.2rem;font-size:.92em}
.ct-item.ct-l2 .ct-lab{color:var(--muted,#6b6660)}
.ct-item.ct-l2.ct-cur .ct-lab{color:inherit}
/* the reading-view switch — rides the sticky lane header, left of the format pills */
.pg-viewseg{display:inline-flex;align-items:stretch;border:1px solid var(--border,rgba(0,0,0,.18));
  border-radius:999px;overflow:hidden;background:var(--card,#fff);flex:0 0 auto;margin-right:.6rem}
.pg-viewseg button{border:0;background:none;font:600 .74rem/1 var(--font-ui,system-ui);
  padding:.4rem .75rem;cursor:pointer;color:var(--muted,#6b6660);white-space:nowrap;
  transition:background .14s ease,color .14s ease}
.pg-viewseg button:hover{color:var(--accent,#8a6d3b)}
.pg-viewseg button.on{background:var(--accent,#8a6d3b);color:#fff}
.pg-viewseg .pg-vfacs{border-left:1px solid var(--border,rgba(0,0,0,.14))}
.pg-viewseg .pg-vfacs.on{background:var(--fg,#2d2927)}
@media (max-width:700px){
  .pg-viewseg button{padding:.45rem .55rem;font-size:.7rem}
}
@media print{.pg-viewseg,.ct-filter{display:none}}
/* R57b: the switch lives in the masthead (visible in EVERY view) and absorbs the old
   Facsimile button on wide screens; phones keep the compact button + thumb bar. */
.pg-mast .pg-viewseg{margin:0 .35rem 0 0}
@media (min-width:701px){.pg-mast.has-viewseg #facsBtn{display:none}}
@media (max-width:700px){.pg-mast .pg-viewseg{display:none}}

/* ══ R59 PAGED FLOW — the reader as a bound book: one printed opening at a time ══ */
html.g-paged #editionBody [data-opn]:not(.opn-on){display:none!important}
html.g-paged .pv-page:not(.opn-on){display:none!important}
html.g-paged .en-page:not(.opn-on){display:none!important}
html.g-paged .foliomark,html.g-paged .cont-card{display:none!important}
/* the English pane stops being its own scroll well — the page is short by construction */
html.g-paged .en-col{position:static!important;max-height:none!important;overflow:visible!important}
/* room for the fixed pager under the text */
html.g-paged .pg-room1{padding-bottom:4.2rem}
/* page-turn bar — quiet, centered, above everything */
.pg-pgrbar{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);display:flex;align-items:stretch;
  background:var(--card,#fff);border:1px solid var(--border,rgba(0,0,0,.18));border-radius:999px;
  box-shadow:0 4px 18px rgba(0,0,0,.14);padding:2px;z-index:70}
html:not(.g-paged) .pg-pgrbar{display:none}
.pg-pgrbar .pg-pgrb{border:0;background:none;cursor:pointer;color:var(--fg,#2d2927);
  font:600 1.15rem/1 var(--font-ui,system-ui);padding:.42rem .85rem;border-radius:999px;
  transition:background .14s ease,color .14s ease}
.pg-pgrbar .pg-pgrb:hover:not(:disabled){background:var(--accent,#8a6d3b);color:#fff}
.pg-pgrbar .pg-pgrb:disabled{opacity:.28;cursor:default}
.pg-pgrbar .pg-pgrlab{border:0;background:none;cursor:pointer;color:var(--muted,#6b6660);
  font:600 .74rem/1 var(--font-ui,system-ui);padding:.42rem .6rem;min-width:9.5em;white-space:nowrap}
.pg-pgrbar .pg-pgrlab:hover{color:var(--accent,#8a6d3b)}
.pg-pgrbar .pg-pgrlab input{width:6.5em;border:1px solid var(--border,rgba(0,0,0,.2));border-radius:6px;
  font:inherit;padding:.12rem .3rem;background:var(--bg,#fff);color:var(--fg,#2d2927)}
/* phones: ride above the thumb bar */
html.g-mobile .pg-pgrbar{bottom:64px}
@media print{.pg-pgrbar{display:none}
  html.g-paged #editionBody [data-opn]:not(.opn-on),html.g-paged .pv-page:not(.opn-on),
  html.g-paged .en-page:not(.opn-on){display:block!important}}
/* the Edition chip in the view switch — provenance-toned, separated like Facsimile */
.pg-viewseg .pg-vedn{border-left:1px solid var(--border,rgba(0,0,0,.14))}
.pg-viewseg .pg-vedn.on{background:var(--fg,#2d2927)}
/* ── R68: the CONTENTS DRAWER speaks the same language as the sidebar ─────────
   The baked page carries an older card-per-row drawer style (borders, ordinals,
   link-teal titles). This block, loading after it, retires that era: flat list,
   one anatomy, washes not cards. */
#ctPanel a.ct-item{display:flex!important;align-items:flex-start;gap:.55rem;
  border:0!important;box-shadow:none!important;background:transparent;
  border-radius:8px;margin:.06rem .4rem;padding:.5rem .6rem;color:var(--fg)!important;
  transition:background .14s var(--ease)}
#ctPanel a.ct-item::before{content:none!important}
#ctPanel .ct-item .ct-lab{display:block;flex:1 1 auto;min-width:0}
#ctPanel .ct-item .ct-col{flex:0 0 auto;margin-left:auto;border:0;padding:.22rem 0 0;
  background:none;font:450 .74rem/1 var(--font-ui);
  color:color-mix(in srgb,var(--muted) 82%,transparent);font-variant-numeric:tabular-nums}
#ctPanel a.ct-item:hover{background:var(--hl)}
#ctPanel a.ct-item.ct-cur{background:var(--hl);box-shadow:inset 2px 0 0 var(--accent)!important}
#ctPanel a.ct-item.ct-cur .ct-t{font-weight:600}
#ctPanel a.ct-item.ct-cur .ct-col{color:var(--accent)}

/* R59 taste: the sidebar reads like a book's contents, not a database dump —
   glosses cap at two lines, long titles at three; the col chip stays quiet. */
.ct-item .ct-gr{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ct-item .ct-lab{overflow-wrap:break-word}
.ct-grp-vol .ct-item .ct-lab,.ct-grp-auth .ct-item .ct-lab{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.ct-grp-work .ct-item{padding-top:.28rem;padding-bottom:.28rem}
.ct-grp-work .ct-work .ct-gr{margin-top:.05rem}

/* ── R63: Cleaned Source (vtx) lane ─────────────────────────────────────────
   html.g-vtx swaps the printed lane: scholarios OCR lanes out, the type-true
   vision transcription in. Sections are .pv-page so the opening tracker,
   ledger nav, paged mode, and EN row-sync all work unchanged. */
#vtxBody{display:none}
html.g-vtx #vtxBody{display:block}
html.g-vtx #editionBody,html.g-vtx #pageView{display:none!important}
html.g-vtx .modeseg{display:none!important}   /* Raw/Greek/Latin/Pageview belong to the OCR arm */
html.g-vtx .edition-prov,html.g-vtx .edition-back{display:none!important}   /* clean-lane chrome */
html.g-vtx .ocr-head{display:none!important}   /* the machine-OCR strip belongs to the OCR arm, not the cleaned source */
.vtx-prov{font:600 .72rem/1.5 var(--font-ui,system-ui);color:var(--muted,#7a736c);
  letter-spacing:.02em;margin:.2rem 0 .1rem;display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.vtx-prov a{color:var(--accent,#8a6d3b);text-decoration:none}
.vtx-prov a:hover{text-decoration:underline}
.vtx-badge{display:inline-block;font:700 .62rem/1 var(--font-ui,system-ui);letter-spacing:.04em;
  padding:.22rem .45rem;border-radius:3px;border:1px solid var(--accent,#8a6d3b);
  color:var(--accent,#8a6d3b);white-space:nowrap}
.vtx-note{font:italic .78rem/1.55 var(--font-serif,Georgia,serif);color:var(--muted,#7a736c);
  margin:0 0 1.1rem;max-width:64ch}
.vtx-page{padding:0 0 1.4rem;margin:0 0 1.2rem;border-bottom:1px solid var(--border,rgba(0,0,0,.08))}
/* R69: work seams in the volume-wide flow — a book's part-title page in miniature:
   generous air, a centered hairline, the English lead with the printed title beneath */
.vtx-work,.en-col h3.en-work{margin:3.2rem 0 1.6rem;padding-top:2.1rem;position:relative;
  font:600 1.05rem/1.4 var(--font-display,var(--font-greek,serif));color:var(--fg);
  text-wrap:balance;letter-spacing:.01em}
.vtx-work::before,.en-col h3.en-work::before{content:'';position:absolute;top:0;left:0;
  width:3.5rem;height:1px;background:color-mix(in srgb,var(--border) 88%,transparent)}
.vtx-work .vtx-work-la{display:block;margin-top:.25rem;font:italic 400 .8rem/1.45 var(--font-greek,serif);
  color:var(--muted)}
@media print{.vtx-work,.en-col h3.en-work{page-break-before:always;margin-top:0}}
.vtx-colhead{font:600 .72rem/1 var(--font-ui,system-ui);color:var(--muted,#7a736c);margin:0 0 .7rem}
.vtx-colhead a{color:inherit;text-decoration:none}
.vtx-colhead a:hover{color:var(--accent,#8a6d3b)}
.vtx-col{font-size:var(--read-fs,20px);line-height:1.72;-webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility}
.vtx-col+.vtx-col{margin-top:1.1rem;padding-top:1.1rem;border-top:1px dashed var(--border,rgba(0,0,0,.08))}
.vtx-col p{margin:0 0 .85em}
.vtx-col p:last-child{margin-bottom:0}
.vtx-front{font-size:calc(var(--read-fs,20px)*.92)}
.vtx-notes{margin:.9rem 0 0;font-size:.82em;color:var(--muted-2,#5d5750)}
.vtx-notes summary{cursor:pointer;font:600 .72rem/1 var(--font-ui,system-ui);color:var(--muted,#7a736c)}
.vtx-notes summary:hover{color:var(--accent,#8a6d3b)}
.vtx-notes p{margin:.5em 0 0}
@media print{.vtx-prov,.vtx-note{display:none}}

/* ── R64: elevated transcription typography + upgraded sidebar ── */
.vtx-grc{font-family:var(--font-greek,'GFS Didot',Georgia,serif)}
.vtx-la{font-family:var(--font-body,'Source Serif Pro',Palatino,Georgia,serif)}
.vtx-title{text-align:center;font-family:var(--font-body,serif);font-weight:600;
  font-size:.82em;letter-spacing:.06em;margin:.2rem 0 1rem;color:var(--fg,#2d2927)}
.vtx-marg{float:left;clear:left;width:1.3rem;margin-left:-1.9rem;text-align:right;
  font:700 .68rem/1.9 var(--font-ui,system-ui);color:var(--accent,#8a6d3b);opacity:.75;
  user-select:none}
@media (max-width:900px){.vtx-marg{float:none;display:inline-block;width:auto;margin:0 .4rem 0 0}}
.vtx-ill{color:var(--muted,#7a736c);opacity:.8}
.vtx-fn{margin:.4em 0 0;text-indent:-1.1em;padding-left:1.1em}
.vtx-fn:first-child{margin-top:.5em}
.pg-facsrow{display:flex;align-items:baseline;gap:.5rem;padding:.34rem .5rem;margin-top:.2rem;
  border-top:1px solid var(--border,rgba(0,0,0,.08));cursor:pointer;font-size:.82rem;
  color:var(--fg,#2d2927)}
.pg-facsrow input{margin:0;accent-color:var(--accent,#8a6d3b);flex:0 0 auto;position:relative;top:.12rem}
.pg-facsrow:hover .pgr-lab{color:var(--accent,#8a6d3b)}

/* ── R64 QA round: findings from the live walkthrough fleet ── */
/* masthead title never bleeds into the reading column (Martyrdom of St Clement, 3-line wrap) */
.pg-mast .pg-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;max-height:2.9em}
/* long unbroken heading run-ins must wrap inside their pane (PG125 OCR sub-column overflow) */
.room1-grid>*{min-width:0}
#editionBody .la,#editionBody .tx,.pv-page,.vtx-col{overflow-wrap:break-word}
/* Greek-focus: the sidebar's Greek radio hides the Latin blocks of bilingual printed pages */
html.g-vtxgrc .vtx-col.vtx-la{display:none}
html.g-vtxgrc .vtx-langtag{display:none}
.vtx-chip{font:600 .62rem/1 var(--font-ui,system-ui);letter-spacing:.03em;padding:.22rem .5rem;
  border-radius:3px;border:1px solid var(--border,rgba(0,0,0,.2));background:none;
  color:var(--muted,#7a736c);cursor:pointer}
.vtx-chip[aria-pressed="true"]{border-color:var(--accent,#8a6d3b);color:var(--accent,#8a6d3b)}
.vtx-chip:hover{color:var(--accent,#8a6d3b)}
.vtx-langtag{float:right;font:600 .6rem/1.4 var(--font-ui,system-ui);letter-spacing:.05em;
  color:var(--muted,#7a736c);opacity:.6;margin-left:.6rem;user-select:none}
.vtx-col.vtx-la{font-size:.96em;color:var(--muted-2,#4c4742)}
@media (max-width:520px){
  /* the Sign in control pushed the page sideways (container, not just the button) */
  .pg-mast .pg-auth-btn{font-size:.68rem;padding:.3rem .4rem;max-width:3.6rem;overflow:hidden;
    text-overflow:ellipsis;white-space:nowrap}
  .pg-mast .pg-auth{flex:0 0 auto;max-width:4rem;min-width:0;overflow:hidden}
  .pg-mast{overflow-x:clip}
  /* Contents drawer: the running counter stamped onto chapter titles */
  a.ct-item{padding-left:2.4rem!important;position:relative}
}
/* mobile Both+source: at phone width the lanes stack — the source column replaces the
   single reading column (side-by-side at 390px is unreadable; '+ Greek' must GIVE Greek) */
@media (max-width:700px){
  html.g-vtx.g-view-both .en-col{display:none}
  /* R84f: at phone width Both renders as Greek (the rule above) — offering the pill
     is a fake third option; the menu says what the phone can actually do. A saved
     'both' preference still boots fine (it reads as the Greek lane). */
  #pgViewSeg button[data-v="both"]{display:none}
  #txtRadios label:has(input[value="both"]){display:none}
  /* R84c: 100vw here let the lane size itself to the VIEWPORT while its flex row is
     narrower — every g-vtx boot at phone width scrolled sideways ~24px. 100% is
     container-true; the columns themselves get the same cap. */
  html.g-vtx .main,html.g-vtx #vtxBody{max-width:100%;min-width:0}
  .ocr-col,.en-col{max-width:100%}
  #vtxBody{overflow-wrap:break-word}
  .vtx-col{font-size:calc(var(--read-fs,20px)*.92)}
}
/* Latin-only printed pages stay visible under the Greek-only filter (never a blank pane) */
html.g-vtxgrc .vtx-page.vtx-only-la .vtx-col.vtx-la{display:block}
html.g-vtxgrc .vtx-page.vtx-only-la .vtx-langtag{display:inline}

/* ── R65 design pass: the quiet-magic layer (reader) ── */
:root{--ease:cubic-bezier(.32,.72,0,1);--spring-pop:cubic-bezier(.34,1.35,.64,1);--ink-soft:#443e38;--shadow-ink:45,41,39}
.pg-progress{position:fixed;top:0;left:0;right:0;height:2px;background:var(--accent,#8a6d3b);
  transform-origin:0 50%;transform:scaleX(0);z-index:200;pointer-events:none;
  transition:transform .12s linear;opacity:.85}
.pg-mast{transition:transform .34s var(--ease),opacity .28s var(--ease)}
html.g-quiet{--mast-h:0px}
html.g-quiet .pg-mast{transform:translateY(-102%);opacity:0;pointer-events:none}
.ocr-head,.en-head,.edition-back,.pg-side{transition:top .34s var(--ease)}
/* a page turn breathes in rather than popping */
html.g-paged .pv-page.opn-on,html.g-paged .en-page.opn-on{animation:pgOpnIn .3s var(--ease) both}
@keyframes pgOpnIn{from{opacity:.001;transform:translateY(6px)}to{opacity:1;transform:none}}
/* the facsimile page-turn cross-fade (JS adds .is-in on load) */
#facsImg.facs-fade{opacity:0;transition:opacity .28s var(--ease)}
#facsImg.facs-fade.is-in{opacity:1}
/* the facsimile pane arrives, it doesn't pop */
@supports (transition-behavior:allow-discrete){
  .facs{transition:transform .38s var(--ease),opacity .38s var(--ease),display .38s allow-discrete}
  @starting-style{.with-facs .facs{transform:translateX(28px);opacity:0}}
  #vtxBody,#editionBody{transition:opacity .2s var(--ease),display .2s allow-discrete}
  @starting-style{html.g-vtx #vtxBody{opacity:0} #editionBody{opacity:0}}
}
/* panes keep their own momentum — no scroll chaining out of rails and sidebars */
.pg-side,#enCol,.facs{overscroll-behavior:contain}
/* interactive surfaces answer the hand */
.pg-viewseg button,.pg-thumb-b,.pg-radio,.pg-facsrow,.vtx-chip,.modeseg button{
  transition:background-color .14s var(--ease),color .14s var(--ease),border-color .14s var(--ease)}
.pg-thumb-b.on .pg-thumb-ic{transform:translateY(-1px)}
.pg-thumb-ic{transition:transform .2s var(--ease)}
/* apparatus opens softly where the platform allows */
.vtx-notes::details-content{transition:height .24s var(--ease),content-visibility .24s allow-discrete;
  interpolate-size:allow-keywords}
@media (prefers-reduced-motion:reduce){
  .pg-progress{transition:none}
  .pg-mast,.ocr-head,.en-head,.edition-back,.pg-side,.facs,#vtxBody,#editionBody,
  .pg-viewseg button,.pg-thumb-b,.pg-thumb-ic{transition:none}
  html.g-paged .pv-page.opn-on,html.g-paged .en-page.opn-on{animation:none}
  #facsImg.facs-fade{opacity:1;transition:none}
}

/* reflow stays local to each opening — scrolling never pays for a distant layout */
.vtx-page,.pv-page,.en-page{contain:layout}
/* the English provenance shrinks to a chip — the detail lives in its tooltip */
.en-prov-chip{display:inline-block;font:600 .62rem/1 var(--font-ui,system-ui);letter-spacing:.04em;
  padding:.22rem .45rem;border-radius:3px;border:1px solid var(--border,rgba(0,0,0,.18));
  color:var(--muted,#7a736c);cursor:help}

/* ── R65g ride fixes ── */
/* facsimile swaps never re-layout the pane (worst single CLS 0.19 traced to img load) */
#facsImg{width:100%;aspect-ratio:159/252;object-fit:contain;height:auto}
/* TOC jumps land at ONE consistent offset under the masthead */
.pv-page[data-pcol],.en-page[data-pcol],.blk[data-col],.vtx-page{scroll-margin-top:calc(var(--mast-h,48px) + 10px)}
/* pure-English immersion: a reading measure, not a wall (facs off, EN view) */
html.g-view-en .app:not(.with-facs) .en-col{max-width:74ch;margin-left:auto;margin-right:auto}
/* windowed lane: a shell holds an opening's PLACE (anchor + estimated height) until the reader nears */
.vtx-page.vtx-shell{min-height:var(--vtx-shell-h,1100px)}
.vtx-page.vtx-shell .vtx-colhead{opacity:.45}

/* ── reading-feel pass (make-interfaces-feel-better) ─────────────────────────
   the details that compound: crisp text, numbers that never shift the chrome,
   prose that wraps like a book, content that whispers in as you approach,
   controls that answer the hand. */

/* crisp text on macOS — the reading surface above all */
.pg-read, .main, .en-col, #vtxBody { -webkit-font-smoothing: antialiased; }

/* position chip, pager counts, col labels: layout must never breathe as numbers tick */
#pgOpening, .pg-floatcol, .pg-pgrbar, .facs-meta, .vtx-colhead, .en-colhead {
  font-variant-numeric: tabular-nums;
}

/* prose wraps like a book: no orphans in the reading lanes, balanced headings */
.en-page p, .vtx-col p, .blk p { text-wrap: pretty; }
.en-work, .pg-read h1, .ans-h { text-wrap: balance; }

/* the facsimile carries a whisper of an edge — depth without dirt */
#facsImg { outline: 1px solid rgba(0, 0, 0, .1); outline-offset: -1px; }
[data-theme="dark"] #facsImg { outline-color: rgba(255, 255, 255, .1); }

/* controls answer the hand: 0.96 press, specific properties only */
.pg-pgrb, .vtx-chip, .pg-vfacs, .pg-vedn, .pg-viewseg button, .thumb-bar button, .pg-floatcol {
  transition-property: transform, background-color, color, opacity;
  transition-duration: .14s;
}
.pg-pgrb:active, .vtx-chip:active, .pg-viewseg button:active, .thumb-bar button:active, .pg-floatcol:active {
  transform: scale(.96);
}

/* small controls, honest hit areas (≥40px) without visual bloat */
.pg-pgrb, .vtx-chip { position: relative; }
.pg-pgrb::after, .vtx-chip::after {
  content: ""; position: absolute; inset: -8px;
}

/* hydrated openings whisper in — only when arriving DURING reading, never at boot */
@media (prefers-reduced-motion: no-preference) {
  .vtx-page.vtx-fresh > * {
    animation: vtxIn .38s var(--ease, cubic-bezier(.2, 0, 0, 1)) both;
  }
  @keyframes vtxIn {
    from { opacity: 0; filter: blur(4px); }
    to   { opacity: 1; filter: blur(0); }
  }
}

/* the scrollbar never reflows the page when it appears */
html { scrollbar-gutter: stable; }

/* ── feel pass wave 1 ── */
/* facsimile close: the text column GLIDES into the freed width */
.pg-room1, .main { transition: margin-right .22s var(--ease, ease); }
/* the position chip never pushes its neighbors as numbers change */
#pgOpening { display: inline-block; min-width: 13ch; }
/* theme switches crossfade instead of cutting */
body, .pg-mast, .pg-side, .facs, .en-col, .pg-read, #vtxBody {
  transition-property: background-color, color, border-color;
  transition-duration: .18s;
}
/* the masthead's height collapse rides the same curve as its tuck */
.pg-mast { transition: transform .34s var(--ease), opacity .28s var(--ease), height .3s var(--ease), background-color .18s; }
/* while the masthead is away, the floating position chip stands in — always */
html.g-quiet .pg-floatcol { display: inline-flex !important; }
/* mobile: the thumb bar respects the home indicator */
.pg-thumb { padding-bottom: max(6px, env(safe-area-inset-bottom)); }
/* mobile masthead: nothing clips at the right edge */
@media (max-width: 430px) {
  .pg-mast { gap: .3rem; }
  .pg-mast .pg-title { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
  .pg-auth button, .pg-auth .pg-signin { padding: .25rem .5rem; font-size: .72rem; }
}
/* EN shells reserve reading room until hydrated; rowSync must not collapse them */
.en-page.en-shell2 { min-height: var(--vtx-shell-h, 1100px); }
.en-page.en-shell2 .en-colhead { opacity: .45; }

/* ── lay-reader pass (R67 shell wave) ── */
/* Migne's marginal letters are quiet apparatus, never mistaken for typos or links */
.mgn-letter, sup.mgn, .blk sup, .en-page sup { color: var(--muted, #8a8378); font-size: .62em; font-weight: 600; opacity: .55; }
/* masthead title: word-boundary fade, never a hard mid-word clip */
.pg-mast .pg-title { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* the floating place pill never covers the last line of text */
.pg-floatcol { bottom: max(14px, env(safe-area-inset-bottom)); opacity: .92; }
html.g-quiet .pg-floatcol { opacity: .92; }

/* ═══ CALM-LUXE LAYER (R67 design pass: softer contrast · whitespace · springs) ═══ */

/* 1 · SOFTER INK — reading prose settles a step below heading weight; headings keep --fg */
.en-page p, .vtx-col p, .blk p, .tx { color: var(--ink-soft, #443e38); }
[data-theme="dark"] .en-page p, [data-theme="dark"] .vtx-col p,
[data-theme="dark"] .blk p, [data-theme="dark"] .tx { color: #d6d0c6; }
/* hairlines whisper instead of drawing */
.pg-side, .ct-panel, .facs, .vtx-notes, .en-colhead, .vtx-colhead {
  border-color: color-mix(in srgb, var(--border, #d9c6a7) 62%, transparent);
}

/* 2 · BREATH — openings get air between them; the page reads like leaves, not a wall */
.pv-page, .en-page, .vtx-page { margin-bottom: 2.75rem; }
.en-colhead, .vtx-colhead { margin-bottom: 1.1rem; }
.pg-side { row-gap: 1.4rem; }
@media (min-width: 1100px) {
  .main { padding-top: 2.2rem; }
  .en-col { padding-top: 2.2rem; }
}

/* 3 · TYPE POLISH — optical kerning on, display tracks tighter, numerals already tabular */
.pg-read, .main, .en-col, #vtxBody, .pg-mast {
  font-kerning: normal; font-feature-settings: "kern" 1, "liga" 1;
}
.pg-mast .pg-title, .en-work, .pg-read h1 { letter-spacing: -0.012em; }
.en-colhead a, .vtx-colhead a { letter-spacing: 0.04em; font-size: .68rem; opacity: .75; }

/* 4 · THE FACSIMILE TRAY (double-bezel: the scan is a plate in a machined tray) */
.facs .facs-body, .facs > div:has(> #facsImg) { padding: 10px; }
#facsImg {
  border-radius: 10px;
  outline: 1px solid rgba(0, 0, 0, .08); outline-offset: -1px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .35),
    0 1px 2px rgba(var(--shadow-ink, 45, 41, 39), .05),
    0 10px 30px rgba(var(--shadow-ink, 45, 41, 39), .07);
}
[data-theme="dark"] #facsImg {
  outline-color: rgba(255, 255, 255, .09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 30px rgba(0, 0, 0, .35);
}

/* 5 · DIFFUSED AMBIENT SHADOWS — every floating surface sits in soft air, never hard-cut */
.pg-floatcol, .pg-pgrbar, #selPopup, .pg-more-menu, .nb-panel, .rr-panel, .ct-panel {
  box-shadow:
    0 1px 2px rgba(var(--shadow-ink, 45, 41, 39), .05),
    0 8px 24px rgba(var(--shadow-ink, 45, 41, 39), .07),
    0 24px 64px rgba(var(--shadow-ink, 45, 41, 39), .06);
}
[data-theme="dark"] .pg-floatcol, [data-theme="dark"] .pg-pgrbar, [data-theme="dark"] #selPopup,
[data-theme="dark"] .pg-more-menu, [data-theme="dark"] .nb-panel, [data-theme="dark"] .rr-panel {
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 36px rgba(0, 0, 0, .5);
}

/* 6 · SPRING CONTROLS — small elements answer with a live overshoot, panels glide with mass */
.vtx-chip, .pg-pgrb, .pg-viewseg button, .thumb-bar button, .pg-floatcol, .pgr-lab {
  transition-property: transform, background-color, color, opacity, box-shadow;
  transition-duration: .32s;
  transition-timing-function: var(--spring-pop);
}
.nb-panel, .rr-panel, .ct-panel {
  transition-timing-function: var(--ease) !important;
  transition-duration: .5s !important;
}
/* hover lift: quiet, physical */
.vtx-chip:hover, .pg-pgrb:hover, .pg-viewseg button:hover { transform: translateY(-1px); }
.vtx-chip:active, .pg-pgrb:active, .pg-viewseg button:active { transform: translateY(0) scale(.97); }
@media (prefers-reduced-motion: reduce) {
  .vtx-chip, .pg-pgrb, .pg-viewseg button, .thumb-bar button, .pg-floatcol,
  .nb-panel, .rr-panel, .ct-panel { transition-duration: .01s !important; }
  .vtx-chip:hover, .pg-pgrb:hover, .pg-viewseg button:hover { transform: none; }
}

/* 7 · QUIET CHROME REFINEMENT — the masthead floats on a soft veil, not a hard line */
.pg-mast {
  border-bottom: 1px solid color-mix(in srgb, var(--border, #d9c6a7) 45%, transparent);
  box-shadow: 0 1px 12px rgba(var(--shadow-ink, 45, 41, 39), .04);
}

/* ── R72: ONE provenance chip + Source & apparatus panel ──────────────────────
   Legacy .src-badge stays in the DOM (laneBadge + Edition-radio honesty check
   read it) but the chip is the one visible provenance. */
.src-badge{display:none !important}
.src-chip{display:inline-flex;align-items:center;gap:.4rem;margin:.2rem 0 .4rem;padding:.24rem .66rem;
  border-radius:9999px;border:1px solid var(--border,#ded5c4);background:none;color:var(--muted,#8a7f70);
  font:600 .68rem/1 var(--font-ui,-apple-system,system-ui,sans-serif);letter-spacing:.05em;cursor:pointer;
  text-transform:uppercase;transition:color .15s,border-color .15s;white-space:nowrap}
.src-chip::before{content:'';width:.45em;height:.45em;border-radius:50%;background:currentColor;opacity:.65;flex:none}
.src-chip:hover,.src-chip[aria-expanded="true"]{color:var(--fg,#2d2927);border-color:var(--accent,#8a6d3b)}
.src-chip:active{transform:scale(.97)}
.src-chip-tlg{color:#3c6e47}
.src-chip-vision{color:var(--accent,#8a6d3b)}
.src-chip-ocr{color:#a5652a;border-color:color-mix(in srgb,#a5652a 45%,transparent)}
#srcPanel{position:fixed;z-index:660;min-width:268px;max-width:min(92vw,344px);padding:.35rem;
  border:1px solid var(--border,#ded5c4);border-radius:12px;background:var(--card,#fff);
  box-shadow:0 2px 6px rgba(60,45,15,.06),0 14px 36px rgba(60,45,15,.16)}
@media(prefers-reduced-motion:no-preference){
  @keyframes srcp-pop{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}
  #srcPanel:not([hidden]){animation:srcp-pop .15s cubic-bezier(.16,1,.3,1)}}
.srcp-head{font:600 .64rem/1 var(--font-ui,system-ui);letter-spacing:.14em;text-transform:uppercase;
  color:var(--muted,#8a7f70);padding:.5rem .65rem .35rem}
.srcp-row{display:block;width:100%;text-align:left;border:0;background:none;border-radius:8px;
  padding:.45rem .65rem;cursor:pointer;color:var(--fg,#2d2927);font:.84rem/1.35 var(--font-ui,system-ui)}
.srcp-row:hover{background:var(--accent-tint,rgba(138,109,59,.08))}
.srcp-row.cur{background:var(--accent-tint,rgba(138,109,59,.13))}
.srcp-row .srcp-lab{display:block;font-weight:600}
.srcp-row .srcp-note{display:block;font-size:.74rem;color:var(--muted,#8a7f70);text-wrap:pretty}
.srcp-prov{padding:.5rem .65rem .4rem;border-top:1px solid var(--border,#ded5c4);margin-top:.3rem;
  font:.7rem/1.5 var(--font-ui,system-ui);color:var(--muted,#8a7f70);text-wrap:pretty}
@media print{.src-chip,#srcPanel{display:none !important}}

/* R76: notebook count badge on the mobile thumb bar */
.pg-thumb-badge{position:absolute;top:-4px;right:-10px;min-width:14px;height:14px;border-radius:7px;
  background:var(--accent,#8a6d3b);color:#fff;font:600 9px/14px var(--font-ui,system-ui);
  padding:0 3px;text-align:center}
.pg-thumb-badge:empty{display:none}
.pg-thumb-ic{position:relative}

/* R78 (impeccable, product register): the notebook counter is a passive tally, not a
   primary action — accent FILL belongs to actions; the counter reads quiet and earns
   its color only on hover */
.nb-toggle{background:none !important;color:var(--accent,oklch(.51 .085 195)) !important;
  border:1px solid color-mix(in oklch,var(--accent,oklch(.51 .085 195)) 42%,transparent) !important;
  border-radius:9999px !important}
.nb-toggle:hover{background:color-mix(in oklch,var(--accent,oklch(.51 .085 195)) 12%,transparent) !important}

/* R80 (user: reader spacing + button placement) — ONE compact control row above the text:
   the provenance chip leads the lane's own row; vertical rhythm tightened */
.vtx-prov{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;margin:.15rem 0 .55rem}
.vtx-prov .src-chip{margin:0}
#srcChip{margin:.15rem 0 .35rem}
.display-controls{row-gap:.25rem}

/* ── R81: facs-open lane crush (user screenshot: text lanes squeezed to letter-slivers
   beside a wide facsimile panel). Below ~560px of reading room in Both view, the printed
   page IS the original text — keep the English lane beside the scan and stand the Greek
   lane down. pgreader.js toggles html.g-facs-crush from real measured widths. */
html.g-facs-crush.g-view-both .room1-grid{grid-template-columns:1fr!important}
html.g-facs-crush.g-view-both .ocr-col,html.g-facs-crush.g-view-both .splitter{display:none!important}

/* ── R82: short opening leveled against a long facing page — the tailpiece asterism says
   "this page ends here"; the leveled remainder below it is margin, not a hole. */
.pv-page.pg-runt::after,.en-page.pg-runt::after{
  content:'\2042';display:block;text-align:center;color:var(--muted,#6f6a64);opacity:.4;
  font-size:.95rem;letter-spacing:.35em;text-indent:.35em;margin-top:2.6rem}

/* ── R83 (audit round) ── */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* facs pager arrows: comfortable pointer targets (were 22px wide) */
.facs-nav button{min-width:30px;min-height:32px;padding:0 .35rem}
/* unhydrated lane shells: let the compositor skip their paint entirely — their taught
   estimated heights double as the intrinsic size, so scroll geometry is unchanged */
/* R86: the estimate IS the scroll geometry, so a wrong one is a wrong scrollbar. 4200px
   was 43% over a real English opening (measured median 2,929px across a hydrated work),
   which left the English pane 1.25 MILLION px too tall — every hydration collapsed a page
   by ~1,300px and dragged the pane out from under the Greek. pgreader.js now measures
   hydrated pages and keeps these vars honest; the literals are only the cold-start guess. */
.en-shell2{content-visibility:auto;contain-intrinsic-size:auto var(--en-shell-est,2900px)}
.vtx-shell{content-visibility:auto;contain-intrinsic-size:auto var(--vtx-shell-est,4200px)}
/* the English pane is its OWN scroller, so the grid-wide anchor lock below leaves it with
   no anchor at all — give it one, or a shell resolving above the fold shifts what you read */
.en-col .en-page{overflow-anchor:auto}

/* ── R84 (design critique: the arrival + the reading surface) ── */
/* NATIVE anchor lock: the reading line is the ONLY scroll anchor in the grid.
   Timer pins lose to renderer freezes; the browser's scroll anchoring doesn't. */
.room1-grid *{overflow-anchor:none}
.pg-scroll-anchor{overflow-anchor:auto}
/* the veil names its destination instead of showing a blank page */
.pg-conv{display:none}
html.pg-settling .pg-conv{display:block;position:fixed;left:50%;top:44%;transform:translate(-50%,-50%);
  font-variant-caps:small-caps;letter-spacing:.08em;font-size:1.02rem;color:var(--muted,#6f6a64);
  z-index:5;pointer-events:none}
/* 1857 front matter (all-caps in the printing) reads as apparatus, not as the work */
.en-page.en-fm{font-size:.85em;line-height:1.55;color:color-mix(in srgb,var(--fg,#1f1b16) 78%,var(--bg,#faf7f2))}
.en-fm-tag{font-variant-caps:small-caps;letter-spacing:.05em;font-size:.8rem;color:var(--muted,#6f6a64);margin:.1rem 0 .5rem}
/* spliced critical-edition openings wear their provenance */
.vtx-edtag{font-size:.66rem;letter-spacing:.07em;text-transform:uppercase;color:var(--muted,#6f6a64);
  border:1px solid color-mix(in srgb,var(--muted,#6f6a64) 35%,transparent);border-radius:3px;
  padding:.05rem .3rem;vertical-align:.1em}
/* an opening with no typed text says so, in the tailpiece's voice */
.vtx-hole{color:var(--muted,#6f6a64);font-style:italic;font-size:.92em;margin:.6rem 0 1rem}
.vtx-hole a{color:inherit;text-decoration:underline;text-underline-offset:2px}
/* solo-English measure ran 85–95ch — cap at book width */
html.g-view-en .en-page,html.g-view-en .en-work,html.g-view-en .en-note{max-width:72ch;margin-inline:auto}

/* ── R84k (owner: "ESV — seamless scrolling, easy reading") ── */
/* FOCUS READING: the rail steps aside, the text river centers. z toggles. */
@media (min-width:1101px){
  html.g-focus .pg-side{display:none}
  html.g-focus .room1-grid{margin-inline:auto}
}
/* colheads are wayfinding, not reading matter: they whisper until sought */
.vtx-colhead,.en-colhead{opacity:.5;transition:opacity .15s ease-out}
.pv-page:hover .vtx-colhead,.en-page:hover .en-colhead,
.vtx-colhead:focus-within,.en-colhead:focus-within{opacity:1}
.en-colhead a{border-bottom:0}
@media (prefers-reduced-motion:reduce){.vtx-colhead,.en-colhead{transition:none}}

/* ── R84m: passage picker + citation toast + print completion ── */
.pg-title-btn{cursor:pointer;border-radius:6px}
.pg-title-btn:hover,.pg-title-btn:focus-visible{background:color-mix(in oklab,var(--masthead-ink,#333) 10%,transparent)}
.pg-pick-ov{position:fixed;inset:0;background:color-mix(in srgb,#000 34%,transparent);z-index:640;display:flex;align-items:flex-start;justify-content:center;padding:7vh 1rem 1rem}
.pg-pick{background:var(--card,#fff);color:var(--fg,#1f1b16);border:1px solid var(--border,#ddd);border-radius:12px;
  width:min(640px,100%);max-height:78vh;display:flex;flex-direction:column;box-shadow:0 18px 50px rgba(0,0,0,.22)}
.pg-pick-head{display:flex;gap:.5rem;padding:.7rem .7rem .4rem}
.pg-pick-q{flex:1;min-height:38px;padding:0 .8rem;border:1px solid var(--border,#ddd);border-radius:8px;background:transparent;color:inherit;font-size:.95rem}
.pg-pick-x{min-width:38px;min-height:38px;border:1px solid var(--border,#ddd);border-radius:8px;background:transparent;color:inherit;cursor:pointer}
.pg-pick-crumb{padding:.1rem 1rem .35rem;font-size:.8rem;color:var(--muted,#6f6a64)}
.pg-pick-crumb button{border:0;background:none;color:var(--accent,#8a6d3b);cursor:pointer;padding:0;font-size:.8rem}
.pg-pick-list{overflow:auto;padding:.25rem .45rem .6rem;overscroll-behavior:contain}
.pg-pick-row{display:flex;justify-content:space-between;gap:1rem;align-items:baseline;padding:.5rem .6rem;border-radius:8px;text-decoration:none;color:inherit}
.pg-pick-row:hover,.pg-pick-row:focus-visible{background:var(--hl,#f3ede2)}
.pg-pick-s{color:var(--muted,#6f6a64);font-size:.78rem;white-space:nowrap}
html.g-mobile .pg-pick-ov{padding:0}
html.g-mobile .pg-pick{width:100%;max-height:100dvh;border-radius:0;border:0}
.pg-toast{position:fixed;left:50%;bottom:12%;transform:translateX(-50%);z-index:700;
  background:var(--card,#fff);color:var(--fg,#1f1b16);border:1px solid var(--border,#ddd);border-radius:9px;
  padding:.5rem .9rem;font-size:.9rem;box-shadow:0 8px 26px rgba(0,0,0,.18)}
@media print{
  .pg-viewseg,.pg-thumb,.nav-strip,.findbar,.pld-findpill,.pld-findbar,.pld-findpanel,
  .rr-tab,.rr-scrim,.pg-progress,.read-progress,.vtx-prov,.en-prov,.pg-conv,.pg-pick-ov,
  .pg-toast,.nb-toggle,.nb-panel,.nb-overlay,.scroll-top,.facs-light,.ask-pill,.pld-selchip{display:none !important}
  .room1-grid{display:block}
  .vtx-colhead,.en-colhead{opacity:1;color:#444}
  .vtx-col,.pv-page,.en-page{max-width:100% !important;color:#000}
}

/* ── R84x (family parity: PL/TFR seamless mobile reading): while the thumb drives
   DOWN the page every piece of chrome melts — thumb bar, edge pills, floating chip —
   and a flick UP (or nearing the top) brings it all back. Machinery scrolls never
   trigger it (the drive detector gates); reduced-motion snaps without sliding. ── */
@media (max-width:880px){
  .pg-thumb{transition:transform .25s ease-out}
  html.g-chromehide .pg-thumb{transform:translateY(112%)}
  html.g-chromehide .nb-toggle,html.g-chromehide .pld-findpill,html.g-chromehide .pg-floatcol,
  html.g-chromehide .scroll-top{opacity:0;pointer-events:none}
  .nb-toggle,.pld-findpill,.pg-floatcol,.scroll-top{transition:opacity .2s ease-out}
}
@media (max-width:880px) and (prefers-reduced-motion:reduce){
  .pg-thumb,.nb-toggle,.pld-findpill,.pg-floatcol,.scroll-top{transition:none}
}

/* ── R86f · DISTILL (owner: "make the reader clean to navigate, uncluttered") ──────────
   PRODUCT.md: "a quiet instrument… dense information is welcome; dense chrome is not" and
   "chrome at the edges". The reader carried the SAME text-lane switch twice — the masthead
   segmented control and a 307px sidebar block of radios with explanatory subtitles — so the
   left rail opened with settings instead of the work's contents. Say it once, in the
   masthead (the family pattern on PL and PO), and give the sidebar back to navigation. */
/* only the three lane radios go — the Facsimile and Continuous-reading checkboxes live in
   this block too and stay visible; hiding a toggle a reader can see is a bigger change than
   removing a duplicate of one. */
#txtRadios .pg-radio:has(input[name="pgside"]){display:none}
.pg-side-sec:has(#txtRadios) .pg-side-h{display:none}
.pg-side-sec:has(#txtRadios){border:0;margin-top:0;padding-top:.2rem}
/* two font-size controls are enough; the slider between A− and A+ said the same thing */
.pg-mast input[type=range]{display:none}
/* Research Chat sits in the right rail already — one door per destination */
.pg-side .pgs-foot-link[href$="ask.html"]{display:none}
/* R87: resolved references inside Migne's own indices — quiet links, reading-first */
a.idxref{color:var(--accent,#8a6d3b);text-decoration:none;border-bottom:1px dotted currentColor}
a.idxref:hover{text-decoration:underline}
