:root {
  --paper: #f2d44c;
  --paper-hi: #f6dc5e;
  --paper-lo: #e2bf35;
  --ink: #1d1a16;
  --ink-soft: #3b3326;
  --red: #cf2a1c;
  --list: 'Archivo Narrow', 'Arial Narrow', sans-serif;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .42  0 0 0 0 .32  0 0 0 0 .05  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.32'/></svg>");
  --fibers: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='.012 .09' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .38  0 0 0 0 .08  0 0 0 .9 -.32'/></filter><rect width='100%' height='100%' filter='url(%23f)' opacity='.22'/></svg>");
  --counter: #c9b79c;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--counter); -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh; color: var(--ink); font-family: var(--list);
  background-color: var(--counter);
  background-image:
    radial-gradient(ellipse 90% 70% at 50% 45%, rgba(255, 246, 228, .22), rgba(60, 40, 20, .28)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='s'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 .25  0 0 0 0 .17  0 0 0 0 .08  0 0 0 2.2 -1.25'/></filter><rect width='100%' height='100%' filter='url(%23s)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='t'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='9'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 .97  0 0 0 0 .9  0 0 0 2.4 -1.6'/></filter><rect width='100%' height='100%' filter='url(%23t)'/></svg>");
}
html[data-mode="book"], html[data-mode="book"] body { overflow: hidden; height: 100%; }
html.sheet-open, html.sheet-open body { overflow: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- loader: the fore-edge filling up */
#loader { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: inherit; background: var(--counter); transition: opacity .6s ease; cursor: pointer; }
#loader.gone { opacity: 0; pointer-events: none; }
.ld-book { width: min(340px, 70vw); height: 46px; padding: 0; position: relative; }
.ld-edges { position: absolute; inset: 0; border-radius: 2px 6px 6px 2px; overflow: hidden; background: rgba(60, 40, 15, .18); box-shadow: 0 10px 22px rgba(50, 30, 10, .25); }
.ld-edges i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; transition: width .35s ease;
  background: repeating-linear-gradient(to bottom, var(--paper) 0 1px, var(--paper-lo) 1px 2px, #f6df6a 2px 3px); }

/* ---------------------------------------------------------------- the open book */
.stage { position: fixed; inset: 0; overflow: hidden; }
.book { position: absolute; left: 50%; top: 50%; width: 1226px; height: 780px; transform-origin: 50% 50%; }
.pages { position: absolute; left: 0; top: 0; width: 1200px; height: 780px; touch-action: none; }
.block { position: absolute; top: 3px; height: 780px; pointer-events: none; }
.block-l { right: calc(600px + 26px); left: calc(-1 * var(--tl, 4px)); top: 4px; bottom: auto; height: calc(780px + var(--tl, 4px) * .55);
  background:
    linear-gradient(to right, rgba(60, 40, 10, .35), rgba(60, 40, 10, 0) 40%),
    repeating-linear-gradient(to right, #e7cb52 0 1px, #b8962a 1px 1.6px, #f0d660 1.6px 2.4px);
  border-radius: 6px 0 0 8px; box-shadow: -10px 18px 34px rgba(40, 25, 5, .38), -2px 4px 6px rgba(40, 25, 5, .3); }
.block-r { left: 600px; width: calc(600px + var(--tr, 4px)); top: 4px; height: calc(780px + var(--tr, 4px) * .55);
  background:
    linear-gradient(to left, rgba(60, 40, 10, .35), rgba(60, 40, 10, 0) 40%),
    repeating-linear-gradient(to left, #e7cb52 0 1px, #b8962a 1px 1.6px, #f0d660 1.6px 2.4px);
  border-radius: 0 6px 8px 0; box-shadow: 10px 18px 34px rgba(40, 25, 5, .38), 2px 4px 6px rgba(40, 25, 5, .3); }
.block-l::after, .block-r::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: calc(100% - 780px);
  background: repeating-linear-gradient(to bottom, #ecd058 0 1px, #b89a2e 1px 1.7px); }

.pw { position: absolute; top: 0; width: 600px; height: 780px; visibility: hidden; }
.pw-L { left: 0; } .pw-R { left: 600px; }
.pw.flap { filter: drop-shadow(0 3px 7px rgba(50, 30, 0, .32)); }
.page { position: absolute; inset: 0; overflow: hidden; background-color: var(--paper);
  background-image: var(--fibers), var(--grain); }
.page-L { border-radius: 4px 0 0 4px; }
.page-R { border-radius: 0 4px 4px 0; }
.pg-spine { position: absolute; top: 0; bottom: 0; width: 70px; pointer-events: none; }
.page-L .pg-spine { right: 0; background: linear-gradient(to left, rgba(70, 45, 0, .34), rgba(70, 45, 0, .1) 14%, rgba(255, 245, 200, .08) 40%, rgba(70, 45, 0, 0)); }
.page-R .pg-spine { left: 0; background: linear-gradient(to right, rgba(70, 45, 0, .38), rgba(70, 45, 0, .12) 14%, rgba(255, 245, 200, .1) 40%, rgba(70, 45, 0, 0)); }
.pg-fx { position: absolute; left: 0; top: 0; display: none; pointer-events: none; transform-origin: 0 0; z-index: 5; }
.page.cover { background-color: var(--paper-hi); background-image: linear-gradient(115deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, .06) 70%, rgba(0, 0, 0, .03)), var(--grain); }
.pg-head { position: absolute; top: 14px; height: 24px; left: 22px; right: 30px; display: flex; align-items: flex-end; justify-content: space-between;
  border-bottom: 1.6px solid var(--ink); font: 700 14px/1 var(--list); letter-spacing: .02em; padding-bottom: 4px; }
.page-R .pg-head { left: 30px; right: 22px; flex-direction: row-reverse; }
.pg-num { font: 700 17px/1 var(--list); }
.pg-guide { font: 700 13.5px/1 var(--list); letter-spacing: .03em; }
.pg-body { position: absolute; top: 46px; width: 548px; height: 712px; }
.pg-body.measure { left: -9999px !important; visibility: hidden; top: 0; height: auto; }
.pg-rule { position: absolute; width: 0; border-left: .8px solid rgba(29, 26, 22, .55); pointer-events: none; }

/* ---------------------------------------------------------------- listings */
.pages .t-head, .pages .t-ref, .pages .t-see, .pages .t-bold, .pages .t-num, .pages .t-adref, .pages .t-cred { position: absolute; }
.t-head { font: 700 12.6px/1.15 var(--list); letter-spacing: .015em; padding: 7px 0 2px; text-transform: uppercase; }
.t-cont { padding-top: 0; }
.t-ref { font: 400 11.6px/1.28 var(--list); padding: 3px 0 2px; }
.t-ref b { font-weight: 700; letter-spacing: .015em; }
.t-ref i, .t-see i { font-style: italic; }
.t-see { font: 400 11.2px/1.28 var(--list); padding: 0 0 2px 7px; }
.t-go { text-decoration: none; }
.t-go:hover, .t-name:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.t-bold { font: 700 12px/1.22 var(--list); padding: 2px 0 0; }
.t-name { text-decoration: none; }
.t-title { font-weight: 400; }
.t-mike { font-size: 11px; }
.t-mike .t-name { font-size: 11.6px; }
.t-num { display: flex; align-items: baseline; gap: 2px; font: 400 11.2px/1.25 var(--list); padding: 0 0 1px 10px; }
.t-num a { text-decoration: none; white-space: nowrap; }
.t-num a:hover { text-decoration: underline; }
.dots { flex: 1 1 auto; min-width: 8px; align-self: flex-end; height: 3px; margin-bottom: 3px;
  background: radial-gradient(circle, var(--ink) .6px, transparent .9px) 0 50% / 3.2px 3px repeat-x; opacity: .85; }
.t-adref { font: italic 400 10.4px/1.25 var(--list); padding: 0 0 2px 7px; letter-spacing: -.012em; white-space: nowrap; }
.t-adref.wrap, .col-page .t-adref, .sheet .t-adref { white-space: normal; }
.t-cred { display: flex; align-items: baseline; gap: 2px; font: 400 10.2px/1.25 var(--list); padding-left: 10px; }
.t-cred .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-cred .r { white-space: nowrap; }

/* the index box on page 1 */
.ix { position: absolute; border: 1.6px solid var(--ink); padding: 0 0 6px; display: flex; flex-direction: column; }
.ix-head { background: var(--ink); color: var(--paper); font: 700 11.5px/1 var(--list); letter-spacing: .06em; text-align: center; padding: 6px 4px 5px; }
.ix-list { list-style: none; margin: 6px 0 0; padding: 0 7px; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; }
.ix-adv .ix-list { display: block; flex: none; }
.ix-list li { display: flex; align-items: baseline; gap: 2px; font: 400 11.4px/1.2 var(--list); }
.ix-adv .ix-list { columns: 3; column-gap: 18px; margin-top: 9px; }
.ix-adv .ix-list li { break-inside: avoid; font-size: 11.4px; line-height: 1.72; }
.ix-list .ix-pg { font-weight: 700; }

/* ---------------------------------------------------------------- thumb tabs on the fore-edge */
.tabs { position: absolute; left: 1200px; top: 0; width: 26px; height: 780px; }
.tab { position: absolute; left: -3px; width: 25px; border: 0; padding: 0 0 0 3px; background: #2a241c; color: var(--paper); border-radius: 0 4px 4px 0;
  font: 700 12px/1 var(--list); cursor: pointer; display: grid; place-items: center; box-shadow: 2px 1px 2px rgba(40, 25, 5, .35); transition: transform .2s ease, background .2s; }
.tab.empty { background: #57493a; color: #e6c955; }
.tab:hover { transform: translateX(3px); }
.tab.on { background: var(--red); color: #fff3c4; transform: translateX(4px); }
.tab:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---------------------------------------------------------------- the column (phones) */
.column { max-width: 680px; margin: 0 auto; padding: 0 34px 60px 0; position: relative; }
.col-cover { background: var(--paper-hi); background-image: var(--grain); padding: 14px 12px; }
.col-page { background-color: var(--paper); background-image: var(--fibers), var(--grain); padding: 6px 14px 30px; min-height: 100vh; }
.col-page .t-head { font-size: 14px; padding-top: 14px; border-top: 1px solid rgba(29, 26, 22, .35); margin-top: 8px; scroll-margin-top: 8px; }
.col-page .t-ref { font-size: 12.5px; scroll-margin-top: 8px; break-inside: avoid; }
.col-refs { columns: 2; column-gap: 14px; margin: 10px 0 4px; padding-top: 8px; border-top: 1px solid rgba(29, 26, 22, .35); }
.col-page .t-bold { font-size: 14.5px; padding-top: 5px; }
.col-page .t-num, .col-page .t-cred, .col-page .t-adref, .col-page .t-see { font-size: 13px; }
.col-page .t-mike, .col-page .t-mike .t-name { font-size: 12.5px; }
.col-page .dots { background-size: 4px 3px; }
.rail { position: fixed; right: 0; top: 0; bottom: 0; width: 30px; z-index: 20; display: flex; flex-direction: column; justify-content: center;
  padding: max(8px, env(safe-area-inset-top)) 0 max(8px, env(safe-area-inset-bottom)); background: linear-gradient(to right, rgba(40, 28, 10, .0), rgba(40, 28, 10, .12)); touch-action: none; user-select: none; -webkit-user-select: none; }
.rl { flex: 1 1 0; max-height: 26px; min-height: 0; border: 0; padding: 0; margin: 0 3px 1px 4px; background: #2a241c; color: var(--paper); border-radius: 3px 0 0 3px;
  font: 700 11px/1 var(--list); display: grid; place-items: center; }
.rl.empty { background: #6a5a46; color: #ead06a; }
.rl.hit { background: var(--red); color: #fff3c4; }

/* ---------------------------------------------------------------- the ad's own page */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet-dim { position: fixed; inset: 0; background: rgba(35, 22, 6, .58); opacity: 0; transition: opacity .3s ease; }
.sheet.in .sheet-dim { opacity: 1; }
.sheet-scroll { position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet-page { position: relative; width: min(900px, calc(100% - 40px)); margin: 28px auto 40px; background-color: var(--paper); background-image: var(--fibers), var(--grain);
  box-shadow: 0 30px 70px rgba(30, 18, 4, .55), 0 2px 6px rgba(30, 18, 4, .35); padding: 0 34px 34px; transform: translateY(26px); opacity: 0; transition: transform .38s cubic-bezier(.2, .8, .2, 1), opacity .25s ease; }
.sheet.in .sheet-page { transform: none; opacity: 1; }
.sheet-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; border-bottom: 1.8px solid var(--ink); padding: 18px 0 6px; margin-bottom: 18px; }
.sheet-head { margin: 0; font: 700 18px/1 var(--list); letter-spacing: .04em; }
.sheet-close { border: 0; background: var(--ink); color: var(--paper); width: 40px; height: 40px; border-radius: 3px; font: 400 28px/40px var(--list); cursor: pointer; flex: none; margin-bottom: 2px; }
.sheet-close:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.sheet-ad { display: grid; justify-items: center; }
.sheet-ad .ad { width: min(470px, 100%); margin: 4px 0 10px; }
.sheet-listing { margin: 20px 0 6px; padding-top: 10px; border-top: 1px solid rgba(29, 26, 22, .4); max-width: 520px; }
.sheet-listing .t-bold { font-size: 17px; }
.sheet-listing .t-num { font-size: 15px; padding-left: 14px; }
.sheet-listing .t-title { font-size: 14px; }
.sheet-work.ab-media { --ab-fg: var(--ink); --ab-muted: #4a3f2c; --ab-accent: var(--red); --ab-gap: 18px; --ab-chrome: 70px; margin-top: 18px; font: 400 16px/1.42 var(--list); }
.sheet-work .ab-lede { font: 500 18px/1.38 var(--list); max-width: 640px; }
.sheet-work .ab-heading { font: 700 14px/1.2 var(--list); letter-spacing: .05em; text-transform: uppercase; border-top: 1.6px solid var(--ink); padding-top: 8px; }
.sheet-work .ab-text { max-width: 640px; }
.sheet-work .ab-frame { box-shadow: 0 0 0 3px var(--ink); }
.sheet-work figcaption { font: italic 400 14px/1.3 var(--list); color: var(--ink-soft); }
.sheet-work .ab-image img { box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 6px 14px rgba(60, 40, 5, .25); }
.sheet-work .ab-audio audio { filter: sepia(.4) saturate(.9); }
.sheet-work .ab-credits { border-top: 1px solid rgba(29, 26, 22, .4); padding-top: 10px; font-size: 14px; }
.sheet-see { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 30px; border-top: 1.6px solid var(--ink); padding-top: 12px; }
.see-go { text-decoration: none; font: 400 15px/1.3 var(--list); }
.see-go b { font-weight: 700; letter-spacing: .02em; }
.see-go:hover b { text-decoration: underline; }
.about { max-width: 560px; }
.about-name { margin: 6px 0 2px; font: 700 26px/1.1 var(--list); }
.about-title { margin: 0 0 10px; font: 700 16px/1.3 var(--list); }
.about-bio { margin: 0 0 8px; font: 400 16px/1.4 var(--list); }
.about-where { margin: 0 0 6px; font: 400 15px/1.3 var(--list); }
.about .t-num { font-size: 15px; padding-left: 0; margin: 2px 0; }
.about .t-head { font-size: 13px; margin-top: 18px; border-top: 1.4px solid var(--ink); padding-top: 8px; }
.about-exp .t-cred { font-size: 14px; padding: 2px 0 2px 10px; }

@media (max-width: 640px) {
  .sheet-page { width: 100%; margin: 0; min-height: 100%; padding: 0 14px 30px; box-shadow: none; }
  .sheet-bar { padding-top: max(12px, env(safe-area-inset-top)); }
  .sheet-work.ab-media { font-size: 15px; }
  .sheet-work .ab-lede { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet-page, .sheet-dim, #loader, .tab { transition: none; }
}

/* wide screens: the ad stays beside its own page while the real work runs down the column */
@media (min-width: 900px) {
  .sheet-page { width: min(1160px, calc(100% - 48px)); display: grid; grid-template-columns: 330px minmax(0, 1fr); column-gap: 36px; align-items: start; }
  .sheet-bar { grid-column: 1 / -1; }
  .sheet-ad { grid-column: 1; grid-row: 2 / span 3; position: sticky; top: 22px; align-self: start; }
  .sheet-ad .ad { width: 100%; margin: 0; }
  .sheet-listing, .sheet-work, .sheet-see { grid-column: 2; }
  .sheet-listing { margin-top: 0; border-top: 0; padding-top: 0; }
  .sheet-page.about-mode { grid-template-columns: minmax(0, 1fr); width: min(760px, calc(100% - 48px)); }
  .sheet-page.about-mode .sheet-listing { grid-column: 1; }
}
@media (max-width: 899px) {
  .sheet-ad .ad { width: min(340px, 100%); }
}
