/* The Chronicles of Scythia: the Lore pages. The chapter pages and the contents page are built
   by tools/build-lore.mjs from lore/chronicles.md; this sheet is written by hand, except the torn
   edges, which the build writes between their markers. */

@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../assets/lore/fonts/eb-garamond.woff2) format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url(../assets/lore/fonts/eb-garamond-italic.woff2) format('woff2'); }
/* Cinzel is drawn from Roman inscriptions: capitals only, its lower case smaller capitals */
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../assets/lore/fonts/cinzel.woff2) format('woff2'); }

:root {
  --bar: 56px;
  --night: #14110e;
  --night-2: #1d1814;
  --gold: #c9a35f;
  --gold-dim: rgba(201, 163, 95, .55);
  --bone: #e9dcc2;
  --ink: #2a1c10;
  --ink-soft: #5d4129;
  --rubric: #7c2617;
  --paper: #eadbbd;
  --text: 'EB Garamond', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --caps: 'Cinzel', 'Trajan Pro', 'Palatino Linotype', Georgia, serif;
  --fade: radial-gradient(130% 90% at 50% 40%, transparent 55%, rgba(122, 78, 32, .2) 100%);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .33 0 0 0 0 .21 0 0 0 0 .1 0 0 0 1.1 -.48'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --cloud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0045' numOctaves='4' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .36 0 0 0 0 .16 0 0 0 1.05 -.46'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E");
  /* torn edges, written by tools/build-lore.mjs */
  --tear-v: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'640'%20viewBox%3D'0%200%2024%20640'%3E%3Cpath%20d%3D'M24%200L11.7%200L12.8%207.4L14.8%2012.4L13.8%2019.9L15.5%2027L14.7%2034.9L19.6%2040.1L16.8%2047.3L20.7%2054.4L22.6%2063L19.7%2066.7L18.5%2075.2L15.9%2082.1L17.2%2090.6L13%2095.8L13.4%20103.8L13.4%20107.7L13.5%20113.3L14.7%20121.9L15.9%20129.3L11%20132.7L12.1%20139L9.8%20144.6L9.9%20153L12.9%20158.2L18.2%20165.2L12.9%20171.3L13.2%20176.7L13%20181.9L12.1%20186.9L7.6%20193.6L6.9%20202L7.1%20210.2L6.1%20217L7.4%20223L5.1%20231.7L3.2%20238.9L3%20245.4L2.8%20250.4L6.4%20258.2L6.5%20261.9L4.4%20265.3L3.3%20269.2L7.7%20278.2L9.4%20285L13.8%20290.8L16.5%20294.6L16.1%20302.9L15.5%20311.2L10.7%20318.8L10.6%20321.8L9.1%20325.3L11.6%20332L14.4%20339.4L12.9%20346.6L12.3%20354.9L16.2%20360.1L12.8%20363.8L15.5%20366.8L15.3%20373.7L15.4%20376.8L16.5%20380.9L16.1%20387.3L14.3%20391.9L18.1%20396.1L20.5%20399.5L21.4%20406.7L16.7%20412.7L22.8%20416.3L20.7%20420.1L14.7%20428.5L19.7%20436.8L20.1%20445.7L16.1%20453.3L18%20457.8L14%20466.1L12.6%20470.5L10.5%20478.8L9.1%20483.9L5.2%20491.3L5.3%20498.7L4.8%20502.9L11.2%20511.8L11.4%20518.6L7%20527.1L6.2%20534L8.6%20540L10.9%20547.6L5.6%20553.5L6.1%20559.2L9.7%20566.1L10.4%20572.5L9.3%20580L5.8%20587.5L8.4%20592.3L8.6%20596.6L4%20601.3L4.6%20608.3L7.1%20611.7L9.4%20619.6L10%20628.1L7.6%20636.9L11.7%20640L24%20640Z'%2F%3E%3C%2Fsvg%3E");
  --tear-h: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'640'%20height%3D'24'%20viewBox%3D'0%200%20640%2024'%3E%3Cpath%20d%3D'M0%2024L0%2011.7L7.4%2012.8L12.4%2014.8L19.9%2013.8L27%2015.5L34.9%2014.7L40.1%2019.6L47.3%2016.8L54.4%2020.7L63%2022.6L66.7%2019.7L75.2%2018.5L82.1%2015.9L90.6%2017.2L95.8%2013L103.8%2013.4L107.7%2013.4L113.3%2013.5L121.9%2014.7L129.3%2015.9L132.7%2011L139%2012.1L144.6%209.8L153%209.9L158.2%2012.9L165.2%2018.2L171.3%2012.9L176.7%2013.2L181.9%2013L186.9%2012.1L193.6%207.6L202%206.9L210.2%207.1L217%206.1L223%207.4L231.7%205.1L238.9%203.2L245.4%203L250.4%202.8L258.2%206.4L261.9%206.5L265.3%204.4L269.2%203.3L278.2%207.7L285%209.4L290.8%2013.8L294.6%2016.5L302.9%2016.1L311.2%2015.5L318.8%2010.7L321.8%2010.6L325.3%209.1L332%2011.6L339.4%2014.4L346.6%2012.9L354.9%2012.3L360.1%2016.2L363.8%2012.8L366.8%2015.5L373.7%2015.3L376.8%2015.4L380.9%2016.5L387.3%2016.1L391.9%2014.3L396.1%2018.1L399.5%2020.5L406.7%2021.4L412.7%2016.7L416.3%2022.8L420.1%2020.7L428.5%2014.7L436.8%2019.7L445.7%2020.1L453.3%2016.1L457.8%2018L466.1%2014L470.5%2012.6L478.8%2010.5L483.9%209.1L491.3%205.2L498.7%205.3L502.9%204.8L511.8%2011.2L518.6%2011.4L527.1%207L534%206.2L540%208.6L547.6%2010.9L553.5%205.6L559.2%206.1L566.1%209.7L572.5%2010.4L580%209.3L587.5%205.8L592.3%208.4L596.6%208.6L601.3%204L608.3%204.6L611.7%207.1L619.6%209.4L628.1%2010L636.9%207.6L640%2011.7L640%2024Z'%2F%3E%3C%2Fsvg%3E");
  --burn-v: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'640'%20viewBox%3D'0%200%2024%20640'%3E%3Cfilter%20id%3D'b'%3E%3CfeGaussianBlur%20stdDeviation%3D'2.2'%2F%3E%3C%2Ffilter%3E%3Cpath%20d%3D'M11.7%200L12.8%207.4L14.8%2012.4L13.8%2019.9L15.5%2027L14.7%2034.9L19.6%2040.1L16.8%2047.3L20.7%2054.4L22.6%2063L19.7%2066.7L18.5%2075.2L15.9%2082.1L17.2%2090.6L13%2095.8L13.4%20103.8L13.4%20107.7L13.5%20113.3L14.7%20121.9L15.9%20129.3L11%20132.7L12.1%20139L9.8%20144.6L9.9%20153L12.9%20158.2L18.2%20165.2L12.9%20171.3L13.2%20176.7L13%20181.9L12.1%20186.9L7.6%20193.6L6.9%20202L7.1%20210.2L6.1%20217L7.4%20223L5.1%20231.7L3.2%20238.9L3%20245.4L2.8%20250.4L6.4%20258.2L6.5%20261.9L4.4%20265.3L3.3%20269.2L7.7%20278.2L9.4%20285L13.8%20290.8L16.5%20294.6L16.1%20302.9L15.5%20311.2L10.7%20318.8L10.6%20321.8L9.1%20325.3L11.6%20332L14.4%20339.4L12.9%20346.6L12.3%20354.9L16.2%20360.1L12.8%20363.8L15.5%20366.8L15.3%20373.7L15.4%20376.8L16.5%20380.9L16.1%20387.3L14.3%20391.9L18.1%20396.1L20.5%20399.5L21.4%20406.7L16.7%20412.7L22.8%20416.3L20.7%20420.1L14.7%20428.5L19.7%20436.8L20.1%20445.7L16.1%20453.3L18%20457.8L14%20466.1L12.6%20470.5L10.5%20478.8L9.1%20483.9L5.2%20491.3L5.3%20498.7L4.8%20502.9L11.2%20511.8L11.4%20518.6L7%20527.1L6.2%20534L8.6%20540L10.9%20547.6L5.6%20553.5L6.1%20559.2L9.7%20566.1L10.4%20572.5L9.3%20580L5.8%20587.5L8.4%20592.3L8.6%20596.6L4%20601.3L4.6%20608.3L7.1%20611.7L9.4%20619.6L10%20628.1L7.6%20636.9L11.7%20640'%20fill%3D'none'%20stroke%3D'%23603a17'%20stroke-opacity%3D'.55'%20stroke-width%3D'5'%20filter%3D'url(%23b)'%2F%3E%3C%2Fsvg%3E");
  --burn-h: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'640'%20height%3D'24'%20viewBox%3D'0%200%20640%2024'%3E%3Cfilter%20id%3D'b'%3E%3CfeGaussianBlur%20stdDeviation%3D'2.2'%2F%3E%3C%2Ffilter%3E%3Cpath%20d%3D'M0%2011.7L7.4%2012.8L12.4%2014.8L19.9%2013.8L27%2015.5L34.9%2014.7L40.1%2019.6L47.3%2016.8L54.4%2020.7L63%2022.6L66.7%2019.7L75.2%2018.5L82.1%2015.9L90.6%2017.2L95.8%2013L103.8%2013.4L107.7%2013.4L113.3%2013.5L121.9%2014.7L129.3%2015.9L132.7%2011L139%2012.1L144.6%209.8L153%209.9L158.2%2012.9L165.2%2018.2L171.3%2012.9L176.7%2013.2L181.9%2013L186.9%2012.1L193.6%207.6L202%206.9L210.2%207.1L217%206.1L223%207.4L231.7%205.1L238.9%203.2L245.4%203L250.4%202.8L258.2%206.4L261.9%206.5L265.3%204.4L269.2%203.3L278.2%207.7L285%209.4L290.8%2013.8L294.6%2016.5L302.9%2016.1L311.2%2015.5L318.8%2010.7L321.8%2010.6L325.3%209.1L332%2011.6L339.4%2014.4L346.6%2012.9L354.9%2012.3L360.1%2016.2L363.8%2012.8L366.8%2015.5L373.7%2015.3L376.8%2015.4L380.9%2016.5L387.3%2016.1L391.9%2014.3L396.1%2018.1L399.5%2020.5L406.7%2021.4L412.7%2016.7L416.3%2022.8L420.1%2020.7L428.5%2014.7L436.8%2019.7L445.7%2020.1L453.3%2016.1L457.8%2018L466.1%2014L470.5%2012.6L478.8%2010.5L483.9%209.1L491.3%205.2L498.7%205.3L502.9%204.8L511.8%2011.2L518.6%2011.4L527.1%207L534%206.2L540%208.6L547.6%2010.9L553.5%205.6L559.2%206.1L566.1%209.7L572.5%2010.4L580%209.3L587.5%205.8L592.3%208.4L596.6%208.6L601.3%204L608.3%204.6L611.7%207.1L619.6%209.4L628.1%2010L636.9%207.6L640%2011.7'%20fill%3D'none'%20stroke%3D'%23603a17'%20stroke-opacity%3D'.55'%20stroke-width%3D'5'%20filter%3D'url(%23b)'%2F%3E%3C%2Fsvg%3E");
  /* end of torn edges */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 16px); }
body {
  margin: 0; background: var(--night); color: var(--bone);
  font-family: var(--text); font-size: 20px; line-height: 1.6;
  font-kerning: normal; font-variant-ligatures: common-ligatures; font-optical-sizing: auto;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 30; padding: 8px 14px; background: var(--gold); color: var(--night); font: 600 15px var(--text); }
.skip:focus { top: 10px; }

/* small capitals for labels: Cinzel, tracked open as inscriptions are */
.label, .book, .bar, .finis, .turn small, .card small, .back {
  font-family: var(--caps); font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
}

/* ---- the bar across the top ---- */
.bar {
  position: sticky; top: 0; z-index: 20; height: var(--bar);
  display: flex; align-items: center; gap: 20px; padding: 0 clamp(16px, 2.4vw, 32px);
  background: linear-gradient(#1b1612, #120f0c); border-bottom: 1px solid rgba(201, 163, 95, .28);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  font-size: 12.5px; color: var(--bone);
}
.bar a { text-decoration: none; }
.brand { flex: none; color: var(--gold); font-size: 13.5px; letter-spacing: .2em; white-space: nowrap; }
.brand:hover { color: #e3c387; }
.chapters a, .chapters .soon { white-space: nowrap; }
.chapters b { font-weight: 600; color: var(--gold); margin-right: .35em; letter-spacing: .06em; }
.chapters .soon { opacity: .38; cursor: default; }
.chapters.wide { flex: 1; min-width: 0; display: flex; justify-content: center; gap: clamp(14px, 1.8vw, 28px); }
.chapters.wide .soon { display: none; }   /* forthcoming chapters are on the contents page and in the narrow list */
.chapters.wide a { position: relative; padding: 6px 0; opacity: .8; transition: opacity .2s; }
.chapters.wide a:hover, .chapters a[aria-current] { opacity: 1; }
.chapters.wide a[aria-current]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--gold); }
.chapters.narrow { display: none; }
.home { flex: none; margin-left: auto; padding: 8px 14px; border: 1px solid var(--gold-dim); border-radius: 2px; color: var(--gold); white-space: nowrap; transition: background .2s, color .2s; }
.home:hover { background: var(--gold); color: var(--night); }
/* the reading has a thread of gold under the bar, filling as the page is read */
@supports (animation-timeline: scroll()) {
  .chapter .bar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold);
    transform-origin: left; transform: scaleX(0); animation: read linear both; animation-timeline: scroll(root); }
  @keyframes read { to { transform: scaleX(1); } }
}

@media (max-width: 1679.98px) {   /* five chapter titles need about 1640px across */
  .chapters.wide { display: none; }
  .chapters.narrow { display: block; position: relative; margin-left: auto; }
  .home { margin-left: 0; }
  .chapters.narrow summary { list-style: none; cursor: pointer; padding: 8px 4px; color: var(--bone); }
  .chapters.narrow summary::-webkit-details-marker { display: none; }
  .chapters.narrow summary::after { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 9px;
    border: solid var(--gold); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .2s; }
  .chapters.narrow[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
  .chapters.narrow nav { position: absolute; right: -8px; top: calc(100% + 10px); min-width: 270px; padding: 8px;
    display: grid; background: var(--night-2); border: 1px solid rgba(201, 163, 95, .3); box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
  .chapters.narrow nav a, .chapters.narrow nav .soon { padding: 11px 12px; font-size: 13px; }
  .chapters.narrow nav a:hover { background: rgba(201, 163, 95, .1); }
  .chapters.narrow nav a[aria-current] { background: rgba(201, 163, 95, .14); }
  .chapters.narrow nav b { display: inline-block; min-width: 2.2em; }
}
@media (max-width: 560px) {
  .bar { gap: 10px; }
  .bar .long { display: none; }
  .home { padding: 7px 12px; }
  .chapters.narrow summary { font-size: 11.5px; letter-spacing: .12em; }
  .chapters.narrow nav { position: fixed; left: 12px; right: 12px; top: calc(var(--bar) + 8px); min-width: 0; }
}

/* ---- a chapter: the painting beside, or above, a sheet of vellum ---- */
.spread { position: relative; }
.painting { margin: 0; background: #0c0a08; overflow: hidden; }
.painting img { width: 100%; height: 100%; object-fit: cover; }

.sheet {
  position: relative; color: var(--ink);
  background-color: var(--paper);
  /* fine grain, slow clouding, and the page darkening toward its edges: drawn, not a tiled photograph */
  background-image:
    var(--fade),
    var(--grain),
    var(--cloud);
  background-size: 100% 100%, 260px 260px, 900px 900px;
  background-attachment: scroll, scroll, scroll;
}

.title { text-align: center; }
.book { margin: 0; font-size: 12px; letter-spacing: .32em; color: var(--ink-soft); }
.title .label { margin: 1.9em 0 .5em; font-size: 14px; letter-spacing: .3em; color: var(--rubric); }
h1 {
  margin: 0; font-family: var(--caps); font-weight: 500; font-size: clamp(38px, 2.6vw + 18px, 62px);
  line-height: 1.08; letter-spacing: .035em; text-wrap: balance; color: var(--ink);
}
.rule { display: flex; justify-content: center; margin: 22px auto; color: #8a6532; }
.rule svg { width: 120px; height: 12px; }
.epigraph {
  max-width: 27em; margin: 0 auto; font-style: italic; font-size: 1.12em; line-height: 1.5;
  color: var(--ink-soft); text-wrap: balance;
}
/* the chapter read aloud (narrate.js), shown once its recording is there */
.narrate { display: inline-flex; align-items: center; gap: .5em; margin: 1.3em auto 0; padding: 7px 16px 7px 12px; cursor: pointer;
  border: 1px solid rgba(124, 38, 23, .45); border-radius: 2px; background: transparent; color: var(--rubric);
  font: 500 12.5px var(--caps); letter-spacing: .18em; text-transform: uppercase; transition: background .2s, color .2s; }
.narrate[hidden] { display: none; }
.narrate:hover, .narrate.on { background: var(--rubric); color: var(--paper); }
.narrate.on .ring { animation: ring 1.4s ease-in-out infinite; }
@keyframes ring { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .narrate.on .ring { animation: none; } }

/* the drawings: ink laid on the vellum, so only the lines show */
.headpiece, .study { margin: 0; }
.headpiece img, .study img { width: 100%; height: auto; mix-blend-mode: multiply; filter: sepia(.3) contrast(1.08); opacity: .9; }
.headpiece { max-width: 34rem; margin: 1.6em auto .8em; }
.study { width: min(100%, 29rem); margin: .6em auto; }
.study.tilt-l img { transform: rotate(-1.2deg) translateX(-6%); }
.study.tilt-r img { transform: rotate(1deg) translateX(6%); }

.prose { max-width: 30em; margin: 0 auto; font-size: clamp(19px, .35vw + 16px, 21px); line-height: 1.62;
  font-variant-numeric: oldstyle-nums proportional-nums; hanging-punctuation: first allow-end; }
.prose p { margin: 0 0 .85em; text-wrap: pretty; widows: 2; orphans: 2; }
.prose h2 {
  margin: 2.6em 0 1.2em; text-align: center; font-family: var(--caps); font-weight: 500;
  font-size: 1.22em; line-height: 1.3; letter-spacing: .07em; color: var(--ink); text-wrap: balance;
}
.prose h2 .num { display: block; margin-bottom: .45em; font-size: .7em; letter-spacing: .24em; color: var(--rubric); }
.prose h2::after { content: ''; display: block; width: 56px; height: 1px; margin: .8em auto 0; background: #8a6532; opacity: .7; }
.prose strong { font-weight: 600; }
.prose .stand { margin: 1.4em 0; text-align: center; font-size: 1.08em; letter-spacing: .01em; }
/* a quotation alone in its paragraph */
.prose .quote { max-width: 25em; margin: 1.7em auto; text-align: center; font-style: italic; font-size: 1.1em; line-height: 1.5; color: var(--ink-soft); text-wrap: balance; }
.prose .stand:last-child { margin-top: 2em; font-size: 1.25em; }

/* the opening paragraph: an illuminated initial three lines deep, and its first line in capitals */
.opening::first-line { font-family: var(--caps); font-size: .84em; letter-spacing: .06em; }
/* three lines are 4.86em of the text; the box with its outer frame stays inside them at 3.2em */
.initial {
  float: left; width: 1.34em; height: 1.34em; margin: .1em .2em 0 .06em;
  display: grid; place-items: center; padding-top: .1em;
  font-family: var(--caps); font-weight: 600; font-size: 3.2em; line-height: 1; letter-spacing: 0;
  color: var(--rubric); text-shadow: 0 1px 0 rgba(255, 240, 210, .5);
  background: radial-gradient(circle at 50% 45%, rgba(201, 163, 95, .08), rgba(201, 163, 95, .26));
  border: 1px solid #9a7438; outline: 1px solid rgba(154, 116, 56, .6); outline-offset: 3px;
}

/* the end of a chapter */
.end { max-width: 40rem; margin: 3.4em auto 0; text-align: center; }
.fleuron { color: #8a6532; }
.finis { margin: .8em 0 2.4em; font-size: 12.5px; letter-spacing: .28em; color: var(--ink-soft); }
.turns { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; text-align: left; }
.turn { position: relative; display: flex; align-items: flex-end; min-height: 128px; overflow: hidden; text-decoration: none;
  color: var(--bone); background: var(--night); border: 1px solid #7d5c2c; box-shadow: 0 6px 18px rgba(60, 35, 10, .28); }
.turn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .62; transition: opacity .3s, transform .6s; }
.turn::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(transparent 20%, rgba(12, 9, 6, .85)); }
.turn span { position: relative; z-index: 2; display: block; padding: 14px 18px; font-family: var(--caps); font-size: 19px; letter-spacing: .04em; line-height: 1.2; }
.turn small { display: block; margin-bottom: 6px; font-size: 10.5px; letter-spacing: .2em; color: var(--gold); }
.turn.next { text-align: right; justify-content: flex-end; }
.turn:hover img { opacity: .8; transform: scale(1.03); }
.turn.soon { background: transparent; border-style: dashed; border-color: rgba(125, 92, 44, .6); box-shadow: none; color: var(--ink-soft); }
.turn.soon::before { display: none; }
.turn.soon small { color: var(--ink-soft); }
.back { margin: 2.6em 0 0; font-size: 11.5px; letter-spacing: .2em; color: var(--ink-soft); }
.back a { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.back a:hover { color: var(--rubric); }

/* wide: the painting stands still at the left; the vellum, torn along its left edge, lies over it */
@media (min-width: 1080px) {
  .spread { display: grid; grid-template-columns: minmax(340px, 38vw) 1fr; }
  .painting { position: sticky; top: var(--bar); height: calc(100vh - var(--bar)); height: calc(100svh - var(--bar)); }
  .painting::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, transparent 75%, rgba(0, 0, 0, .55)), linear-gradient(rgba(0, 0, 0, .25), transparent 18%); }
  .sheet {
    margin-left: -22px; padding: 64px clamp(40px, 5vw, 96px) 72px calc(clamp(40px, 5vw, 96px) + 22px);
    background-image: var(--burn-v), var(--fade), var(--grain), var(--cloud);
    background-size: 24px 640px, 100% 100%, 260px 260px, 900px 900px;
    background-repeat: repeat-y, no-repeat, repeat, repeat;
    -webkit-mask: var(--tear-v) left top / 24px 640px repeat-y, linear-gradient(#000 0 0) 23px 0 / calc(100% - 23px) 100% no-repeat;
            mask: var(--tear-v) left top / 24px 640px repeat-y, linear-gradient(#000 0 0) 23px 0 / calc(100% - 23px) 100% no-repeat;
    min-height: calc(100svh - var(--bar));
  }
}

/* narrower: the painting is a band across the top; the vellum, torn along its top, rises over it */
@media (max-width: 1079.98px) {
  .painting { height: clamp(260px, 44vw + 110px, 560px); }
  .painting::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(transparent 60%, rgba(0, 0, 0, .45)); }
  .painting { position: relative; }
  .sheet {
    margin-top: -24px; padding: 54px clamp(18px, 6vw, 64px) 56px;
    background-image: var(--burn-h), var(--fade), var(--grain), var(--cloud);
    background-size: 640px 24px, 100% 100%, 260px 260px, 900px 900px;
    background-repeat: repeat-x, no-repeat, repeat, repeat;
    -webkit-mask: var(--tear-h) left top / 640px 24px repeat-x, linear-gradient(#000 0 0) 0 23px / 100% calc(100% - 23px) no-repeat;
            mask: var(--tear-h) left top / 640px 24px repeat-x, linear-gradient(#000 0 0) 0 23px / 100% calc(100% - 23px) no-repeat;
  }
  .study.tilt-l img, .study.tilt-r img { transform: none; }
}
@media (max-width: 560px) {
  body { font-size: 18px; }
  .prose { font-size: 18.5px; line-height: 1.6; }
  .title .label { margin-top: 1.5em; }
  .rule { margin: 16px auto; }
  .epigraph { font-size: 1.06em; }
  .headpiece { margin: 1.6em -6px 1em; }
  .prose h2 { margin-top: 2.2em; }
}

/* ---- the contents page ---- */
.contents { background:
  radial-gradient(90% 60% at 50% 0%, rgba(201, 163, 95, .12), transparent 70%),
  linear-gradient(#17130f, #0e0c0a 60%) fixed; min-height: 100vh; }
.hall { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px) 72px; }
.masthead { text-align: center; padding-top: 0; }
.banner { width: clamp(110px, 12vw, 150px); height: auto; margin: 0 auto -6px; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .6)); }
.masthead .label { margin: 0 0 14px; font-size: 13px; letter-spacing: .4em; color: var(--gold); }
.masthead h1 { color: var(--bone); font-size: clamp(36px, 4vw + 14px, 72px); letter-spacing: .05em; }
.masthead h1 span { display: inline-block; font-size: .5em; letter-spacing: .12em; vertical-align: .32em; margin: 0 .2em; color: var(--gold); }
.masthead .rule { color: var(--gold-dim); }
.lede { max-width: 30em; margin: 0 auto 52px; font-style: italic; font-size: 1.15em; color: rgba(233, 220, 194, .78); text-wrap: balance; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(6, 1fr); }
.cards li { grid-column: span 2; }
.cards li:nth-child(n+4) { grid-column: span 3; }
.card { position: relative; display: flex; align-items: flex-end; height: 100%; min-height: 220px; overflow: hidden; text-decoration: none; color: var(--bone);
  background: #0c0a08; border: 1px solid rgba(201, 163, 95, .32); }
.cards li:nth-child(-n+3) .card { aspect-ratio: 3 / 4; }
.cards li:nth-child(n+4) .card { aspect-ratio: 16 / 7; }
.cards .card.soon { aspect-ratio: auto; }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1), filter .4s; filter: saturate(.92) brightness(.92); }
.card::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(transparent 35%, rgba(10, 8, 6, .55) 58%, rgba(10, 8, 6, .95)); }
.card::after { content: ''; position: absolute; inset: 8px; z-index: 1; border: 1px solid rgba(201, 163, 95, .22); pointer-events: none; transition: border-color .3s; }
.card:hover img { transform: scale(1.04); filter: saturate(1) brightness(1); }
.card:hover::after { border-color: rgba(201, 163, 95, .6); }
.words { position: relative; z-index: 2; display: block; padding: 22px 24px 26px; }
.words small { display: block; margin-bottom: 8px; font-size: 11px; letter-spacing: .3em; color: var(--gold); }
.words strong { display: block; font-family: var(--caps); font-weight: 500; font-size: clamp(22px, 1.1vw + 12px, 28px); line-height: 1.15; letter-spacing: .04em; }
.words em { display: block; margin-top: 12px; font-size: 16px; line-height: 1.45; color: rgba(233, 220, 194, .75);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card.soon { background: transparent; border-style: dashed; border-color: rgba(201, 163, 95, .25); color: rgba(233, 220, 194, .5); }
.card.soon::before, .card.soon::after { display: none; }
.card.soon .words small { color: rgba(201, 163, 95, .5); }
.card.soon .words strong { font-size: 20px; }
.card.soon .words em { font-size: 15px; }
.contents .back { text-align: center; color: rgba(233, 220, 194, .6); }
.contents .back a:hover { color: var(--gold); }

.card.soon { min-height: 0; }
.card.soon .words { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; width: 100%; padding: 18px 24px; }
.card.soon .words small { margin: 0; }
.card.soon .words em { margin: 0 0 0 auto; }

@media (max-width: 1000px) {
  .cards li:nth-child(-n+3) .card { aspect-ratio: 3 / 4.4; }
  .words { padding: 18px 18px 20px; }
  .words em { font-size: 15px; -webkit-line-clamp: 4; }
}
@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; gap: 14px; }
  .cards li, .cards li:nth-child(n+4) { grid-column: auto; }
  .cards li .card { aspect-ratio: 5 / 4; }
  .card.soon .words em { margin-left: 0; flex-basis: 100%; }
  .lede { margin-bottom: 36px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print {
  .bar, .painting, .turns, .back { display: none; }
  body, .sheet { background: #fff; color: #000; }
  .sheet { -webkit-mask: none; mask: none; margin: 0; padding: 0; }
}
