/* fangyuancao.me: the site as one worked problem. Four solutions of y' + y = sin x run down the home page;
   each opens a section. White paper, black ink, one red pen. Type: New Computer Modern (assets/fonts/newcm, GUST licence). */
@font-face { font-family: "NewCM"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/newcm/newcm-book.woff2) format("woff2"); }
@font-face { font-family: "NewCM"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/newcm/newcm-italic.woff2) format("woff2"); }
@font-face { font-family: "NewCM"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/newcm/newcm-bold.woff2) format("woff2"); }
:root {
  --paper: #fdfdfb;
  --ink: #121315;
  --grey: #6b6e74;
  --hair: #dcddd9;
  --pen: #c8242b;
  --cm: "NewCM", "Latin Modern Roman", "Computer Modern", "Songti SC", "Noto Serif SC", "Times New Roman", serif;
  --hand: "Caveat", "Bradley Hand", cursive;
  /* read by assets/vault-graph.js */
  --ink-muted: #b4b6b1; --ink-faint: #cfd0cc; --gilt: #c8242b;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #191a1b;
  --ink: #e8e6df;
  --grey: #aaa9a2;
  --hair: #444541;
  --pen: #e66b70;
  --ink-muted: #777873; --ink-faint: #555650;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 19px/1.5 var(--cm); overflow-x: hidden; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover, a:focus-visible { color: var(--pen); text-decoration-color: var(--pen); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--pen); outline-offset: 2px; }
.qed { display: inline-block; width: .5em; height: .82em; background: var(--ink); vertical-align: -.06em; }

/* ---------- home: the strings ---------- */
#stage { position: relative; overflow: hidden; padding: 0 20px; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; transition: opacity .35s; } #stage.open #field { opacity: .25; }
#strings { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#strings path.s { fill: none; stroke: var(--ink); stroke-width: 1.1; stroke-linecap: round; transition: stroke .2s, opacity .35s, stroke-width .2s; }
#strings path.hit { fill: none; stroke: transparent; stroke-width: 26; cursor: pointer; pointer-events: stroke; }
#strings path.guide { fill: none; stroke: none; }
#strings circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.1; transition: stroke .2s, fill .2s, opacity .35s; }
#strings g[data-i] text { font: 400 19px var(--cm); fill: var(--ink); cursor: pointer; transition: fill .2s, opacity .35s; }
#strings text .n { font-weight: 700; }
#strings g.on path.s, #strings g[data-i]:hover path.s, #strings g.kb path.s { stroke: var(--pen); stroke-width: 1.9; }
#strings g[data-i]:hover text, #strings g.kb text { fill: var(--pen); }
#strings g[data-i]:hover circle, #strings g.kb circle, #strings g.on circle { stroke: var(--pen); fill: var(--pen); }
#strings.open g:not(.on) path.s, #strings.open g:not(.on) circle { opacity: .12; }
#strings.open g[data-i] text { opacity: 0; pointer-events: none; }
#strings.open g:not(.on) path.hit { pointer-events: none; }
#axis { pointer-events: none; transition: opacity .35s; }
#axis line, #axis path { stroke: var(--grey); stroke-width: .8; fill: none; }
#axis text { font: 400 15px var(--cm); fill: var(--grey); }
#strings.open #axis { opacity: .3; }

.top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; padding-top: 26px; }
.who { display: flex; gap: 14px; align-items: flex-start; }
.face { flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; margin-top: 2px; background: var(--hair); }
.face img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1) contrast(1.05); transition: filter .5s; }
.face:hover img, .face:focus-visible img { filter: none; }
.top h1 { margin: 0 0 6px; font: 700 30px/1.1 var(--cm); }
.top h1 span { font-weight: 400; font-size: 17px; color: var(--grey); margin-left: 8px; }
.top p { margin: 0; }
.top .how { color: var(--grey); font-size: 16px; font-style: italic; margin-left: .6em; }
.deco { max-width: none; }
.eqn-inline { white-space: nowrap; }
/* sound: the slider sits under the toggle and only shows when the pointer is near */
.controls { display: flex; flex-direction: column; align-items: flex-end; }
.snd { position: relative; text-align: right; padding-bottom: 26px; }
#sound, #theme-toggle { font-style: italic; font-size: 15px; line-height: 1; color: var(--grey); background: none; border: 0; padding: 6px 0; cursor: pointer; white-space: nowrap; }
#sound:hover, #sound:focus-visible, #theme-toggle:hover, #theme-toggle:focus-visible { color: var(--pen); }
#vol { position: absolute; right: 0; top: 30px; -webkit-appearance: none; appearance: none; width: 84px; height: 18px; margin: 0; background: transparent; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .7s ease; }
.snd:hover #vol, .snd:focus-within #vol { opacity: 1; pointer-events: auto; }
@media (hover: none) { .snd.on #vol { opacity: 1; pointer-events: auto; } }
#vol::-webkit-slider-runnable-track { height: 1px; background: var(--ink); }
#vol::-moz-range-track { height: 1px; background: var(--ink); }
#vol::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--paper); border: 1.1px solid var(--ink); }
#vol::-moz-range-thumb { width: 8px; height: 8px; border-radius: 50%; background: var(--paper); border: 1.1px solid var(--ink); }
#vol:hover::-webkit-slider-thumb, #vol:focus-visible::-webkit-slider-thumb { background: var(--pen); border-color: var(--pen); }
#vol:hover::-moz-range-thumb, #vol:focus-visible::-moz-range-thumb { background: var(--pen); border-color: var(--pen); }
#vol:focus-visible { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); background: none; border: 0; }
.sr:focus-visible { z-index: 9; width: auto; height: auto; clip-path: none; top: 8px; left: 8px; background: var(--paper); padding: 4px 8px; }

.aside, .note { position: absolute; z-index: 1; margin: 0; transition: opacity .35s; }
.aside.eqn { white-space: nowrap; font-size: 21px; } .aside.eqn .no { color: var(--grey); font-size: 17px; margin-left: 1.2em; }
.aside.rem { width: 250px; }
.note { width: 240px; font-size: 16px; line-height: 1.4; color: var(--grey); }
.note b { color: var(--ink); }
/* a stanza beside the strings */
.poem { position: absolute; z-index: 1; margin: 0; width: max-content; transition: opacity .35s; }
.poem blockquote { margin: 0; font-size: 17px; line-height: 1.42; }
.poem blockquote span { display: block; padding-left: 1.6em; text-indent: -1.6em; } .poem blockquote span.in { padding-left: 3em; }
.poem figcaption { margin-top: 8px; font-size: 14px; color: var(--grey); }
#stage.open .poem { opacity: .12; }
/* a soft oval of paper behind each stanza and figure (with its caption): solid in the middle, gone at the rim, so the field never competes with the text */
.poem::before, .deco::before { content: ""; position: absolute; z-index: -1; inset: -36px -64px; pointer-events: none;
  background: radial-gradient(ellipse closest-side, var(--paper) 0%, var(--paper) 52%, color-mix(in srgb, var(--paper) 0%, transparent) 100%); }
.poem::before { inset: -64px -84px; background: radial-gradient(ellipse closest-side, var(--paper) 0%, var(--paper) 66%, color-mix(in srgb, var(--paper) 0%, transparent) 100%); }
#stage.open .aside, #stage.open .note { opacity: .12; }
.top { transition: opacity .3s; } #stage.open .top { opacity: 0; pointer-events: none; }
.frac { display: inline-grid; vertical-align: middle; text-align: center; font-size: .74em; line-height: 1.05; margin: 0 1px; } .frac span:first-child { border-bottom: 1px solid currentColor; padding: 0 2px; }
.deco { position: absolute; z-index: 2; width: 170px; margin: 0; text-align: center !important; transition: opacity .35s; }
.deco button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.deco img { display: block; width: 100%; height: auto; transition: transform .6s cubic-bezier(.3,1.6,.5,1); }
:root[data-theme="dark"] .hood-img { filter: invert(1); }
.deco button, .panel figure.fig button { cursor: zoom-in; }
.deco button:hover img, .deco button:focus-visible img, .panel figure.fig button:hover img, .panel figure.fig button:focus-visible img { transform: rotate(-3deg); }
.deco figcaption { margin-top: 4px; font-size: 14px; font-style: italic; color: var(--grey); }
#sea { width: 200px; } #spring { width: 180px; } #gust img { transform-origin: 33% 98%; }
#stage.open .deco { opacity: .12; }

.end { position: absolute; z-index: 2; width: min(320px, 44%); text-align: right; }
.end h2 { margin: 0 0 4px; font: 700 30px/1.1 var(--cm); }
.end p { margin: 0 0 8px; color: var(--grey); font-style: italic; font-size: 17px; }
.end ul { list-style: none; margin: 0; padding: 0; font-size: 17px; line-height: 1.6; }
.end .see { display: inline-block; margin: 12px 4px 0 0; font: 500 26px/1 var(--hand); color: var(--pen); transform: rotate(-7deg); border: 2px solid var(--pen); border-radius: 50%; padding: 3px 14px 6px; }
.colophon { position: absolute; left: 34px; bottom: 10px; z-index: 1; margin: 0; font-size: 14px; color: var(--grey); }

/* ---------- a section, opened beside its string ---------- */
/* the section fills the page to the right of its straightened string, with the text in a centred column */
.panel { position: fixed; z-index: 5; top: 0; bottom: 0; right: 0; left: calc(clamp(22px, 7vw, 64px) + 30px); overflow-y: auto; overscroll-behavior: contain; background: var(--paper); border-left: 1px solid var(--hair);
  padding: 0 30px 70px 38px; transform: translateX(102%); visibility: hidden; transition: transform .45s cubic-bezier(.2,.8,.2,1), visibility 0s .45s; }
.panel.show { transform: none; visibility: visible; transition: transform .45s cubic-bezier(.2,.8,.2,1), visibility 0s; }
.panel p { margin: 0 0 12px; max-width: 60ch; }
.panel p.q { font-size: 22px; margin: 0 76px 20px 0; }
.panel h3 { margin: 34px 0 12px; font: 400 19px/1.3 var(--cm); } .panel h3 b { margin-right: .35em; }
.panel h3 small { font-size: 16px; color: var(--grey); margin-left: .5em; }
.panel h4 { margin: 20px 0 6px; font: italic 400 18px/1.3 var(--cm); }
.sheet { max-width: 780px; margin: 0 auto; padding-top: 38px; }
.bar { position: sticky; top: 0; z-index: 3; height: 0; text-align: right; }
.close { position: relative; top: 26px; font-style: italic; font-size: 16px; line-height: 1; color: var(--grey); background: var(--paper); border: 0; padding: 6px; cursor: pointer; }
.close:hover, .close:focus-visible { color: var(--pen); }
/* numbered references */
ol.refs { margin: 0 0 8px; padding: 0; list-style: none; display: grid; gap: 18px; }
ol.refs > li { display: grid; grid-template-columns: 2.3em minmax(0, 1fr); line-height: 1.42; scroll-margin-top: 20px; }
ol.refs > li::before { content: "[" attr(data-n) "]"; }
ol.refs .cite { display: block; }
ol.refs .claim { display: block; margin-top: 5px; color: var(--ink); }
ol.refs .more { margin-top: 4px; }
ol.refs li.flash { animation: flash 1.8s ease-out; }
@keyframes flash { from { background: color-mix(in srgb, var(--pen) 14%, transparent); } to { background: transparent; } }
details > summary { cursor: pointer; font-style: italic; color: var(--grey); list-style: none; width: fit-content; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: " ▸"; font-style: normal; font-size: .7em; display: inline-block; margin-left: 0.35em; vertical-align: 0.05em; transform-origin: center center; }
details > summary:hover { color: var(--pen); }
details .proof { margin-top: 6px; } details .proof p:last-child { margin-bottom: 0; }
.go { display: inline-block; margin-top: 5px; font-style: italic; }
.pill { font-variant: small-caps; letter-spacing: .03em; color: var(--pen); }
/* pictures */
.figs { columns: 3 200px; column-gap: 26px; margin: 6px 0; }
.figs figure { break-inside: avoid; margin: 0 0 22px; }
.figs button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.figs img { display: block; width: 100%; height: auto; background: var(--hair); }
.figs figcaption { margin-top: 6px; font-size: 15px; line-height: 1.35; color: var(--grey); } .figs figcaption b, .figs figcaption i { color: var(--ink); }
.plates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 16px; margin: 4px 0 6px; padding: 0; list-style: none; }
.plates button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.plates img { display: block; width: 100%; height: 150px; object-fit: cover; filter: grayscale(1); transition: filter .4s; background: var(--hair); }
.plates button:hover img, .plates button:focus-visible img { filter: none; }
.plates figcaption, .plates .cap { display: block; margin-top: 5px; font-size: 15px; line-height: 1.3; color: var(--grey); } .plates .cap i { color: var(--ink); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.thumbs button { position: relative; display: block; padding: 0; border: 0; background: var(--hair); cursor: zoom-in; }
.thumbs img, .thumbs video { display: block; width: 86px; height: 64px; object-fit: cover; filter: grayscale(1); transition: filter .4s; }
.thumbs button:hover img, .thumbs button:focus-visible img { filter: none; }
.thumbs .play::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 18px; text-shadow: 0 0 6px rgba(0,0,0,.7); }
/* tables of books, films, paintings */
ul.rows { list-style: none; margin: 0 0 6px; padding: 0; }
ul.rows > li { border-bottom: 1px solid var(--hair); }
ul.rows > li:first-child { border-top: 1px solid var(--hair); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; width: 100%; padding: 6px 0; border: 0; background: none; text-align: left; cursor: pointer; line-height: 1.35; }
.row .t { display: inline-block; } .row:hover .t, .row:focus-visible .t { color: var(--pen); }
.row .by { color: var(--grey); }
.row .r { color: var(--grey); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .r b { color: var(--ink); font-weight: 400; }
div.row { cursor: default; }
.detail { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 4px 0 16px; }
.detail.nocover { grid-template-columns: minmax(0, 1fr); }
.detail img { width: 92px; height: auto; background: var(--hair); }
.detail p { font-size: 17px; line-height: 1.45; margin-bottom: 8px; }
.detail .meta { color: var(--grey); font-size: 16px; }
.year { margin: 18px 0 4px; font-size: 16px; color: var(--grey); }
.run { margin: 0 0 10px; } .run i.sep { font-style: normal; color: var(--grey); }
ol.rank { margin: 6px 0 10px; padding-left: 2.3em; } ol.rank li { padding-left: .2em; line-height: 1.4; }
.foot { font-size: 16px; color: var(--grey); margin-top: 8px; }
/* about */
.portrait { float: right; width: 150px; margin: 4px 0 14px 22px; filter: grayscale(1); transition: filter .5s; } .portrait:hover { filter: none; }
table.cv { border-collapse: collapse; margin: 4px 0 6px; width: 100%; } table.cv td { vertical-align: top; padding: 4px 0; line-height: 1.38; } table.cv td:first-child { width: 6.2em; color: var(--grey); white-space: nowrap; padding-right: 14px; }
blockquote.epi { margin: 6px 0 4px; padding: 0 0 0 18px; border-left: 1px solid var(--ink); font-style: italic; max-width: 56ch; }
blockquote.epi footer { margin-top: 6px; font-style: normal; font-size: 16px; color: var(--grey); }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; font-style: italic; color: var(--grey); }
.linkish:hover, .linkish:focus-visible { color: var(--pen); }
.panel figure.fig { margin: 30px 0 0; text-align: center; clear: both; } .panel figure.fig button { display: inline-block; width: min(250px, 70%); padding: 0; border: 0; background: none; }
.panel figure.fig img { display: block; width: 100%; height: auto; transition: transform .6s cubic-bezier(.3,1.6,.5,1); }
.panel figure.fig figcaption { margin-top: 8px; font-size: 16px; color: var(--grey); }

/* ---------- full-size pictures ---------- */
dialog.light { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; max-height: 100dvh; width: 100vw; height: 100vh; height: 100dvh; margin: 0; }
dialog.light::backdrop { background: color-mix(in srgb, var(--paper) 96%, transparent); }
dialog.light .in { height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center; gap: 10px; padding: 44px 20px 22px; }
dialog.light img, dialog.light video { max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; display: block; }
dialog.light .cap { text-align: center; font-size: 17px; max-width: 70ch; max-height: 30vh; overflow-y: auto; } dialog.light .cap small { display: block; font-size: 16px; color: var(--grey); }
dialog.light .cap p { margin: 6px 0 0; font-size: 16px; text-align: left; }
dialog.light .x, dialog.light .nav { position: fixed; z-index: 10; background: var(--paper); border: 0; cursor: pointer; font-style: italic; font-size: 16px; color: var(--grey); padding: 8px 10px; }
dialog.light .x { top: max(10px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); } dialog.light .nav.prev { left: 6px; top: 50%; transform: translateY(-50%); } dialog.light .nav.next { right: 6px; top: 50%; transform: translateY(-50%); }
dialog.light .x:hover, dialog.light .nav:hover { color: var(--pen); }

/* ---------- the vault page ---------- */
.page { max-width: 1100px; margin: 0 auto; padding: 26px 20px 40px; }
.page .back { font-style: italic; color: var(--grey); }
.page h1 { margin: 14px 0 6px; font: 700 30px/1.1 var(--cm); }
.page .lede { margin: 0; max-width: 70ch; }
/* the vault page is one screen: the map takes whatever height is left, and the page itself does not scroll */
body[data-page="vault"] { height: 100svh; overflow: hidden; }
body[data-page="vault"] .page { height: 100svh; display: flex; flex-direction: column; padding-bottom: 14px; }
body[data-page="vault"] #graph-wrap { flex: 1 1 auto; min-height: 0; height: auto; }
#graph-wrap { position: relative; height: max(400px, calc(100svh - 270px)); margin-top: 20px; border: 1px solid var(--hair); overflow: hidden; }
#graph { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#graph.dragging { cursor: grabbing; } #graph.on-node { cursor: pointer; }
.graph-tip { position: absolute; z-index: 6; max-width: 22rem; padding: 6px 10px; background: var(--paper); border: 1px solid var(--ink); font-size: 16px; line-height: 1.3; pointer-events: none; opacity: 0; transition: opacity .18s; }
.graph-tip.on { opacity: 1; } .graph-tip small { display: block; font-size: 14px; color: var(--grey); font-style: italic; }
.graph-legend { position: absolute; right: 14px; bottom: 10px; z-index: 5; display: flex; flex-direction: column; gap: 3px; font-size: 14px; font-style: italic; color: var(--grey); text-align: right; pointer-events: none; padding: 6px 10px; border-radius: 6px; background: color-mix(in srgb, var(--paper) 85%, transparent); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.graph-legend span { display: flex; align-items: center; justify-content: flex-end; gap: 8px; } .graph-legend i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.graph-focus { position: absolute; left: 12px; top: 10px; z-index: 5; display: flex; align-items: baseline; gap: 8px; max-width: calc(100% - 24px); padding: 5px 10px; background: var(--paper); border: 1px solid var(--hair); font-size: 16px; }
.graph-focus span { color: var(--grey); font-style: italic; } .graph-focus b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .graph-focus a { flex: none; font-style: italic; }
.note-panel { position: absolute; z-index: 7; top: 0; right: 0; bottom: 0; width: min(460px, 48%); display: flex; flex-direction: column; background: var(--paper); border-left: 1px solid var(--hair); transform: translateX(104%); visibility: hidden; transition: transform .38s cubic-bezier(.2,.8,.2,1), visibility 0s .38s; }
.note-panel.open { transform: none; visibility: visible; transition: transform .38s cubic-bezier(.2,.8,.2,1), visibility 0s; }
.np-scroll { flex: 1; overflow-y: auto; padding: 22px 26px 28px; overscroll-behavior: contain; }
.np-close { position: absolute; top: 6px; right: 8px; z-index: 1; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: var(--paper); color: var(--grey); font-size: 20px; cursor: pointer; } .np-close:hover { color: var(--pen); }
.np-kicker { margin: 0 36px 4px 0; font-size: 15px; font-style: italic; color: var(--grey); }
.np-title { margin: 0 30px 14px 0; font: 700 22px/1.25 var(--cm); }
.np-body { font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.np-body p, .np-body ul, .np-body ol, .np-body blockquote, .np-body table, .np-body pre { margin: 0 0 12px; }
.np-body ul, .np-body ol { padding-left: 22px; } .np-body li { margin: 3px 0; }
.np-body h4, .np-body h5, .np-body h6 { margin: 18px 0 6px; font: italic 400 17px/1.3 var(--cm); color: var(--grey); } .np-body h4:first-child { margin-top: 0; }
.np-body blockquote { padding-left: 14px; border-left: 1px solid var(--ink); font-style: italic; }
.np-body code { font-size: 14px; } .np-body pre { overflow-x: auto; }
.np-body table { border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; } .np-body th, .np-body td { border: 1px solid var(--hair); padding: 4px 8px; text-align: left; }
.np-body mark { background: color-mix(in srgb, var(--pen) 16%, transparent); color: inherit; }
.np-body hr { border: 0; border-top: 1px solid var(--hair); margin: 16px 0; }
.np-loading { color: var(--grey); font-style: italic; }
.np-links h3 { margin: 22px 0 8px; padding-top: 14px; border-top: 1px solid var(--hair); font: italic 400 16px/1.3 var(--cm); color: var(--grey); }
.np-links ul { list-style: none; margin: 0; padding: 0; }
.np-links a.wl { display: flex; gap: 9px; align-items: baseline; padding: 4px 0; font-size: 16px; line-height: 1.35; }
.np-links a.wl i { flex: none; width: 7px; height: 7px; border-radius: 50%; transform: translateY(-1px); }
.vault-stamp { margin: 10px 2px 0; text-align: right; font-size: 15px; font-style: italic; color: var(--grey); }

@media (max-width: 700px) {
  body { font-size: 17px; }
  .face { width: 44px; height: 44px; }
  .top h1 { font-size: 25px; } .top h1 span { display: block; margin: 3px 0 0; font-size: 15px; }
  .top .how { font-size: 15px; display: block; margin-left: 0; }
  #strings g[data-i] text { font-size: 16px; }
  .poem blockquote { font-size: 13.5px; } .poem figcaption { font-size: 12px; } #vol { width: 60px; } .deco { width: 112px; } #sea { width: 132px; } .deco figcaption { font-size: 12px; }
  .aside.eqn { font-size: 15px; } .aside.eqn .no { display: none; } .aside.rem { font-size: 15px; }
  .end h2 { font-size: 24px; } .end ul, .end p { font-size: 15px; } .end .see { font-size: 21px; }
  .colophon { left: 30px; font-size: 12px; }
  .panel { left: calc(clamp(22px, 7vw, 64px) + 16px); padding: 0 16px 56px 20px; } .panel p.q { font-size: 19px; margin-right: 56px; }
  .sheet { padding-top: 28px; } .close { top: 18px; }
  .figs { columns: 2 130px; column-gap: 16px; }
  .plates { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); } .plates img { height: 118px; }
  .portrait { width: 104px; margin-left: 14px; }
  .detail { grid-template-columns: 70px minmax(0, 1fr); gap: 12px; } .detail img { width: 70px; }
  .note-panel { top: auto; left: 0; width: auto; height: 64%; border-left: 0; border-top: 1px solid var(--hair); transform: translateY(104%); }
}
@media (max-width: 480px) { .figs { columns: 1; } }
/* ---------- small movements ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes fold { to { opacity: 0; transform: translateY(-6px); } }
@keyframes bloom { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes veil { from { opacity: 0; } to { opacity: 1; } }
/* a section's contents rise in, one after another, as it slides open */
.panel.show .sheet > * { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.panel.show .sheet > :nth-child(1) { animation-delay: .12s; } .panel.show .sheet > :nth-child(2) { animation-delay: .17s; } .panel.show .sheet > :nth-child(3) { animation-delay: .22s; }
.panel.show .sheet > :nth-child(4) { animation-delay: .27s; } .panel.show .sheet > :nth-child(5) { animation-delay: .32s; } .panel.show .sheet > :nth-child(n+6) { animation-delay: .37s; }
/* anything that opens unfolds; anything that closes folds away */
details[open] > :not(summary) { animation: unfold .28s cubic-bezier(.2,.8,.2,1) both; }
details.shut > :not(summary) { animation: fold .2s ease-in both; }
details > summary::after { display: inline-block; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
details[open] > summary::after { content: " ▸"; transform: rotate(90deg) translateX(2px); } details.shut > summary::after { transform: none; }
.detail { animation: unfold .28s cubic-bezier(.2,.8,.2,1) both; } .detail.out { animation: fold .2s ease-in both; }
#lemmas > *, #quote > * { animation: unfold .35s cubic-bezier(.2,.8,.2,1) both; } #lemmas > :nth-child(2) { animation-delay: .06s; } #lemmas > :nth-child(3) { animation-delay: .12s; }
/* pictures open from slightly small; the page behind fades */
dialog.light[open] .in > :first-child { animation: bloom .3s cubic-bezier(.2,.8,.2,1) both; } dialog.light[open] .cap { animation: rise .35s .08s cubic-bezier(.2,.8,.2,1) both; }
dialog.light[open]::backdrop { animation: veil .25s ease-out both; }
/* the home page draws itself in on arrival */
.poem, .deco, .aside, .end { animation: rise .7s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: .25s; } .top { animation: veil .6s ease-out backwards; }
#field { animation: veil 1.4s .3s ease-out backwards; }
/* rows and links answer the pointer */
.row .t, a, .figs img, .plates img { transition: color .18s, text-decoration-color .18s, transform .35s cubic-bezier(.2,.8,.2,1), filter .4s; }
.row:hover .t { transform: translateX(3px); }
.figs button:hover img, .figs button:focus-visible img { transform: scale(1.02); }
.go { transition: transform .25s cubic-bezier(.2,.8,.2,1); } .go:hover { transform: translateX(3px); }
.plates.eight > li:nth-child(n+9) { display: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
ol.rows.ranked { list-style: none; margin: 0 0 6px; padding: 0; counter-reset: rk; }
ol.rows.ranked > li { counter-increment: rk; border-bottom: 1px solid var(--hair); position: relative; padding-left: 2.2em; } ol.rows.ranked > li:first-child { border-top: 1px solid var(--hair); }
ol.rows.ranked > li::before { content: counter(rk) "."; position: absolute; left: 0; top: 6px; color: var(--grey); font-variant-numeric: tabular-nums; }

/* ---------- an essay, typeset (essays/*.html, built by tools/build-essays.py) ---------- */
.essay { max-width: 680px; margin: 0 auto; padding: 26px 20px 70px; counter-reset: para; }
.essay .back { font-style: italic; color: var(--grey); }
.essay header { margin: 34px 0 30px; text-align: center; }
.essay h1 { margin: 0 0 12px; font: 700 34px/1.15 var(--cm); text-wrap: balance; }
.essay .byline { margin: 0 0 8px; font-size: 20px; font-variant: small-caps; letter-spacing: .04em; }
.essay .meta { margin: 0; font-size: 16px; font-style: italic; color: var(--grey); }
.essay article p { margin: 0; text-align: justify; hyphens: auto; -webkit-hyphens: auto; text-indent: 1.5em; line-height: 1.55; }
.essay article h2 + p, .essay article > p:first-child, .essay article figure + p, .essay article blockquote + p { text-indent: 0; }
.essay h2 { margin: 34px 0 10px; font: 700 21px/1.25 var(--cm); scroll-margin-top: 16px; text-wrap: balance; }
.essay blockquote { margin: 14px 0 14px 1.5em; font-size: 17px; } .essay blockquote p { text-indent: 0 !important; }
.essay article p.bib { text-indent: -1.5em; padding-left: 1.5em; margin-bottom: 8px; text-align: left; font-size: 17px; overflow-wrap: anywhere; }
.essay article p.cap, .essay figcaption { margin: 8px 0 18px; text-indent: 0; text-align: center; font-size: 16px; color: var(--grey); }
.essay figure { margin: 22px 0; } .essay figure img { display: block; width: 100%; height: auto; }
.essay figure.tbl { overflow-x: auto; }
.essay table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.4; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.essay thead th { border-bottom: 1px solid var(--ink); font-weight: 700; } .essay th, .essay td { padding: 8px 10px; text-align: left; vertical-align: top; } .essay tbody th { font-weight: 400; white-space: nowrap; }
.essay sup { font-size: .68em; line-height: 0; scroll-margin-top: 24px; } .essay sup a { text-decoration: none; color: var(--pen); padding: 0 1px; scroll-margin-top: 24px; }
.essay .notes { margin-top: 44px; border-top: 1px solid var(--ink); } .essay .notes h2 { margin-top: 18px; }
.essay .notes ol { margin: 0; padding-left: 2.2em; font-size: 16px; line-height: 1.45; } .essay .notes li { margin-bottom: 7px; overflow-wrap: anywhere; scroll-margin-top: 16px; }
.essay .notes li:target, .essay sup a:target { background: color-mix(in srgb, var(--pen) 14%, transparent); }
.essay .notes .back { font-style: normal; text-decoration: none; color: var(--grey); }
.essay .fin { text-align: right; margin: 26px 0 0; }
/* a note shown beside its mark, when there is room in the margin */
.sidenote { position: absolute; width: 230px; font-size: 14.5px; line-height: 1.4; color: var(--grey); text-align: left; text-indent: 0; hyphens: manual; overflow-wrap: anywhere; }
@media (max-width: 1220px) { .sidenote { display: none !important; } }
.sidenote b { color: var(--pen); font-weight: 400; margin-right: 4px; }
.progress { position: fixed; left: 0; top: 0; height: 2px; width: 0; background: var(--pen); z-index: 20; }
@media (max-width: 700px) { .essay h1 { font-size: 27px; } .essay article p { text-align: left; } }
.go.pdf { margin-left: 14px; font-size: .85em; color: var(--grey); }
/* on a phone the stanzas and figures sit right against the strings, so keep the ovals from washing them out */
@media (max-width: 700px) { .poem::before { inset: -40px -14px; } .deco::before { inset: -24px -14px; } }
