/* Printed-matter look: paper, ink, a blue pen and a red pencil. */
:root {
  --bg: #f2ede3;
  --bg-2: #e9e2d4;
  --card: #faf7f0;
  --text: #1d1b17;
  --muted: #6b645a;
  --rule: #cbbfa9;
  --line: #cbbfa9;
  --deep: #faf7f0;
  --blue: #1f3f8f;
  --blue-2: #1f3f8f;
  --sky: #2b3a5c;
  --red: #a33224;
  --gold: #9a7414;
  --green: #3c6e4f;
  --paper: #fbf8f1;
  --paper-ink: #1d1b17;
  --st-igual: #e2d9c6;
  --st-cambia: #1f3f8f;
  --st-nueva: #b8862a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: "American Typewriter", "Courier Prime", "Courier New", Courier, monospace;
  --sans: var(--serif);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
button { font: inherit; color: inherit; }
::selection { background: rgba(31, 63, 143, .18); }

/* ---------- masthead ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: baseline; gap: 28px;
  max-width: 1120px; margin: 0 auto; padding: 18px 24px 10px;
  background: var(--bg);
  border-bottom: 3px double var(--text);
}
.brand {
  font-variant: small-caps; letter-spacing: .08em; font-size: 19px;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--text); }
.nav { display: flex; gap: 20px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); text-decoration: none; font-size: 16px; white-space: nowrap; padding-bottom: 2px; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); border-bottom: 1px solid var(--text); }
.shuffle {
  border: 0; background: none; padding: 0; cursor: pointer; white-space: nowrap;
  font-style: italic; font-size: 16px; color: var(--muted);
}
.shuffle:hover { color: var(--red); }

main { max-width: 1120px; margin: 0 auto; padding: 40px 24px 96px; outline: none; }
.view { animation: fade .35s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.005em; }
h3 { font-size: 21px; margin: 26px 0 8px; }
h2.section { font-size: clamp(34px, 5vw, 50px); line-height: 1.05; margin: 4px 0 10px; }
.lede { color: var(--muted); max-width: 720px; margin: 0 0 28px; font-size: 18px; }
.kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}

/* ---------- title page ---------- */
.title-page { text-align: center; padding: 40px 0 34px; border-bottom: 1px solid var(--text); }
.title-page h1 { font-size: clamp(52px, 10vw, 124px); line-height: .95; margin: 18px 0 14px; }
.title-page .subtitle { font-style: italic; font-size: 22px; margin: 0; color: var(--muted); }
.preface {
  column-count: 2; column-gap: 52px; column-rule: 1px solid var(--rule);
  margin: 34px 0 10px; font-size: 18px; hyphens: auto; text-align: justify;
}
.preface p { margin: 0 0 14px; }
.dropcap::first-letter {
  float: left; font-size: 74px; line-height: .82; padding: 6px 10px 0 0; color: var(--red);
}
.epigraph {
  max-width: 640px; margin: 36px auto 48px; text-align: center;
  font-style: italic; font-size: 21px; line-height: 1.5;
}
.epigraph cite {
  display: block; margin-top: 10px; font-style: normal;
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.rubric {
  font-family: var(--mono); font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  border-top: 1px solid var(--text); padding-top: 10px; margin: 48px 0 18px;
}
.contents { list-style: none; padding: 0; margin: 0; }
.contents a {
  display: flex; align-items: baseline; gap: 10px; padding: 10px 0;
  color: var(--text); text-decoration: none; border-bottom: 1px solid var(--rule);
}
.contents a:hover .ttl { color: var(--red); }
.contents .num { width: 44px; color: var(--red); font-size: 17px; flex: none; }
.contents .ttl { font-size: 24px; flex: none; }
.contents .dots { flex: 1; border-bottom: 1px dotted var(--muted); transform: translateY(-6px); min-width: 20px; }
.contents .desc { color: var(--muted); font-size: 16px; font-style: italic; text-align: right; max-width: 52%; }

/* time machine */
#machine .mgrid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 28px; }

/* ---------- buttons & small parts ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; cursor: pointer;
  border: 1px solid var(--text); background: transparent; color: var(--text);
  text-decoration: none; font-size: 15px; border-radius: 0;
}
.btn:hover { background: var(--text); color: var(--bg); }
.btn.primary { background: var(--text); color: var(--bg); }
.btn.primary:hover { background: var(--red); border-color: var(--red); }
.chip {
  border: 1px solid var(--rule); background: transparent; padding: 4px 10px; font-size: 14px; cursor: pointer; color: var(--muted);
}
.chip.on { color: var(--text); border-color: var(--text); }
.chip .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--rule); padding: 0 4px; color: var(--muted); }
.empty { color: var(--muted); font-style: italic; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 14px; margin: 10px 0 0; align-items: center; }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border: 1px solid var(--rule); }

.card { background: var(--card); border: 1px solid var(--rule); padding: 20px 22px; }

/* index card */
.paper {
  position: relative; color: var(--paper-ink); padding: 18px 22px 18px 52px;
  background:
    linear-gradient(90deg, transparent 38px, rgba(163, 50, 36, .45) 38px, rgba(163, 50, 36, .45) 39px, transparent 39px),
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(31, 63, 143, .13) 27px 28px),
    var(--paper);
  background-position: 0 0, 0 14px, 0 0;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(60, 40, 10, .08), 0 8px 20px rgba(60, 40, 10, .06);
}
.paper .frag { font-size: 18px; line-height: 28px; }
.paper .frag + .frag { margin-top: 0; }

.badge {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  padding: 1px 6px; border: 1px solid currentColor;
}
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.b-oficial { color: var(--green); }
.b-transcripcion-fan { color: var(--blue); }
.b-provisoria { color: var(--gold); }
.b-parcial { color: #6b4c8a; }
.b-inferida { color: var(--red); }

/* diff marks: red pencil strike, highlighter for new words */
del.w { color: var(--red); text-decoration: line-through; text-decoration-color: var(--red); }
ins.w {
  text-decoration: none; color: inherit;
  background: linear-gradient(transparent 52%, rgba(214, 170, 60, .5) 52%, rgba(214, 170, 60, .5) 92%, transparent 92%);
}

/* ---------- timeline ---------- */
.tl-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.tl-scroller {
  overflow-x: auto; overflow-y: hidden; padding: 10px 0 18px; cursor: grab;
  background: var(--card); border-top: 1px solid var(--text); border-bottom: 1px solid var(--text);
}
.tl-scroller.dragging { cursor: grabbing; }
.tl-canvas { position: relative; height: 510px; }
.tl-axis { position: absolute; left: 0; right: 0; top: 300px; height: 1px; background: var(--text); }
.tl-year { position: absolute; top: 310px; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tl-year.major { color: var(--text); font-size: 12px; }
.tl-tick { position: absolute; top: 296px; width: 1px; height: 9px; background: var(--text); }
.tl-era {
  position: absolute; top: 335px; height: 24px; padding: 3px 8px;
  font-size: 12px; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #fff; cursor: default;
}
.tl-bars { position: absolute; left: 0; right: 0; top: 436px; height: 60px; }
.tl-bars-label { position: absolute; left: 10px; top: 436px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.tl-bar { position: absolute; bottom: 0; transform: translateX(-50%); background: var(--sky); opacity: .55; }
.tl-gap {
  position: absolute; top: 40px; height: 250px; display: grid; place-items: center; padding: 10px; text-align: center;
  background: repeating-linear-gradient(45deg, rgba(163, 50, 36, .07) 0 1px, transparent 1px 9px);
  border-left: 1px dashed var(--red); border-right: 1px dashed var(--red);
  font-style: italic; color: var(--red); font-size: 16px;
}
.tl-node {
  position: absolute; transform: translate(-50%, -50%); width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid var(--card); box-shadow: 0 0 0 1px var(--text); cursor: pointer; z-index: 2; padding: 0;
}
.tl-node:hover, .tl-node:focus-visible, .tl-node.selected { transform: translate(-50%, -50%) scale(1.45); outline: none; z-index: 5; }
.tl-stem { position: absolute; width: 1px; background: var(--rule); }
.tl-label {
  position: absolute; transform: translateX(-50%); font-size: 12px; font-style: italic; color: var(--text);
  white-space: nowrap; pointer-events: none; overflow: hidden; text-overflow: ellipsis;
}
.tl-preview { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* ---------- version drawer ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(660px, 100%); z-index: 40;
  background: var(--bg); border-left: 1px solid var(--text);
  transform: translateX(102%); transition: transform .3s ease-out;
  overflow-y: auto; padding: 30px 32px 60px; box-shadow: -12px 0 30px rgba(40, 30, 10, .12);
}
.drawer.open { transform: none; }
.drawer-close {
  position: sticky; top: 0; float: right; width: 34px; height: 34px; cursor: pointer;
  border: 1px solid var(--text); background: var(--bg);
}
.drawer-close:hover { background: var(--text); color: var(--bg); }
.scrim { position: fixed; inset: 0; background: rgba(30, 25, 15, .25); z-index: 30; opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.v-head h2 { font-size: 34px; margin: 6px 0 4px; line-height: 1.1; }
.v-meta { color: var(--muted); font-size: 15px; }
.v-summary { font-size: 18px; }
.vmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 4px; margin: 12px 0; }
.vcell { padding: 7px 4px; text-align: center; font-size: 11px; font-family: var(--mono); }
.vcell b { display: block; font-family: var(--serif); font-size: 18px; font-weight: 400; }
.st-igual { background: var(--st-igual); color: var(--text); }
.st-cambia { background: var(--st-cambia); color: #fff; }
.st-eliminada { background: repeating-linear-gradient(135deg, rgba(163, 50, 36, .3) 0 2px, transparent 2px 7px); color: var(--red); box-shadow: inset 0 0 0 1px rgba(163, 50, 36, .4); }
.st-nueva { background: var(--st-nueva); color: #fff; }
.st-desconocido { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--rule); }

.change { display: grid; grid-template-columns: 1fr 1fr; margin: 12px 0; border: 1px solid var(--rule); }
.change .side { padding: 12px 14px; font-size: 17px; line-height: 1.45; background: var(--card); }
.change .side.b { border-left: 1px solid var(--rule); background: var(--paper); }
.change .side small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.change .note { grid-column: 1 / -1; padding: 8px 14px; font-size: 14px; font-style: italic; color: var(--muted); border-top: 1px solid var(--rule); }
.change .none { color: var(--muted); font-style: italic; font-size: 14px; }
.trivia { margin: 10px 0; padding-left: 20px; }
.trivia li { margin: 6px 0; }
.srcs a { display: block; font-size: 15px; margin: 3px 0; word-break: break-word; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }

/* ---------- verse map ---------- */
.matrix-wrap { overflow-x: auto; border-top: 1px solid var(--text); border-bottom: 1px solid var(--text); }
table.matrix { border-collapse: separate; border-spacing: 3px; min-width: 860px; width: 100%; }
.matrix th { font-weight: 400; font-size: 14px; text-align: left; padding: 5px 6px; }
.matrix thead th { position: sticky; top: 0; background: var(--bg); z-index: 1; vertical-align: bottom; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.matrix thead th .inc { display: block; font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--text); max-width: 120px; line-height: 1.25; }
.matrix tbody th { white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.matrix tbody th a { color: var(--text); text-decoration: none; }
.matrix tbody th a:hover { color: var(--red); }
.matrix tbody th .yr { font-family: var(--mono); color: var(--muted); margin-right: 8px; font-size: 12px; }
.matrix td { height: 26px; min-width: 62px; cursor: pointer; }
.matrix td:hover { outline: 2px solid var(--text); outline-offset: -1px; }
.matrix td.new-count { text-align: center; font-family: var(--mono); font-size: 12px; }
.matrix tr.era-sep th { padding: 18px 8px 4px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--muted); }

.tooltip {
  position: fixed; z-index: 60; pointer-events: none; max-width: 340px;
  background: var(--paper); color: var(--text); border: 1px solid var(--text); padding: 9px 11px;
  font-size: 14px; line-height: 1.4; box-shadow: 0 6px 16px rgba(40, 30, 10, .15); opacity: 0; transition: opacity .1s;
}
.tooltip.on { opacity: 1; }
.tooltip .frag { font-style: italic; margin-top: 4px; }

/* ---------- compare ---------- */
.cmp-pick { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: end; margin-bottom: 22px; }
.cmp-pick label { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
select {
  width: 100%; padding: 9px 10px; font: inherit; font-size: 16px; border-radius: 0;
  background: var(--card); color: var(--text); border: 1px solid var(--text);
}
select:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.swap { width: 42px; height: 42px; border: 1px solid var(--text); background: var(--card); cursor: pointer; font-size: 18px; }
.swap:hover { background: var(--text); color: var(--bg); }
.cmp-summary { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 20px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.cmp-summary .pill b { color: var(--text); }
.cmp-head { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 14px; margin-bottom: 10px; border-bottom: 1px solid var(--text); padding-bottom: 10px; }
.cmp-head .h { font-size: 22px; line-height: 1.2; }
.cmp-head .h a { text-decoration: none; }
.cmp-row { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.cmp-verse b { display: block; font-size: 30px; font-weight: 400; line-height: 1; }
.cmp-verse i { display: block; font-size: 13px; color: var(--muted); line-height: 1.3; margin-top: 6px; }
.cmp-cell .st { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.cmp-cell .frag { font-size: 17px; margin-top: 6px; line-height: 1.45; }
.cmp-cell .note { font-size: 14px; font-style: italic; color: var(--muted); margin-top: 6px; }
.cmp-row.same-both { opacity: .55; }

/* ---------- threads ---------- */
.motif-tabs { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 26px; }
.motif-tabs button {
  border: 1px solid var(--rule); background: transparent; padding: 4px 10px; cursor: pointer; font-size: 15px; color: var(--muted);
}
.motif-tabs button:hover { color: var(--text); border-color: var(--text); }
.motif-tabs button.on { color: var(--bg); background: var(--text); border-color: var(--text); }
.slider-wrap { margin: 18px 0 22px; }
input[type=range] { width: 100%; accent-color: var(--text); }
.thread { position: relative; padding-left: 46px; }
.thread svg.rope { position: absolute; left: 0; top: 0; width: 46px; height: 100%; overflow: visible; }
.knot {
  position: relative; margin: 0 0 16px; padding: 14px 18px; background: var(--card); border: 1px solid var(--rule);
  opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s;
}
.knot.in { opacity: 1; transform: none; }
.knot::before {
  content: ""; position: absolute; left: -38px; top: 20px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 0 3px var(--bg);
}
.knot.album { background: var(--paper); border-color: var(--text); }
.knot.album::before { background: var(--gold); }
.knot.gone::before { background: var(--red); }
.knot .when { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.knot .frag { font-size: 22px; line-height: 1.4; margin: 6px 0; }
.knot .frag.none { font-size: 16px; font-style: italic; color: var(--muted); }
.knot .note { color: var(--muted); font-size: 15px; font-style: italic; }
.knot a.vlink { font-size: 14px; }

/* ---------- bob himself ---------- */
.bob { max-width: 900px; margin: 0 auto; }
.bob-head { padding-bottom: 28px; border-bottom: 1px solid var(--text); }
.bob-head .lede { margin-bottom: 0; }
.sayings { list-style: none; margin: 0; padding: 0; }
.saying {
  display: grid; grid-template-columns: 120px 1fr; gap: 36px;
  padding: 44px 0; border-bottom: 1px solid var(--rule);
}
.saying-year { font-size: 40px; line-height: 1; color: var(--red); padding-top: 6px; }
.saying-year span { font-size: 18px; font-style: italic; color: var(--muted); }
.saying figure { margin: 0; }
.saying blockquote {
  margin: 0; font-size: 25px; line-height: 1.45; text-indent: -.42em;
}
.saying blockquote::before { content: "“"; }
.saying blockquote::after { content: "”"; }
.saying-ctx { margin: 18px 0 0; font-size: 17px; color: var(--muted); font-style: italic; max-width: 640px; }
.saying figcaption {
  margin-top: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.saying figcaption::before { content: "— "; }

/* ---------- sources (apparatus) ---------- */
.sources { max-width: 900px; margin: 0 auto; }
.app-entry { padding: 34px 0; border-top: 1px solid var(--rule); }
.app-entry header { display: grid; grid-template-columns: 90px 1fr; gap: 20px; align-items: baseline; }
.app-year { font-size: 30px; color: var(--red); line-height: 1; }
.app-entry h3 { margin: 0 0 4px; font-size: 23px; }
.app-entry h3 a { color: var(--text); text-decoration: none; }
.app-entry h3 a:hover { color: var(--red); }
.app-sources, .app-changes { margin: 16px 0 0 110px; padding-left: 20px; font-size: 16px; }
.app-sources li { margin: 6px 0; }
.app-sources li::marker { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.app-kind { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.app-note { color: var(--muted); font-style: italic; }
.app-changes { list-style: none; padding-left: 0; border-left: 1px solid var(--rule); padding-left: 18px; }
.app-changes li { margin: 6px 0; font-style: italic; }
.app-changes sup { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--blue); margin-left: 3px; }
.app-caveat { margin: 14px 0 0 110px; padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--card); font-size: 15px; }
.unverified { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-style: normal; color: var(--gold); border: 1px solid var(--gold); padding: 0 4px; margin-left: 6px; }
.app-line-note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.src-none { color: var(--red); font-style: italic; font-size: 14px; }
.src-line a { font-style: normal; }
.bib-kind { font-family: var(--mono); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; border-top: 1px solid var(--text); padding-top: 10px; margin-top: 36px; }
.bib { list-style: none; padding: 0; margin: 0; }
.bib li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.bib-for { font-size: 14px; color: var(--muted); margin-top: 3px; }
.bib-for a { color: var(--muted); }

/* ---------- game ---------- */
.game { max-width: 780px; margin: 0 auto; text-align: center; }
.game .score { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.game .q { margin: 28px auto; max-width: 660px; text-align: left; }
.game .q .frag { font-size: 23px; line-height: 28px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.opt { padding: 14px 16px; border: 1px solid var(--text); background: var(--card); cursor: pointer; text-align: left; }
.opt:hover:not(:disabled) { background: var(--text); color: var(--bg); }
.opt:hover:not(:disabled) small { color: var(--bg); }
.opt b { display: block; font-size: 18px; font-weight: 400; }
.opt small { color: var(--muted); font-style: italic; }
.opt.right { background: #dfe9dc; border-color: var(--green); }
.opt.wrong { background: #f1dcd6; border-color: var(--red); }
.feedback { min-height: 60px; }
.streak { font-size: 26px; letter-spacing: 6px; }

/* ---------- lyrics ---------- */
.lyr-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: start; }
.paper.lyr { padding: 28px 26px 26px 78px; background-position: 0 0, 0 23px, 0 0; }
.lyr-verse { position: relative; margin-bottom: 28px; }
.lyr-n {
  position: absolute; left: -66px; top: 2px; width: 24px; height: 24px; border-radius: 50%; padding: 0;
  border: 1px solid var(--red); background: transparent; color: var(--red); font-family: var(--mono); font-size: 11px; cursor: pointer;
}
.lyr-n:hover { background: var(--red); color: #fff; }
.lyr-line { font-size: 18px; line-height: 28px; padding: 0 6px; margin-left: -6px; }
.lyr-line.has {
  cursor: pointer; text-decoration: underline; text-decoration-color: rgba(31, 63, 143, .45);
  text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.lyr-line.has:hover, .lyr-line.on { background: rgba(214, 170, 60, .3); }
.lyr-line sup { font-family: var(--mono); font-size: 10px; line-height: 0; color: var(--blue); margin-left: 4px; }
.lyr-missing { font-size: 15px; font-style: italic; color: var(--muted); border-top: 1px dashed var(--rule); padding-top: 12px; }
.lyr-side { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; }
.strip { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 10px; }
.strip-cell { width: 16px; height: 24px; cursor: pointer; padding: 0; border: 0; }
.strip-cell:hover { outline: 2px solid var(--text); }
.hist-mini { display: block; padding: 5px 0; font-size: 16px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--rule); }
.hist-mini:hover { color: var(--red); }
.hist { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.hist .when { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.hist .frag { font-size: 18px; line-height: 1.45; margin: 4px 0; }
.hist .note { font-size: 14px; font-style: italic; color: var(--muted); }

/* scrollbars */
* { scrollbar-color: var(--rule) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { height: 10px; width: 10px; }
::-webkit-scrollbar-thumb { background: var(--rule); border: 2px solid var(--bg); }

@media (max-width: 900px) {
  .preface { column-count: 1; }
  .saying { grid-template-columns: 1fr; gap: 12px; padding: 32px 0; }
  .app-entry header { grid-template-columns: 1fr; gap: 6px; }
  .app-sources, .app-changes, .app-caveat { margin-left: 0; }
  .saying-year { font-size: 28px; }
  .saying blockquote { font-size: 21px; }
  .tl-preview, .lyr-grid, #machine .mgrid { grid-template-columns: 1fr; }
  .lyr-side { position: static; max-height: none; }
  .cmp-head, .cmp-row { grid-template-columns: 64px 1fr 1fr; }
  .contents .desc { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  main { padding: 24px 16px 70px; }
  .top { flex-wrap: wrap; padding: 14px 16px 8px; gap: 10px 18px; }
  .nav { order: 3; flex-basis: 100%; gap: 16px; }
  .cmp-pick { grid-template-columns: 1fr; }
  .swap { justify-self: center; }
  .cmp-head { display: none; }
  .cmp-row, .change, .opts { grid-template-columns: 1fr; }
  .change .side.b { border-left: 0; border-top: 1px solid var(--rule); }
  .drawer { padding: 22px 16px 60px; }
  .paper.lyr { padding: 22px 14px 18px 60px; }
  .lyr-n { left: -50px; }
  .preface { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
