/* Adams's Synchronological Chart (1881): paper, ink and a little vermilion. */
:root {
  --bg: #ece3cd;
  --bar: #f4eedf;
  --surround: #d6c9aa;
  --panel: #f8f3e7;
  --panel-2: #efe6d2;
  --ink: #261d14;
  --ink-2: #5b4a35;
  --ink-3: #85725a;
  --rule: #c2ae88;
  --rule-2: #dccdaa;
  --accent: #9b2c1c;
  --accent-ink: #fff8ee;
  --accent-soft: rgba(155, 44, 28, .1);
  --focus: #1f5f8b;
  --lit: #b3301c;
  --wash: #1f5f8b;
  --hover: rgba(38, 29, 20, .7);
  --loc-shade: rgba(38, 29, 20, .42);
  --shadow: 0 1px 2px rgba(60, 40, 15, .12), 0 8px 28px rgba(60, 40, 15, .16);
  --plate-filter: none;
  --serif: 'EB Garamond', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --display: 'IM Fell English', 'EB Garamond', Georgia, serif;
  --caps: 'IM Fell English SC', 'EB Garamond', Georgia, serif;
  --bar-h: 56px;
  --ruler-h: 38px;
  --cover-r: 0px;
  --cover-b: 0px;
  /* The lanes, in the hand-colouring's tones */
  --l-bible: #a8402e; --l-egypt: #b98322; --l-assyria-babylon-persia: #6f5596; --l-greece-macedon: #2f6f9e;
  --l-rome-byzantium: #8a2a4c; --l-church: #6c6a2c; --l-western-europe: #2f7d5c; --l-britain: #b1592c;
  --l-asia-saracens: #4d6f2a; --l-america: #2c5d7c;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15120e; --bar: #1c1813; --surround: #0d0b08; --panel: #1f1a14; --panel-2: #29221a;
    --ink: #efe5cf; --ink-2: #c4b394; --ink-3: #93836a; --rule: #4d4232; --rule-2: #372f24;
    --accent: #e4805f; --accent-ink: #1a120c; --accent-soft: rgba(228, 128, 95, .14); --focus: #8fc3e8;
    --hover: rgba(20, 14, 8, .8); --loc-shade: rgba(0, 0, 0, .55);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 32px rgba(0, 0, 0, .5);
    --plate-filter: brightness(.84) contrast(1.04);
    --l-bible: #e07a62; --l-egypt: #e0b04f; --l-assyria-babylon-persia: #a88ad0; --l-greece-macedon: #6fa8d6;
    --l-rome-byzantium: #d06c90; --l-church: #b6b462; --l-western-europe: #6cc09a; --l-britain: #e48f5e;
    --l-asia-saracens: #98bd66; --l-america: #6ea6c8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15120e; --bar: #1c1813; --surround: #0d0b08; --panel: #1f1a14; --panel-2: #29221a;
  --ink: #efe5cf; --ink-2: #c4b394; --ink-3: #93836a; --rule: #4d4232; --rule-2: #372f24;
  --accent: #e4805f; --accent-ink: #1a120c; --accent-soft: rgba(228, 128, 95, .14); --focus: #8fc3e8;
  --hover: rgba(20, 14, 8, .8); --loc-shade: rgba(0, 0, 0, .55);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 32px rgba(0, 0, 0, .5);
  --plate-filter: brightness(.84) contrast(1.04);
  --l-bible: #e07a62; --l-egypt: #e0b04f; --l-assyria-babylon-persia: #a88ad0; --l-greece-macedon: #6fa8d6;
  --l-rome-byzantium: #d06c90; --l-church: #b6b462; --l-western-europe: #6cc09a; --l-britain: #e48f5e;
  --l-asia-saracens: #98bd66; --l-america: #6ea6c8;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.5 var(--serif); font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: grid; grid-template-rows: var(--bar-h) minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); height: 100dvh; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: .15em; }
kbd { font: 500 .78em/1 var(--serif); font-variant-numeric: lining-nums; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 4px; padding: .15em .4em; background: var(--panel); color: var(--ink-2); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--panel); padding: 8px 14px; border: 1px solid var(--rule); }
.skip:focus { top: 8px; }

/* ---------------------------------------------------------------- the bar */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 max(12px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
  background: var(--bar); border-bottom: 1px solid var(--rule); position: relative; z-index: 6;
}
.bar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; border-bottom: 1px solid var(--rule-2); pointer-events: none; }
.mark { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.mark-seal { width: 34px; height: 34px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.3; }
.mark-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.mark-title { font: 400 21px/1.05 var(--display); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mark-sub { font: 400 13px/1.2 var(--caps); color: var(--ink-2); letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mark .short { display: none; }
.tools { display: flex; align-items: center; gap: 2px; flex: none; }
.tool {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border: 1px solid transparent;
  background: none; border-radius: 6px; font: 400 16px/1 var(--caps); letter-spacing: .04em; color: var(--ink);
}
.tool:hover { background: var(--accent-soft); }
.tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tool-find { border-color: var(--rule); background: var(--panel); min-width: 150px; margin-right: 6px; }
.tool-find kbd { margin-left: auto; }
.tool[aria-pressed="true"] svg { fill: currentColor; }

/* ---------------------------------------------------------------- the stage and the plate */
.stage { position: relative; overflow: hidden; background: var(--surround); }
.plate { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; outline: none; }
.plate.is-grabbing { cursor: grabbing; }
.plate.is-over { cursor: pointer; }
.pl-layers { position: absolute; inset: 0; filter: var(--plate-filter); }
.pl-layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.pl-layer img { position: absolute; display: block; max-width: none; image-rendering: auto; }
.pl-overview img { position: static; }
.pl-tile { animation: tile-in .25s ease-out; }
@keyframes tile-in { from { opacity: 0; } to { opacity: 1; } }
.pl-overlay { position: absolute; left: 0; top: 0; pointer-events: none; }
.pl-reticle { position: absolute; width: 30px; height: 30px; left: calc((100% - var(--cover-r)) / 2 - 15px); top: calc(var(--ruler-h) + (100% - var(--ruler-h) - var(--cover-b)) / 2 - 15px); pointer-events: none; opacity: 0; transition: opacity .2s; }
.pl-reticle::before, .pl-reticle::after { content: ''; position: absolute; background: var(--accent); }
.pl-reticle::before { left: 14px; top: 0; width: 2px; height: 30px; }
.pl-reticle::after { top: 14px; left: 0; height: 2px; width: 30px; }
.plate:focus-visible .pl-reticle { opacity: 1; }
.plate:focus-visible { box-shadow: inset 0 0 0 3px var(--focus); }

/* The year ruler and the cartouche at the centre */
.ruler {
  position: absolute; left: 0; right: 0; top: 0; height: var(--ruler-h); z-index: 3; pointer-events: none;
  background: color-mix(in srgb, var(--bar) 92%, transparent); border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ticks { position: absolute; inset: 0; overflow: hidden; }
.ticks i { position: absolute; left: 0; bottom: 0; width: 1px; height: 4px; background: var(--ink-3); }
.ticks i.mid { height: 8px; background: var(--ink-2); }
.ticks i.major { height: 13px; background: var(--ink); }
.ticks i span { position: absolute; bottom: 14px; left: 0; transform: translateX(-50%); white-space: nowrap; font: 400 14px/1 var(--caps); letter-spacing: .03em; color: var(--ink-2); font-variant-numeric: lining-nums; }
.cartouche { position: absolute; left: 0; top: 3px; width: 0; display: flex; flex-direction: column; align-items: center; }
.c-inner {
  display: flex; align-items: baseline; gap: 5px; white-space: nowrap; padding: 3px 16px 4px;
  background: var(--panel); border: 1px solid var(--ink-2); outline: 1px solid var(--rule); outline-offset: 2px;
  box-shadow: 0 2px 10px rgba(40, 25, 10, .18); position: relative;
}
.c-inner::after { content: ''; position: absolute; left: 50%; bottom: -9px; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink-2); border-bottom: 0; }
.c-year { font: 400 25px/1 var(--display); font-variant-numeric: lining-nums; letter-spacing: .01em; min-width: 2.2em; text-align: right; }
.c-era { font: 400 15px/1 var(--caps); color: var(--ink-2); letter-spacing: .08em; min-width: 1.4em; }
.c-lane { margin-top: 10px; font: italic 400 15px/1.1 var(--display); color: var(--ink); white-space: nowrap; padding: 2px 9px; background: color-mix(in srgb, var(--panel) 82%, transparent); border-radius: 3px; }
.c-lane:empty { display: none; }

/* Controls, locator and credit, kept clear of the panel */
.controls { position: absolute; z-index: 4; right: calc(12px + var(--cover-r)); bottom: calc(14px + var(--cover-b)); display: flex; flex-direction: column; gap: 6px; transition: right .26s, bottom .26s; }
.ctl { width: 44px; height: 44px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; box-shadow: var(--shadow); color: var(--ink); }
.ctl:hover { border-color: var(--ink-2); }
.ctl svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ctl#z-fit { margin-top: 6px; }
.locator {
  position: absolute; z-index: 4; left: 12px; bottom: calc(34px + var(--cover-b)); width: min(520px, calc(100% - 96px - var(--cover-r)));
  aspect-ratio: 2048 / 218; border: 1px solid var(--ink-2); outline: 1px solid var(--rule); outline-offset: 2px; background: var(--panel);
  box-shadow: var(--shadow); cursor: crosshair; touch-action: none; transition: opacity .3s, bottom .26s;
}
.is-overview .locator, .has-intro .locator { opacity: 0; pointer-events: none; }
.credit { position: absolute; z-index: 4; left: 12px; bottom: calc(6px + var(--cover-b)); margin: 0; padding: 1px 8px; border-radius: 3px; background: color-mix(in srgb, var(--panel) 86%, transparent); font: 400 13px/1.35 var(--serif); color: var(--ink-2); transition: bottom .26s; max-width: calc(100% - 80px - var(--cover-r)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.credit button { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: .15em; }
.wash-note { position: absolute; z-index: 4; left: 50%; transform: translateX(-50%); top: calc(var(--ruler-h) + 62px); display: none; align-items: center; gap: 10px; padding: 5px 6px 5px 14px; background: var(--panel); border: 1px solid var(--rule); border-radius: 999px; box-shadow: var(--shadow); font-size: 15px; max-width: calc(100% - 32px - var(--cover-r)); }
.has-wash .wash-note { display: flex; }
.wash-note #wash-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wash-note button { border: 1px solid var(--rule); background: var(--panel-2); border-radius: 999px; padding: 2px 12px; font-size: 14px; }
.tip { position: absolute; z-index: 5; left: 0; top: 0; pointer-events: none; display: flex; flex-direction: column; max-width: 300px; padding: 6px 10px 7px; background: var(--panel); border: 1px solid var(--ink-2); box-shadow: var(--shadow); font-size: 15px; line-height: 1.25; }
.tip b { font: 400 17px/1.2 var(--display); }
.tip span { color: var(--ink-2); font-size: 14px; }
.toast { position: absolute; z-index: 9; left: 50%; bottom: calc(80px + var(--cover-b)); transform: translate(-50%, 8px); opacity: 0; transition: opacity .2s, transform .2s; background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: 6px; font-size: 15px; max-width: calc(100% - 32px); overflow-wrap: anywhere; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.failed { position: absolute; inset: auto 16px 50% 16px; text-align: center; z-index: 9; background: var(--panel); padding: 16px; border: 1px solid var(--accent); }

/* ---------------------------------------------------------------- buttons, chips, rows */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 6px 16px; border: 1px solid var(--ink-2); background: var(--panel); border-radius: 6px; font: 400 16px/1.1 var(--caps); letter-spacing: .04em; color: var(--ink); text-decoration: none; }
.btn:hover { background: var(--panel-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.chip-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--ink-3)); flex: none; }
[data-lane="bible"] { --dot: var(--l-bible); } [data-lane="egypt"] { --dot: var(--l-egypt); }
[data-lane="assyria-babylon-persia"] { --dot: var(--l-assyria-babylon-persia); } [data-lane="greece-macedon"] { --dot: var(--l-greece-macedon); }
[data-lane="rome-byzantium"] { --dot: var(--l-rome-byzantium); } [data-lane="church"] { --dot: var(--l-church); }
[data-lane="western-europe"] { --dot: var(--l-western-europe); } [data-lane="britain"] { --dot: var(--l-britain); }
[data-lane="asia-saracens"] { --dot: var(--l-asia-saracens); } [data-lane="america"] { --dot: var(--l-america); }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 4px 12px; margin: 0 6px 6px 0; border: 1px solid var(--rule); background: var(--panel); border-radius: 999px; font-size: 16px; line-height: 1.2; text-align: left; }
.chip:hover { border-color: var(--ink-2); background: var(--panel-2); }
.chips { display: flex; flex-wrap: wrap; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 6.6em 1fr; gap: 12px; width: 100%; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--rule-2); background: none; text-align: left; align-items: baseline; text-decoration: none; color: var(--ink); }
.row:hover { background: var(--accent-soft); }
.row-date { font: 400 15px/1.3 var(--caps); color: var(--ink-2); letter-spacing: .02em; font-variant-numeric: lining-nums; }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-title { font-size: 17px; line-height: 1.25; }
.row-lane { font-size: 14px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }
.row .row-lane::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--ink-3)); }

/* ---------------------------------------------------------------- the panel */
.panel {
  position: absolute; z-index: 7; top: calc(var(--ruler-h) + 10px); right: 12px; bottom: 12px; width: clamp(330px, 33vw, 440px);
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; box-shadow: var(--shadow);
  transform: translateX(calc(100% + 24px)); transition: transform .26s cubic-bezier(.2, .8, .2, 1); overflow: hidden;
}
.panel.is-open { transform: none; }
.sheet-handle { display: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 6px 20px; border-bottom: 1px solid var(--rule-2); }
.panel-kicker { font: 400 15px/1.2 var(--caps); letter-spacing: .08em; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-close { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; border-radius: 6px; color: var(--ink); flex: none; }
.panel-close:hover { background: var(--accent-soft); }
.panel-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.panel-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 22px 28px; scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }

.eyebrow { margin: 0 0 4px; font: 400 15px/1.3 var(--caps); letter-spacing: .06em; color: var(--ink-2); }
.eyebrow .chip-dot { width: 9px; height: 9px; margin-right: 8px; vertical-align: .05em; }
.entry-title, .view-title { margin: 0 0 6px; font: 400 31px/1.08 var(--display); letter-spacing: -.003em; text-wrap: balance; outline: none; }
.year-title { font-size: 54px; font-variant-numeric: lining-nums; }
.year-title .era { font: 400 24px/1 var(--caps); color: var(--ink-2); letter-spacing: .08em; }
.view-sub { margin: 0 0 12px; color: var(--ink-2); }
.entry-date { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rule-2); }
.date-big { font: 400 23px/1.1 var(--display); color: var(--accent); font-variant-numeric: lining-nums; }
.date-note { font-size: 14px; color: var(--ink-3); font-style: italic; }
.summary { margin: 0 0 16px; font-size: 18.5px; line-height: 1.5; }
.also { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin: -4px 0 14px; padding: 8px 10px 2px; background: var(--panel-2); border-radius: 6px; }
.also-head { font: 400 14px/1 var(--caps); letter-spacing: .06em; color: var(--ink-2); margin: 0 10px 6px 0; }
.also .chip { min-height: 32px; font-size: 15px; }
.printed { margin: 0 0 20px; padding: 16px 18px 12px; background: var(--panel-2); border: 1px solid var(--rule-2); position: relative; }
.printed::before { content: '“'; position: absolute; left: 8px; top: -14px; font: 400 58px/1 var(--display); color: var(--accent); }
.printed blockquote { margin: 0; }
.printed p { margin: 0; font: 400 18px/1.4 var(--display); letter-spacing: .015em; overflow-wrap: anywhere; }
.printed figcaption { margin-top: 8px; font: 400 14px/1 var(--caps); letter-spacing: .06em; color: var(--ink-3); text-align: right; }
.printed figcaption::before { content: '— '; }
.sec { margin: 0 0 18px; }
.sec-title { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font: 400 16px/1.2 var(--caps); letter-spacing: .08em; color: var(--ink-2); }
.sec-title::after { content: ''; flex: 1; border-top: 1px solid var(--rule-2); }
.knowledge-record { margin: 0 0 12px; padding: 14px 16px; background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; }
.knowledge-title { margin: 0 0 6px; font: 400 24px/1.2 var(--display); overflow-wrap: anywhere; }
.knowledge-description { margin: 0 0 12px; color: var(--ink-2); }
.knowledge-relation { margin: 0 0 5px; font: 14px var(--caps); letter-spacing: .05em; color: var(--ink-2); }
.knowledge-facts { display: grid; grid-template-columns: minmax(0, 7em) minmax(0, 1fr); gap: 6px 12px; margin: 12px 0; font-size: 16px; line-height: 1.4; }
.knowledge-facts dt { color: var(--ink-2); }
.knowledge-facts dd { margin: 0; overflow-wrap: anywhere; }
.knowledge-source { border-top: 1px solid var(--rule); padding-top: 8px; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.knowledge-source summary { cursor: pointer; padding: 4px 0; }
.knowledge-source p { margin: 6px 0 0; }
.knowledge-facts a { color: var(--accent); text-underline-offset: 3px; }
.knowledge-open { font: 16px var(--caps); color: var(--accent); text-underline-offset: 3px; }
.knowledge-entity > .knowledge-facts { margin: 20px 0; font-size: 18px; gap: 10px 16px; }
.story { margin: 0; font-size: 18px; }
.refs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.refs li { padding: 2px 10px; border: 1px solid var(--rule-2); border-radius: 4px; font-size: 16px; font-variant-numeric: lining-nums; }
.family { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; align-items: baseline; }
.family dt { font: italic 400 16px/2.2 var(--serif); color: var(--ink-2); }
.family dd { margin: 0; }
.hint { color: var(--ink-3); font-size: 15px; margin: 0 0 8px; }
.modern { padding: 10px 14px; border: 1px solid var(--rule-2); border-radius: 6px; margin-bottom: 8px; }
.modern p { margin: 0; }
.modern-date { font: 400 20px/1.2 var(--display); font-variant-numeric: lining-nums; }
.modern-src, .modern-lane { font: 400 14px var(--serif); color: var(--ink-3); }
.modern-title { font-weight: 500; margin: 2px 0 4px !important; }
.modern-sum { font-size: 16px; color: var(--ink-2); }
.places a { color: var(--ink); text-decoration-color: var(--rule); }
.shelf { margin: 0; padding-left: 1.1em; }
.shelf li { margin-bottom: 8px; }
.shelf-heading { display: block; font-size: 15px; color: var(--ink-2); }
.shelf-src { font-size: 14px; }
.step { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 22px 0 12px; }
.step-btn { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 6px; background: none; text-align: left; color: var(--ink); text-decoration: none; min-width: 0; }
.step-btn:hover { background: var(--panel-2); }
.step-btn.next { text-align: right; align-items: flex-end; }
.step-dir { font: 400 14px/1 var(--caps); letter-spacing: .05em; color: var(--ink-3); }
.step-title { font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tour { list-style: none; margin: 0; padding: 0; counter-reset: stop; }
.tour-stop { display: grid; grid-template-columns: 2.4em 1fr; gap: 10px; align-items: baseline; padding: 9px 4px; border-bottom: 1px solid var(--rule-2); text-decoration: none; color: var(--ink); }
.tour-stop:hover { background: var(--accent-soft); }
.tour-n { font: 400 22px/1 var(--display); color: var(--accent); text-align: right; font-variant-numeric: lining-nums; }
.lane-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.lane-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 4px 12px; border: 1px solid var(--rule); background: var(--panel); border-radius: 999px; font-size: 15.5px; }
.lane-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.lane-chip[aria-pressed="true"] .chip-dot { box-shadow: 0 0 0 2px var(--bg); }
.lane-n { font-size: 13px; color: var(--ink-3); font-variant-numeric: lining-nums; }
.lane-chip[aria-pressed="true"] .lane-n { color: inherit; opacity: .7; }
.group { content-visibility: auto; contain-intrinsic-size: auto 300px; }
.group-title { margin: 16px 0 2px; font: italic 400 17px/1.2 var(--display); color: var(--ink-2); }

/* ---------------------------------------------------------------- the introduction */
.intro {
  position: absolute; z-index: 6; left: 50%; bottom: 28px; transform: translateX(-50%); width: min(760px, calc(100% - 32px));
  padding: 26px 34px 26px; background: var(--panel); border: 1px solid var(--ink-2); outline: 1px solid var(--rule); outline-offset: 4px;
  box-shadow: var(--shadow); text-align: center; animation: rise .5s cubic-bezier(.2, .8, .2, 1);
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 14px); } }
.intro-close { position: absolute; right: 8px; top: 6px; width: 40px; height: 40px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--ink-2); border-radius: 6px; }
.intro-kicker { margin: 0; font: italic 400 19px/1.2 var(--display); color: var(--ink-2); }
.intro-title { margin: 2px 0 6px; font: 400 clamp(28px, 4.4vw, 44px)/1.05 var(--display); letter-spacing: .005em; text-wrap: balance; }
.intro-title i { color: var(--accent); }
.intro-by { margin: 0 0 12px; font: 400 15px/1.3 var(--caps); letter-spacing: .07em; color: var(--ink-2); }
.intro-text { margin: 0 auto 18px; max-width: 36em; font-size: 18px; text-wrap: pretty; }
.intro-count { display: block; margin-top: 6px; font: 400 14px/1.2 var(--caps); letter-spacing: .07em; color: var(--ink-3); font-variant-numeric: lining-nums; }
.intro-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.has-intro .controls { opacity: 0; pointer-events: none; }

/* ---------------------------------------------------------------- dialogs */
dialog { padding: 0; border: 0; background: none; color: var(--ink); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(25, 17, 9, .42); backdrop-filter: blur(2px); }
.find { width: min(660px, calc(100% - 24px)); margin: 9vh auto auto; }
.find-box { background: var(--panel); border: 1px solid var(--ink-2); box-shadow: var(--shadow); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; max-height: 76vh; }
.find-field { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--rule); }
.find-field svg { width: 22px; height: 22px; fill: none; stroke: var(--ink-2); stroke-width: 1.7; stroke-linecap: round; flex: none; }
.find-field input { flex: 1; min-width: 0; height: 50px; border: 0; background: none; font: 400 22px/1 var(--display); outline: none; }
.find-field input::placeholder { color: var(--ink-3); }
.find-field input::-webkit-search-cancel-button { display: none; }
.find-close { border: 1px solid var(--rule); background: var(--panel-2); border-radius: 5px; padding: 4px 10px; font-size: 14px; color: var(--ink-2); }
.find-list { list-style: none; margin: 0; padding: 6px 0 10px; overflow-y: auto; overscroll-behavior: contain; }
.find-head { padding: 10px 18px 4px; font: 400 14px/1 var(--caps); letter-spacing: .08em; color: var(--ink-3); }
.find-item { display: flex; flex-direction: column; gap: 1px; padding: 8px 18px; cursor: pointer; border-left: 3px solid transparent; }
.find-item[aria-selected="true"] { background: var(--accent-soft); border-left-color: var(--accent); }
.f-title { display: flex; align-items: center; gap: 8px; font-size: 18px; line-height: 1.25; }
.f-meta { font-size: 14.5px; color: var(--ink-2); padding-left: 16px; }
.find-item .f-title:not(:has(.chip-dot)) + .f-meta { padding-left: 0; }
.find-empty { padding: 18px; color: var(--ink-2); font-style: italic; }
.about { width: min(760px, calc(100% - 24px)); margin: 5vh auto; }
.about-box { background: var(--panel); border: 1px solid var(--ink-2); box-shadow: var(--shadow); border-radius: 8px; display: flex; flex-direction: column; max-height: 90vh; }
.about-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 10px 26px; border-bottom: 1px solid var(--rule); }
.about-head h2 { margin: 0; font: 400 28px/1.1 var(--display); }
.about-body { overflow-y: auto; padding: 16px 26px 26px; }
.about-body h3 { margin: 22px 0 6px; font: 400 17px/1.2 var(--caps); letter-spacing: .07em; color: var(--ink-2); }
.about-body .lede { font: italic 400 19px/1.4 var(--display); }
.about-body p { margin: 0 0 10px; }
.howto { padding-left: 1.1em; margin: 0; }
.howto li { margin-bottom: 6px; }
.licence { white-space: pre-wrap; font: 400 14px/1.45 var(--serif); background: var(--panel-2); border: 1px solid var(--rule-2); padding: 12px 14px; margin: 0 0 10px; color: var(--ink-2); max-height: 260px; overflow: auto; }
.build { color: var(--ink-3); font-size: 14px; margin-top: 18px !important; font-variant-numeric: lining-nums; }
.noscript { padding: 20px; }

/* ---------------------------------------------------------------- tablets and phones */
@media (max-width: 1023px) {
  .tool-label { display: none; }
  .tool-find .tool-label { display: inline; }
  .tool-find { min-width: 0; }
}
@media (max-width: 759px) {
  :root { --bar-h: 52px; --ruler-h: 34px; }
  .mark-title { font-size: 19px; }
  .mark .long { display: none; }
  .mark .short { display: inline; }
  .tool { padding: 0 7px; }
  #btn-theme { display: none; }
  .mark-sub { font-size: 12px; }
  .mark-seal { width: 30px; height: 30px; }
  .tool { padding: 0 9px; height: 40px; }
  .tool-find { border-color: transparent; background: none; margin: 0; }
  .tool-find .tool-label, .tool-find kbd { display: none; }
  .ticks i span { font-size: 12.5px; bottom: 13px; }
  .c-year { font-size: 22px; }
  .c-lane { font-size: 14px; }
  .panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; border-radius: 14px 14px 0 0; border-bottom: 0;
    transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .panel.is-dragging { transition: none; }
  .sheet-handle { display: flex; justify-content: center; align-items: center; height: 22px; flex: none; cursor: grab; touch-action: none; }
  .sheet-handle span { width: 44px; height: 5px; border-radius: 3px; background: var(--rule); }
  .panel-head { padding: 0 6px 4px 18px; }
  .panel-body { padding: 10px 18px 24px; }
  .entry-title, .view-title { font-size: 27px; }
  .summary { font-size: 17.5px; }
  .controls { right: 10px; }
  .controls .ctl { width: 42px; height: 42px; }
  .locator { width: calc(100% - 78px); left: 10px; bottom: calc(32px + var(--cover-b)); }
  .credit { left: 10px; font-size: 12px; }
  .intro { left: 0; right: 0; bottom: 0; transform: none; width: auto; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); outline: 0; border-width: 1px 0 0; border-radius: 14px 14px 0 0; }
  @keyframes rise { from { opacity: 0; transform: translateY(20px); } }
  .intro-text { font-size: 16.5px; }
  .intro-actions .btn { flex: 1 1 40%; }
  .intro-actions .btn-primary { flex-basis: 100%; }
  .find { margin: 0; width: 100%; max-height: 100%; }
  .find-box { max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
  .about { margin: 0; width: 100%; }
  .about-box { max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
  .about-body { padding: 14px 18px 30px; }
  .row { grid-template-columns: 5.8em 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Scripture opens as a reader with a whole chapter around the cited passage. */
.bible-reference { margin: 18px 0; }
.bible-reference label, .bible-pickers label { display: flex; flex-direction: column; gap: 5px; font: 16px var(--caps); color: var(--ink-2); }
.bible-input-row { display: flex; gap: 8px; margin-top: 5px; }
.bible-input-row input { flex: 1; min-width: 0; width: 100%; padding: 10px; font: 18px var(--serif); color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; }
.bible-pickers { display: flex; flex-wrap: wrap; gap: 10px; }
.bible-pickers label:first-child { flex: 1; min-width: 140px; }
.bible-pickers select { max-width: 100%; min-height: 44px; padding: 5px; font: 18px var(--serif); color: var(--ink); background: var(--panel); border: 1px solid var(--rule); }
.bible-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 16px 0; }
.bible-citation { font-size: 17px; color: var(--ink-2); }
.bible-verse { font-size: 21px; line-height: 1.65; padding: 6px 8px; margin: 0 0 4px; scroll-margin-top: 20px; }
.bible-verse.is-cited { background: var(--accent-soft); }
.verse-number { font: 15px var(--caps); vertical-align: super; color: var(--accent); }
.bible-superscription { font-style: italic; color: var(--ink-2); }
.bible-error { padding: 12px; border: 1px solid var(--accent); }
@media (min-width: 760px) { .is-reading .panel { width: min(600px, calc(100vw - 36px)); } }
@media (max-width: 759px) { .tools { gap: 0; } .tool { padding-left: 7px; padding-right: 7px; } }

.reader-back { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 9px 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
