@charset "utf-8";
/* Hayes Hybrid shell: what stays when the page turns (root layout).
   The Now playing strip, the page-turn curtain, the running head, and the index's
   ways into a chapter. Tokens are D's (defined on :root by the page). */

/* ---------- Now playing: one ink strip at the foot of the screen, on D's 12 columns ---------- */
.np {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 75;
  background: var(--ink, #131312); color: var(--bone, #e8e6e1);
  box-shadow: 0 -1px 0 rgba(232, 230, 225, .14);
  transform: translateY(101%); transition: transform .42s steps(3, end);
  --p: 0%;
}
.np.on { transform: none; }
.np[hidden] { display: none; }
.np-in {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g, 24px); align-items: center;
  height: 48px; padding-inline: var(--m, 32px);
}
.np button {
  appearance: none; -webkit-appearance: none; margin: 0; border: 0; background: none; color: inherit; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit; padding: 0; min-height: 40px;
  display: inline-flex; align-items: center; gap: 10px; -webkit-tap-highlight-color: transparent;
}
.np button:focus-visible, .np-pos:focus-visible { outline: 2px solid var(--bone, #e8e6e1); outline-offset: 2px; }
.np-pp { grid-column: 1 / 2; justify-self: start; }
.np-sq { display: block; width: 11px; height: 11px; background: var(--accent, #ea5a1e); box-shadow: inset 0 0 0 1px var(--accent, #ea5a1e); transition: background-color .2s; }
.np.paused .np-sq { background: transparent; box-shadow: inset 0 0 0 1px var(--bone, #e8e6e1); }
.np-what { grid-column: 2 / 6; margin: 0; min-width: 0; display: grid; line-height: 1.2; }
.np-l { color: rgba(232, 230, 225, .55); }
.np-title { font-family: var(--f-text, Georgia, serif); font-size: 16px; letter-spacing: 0; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-bars { grid-column: 6 / 7; justify-self: end; display: inline-flex; align-items: center; gap: 2px; height: 11px; }
.np-bars i { display: block; width: 3px; height: 4px; border-radius: 2px; background: var(--accent, #ea5a1e); }
.np.paused .np-bars i { height: 3px !important; opacity: .5; animation: none !important; }
.np.loop:not(.paused) .np-bars i { animation: npb .62s ease-in-out infinite alternate; }
.np.loop .np-bars i:nth-child(2) { animation-delay: -.21s; } .np.loop .np-bars i:nth-child(3) { animation-delay: -.44s; } .np.loop .np-bars i:nth-child(4) { animation-delay: -.33s; }
@keyframes npb { from { height: 3px; } to { height: 11px; } }
/* the position rule: played part bone, the rest bone at 40%, the playhead a 1px accent rule */
.np-pos {
  grid-column: 7 / 11; width: 100%; margin: 0; height: 22px; background: transparent; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.np-pos::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(var(--bone, #e8e6e1), var(--bone, #e8e6e1)) 0 0 / var(--p) 100% no-repeat, rgba(232, 230, 225, .32); }
.np-pos::-moz-range-track { height: 1px; background: rgba(232, 230, 225, .32); }
.np-pos::-moz-range-progress { height: 1px; background: var(--bone, #e8e6e1); }
.np-pos::-webkit-slider-thumb { -webkit-appearance: none; width: 2px; height: 13px; margin-top: -6px; background: var(--accent, #ea5a1e); border: 0; }
.np-pos::-moz-range-thumb { width: 2px; height: 13px; background: var(--accent, #ea5a1e); border: 0; border-radius: 0; }
.np.loop .np-pos { visibility: hidden; }
.np-time { grid-column: 11 / 12; justify-self: end; white-space: nowrap; }
.np-stop { grid-column: 12 / 13; justify-self: end; }
.np-stop::before { content: ""; width: 9px; height: 9px; background: currentColor; }
html.np-on body { padding-bottom: 48px; }
.np-audio { display: none; }
@media (max-width: 760px) {
  .np-in { height: 56px; grid-template-columns: auto minmax(0, 1fr) auto auto; column-gap: 14px; padding-bottom: env(safe-area-inset-bottom); box-sizing: content-box; }
  .np-pp, .np-what, .np-time, .np-stop { grid-column: auto; }
  .np-ppl, .np-l, .np-bars { display: none; }
  .np-pp { min-width: 44px; min-height: 44px; justify-content: center; }
  .np-stop { min-height: 44px; }
  .np-pos { position: absolute; left: 0; right: 0; top: -1px; height: 2px; width: 100%; pointer-events: none; }
  .np-pos::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(var(--accent, #ea5a1e), var(--accent, #ea5a1e)) 0 0 / var(--p) 100% no-repeat, rgba(232, 230, 225, .2); }
  .np-pos::-webkit-slider-thumb { opacity: 0; }
  html.np-on body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
}

/* ---------- the curtain (page turn) ---------- */
.curtain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; display: none; pointer-events: none; }
.curtain-line { position: fixed; left: 0; right: 0; top: 50%; margin: 0; transform: translateY(-50%); z-index: 71; text-align: center; opacity: 0; transition: opacity .18s; pointer-events: none; white-space: pre; }
.curtain-line.on { opacity: 1; }
.curtain-cap {
  position: fixed; z-index: 71; margin: 0; display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 10px 7px; background: var(--ink, #131312); color: var(--paper, #e8e6e1); opacity: 0; transition: opacity .15s; pointer-events: none; white-space: nowrap;
}
.curtain-cap.on { opacity: 1; }
/* the readout never gives way: a long figure caption is cut short (an ellipsis) before it can run into it */
.curtain-cap .cap-r { flex: none; min-width: 6ch; text-align: right; white-space: nowrap; }
.curtain-cap > span:first-child { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- running head (chapters): one bar, the chapter's number and name, a folio rule ---------- */
.top.rh { transform: none !important; transition: background-color .3s, color .3s, box-shadow .3s; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g, 24px); align-items: baseline; }
.top.rh .brand { grid-column: 1 / 4; justify-self: start; }
.top.rh .rh-ch { grid-column: 4 / 10; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top.rh .rh-n { color: var(--accent, #ea5a1e); margin-right: 1.2em; }
.top[data-world="accent"].rh .rh-n { color: var(--ink, #131312); }
.top.rh nav { grid-column: 10 / 13; justify-self: end; }
.folio { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--hr); pointer-events: none; }
.folio i { position: absolute; inset: 0; background: var(--hc); transform-origin: 0 50%; transform: scaleX(var(--fp, 0)); }
.folio b { position: absolute; top: -3px; width: 1px; height: 7px; background: var(--hc); opacity: .55; }
.folio b.past { opacity: 1; }
@media (max-width: 760px) {
  .top.rh { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 16px; }
  .top.rh .brand, .top.rh .rh-ch, .top.rh nav { grid-column: auto; }
  .top.rh .rh-tt { display: none; }
  .folio b { display: none; }
}

/* ---------- the index's ways into a chapter ---------- */
.row .chap { display: none; }
@media (hover: hover) and (pointer: fine) {
  /* inside the meter window, at its right edge, level with the sound control */
  .row .chap {
    display: inline-flex; align-items: center; gap: .7em; position: absolute; z-index: 5; left: var(--cx, 80%); top: calc(50% + 10px);
    transform: translateX(-100%); min-height: 32px; padding: 7px 14px 6px; border-radius: 999px; white-space: nowrap;
    background: var(--paper); color: var(--ink); text-decoration: none; opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  .row .chap i { font-style: normal; transition: transform .35s var(--ease); }
  .row .chap:hover i { transform: translateX(4px); }
  .row.hot .chap, .row:hover .chap, .row .chap:focus-visible, .row.sounding .chap { opacity: 1; pointer-events: auto; transition: opacity .35s .3s; }
  .row .chap:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
}
.row-panel .chap-p { margin-left: 18px; }
.e-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 4px; }
.e-links .e-link { margin-top: 0; }
/* in an entry the links sit at the foot of the text column, as a single link does */
.e-text > .e-links { margin-top: auto; }
@media (max-width: 760px) { .e-text > .e-links { margin-top: 4px; } }
/* the project index: on a phone a row opens in place and its panel leads on into chapter 03 at
   that project's section; with a mouse the row itself turns the page there (the peek is its picture) */
.proj-go { display: inline-block; margin: -8px 0 22px; text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.proj-go:hover { border-color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .proj .proj-status::after { content: "→"; transition: transform .35s var(--ease); }
  .proj.hot .proj-status::after { transform: translateX(4px); }
}
