/* The language toggle and the side-by-side view of a lecture page (scripts/build_site.py,
   scripts/site_assets/parallel.js). Colours and fonts come from the reader's theme variables. */
.view-toggle { position: sticky; top: 0; z-index: 20; background: var(--bg);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 0;
  margin: -8px 0 16px; border-bottom: 1px solid var(--border);
  font-family: var(--font-sans); font-size: 0.82rem; }
.view-toggle .view-label { color: var(--text-dim); margin-right: 2px; }
.view-toggle a { padding: 3px 10px; border: 1px solid var(--border); border-radius: 4px;
  color: var(--text-dim); text-decoration: none; line-height: 1.5; }
.view-toggle a:hover { border-color: var(--accent); color: var(--text); }
.view-toggle a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.view-toggle a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.view-toggle .js-only { display: none; }
html.js .view-toggle .js-only { display: inline-block; }
.view-toggle .view-other { color: var(--text-dim); margin-left: 8px; }
.view-toggle .view-other a { border: 0; padding: 0; text-decoration: underline; }

/* Side by side: one row per pairing, German left, English right, the paragraph numbers in the
   outer margins. The rows are grid rows, so a German paragraph opposite two English ones starts
   level with the first of them, and a short cell leaves white space rather than drifting. */
html.pv-on .reading-shell { display: block; }
html.pv-on .reading-rail { display: none; }
.pv { --pv-gutter: 2.6rem; --pv-gap: 2rem; margin-top: 8px; }
.pv-note { font-family: var(--font-sans); font-size: 0.8rem; color: var(--text-dim);
  line-height: 1.5; margin: 0 0 12px; max-width: 60rem; }
.pv-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--pv-gap); padding: 10px var(--pv-gutter); border-top: 1px solid var(--border); }
.pv-row:hover, .pv-row:focus-within { background: var(--surface); }
.pv-head { border-top: 0; padding-bottom: 4px; font-family: var(--font-sans); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
.pv-head:hover { background: none; }
.pv-cell { min-width: 0; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.pv-cell > .pv-p + .pv-p { margin-top: 0.9em; }
.pv-p { position: relative; }
.pv-p > :first-child:not(.pv-n), .pv-p > .pv-n + * , .pv-p > .pv-mark + * { margin-top: 0; }
.pv-p > :last-child { margin-bottom: 0; }
.pv-n { position: absolute; top: 0.3em; width: var(--pv-gutter); font-family: var(--font-sans);
  font-size: 0.7rem; line-height: 1.3; color: var(--text-dim); text-decoration: none;
  font-variant-numeric: tabular-nums; }
.pv-n:hover { color: var(--accent); }
.pv-de .pv-n { left: calc(-1 * var(--pv-gutter) - 4px); text-align: left; }
.pv-en .pv-n { right: calc(-1 * var(--pv-gutter) - 4px); text-align: right; }
.pv-mark { position: absolute; top: 1.7em; right: calc(-1 * var(--pv-gutter) - 4px);
  width: var(--pv-gutter); text-align: right; font-family: var(--font-sans); font-size: 0.64rem;
  line-height: 1.2; color: var(--text-dim); font-style: italic; cursor: help; }
.pv-l .pv-mark { color: var(--accent); }
.pv-none { font-family: var(--font-sans); font-size: 0.72rem; color: var(--text-dim); opacity: 0.6; }
.pv-cols .pv-cell .pv-p + .pv-p { margin-top: 1.1em; }
.pv-cols:hover { background: none; }
.pv-post { font-size: 0.85rem; }
.pv h2, .pv h3 { margin-top: 0; }
@media (max-width: 767px) {
  .pv-row { grid-template-columns: minmax(0, 1fr); row-gap: 10px; padding: 12px 0; }
  .pv-head { display: none; }
  .pv-n, .pv-mark { position: static; display: inline-block; width: auto; margin: 0 8px 4px 0; }
  .pv-de .pv-n::after { content: " German"; }
  .pv-en .pv-n::after { content: " English"; }
  .pv-en { border-top: 1px dashed var(--border); padding-top: 10px; }
}
@media print {
  .view-toggle, .pv-note[role="status"] { display: none; }
  .pv-row { break-inside: auto; }
  .pv-row:hover { background: none; }
}
