/* Bottom dock and section bar (dock.js). Colours, type and borders come from the site's own variables in site.css,
   so the light, sepia and dark themes all work. The section bar replaces the thin progress line under the top bar. */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 18; background: var(--bg); color: var(--fg);
  border-top: 1px solid var(--rule); box-shadow: 0 -4px 18px rgb(0 0 0 / .05);
  font-family: var(--sans); font-size: 14px; line-height: 1.3; padding-bottom: env(safe-area-inset-bottom, 0px); }
.dock:empty { display: none; }
html.has-dock body { padding-bottom: var(--dock-h); }            /* nothing ends up hidden under the dock */
html.has-dock { scroll-padding-bottom: calc(var(--dock-h) + .5rem); }
html.has-dock .resume { bottom: calc(var(--dock-h) + .75rem); }  /* the "resume reading" pill sits above it */
html.has-secbar .topbar .progress { display: none; }             /* one progress bar, not two */

.secbar { position: relative; max-width: 72rem; height: 34px; margin-inline: auto; cursor: pointer; outline: none;
  touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.sb-track { position: absolute; left: var(--gutter); right: var(--gutter); top: 21px; height: 4px; border-radius: 2px;
  background: var(--rule); }
.secbar:focus-visible .sb-track { outline: 2px solid var(--accent); outline-offset: 6px; }
.sb-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: var(--accent); }
.sb-ticks { position: absolute; inset: 0; }
.sb-tick { position: absolute; top: -2px; width: 1px; height: 8px; margin-left: -.5px; background: var(--faint); opacity: .45; }
.sb-tick.big { top: -4px; height: 12px; opacity: .85; }
.sb-knob { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px var(--bg); transition: transform .12s ease; }
.secbar:hover .sb-knob, .secbar:focus-visible .sb-knob, .secbar.is-dragging .sb-knob { transform: scale(1.3); }
.sb-ghost { position: absolute; top: -6px; width: 2px; height: 16px; margin-left: -1px; border-radius: 1px; background: var(--fg); }
.sb-ghost[hidden], .sb-bubble[hidden] { display: none; }
.sb-labels { position: absolute; left: var(--gutter); right: var(--gutter); top: 3px; height: 13px; pointer-events: none; }
.sb-lab { position: absolute; transform: translateX(-50%); font-size: 10.5px; line-height: 13px; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb-lab.at-start { transform: none; }
.sb-lab.at-end { transform: translateX(-100%); }
.sb-bubble { position: absolute; bottom: calc(100% + 8px); transform: translateX(-50%); padding: .3rem .6rem; border-radius: 6px;
  background: var(--fg); color: var(--bg); font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none;
  box-shadow: 0 4px 14px rgb(0 0 0 / .18); }
.sb-bubble::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -5px; border: 5px solid transparent;
  border-top-color: var(--fg); }

/* Phones and touch screens: a taller strip to hit with a thumb, bigger knob; still one slim line of the page. */
@media (pointer: coarse), (max-width: 40rem) {
  .secbar { height: 40px; }
  .sb-track { top: 25px; height: 5px; }
  .sb-labels { top: 5px; }
  .sb-lab { font-size: 11px; }
  .sb-knob { width: 14px; height: 14px; margin: -7px 0 0 -7px; }
}
@media (prefers-reduced-motion: reduce) { .sb-knob { transition: none; } }
@media print { .dock { display: none !important; } html.has-dock body { padding-bottom: 0; } }
