/* Wordmarkd. Laid out like a film diary: a bar across the top, walls of posters, a piece's
   page in three columns (poster, the writing, the reviews), profiles with stats and tabs.
   Set plainly: black (or white), Inter for the site in light weights with tight big titles,
   a serif for the writing itself, small capitals over thin rules for section headings.
   No shadows, gradients or animation. */

/* ==== colors and type ============================================================== */
:root { color-scheme: light dark; --accent: #baa3f9; accent-color: var(--accent);
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: Charter, "Iowan Old Style", "Source Serif Pro", Georgia, serif;
  --bg: #ffffff; --fg: #3d3d3d; --head: #000000; --muted: #7a7a7a; --line: #e4e4e4; --field: #f2f2f2; --panel: #f7f7f7;
  --link: color-mix(in srgb, var(--accent) 55%, #000); --wide: 1180px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) { --bg: #000000; --fg: #cacaca; --head: #ffffff; --muted: #808080; --line: #232323;
    --field: #161616; --panel: #0c0c0c; --link: var(--accent); }
}
[data-theme=light] { color-scheme: light; }
[data-theme=dark] { color-scheme: dark; --bg: #000000; --fg: #cacaca; --head: #ffffff; --muted: #808080; --line: #232323;
  --field: #161616; --panel: #0c0c0c; --link: var(--accent); }
[hidden] { display: none !important; }

html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 16px; font-weight: 400; line-height: 1.55; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.5em; box-sizing: border-box; }
main.wrap { padding-top: 2em; padding-bottom: 2em; min-height: 60vh; }
/* a piece's page has columns on both sides of the text, so it uses more of a wide screen */
main.wrap:has(.piece-page) { max-width: 1480px; }
b, strong { font-weight: 600; color: var(--head); }
img { max-width: 100%; height: auto; }
figure { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }

/* one color for links, visited or not (a plain rule, so classes like .badge win for visited links too) */
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
/* titles of pieces and people's names in lists: in the heading color, accent on hover */
:is(h1 a, h2 a, h3 a, a.title):is(:link, :visited) { color: var(--head); }
:is(h1 a, h2 a, h3 a, a.title, nav.contents a):hover { color: var(--link); text-decoration: none; }

h1, h2, h3 { color: var(--head); font-weight: 500; line-height: 1.1; }
h1 { font-size: 2.6em; letter-spacing: -.055em; margin: 0 0 .25em; }
h2 { font-size: 1.2em; letter-spacing: -.02em; }
h3 { font-size: 1em; letter-spacing: -.01em; }
/* section headings: small capitals over a thin rule (never the headings inside the writing) */
main h2:not(.reader *, .piece-title) { font-size: .75em; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; line-height: 1.4;
  color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: .5em; margin: 2.4em 0 1em;
  display: flex; align-items: baseline; gap: .6em; }
main h2:not(.reader *, .piece-title) a:is(:link, :visited) { color: var(--muted); }
main h2:not(.reader *, .piece-title) a:hover { color: var(--head); }
main h2 .count { color: var(--fg); font-weight: 400; letter-spacing: 0; }
main h2 .more { margin-left: auto; font-size: 1em; }
main section:first-child > h2:first-child, .col-side > section:first-child > h2:first-child, .cols > section > h2:first-child { margin-top: 0; }
small, .muted { color: var(--muted); }
.lead { font-size: 1.3em; font-weight: 300; line-height: 1.4; color: var(--fg); margin: .2em 0 0; letter-spacing: -.01em; }
blockquote { margin: .4em 0 .4em 1.2em; font-style: italic; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }
code, kbd { font-size: .9em; background: var(--field); padding: .05em .3em; border-radius: 3px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .35em 0; border-bottom: 1px solid var(--line); }

table { border-collapse: collapse; width: 100%; }
caption { text-align: left; }
th, td { border-bottom: 1px solid var(--line); padding: .55em .6em .55em 0; text-align: left; vertical-align: top; }
thead th { font-size: .72em; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
tbody th { color: var(--head); font-weight: 500; }

/* ---- for keyboard and screen reader users */
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 10; top: .5em; left: .5em; padding: .3em .6em; background: var(--bg); }

/* ==== fields and buttons: flat and filled ========================================== */
input, select, button, textarea { font: inherit; font-size: .92em; }
textarea { width: 100%; box-sizing: border-box; }
input:not([type=checkbox], [type=radio], [type=color], [type=range], [type=file], [type=hidden]), select, textarea {
  background: var(--field); color: var(--head); border: 1px solid transparent; border-radius: 3px; padding: .5em .65em; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
select[multiple] { padding: .3em; }
button, input[type=file]::file-selector-button, a.button {
  display: inline-block; background: var(--field); color: var(--head); border: 0; border-radius: 3px; padding: .5em 1em;
  cursor: pointer; font-weight: 500; font-size: .85em; line-height: 1.3; text-decoration: none; }
button:hover, input[type=file]::file-selector-button:hover, a.button:hover { background: color-mix(in srgb, var(--field) 82%, var(--head)); text-decoration: none; }
button[aria-pressed=true] { background: var(--head); color: var(--bg); }
input[type=file] { color: var(--muted); font-size: .85em; }
input[type=file]::file-selector-button { margin-right: .8em; }
::placeholder { color: var(--muted); opacity: 1; }
label { color: var(--head); }

/* forms: labels over their fields, in a comfortable column */
.stacked { max-width: 46em; }
.stacked p { margin: 0 0 1.1em; }
.stacked input:not([type=checkbox], [type=radio], [type=hidden], [type=color], [type=file], #line-every), .stacked select, .stacked textarea {
  display: block; margin-top: .35em; width: min(100%, 32em); box-sizing: border-box; }
.stacked textarea, .stacked #body { width: 100%; }
.narrow { max-width: 24em; }
fieldset { margin: 2em 0; padding: 0; border: 0; min-width: 0; }
legend { display: block; width: 100%; font-size: .75em; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
  border-bottom: 1px solid var(--line); padding: 0 0 .5em; margin-bottom: 1.1em; }
header.site form, ul.inline form, .vote-row form, form.live, footer form, .profile-actions form { display: inline; }
.notice { border-left: 2px solid var(--accent); padding: .35em 0 .35em .9em; color: var(--head); margin: 0 0 1.2em; }
.secret { font-family: monospace; }
label.choice { display: flex; gap: .7em; align-items: flex-start; margin: 0 0 1em; max-width: 46em; }
label.choice input { margin-top: .3em; }
label.choice .muted { display: block; font-size: .9em; }
caption { font-size: .75em; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 1.5em 0 .5em; }
details > summary { cursor: pointer; color: var(--fg); }
details > summary:hover { color: var(--head); }

/* ==== the bar across the top ======================================================= */
header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .6em 2em; min-height: 4.4em; padding-top: .6em; padding-bottom: .6em; }
header.site .brand { margin: 0 auto 0 0; font-size: 1.75em; font-weight: 600; letter-spacing: -.065em; line-height: 1; }
header.site .brand a, header.site .brand a:visited { color: var(--head); text-decoration: none; }
nav ul, nav ol, ul.inline, ol.inline { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2em 1em; align-items: baseline; }
header.site nav > ul { align-items: center; gap: .4em 1.5em; }
header.site nav a, header.site nav a:visited, header.site summary {
  font-size: .72em; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--fg); text-decoration: none; }
header.site nav a:hover, header.site summary:hover, header.site nav [aria-current] { color: var(--head); text-decoration: none; }
header.site nav a.write, header.site nav a.write:visited { color: var(--bg); background: var(--head); padding: .45em .8em; border-radius: 3px; }
header.site nav a.write:hover { background: var(--accent); color: #000; }
/* the account menu under your name */
details.menu { position: relative; }
details.menu > summary { list-style: none; display: flex; align-items: center; gap: .1em; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary::after { content: "▾"; margin-left: .35em; font-size: .9em; }
details.menu .avatar { width: 1.7em; height: 1.7em; }
details.menu > ul { position: absolute; z-index: 20; top: calc(100% + .7em); left: 0; min-width: 11em; display: block; padding: .3em 0;
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px; }
details.menu > ul li { display: block; }
details.menu > ul a, details.menu > ul button { display: block; width: 100%; box-sizing: border-box; text-align: left; padding: .55em 1em;
  background: none; border-radius: 0; font-size: .72em; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--fg); }
details.menu > ul a:hover, details.menu > ul button:hover { background: var(--field); color: var(--head); }
details.menu form { display: block; }
.count { font-variant-numeric: tabular-nums; }
summary .count { color: #000; background: var(--accent); border-radius: 1em; padding: 0 .45em; margin-left: .3em; letter-spacing: 0; }
.site-search input { width: 11em; padding: .4em .8em; font-size: .85em; border-radius: 1em; }

/* ==== the footer =================================================================== */
footer.site { border-top: 1px solid var(--line); margin-top: 3em; padding: 2em 0 3em; font-size: .8em; color: var(--muted); }
footer.site ul { gap: .3em 1.6em; margin-bottom: 1em; }
footer.site ul a, footer.site ul a:visited, footer.site button { font-size: .9em; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--fg); }
footer.site button { background: none; padding: 0; }
footer.site button:hover { color: var(--head); background: none; }
footer.site p { margin: 0; }

/* ==== page tops, tabs and two-column pages ========================================= */
.page-head { margin-bottom: 1.8em; }
.page-head > p { margin: .3em 0; }
nav.tabs { border-bottom: 1px solid var(--line); margin: 0 0 2em; }
nav.tabs ul { gap: 0 1.8em; }
nav.tabs a, nav.tabs a:visited { display: inline-block; padding: .7em 0; margin-bottom: -1px; border-bottom: 1px solid transparent;
  font-size: .72em; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--fg); text-decoration: none; }
nav.tabs a:hover { color: var(--head); }
nav.tabs [aria-current] { color: var(--head); border-bottom-color: var(--head); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 17.5em; gap: 0 3.5em; align-items: start; }
.col-side { font-size: .92em; }
.col-main .pieces { --ph: 12.5em; gap: 1.6em 1em; }
.col-side .pieces { --ph: 9em; gap: 1.2em .8em; }
.big-number { font-size: 3em; font-weight: 500; letter-spacing: -.05em; line-height: 1; color: var(--head); margin: 0 0 .2em; }

/* ==== the library: a filter bar, then a wall of posters ============================ */
.browse-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1em 2em; }
.browse-head h1 { font-size: 3.6em; margin: 0; }
.browse-head search { flex: 0 1 26em; }
.browse-head .search { display: flex; gap: .4em; align-items: center; }
.browse-head .search input[type=search] { flex: 1; min-width: 0; }
.browse-head .notice { flex-basis: 100%; }
nav.filters { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .5em 0; margin-bottom: 1em; font-size: .9em; }
nav.filters dl { margin: 0; }
nav.filters dl > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2em 1.2em; padding: .35em 0; }
nav.filters dt { font-size: .75em; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); min-width: 5.5em; }
nav.filters dd { margin: 0; flex: 1; }
nav.filters a, nav.filters a:visited { color: var(--fg); }
nav.filters a:hover, nav.filters [aria-current], nav.filters [aria-pressed=true] { color: var(--head); }
nav.filters [aria-current], nav.filters [aria-pressed=true] { font-weight: 600; }
details.advanced { margin: 0 0 1em; font-size: .9em; }
details.advanced > summary { font-size: .82em; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
details.advanced[open] { padding-bottom: 1em; border-bottom: 1px solid var(--line); }
dl.tips dt { margin-top: .6em; }
dl.tips dd { margin: .2em 0 .6em 1.2em; color: var(--muted); }
.chart-filters { display: flex; flex-wrap: wrap; gap: .6em 1em; align-items: end; margin: 0 0 2em; font-size: .9em; }
.chart-filters label { display: flex; flex-direction: column; gap: .3em; font-size: .85em; color: var(--muted); }

/* the posters: every poster in a row is the same height (--ph); an uploaded cover's width follows
   its own shape, from half as wide as tall (1:2) to twice as wide (2:1), trimmed beyond that.
   Covers set in type are 2:3. Each card is as wide as its poster, and its caption wraps to fit. */
.pieces { --ph: 15em; list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 2em 1.3em; }
.pieces > li { flex: none; }
.pieces.ranked { counter-reset: rank; }
.pieces.ranked > li { counter-increment: rank; }
.pieces.ranked .piece-title::before { content: counter(rank) ". "; color: var(--muted); font-weight: 400; }
article.piece { display: flex; flex-direction: column; gap: .15em; width: min-content; min-width: calc(var(--ph) / 2); }
article.piece p { margin: 0; font-size: .82em; }
.piece-title { font-size: .92em; font-weight: 500; margin: .55em 0 0; line-height: 1.25; letter-spacing: -.01em; }
.piece-by a, .piece-by a:visited { color: var(--fg); }
.piece-tags { line-height: 1.9; }
.poster { display: block; position: relative; height: var(--ph, 15em); width: calc(var(--ph, 15em) * 2 / 3); container-type: inline-size;
  border-radius: 3px; overflow: hidden; background: var(--field);
  outline: 1px solid color-mix(in srgb, var(--head) 10%, transparent); outline-offset: -1px; text-decoration: none; }
a.poster:hover { outline: 2px solid var(--accent); outline-offset: -2px; text-decoration: none; }
.poster:has(> img) { width: auto; container-type: normal; }
.poster > img { display: block; height: 100%; width: auto; min-width: calc(var(--ph, 15em) / 2); max-width: calc(var(--ph, 15em) * 2); object-fit: cover; }
/* no cover: the title set in type, tight and big, the author small underneath (cqi = the poster's width) */
.type-cover { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 8cqi 8cqi 7cqi;
  background: var(--panel); color: var(--head); overflow: hidden; }
.tc-title { font-size: 12.5cqi; font-weight: 500; letter-spacing: -.05em; line-height: 1.02; overflow-wrap: break-word; hyphens: auto; }
.tc-author { font-size: max(7.5cqi, 9px); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.type-cover.mono .tc-title { font-family: "Courier New", monospace; letter-spacing: -.02em; }
/* the average rating, on the poster's corner */
.poster .chip { position: absolute; right: .4em; bottom: .4em; padding: .2em .45em; border-radius: 2px; background: rgb(0 0 0 / .78); color: #fff;
  font-size: .78em; font-weight: 600; letter-spacing: 0; line-height: 1.2; font-variant-numeric: tabular-nums; }
.poster .chip::before { content: "★ "; color: var(--accent); }
.poster.sm { --ph: 6.3em; flex: none; border-radius: 2px; }
.poster.sm .tc-author, .poster.sm .chip { display: none; }
/* the big poster on a piece's page fills its column instead, with the same 2:1 to 1:2 limits */
.poster.lg { width: 100%; height: auto; aspect-ratio: 2 / 3; }
.poster.lg:has(> img) { width: 100%; aspect-ratio: auto; }
.poster.lg > img { width: 100%; height: auto; min-width: 0; max-width: none; min-height: 6.75em; max-height: 27em; }
.cover-img { display: block; max-height: 9em; width: auto; border-radius: 3px; }
.cover-img.md { max-height: 18em; }

/* stars, tags, avatars */
.stars { color: var(--accent); letter-spacing: .04em; white-space: nowrap; font-size: 1.1em; }
/* the dim stars, and a half star: the left half lit, the right half dim */
.stars .star-off { color: color-mix(in srgb, var(--muted) 45%, transparent); }
.stars .star-half { background: linear-gradient(90deg, var(--accent) 50%, color-mix(in srgb, var(--muted) 45%, transparent) 50%);
  -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 0; margin-right: .04em; }
.badge { display: inline-block; font-size: .68em; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; line-height: 1.6;
  color: var(--fg); border: 1px solid var(--line); border-radius: 3px; padding: 0 .45em; margin: 0 .3em .2em 0; white-space: nowrap; }
a.badge:hover { color: var(--head); border-color: var(--head); text-decoration: none; }
.badge.primary { color: var(--head); border-color: color-mix(in srgb, var(--head) 40%, transparent); }
/* genres and descriptors are the same tag; a primary genre is just a little stronger */
.recommended, .badge.recommended { color: var(--accent); }
.badge.recommended { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.avatar { width: 1.5em; height: 1.5em; object-fit: cover; vertical-align: middle; margin-right: .4em; border-radius: 0; }
.avatar.lg { width: 6.5em; height: 6.5em; margin: 0; flex: none; }
.avatar.blank { display: inline-flex; align-items: center; justify-content: center; background: var(--field); color: var(--muted);
  font-weight: 500; text-transform: uppercase; }
.avatar.lg.blank { font-size: 2.6em; width: 2.5em; height: 2.5em; }
a.plus { display: inline-block; min-width: 1.2em; padding: 0 .25em; border: 1px solid var(--line); border-radius: 3px; text-align: center;
  text-decoration: none; line-height: 1.4; font-size: .8em; color: var(--fg); vertical-align: middle; }
a.plus:hover { border-color: var(--head); color: var(--head); }

/* ==== ratings ===================================================================== */
/* how something was rated: a bar for each score, half a star (left) to five (right) */
figure.spread { margin: 0 0 1.5em; }
figure.spread figcaption { color: var(--muted); font-size: .8em; margin-bottom: .5em; }
.histogram { display: flex; align-items: flex-end; gap: .5em; }
.histogram ol { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; align-items: flex-end; gap: 2px; height: 3.6em;
  border-bottom: 1px solid var(--line); }
.histogram li { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.histogram .bar { display: block; width: 100%; height: max(var(--h), 2px); background: color-mix(in srgb, var(--accent) 85%, transparent); }
.histogram li:hover .bar { background: var(--head); }
.histogram > .stars { font-size: .75em; line-height: 1; padding-bottom: .15em; }
/* the average, large */
.rating-big { display: flex; align-items: center; gap: .8em; margin: 0 0 1.2em; }
.rating-big p { margin: 0; }
.rating-number { font-size: 3.6em; font-weight: 500; letter-spacing: -.06em; line-height: .9; color: var(--head); font-variant-numeric: tabular-nums; }
.rating-number.none { color: var(--muted); }
.rating-big .stars { font-size: 1.35em; }
/* picking your rating: five big stars, each clickable in halves */
.star-input { display: inline-flex; flex-direction: row-reverse; font-size: 2.4em; line-height: 1; margin: .05em 0 .2em; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
form.rate .star-input label { position: relative; display: block; width: .5em; height: 1em; margin: 0; overflow: hidden; cursor: pointer; font-size: 1em; }
.star-input label.half-l { margin-left: .06em; }
.star-input label::before { content: "★"; position: absolute; top: 0; width: 1em; text-align: center; color: color-mix(in srgb, var(--muted) 45%, transparent); }
.star-input label.half-l::before { left: 0; }
.star-input label.half-r::before { left: -.5em; }
.star-input input:checked ~ label::before { color: var(--accent); }
.star-input:hover label::before { color: color-mix(in srgb, var(--muted) 45%, transparent); }
.star-input label:hover::before, .star-input label:hover ~ label::before { color: var(--accent); }
.star-input:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ==== facts about a piece: "Genres  Gothic, Memoir", one pair to a line ============ */
dl.facts { margin: 1.4em 0; border-top: 1px solid var(--line); }
dl.facts > div { display: flex; flex-wrap: wrap; gap: .2em 1em; padding: .6em 0; border-bottom: 1px solid var(--line); }
dl.facts dt { font-size: .72em; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); min-width: 9em; padding-top: .3em; }
dl.facts dd { margin: 0; flex: 1; font-size: .92em; }

/* ==== reviews and ratings in lists ================================================= */
.feed { list-style: none; padding: 0; margin: 0; }
.feed > li { border-bottom: 1px solid var(--line); padding: 1.1em 0; }
.feed > li:first-child { padding-top: 0; }
article.review { margin: 0; }
article.review header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2em .7em; }
article.review footer { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4em; margin-top: .5em; }
article.review h3 { margin: 0; font-size: 1.05em; font-weight: 500; }
article.review .stars { font-size: 1.25em; }
article.review .review-text { margin: .5em 0 0; white-space: pre-line; color: var(--fg); }
.review-row { display: flex; gap: 1.1em; align-items: flex-start; }
.review-row > div { flex: 1; min-width: 0; }
.review-who { margin: .15em 0 0; font-size: .85em; color: var(--muted); }
.review-who a, .review-who a:visited { color: var(--fg); font-weight: 500; }

/* ==== a piece's page: poster | the writing | the reviews =========================== */
/* the whole page: the piece on the left, the side column (ratings and reviews) on the right with
   the pull tab between them. The side stays in view as you scroll; put away, the piece gets the width. */
.piece-page { display: grid; grid-template-columns: minmax(0, 1fr) 20em; align-items: start; }
.piece-main { min-width: 0; padding-right: 2em; }
html.side-closed .piece-page { grid-template-columns: minmax(0, 1fr) auto; }
html.side-closed .side { display: none; }
/* the chevrons that put a column away and bring it back: at the top corner of the column, nearest the text */
.col-toggle { display: flex; align-items: center; gap: .5em; background: none; padding: .1em .35em; color: var(--head); border-radius: 3px; }
.col-toggle:hover { background: var(--field); color: var(--head); }
.col-toggle .chev { font-size: 2.3em; line-height: .75; font-weight: 400; }
.col-toggle-label { display: none; font-size: .72em; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
html:not(.js) .col-toggle { display: none; }
html.side-closed .side-toggle .chev, html.contents-closed .contents-toggle .chev { transform: scaleX(-1); }
/* ratings and reviews: the chevron on top, then the column, which scrolls on its own and stays in view */
.side-col { position: sticky; top: 1em; max-height: calc(100vh - 2em); display: flex; flex-direction: column; align-items: flex-start; }
.side-col > .side-toggle { margin: 0 0 .3em .9em; }
/* the piece's top: poster | title and details */
.work-layout { display: grid; grid-template-columns: 13.5em minmax(0, 1fr); gap: 0 3em; align-items: start; }
.poster-col { display: flex; flex-direction: column; gap: .8em; }
.poster-col .poster { width: 100%; }
.poster-col form.want button { width: 100%; }
.poster-col .actions { justify-content: center; gap: .4em 1.2em; font-size: .9em; align-items: center; }
.poster-col .actions button { background: none; padding: 0; color: var(--muted); font-weight: 400; font-size: 1em; }
.poster-col .actions button:hover { color: var(--head); background: none; }
.work > header h1 { font-size: 3.2em; line-height: 1; margin-bottom: .2em; overflow-wrap: anywhere; }
.byline { margin: 0; color: var(--muted); font-size: 1.05em; }
.byline a, .byline a:visited { color: var(--head); font-weight: 500; }
.blurb { font-size: 1.25em; font-weight: 300; line-height: 1.45; color: var(--fg); margin: 1em 0 0; letter-spacing: -.01em; }
.work .notice { margin-top: 1em; }
/* the writing, with its contents in a column on the left that stays in view, the way the ratings
   and reviews stay on the right */
.reading-area { margin: 3.5em 0 1em; padding-top: 2.5em; border-top: 1px solid var(--line); }
.reading-area.has-contents { display: grid; grid-template-columns: 11em minmax(0, 1fr); align-items: start; }
.contents-col { position: sticky; top: 1em; max-height: calc(100vh - 2em); display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.contents-col > .contents-toggle { margin: 0 .2em .3em 0; }
html.contents-closed .reading-area.has-contents { grid-template-columns: auto minmax(0, 1fr); }
.reading-area.has-contents > .text { padding-left: 2em; }
html.contents-closed .reading-area.has-contents { grid-template-columns: auto minmax(0, 1fr); }
html.contents-closed .reading-area nav.contents { display: none; }
.reading-area nav.contents { align-self: stretch; min-height: 0; overflow: auto; font-size: .88em; box-sizing: border-box;
  padding-right: 1em; border-right: 1px solid var(--line);
  scrollbar-width: thin; overscroll-behavior: contain; }
.reading-area nav.contents h2 { margin-top: 0 !important; }
nav.contents ol { display: block; list-style: none; padding: 0; margin: 0; }
nav.contents li { padding: .3em 0 .3em .7em; border-left: 2px solid transparent; line-height: 1.3; }
nav.contents li:has(a[aria-current]) { border-left-color: var(--accent); }
nav.contents a:is(:link, :visited) { color: var(--fg); }
nav.contents a[aria-current] { color: var(--head); font-weight: 600; }
.side { align-self: stretch; min-height: 0; overflow: auto; box-sizing: border-box; padding: 0 0 1em 1.5em;
  border-left: 1px solid var(--line); font-size: .92em; scrollbar-width: thin; overscroll-behavior: contain; }
.side > h2:first-child { margin-top: 0 !important; }
.side .rank { margin: -.4em 0 1.4em; font-size: .9em; }
/* the reviews, after the writing */
.reviews-head { margin-top: 2em !important; }
.side article.review { padding: 1em 0; border-bottom: 1px solid var(--line); }
.side article.review header { gap: .2em .5em; }
.side article.review.followed { border-left: 2px solid var(--accent); padding-left: .8em; }
.vote-row button { background: none; padding: 0 .2em; color: var(--muted); font-weight: 400; font-size: .85em; }
.vote-row button:hover { color: var(--head); background: none; }
.vote-row button[aria-pressed=true] { color: var(--accent); background: none; }
form.rate { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 1em; margin-bottom: 1.5em; }
form.rate fieldset { margin: 0; }
form.rate legend { border: 0; margin: 0 0 .6em; padding: 0; }
form.rate label { display: block; font-size: .85em; margin: .6em 0 .3em; }
form.rate select { width: 100%; }
form.rate button { margin-top: .8em; width: 100%; background: var(--head); color: var(--bg); }
form.rate button:hover { background: var(--accent); color: #000; }
  padding: 1em .5em; border: 1px solid var(--line); border-right: 0; border-radius: 4px 0 0 4px; background: var(--bg);
  color: var(--head); font-size: .75em; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; cursor: pointer; }

/* ---- the genre voting window: a header that stays put (title, tabs, filter), then compact rows,
   each a genre or descriptor with its counts on the left and the vote toggles on the right */
dialog { width: min(42em, 92vw); max-height: 85vh; overflow: auto; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 1.5em; }
dialog::backdrop { background: rgb(0 0 0 / .75); }
.dialog-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; }
dialog.vote-window { width: min(48em, 94vw); height: min(85vh, 60em); padding: 0; overscroll-behavior: contain; }
dialog.vote-window[open] { display: flex; flex-direction: column; }
dialog.vote-window:not(:modal)[open] { height: auto; }  /* shown in the page without the script */
.vote-head { flex: none; padding: 1.2em 1.5em 0; border-bottom: 1px solid var(--line); background: var(--bg); }
.vote-head h2 { margin: 0 !important; padding: 0 !important; border: 0 !important; font-size: 1.5em !important; font-weight: 500 !important;
  text-transform: none !important; letter-spacing: -.03em !important; color: var(--head) !important; }
.vote-head .dialog-head button { background: none; color: var(--muted); padding: .2em 0; }
.vote-head .dialog-head button:hover { color: var(--head); }
.vote-head nav.tabs { border: 0; margin: .6em 0 0; }
.vote-filter-row { margin: .2em 0 .9em; }
.vote-filter-row input { width: 100%; box-sizing: border-box; }
#genres { flex: 1; overflow: auto; padding: 0 1.5em 1.5em; overscroll-behavior: contain; }
#genres h2.vote-section { margin: 1.6em 0 .6em; scroll-margin-top: 1em; }
.vote-help { font-size: .85em; color: var(--muted); margin: 0 0 1em; }
.vote-help b { color: var(--fg); }
.vote-group-box { margin: 1.2em 0 0; }
.vote-group { margin: 0 0 .2em; font-size: .7em; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.vote-group .count { color: var(--fg); font-weight: 400; letter-spacing: 0; margin-left: .3em; }
details.vote-out > summary { padding: .3em 0; }
.votes { list-style: none; padding: 0; margin: 0; }
.vote-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4em 1em; padding: .55em 0; border-bottom: 1px solid var(--line); }
.vote-item.out .vote-name { color: var(--muted); }
.vote-what { flex: 1 1 14em; min-width: 0; line-height: 1.35; }
.vote-what > a, .vote-name { color: var(--head); font-weight: 500; }
.vote-what .muted { font-size: .85em; }
.vote-what small { font-size: .75em; }
/* the vote toggles: small outlined pills, filled when they're your vote */
.vote-item .vote-row { display: flex; flex-wrap: wrap; gap: .3em; flex: none; }
.vote-item .vote-row button { background: none; border: 1px solid color-mix(in srgb, var(--head) 28%, transparent); border-radius: 1em; padding: .2em .7em; font-size: .72em; font-weight: 500; color: var(--fg); }
.vote-item .vote-row button:hover { border-color: var(--head); color: var(--head); background: none; }
.vote-item .vote-row button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #000; }
form.want { margin: 0; }
.genre-add, .descriptor-add { display: flex; flex-wrap: wrap; gap: .4em; align-items: center; margin: 0 0 .5em; position: relative; }
.genre-add label, .descriptor-add label { flex-basis: 100%; font-size: .8em; color: var(--muted); }
.genre-add input[type=search], .descriptor-add input:not([type=hidden]) { flex: 1; }
.genre-results { list-style: none; padding: .3em 0; margin: 0; flex-basis: 100%; border: 1px solid var(--line); border-radius: 4px; max-height: 18em; overflow: auto; }
.genre-results li { cursor: pointer; padding: .4em .8em; font-size: .9em; line-height: 1.35; }
.genre-results li[aria-selected=true] { background: var(--field); color: var(--head); }

/* ---- the genres page */
.gb-top { padding-bottom: 1em; }
.gb-top > h2 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.gb-top ul { list-style: none; padding-left: 1.2em; border-left: 1px solid var(--line); margin: .4em 0; }
.gb-top > ul { padding-left: 0; border: 0; columns: 2 18em; column-gap: 3em; }
.gb-top > ul > li { break-inside: avoid; }
.gb-item { margin: .4em 0; }
.gb-item > a { color: var(--head); font-weight: 500; }
.gb-item .muted { font-size: .88em; }
#genre-filter { width: min(100%, 26em); display: block; margin-top: .4em; }

/* ==== profiles ===================================================================== */
.profile-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5em 3em; margin-bottom: 1.5em; }
.profile-who { display: flex; align-items: center; gap: 1.5em; }
.profile-who h1 { font-size: 3em; margin: 0 0 .1em; }
.profile-who p { margin: 0 0 .7em; }
.profile-actions { display: flex; gap: .5em; }
dl.profile-stats { display: flex; margin: 0; }
dl.profile-stats > div { display: flex; flex-direction: column-reverse; align-items: center; padding: 0 1.2em; border-left: 1px solid var(--line); }
dl.profile-stats > div:first-child { border-left: 0; }
dl.profile-stats dd { margin: 0; font-size: 1.8em; font-weight: 500; letter-spacing: -.04em; color: var(--head); line-height: 1.1; }
dl.profile-stats dt { font-size: .66em; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* ==== the text of a piece ========================================================== */
/* the writing gets the page to itself: a band across the full width under the piece's details,
   with a wide, centred column of text */
.text { min-width: 0; }
.text > .reading-tools, .text > .bookmark-status, .text > .pages { max-width: 46em; margin-left: auto; margin-right: auto; }
.text > .reading-tools { justify-content: center; }
.reading-tools { display: flex; flex-wrap: wrap; gap: .4em 1.2em; align-items: center; font-size: .8em; margin: 0 0 .4em; color: var(--muted); }
.reading-tools label { color: var(--muted); display: flex; align-items: center; gap: .5em; }
.title-page { text-align: center; margin: 1.5em 0 3em; font-size: 1.2em; font-family: var(--serif); color: var(--head); }
.tp-title { font-size: 2.2em; font-style: italic; margin: 0; letter-spacing: -.01em; line-height: 1.15; }
.tp-author { font-variant: small-caps; letter-spacing: .2em; margin: .5em 0 0; color: var(--fg); }
.pages { font-size: .82em; text-align: center; color: var(--muted); margin: 1.2em 0; }
.pages p { margin: .2em 0; }
.pages ol { justify-content: center; }
.pages [aria-current] { color: var(--head); font-weight: 600; }
/* the text column stays about 790px wide; the type is a little smaller so more fits on screen */
.reader { position: relative; max-width: 45em; margin: 0 auto; padding: 0 1.5em; font-family: var(--serif); font-size: 1.1em; line-height: 1.65; color: var(--head); }
.chapter + .chapter:not(.continued) { margin-top: 2.5em; }
.chapter-head { text-align: center; margin: 1.5em 0 1em; }
.chapter-label { font-variant: small-caps; letter-spacing: .2em; margin: 0; color: var(--fg); }
.chapter-title { font-size: 1.5em; font-style: italic; font-weight: 400; letter-spacing: 0; margin: .2em 0 0; }
/* ## headings inside a chapter (and ### below them): bold and clearly bigger than the text */
.reader .chapter-body h2, .reader .chapter-body h3 { font-weight: 700; letter-spacing: .01em; line-height: 1.25; margin: 1.4em 0 .5em; text-indent: 0; }
.reader .chapter-body h2 { font-size: 1.4em; }
.reader .chapter-body h3 { font-size: 1.15em; }
.reader .chapter-body h2 + p, .reader .chapter-body h3 + p { text-indent: 0; }
.reader hr { border: 0; text-align: center; margin: 1.2em 0; }
.reader hr::after { content: "⁂"; color: var(--muted); }

/* ---- the author's choices for how it looks */
.reader[data-line-numbers] { padding-left: 2.5em; }
.reader .ln { position: absolute; left: 0; width: 2em; text-align: right; font-size: .7em; opacity: .55; font-family: var(--sans); }
.reader p { margin: 0 0 .6em; }
.reader p + p { text-indent: 2em; }
.reader.no-indent p + p, .reader .chapter-body > p:first-of-type, .reader p.stanza { text-indent: 0; }
.reader p.stanza { margin-bottom: 1em; }
/* no large first letter (or the chapter carries on from the last page): indent the first paragraph like the rest */
.reader.no-drop-cap:not(.no-indent) .chapter-body > p:first-of-type:not(.stanza),
.reader:not(.no-indent) .continued .chapter-body > p:first-of-type:not(.stanza) { text-indent: 2em; }
.reader:not(.no-drop-cap) .chapter:not(.continued) .chapter-body > p:first-of-type::first-letter { float: left; font-size: 3.4em; line-height: .85; margin: .06em .08em 0 0; }
.reader .line { display: block; }
/* justified: even edges, with hyphenation so the gaps stay small; poem lines keep their own ends */
.reader.justify p:not(.stanza) .line { text-align: justify; hyphens: auto; }
/* a line someone linked to, the line menu, and your bookmark */
.reader .line { scroll-margin-top: 30vh; }
.reader .line:target { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.reader .line.bookmarked { position: relative; }
.reader .line.bookmarked::before { content: ""; position: absolute; left: -.8em; top: .25em; bottom: .25em; width: 2px; background: var(--accent); }
.reader.has-linked-text .line:target { background: none; }
.reader mark.linked { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; }
/* the bookmark icon in the margin of the line under the pointer */
.bookmark-pin { position: absolute; top: 0; left: -1.35em; width: 1.1em; height: 1.2em; padding: 0; border: 0; background: none; cursor: pointer;
  visibility: hidden; color: var(--head); opacity: .35; text-indent: 0; }
.bookmark-pin:hover { background: none; }
.bookmark-pin.shown { visibility: visible; }
.bookmark-pin:hover, .bookmark-pin:focus-visible { opacity: .9; }
.bookmark-pin.on { color: var(--accent); opacity: 1; }
.reader[data-line-numbers] .bookmark-pin { left: -1.1em; }
.line-menu { position: absolute; z-index: 5; right: 0; display: flex; gap: .4em; padding: .3em; font-size: .8em;
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px; text-indent: 0; line-height: 1.3; font-family: var(--sans); }
.bookmark-status { font-size: .8em; text-align: center; margin: .2em 0 1em; color: var(--muted); }
.bookmark-status form { display: inline; }
.bookmark-status button { background: none; padding: 0; color: var(--link); font-size: 1em; font-weight: 400; }
/* indent the run-on part of a wrapped line (not beside a large first letter) */
.reader.hang .line { padding-left: 2em; text-indent: -2em; }
.reader.hang:not(.no-drop-cap) .chapter:not(.continued) .chapter-body > p:first-of-type .line { padding-left: 0; text-indent: 0; }
.reader.font-mono { font-family: "Courier New", monospace; }
.smallcaps, .sc { font-variant: small-caps; }
/* ||spoilers||: a solid bar until clicked (or reached with the keyboard) */
.spoiler { background: var(--head); color: transparent; border-radius: 2px; cursor: pointer; }
.spoiler.shown, html:not(.js) .spoiler:focus { background: none; color: inherit; outline: 1px dotted; }
.spoiler ::selection { color: transparent; }

/* ---- reading mode: only the writing, set close and plain, so the eye can stay on the lines */
html.reading header.site, html.reading footer.site, html.reading .work > header, html.reading .poster-col,
html.reading .side-col, html.reading .work-layout, html.reading dialog, html.reading .skip { display: none !important; }
html.reading main.wrap { max-width: 56em; }
html.reading .piece-page, html.reading .reading-area:not(.has-contents) { display: block; }
/* reading mode with the contents shown: room for them beside the text */
html.reading:not(.contents-closed) main.wrap:has(.reading-area.has-contents) { max-width: 70em; }
html.reading .reading-area { border: 0; margin: 0; padding: 0; }
html.reading .piece-main { padding: 0; }
html.reading .text { border: 0; margin: 0; padding: 1em 0 2em; }
html.reading .reading-tools { opacity: .7; }
html.reading .reader { font-size: 1.1em; line-height: 1.65; }
html.reading .reader p { margin-bottom: .55em; }
html.reading .reader p.stanza { margin-bottom: 1em; }
html.reading .title-page { margin: .5em 0 1em; }
html.reading .tp-title { font-size: 1.4em; }
html.reading .chapter-head { margin: 1em 0 .7em; }
html.reading .chapter + .chapter:not(.continued) { margin-top: 1.8em; }
html.reading .reader hr { margin: 1.2em 0; }

/* ==== the editor page ============================================================== */
/* the writing on the left; cover, look, pages and who can see it in a column on the right */
.editor-form { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) 19em; gap: 0 3.5em; align-items: start; }
.edit-main > fieldset:first-child, .edit-side > fieldset:first-child { margin-top: 0; }
.edit-side { font-size: .92em; }
.edit-side :is(input:not([type=checkbox], [type=radio], [type=hidden], [type=file], #line-every), select) { width: 100%; }
@media (max-width: 960px) { .editor-form { display: block; } }
.stacked .editor-tabs, .stacked .toolbar { display: flex; flex-wrap: wrap; gap: .3em; margin: .3em 0; align-items: center; }
.editor-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4em 1em; margin-bottom: .6em; }
.toolbar button, .editor-tabs .tab { padding: .4em .7em; }
.toolbar a { font-size: .85em; margin-left: .3em; }
.editor-tabs .tab.on { background: var(--head); color: var(--bg); }
.editor-status { font-size: .8em; margin-left: .5em; }
.format-help { margin: 1em 0; font-size: .9em; }
.format-help table { margin-top: .8em; }
p.actions { display: flex; gap: .6em; align-items: center; }
p.actions button:first-child { background: var(--head); color: var(--bg); }
p.actions button:first-child:hover { background: var(--accent); color: #000; }

/* the live editor (static/editor.js): Markdown shown formatted as you write. The marks
   (#, **, > ...) only show on the line the cursor is on; elsewhere they're hidden, not removed. */
.live-editor { min-height: 360px; padding: 1.1em 1.3em; background: var(--field); color: var(--head); border-radius: 4px;
  font-family: var(--serif); font-size: 1.12em; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; caret-color: var(--accent); cursor: text; }
.live-editor:focus { outline: 1px solid var(--accent); outline-offset: 0; }
.live-editor.font-mono { font-family: "Courier New", monospace; }
.live-editor .ln { min-height: 1.7em; position: relative; }
.live-editor .md-mark { color: var(--muted); font-weight: 400; font-style: normal; font-variant: normal; letter-spacing: 0; }
.live-editor .ln:not(.active) .md-mark:not(.md-keep) { display: none; }
.live-editor .md-keep { color: var(--accent); }
.live-editor .ln.h1 { font-size: 1.45em; font-style: italic; line-height: 1.35; margin: .6em 0 .2em; }
.live-editor .ln.h2 { font-size: 1.25em; font-weight: 700; line-height: 1.35; margin: .5em 0 .1em; }
.live-editor .ln.h3 { font-size: 1.1em; font-weight: 700; }
.live-editor .ln.chapter { font-variant: small-caps; letter-spacing: .2em; }
.live-editor .ln.quote { font-style: italic; padding-left: .9em; box-shadow: inset 2px 0 0 var(--accent); }
.live-editor .ln.break { text-align: center; color: var(--muted); }
.live-editor .ln.break:not(.active)::after { content: "⁂"; }
.live-editor .ln.list { padding-left: 1.4em; text-indent: -1.4em; }
.live-editor strong { font-weight: 700; }
.live-editor code { font-family: monospace; font-size: .9em; background: var(--bg); padding: 0 .2em; border-radius: 2px; }
.live-editor .md-spoiler { background: color-mix(in srgb, var(--head) 14%, transparent); border-radius: 2px; }
.live-editor .md-link { color: var(--link); text-decoration: underline; }
.live-editor.empty .ln:first-child::before { content: "Start writing, or paste your writing here. Use “+ Chapter” to start each chapter. Marks like # and ** turn into formatting as you go.";
  color: var(--muted); pointer-events: none; position: absolute; }
.preview { min-height: 360px; padding: 1.1em 1.3em; border: 1px solid var(--line); border-radius: 4px; }

/* ==== smaller screens ============================================================== */
@media (max-width: 1080px) {
  .piece-page, html.side-closed .piece-page { display: block; }
  .side-col { position: static; max-height: none; display: block; }
  .side-toggle { display: none; }
  .piece-main { padding: 0; }
  html.side-closed .side { display: block; }
  .side { position: static; max-height: none; overflow: visible; margin-top: 3em; padding: 2em 0 0; border-left: 0; border-top: 1px solid var(--line); font-size: 1em; }
  .poster.lg > img { min-height: 5.5em; max-height: 22em; }
}
@media (max-width: 860px) {
  .reading-area.has-contents, html.reading .reading-area.has-contents { display: flex; flex-direction: column; }
  .reading-area.has-contents > .text { padding-left: 0; }
  .contents-col { position: static; max-height: none; align-items: flex-start; }
  .reading-area nav.contents { margin-bottom: 2em; padding: 0; border: 0; }
  /* on small screens the chevron says what it is and sits above the list */
  .contents-toggle { padding: .3em .6em; border: 1px solid var(--line); margin: 0 0 1em; }
  .contents-toggle .col-toggle-label { display: inline; }
  .reading-area nav.contents h2 { display: none; }  /* the button already says "Contents" */
  .contents-toggle .chev { transform: rotate(-90deg); font-size: 1.4em; }
  html.contents-closed .contents-toggle .chev { transform: rotate(90deg); }
  /* on small screens the tab is a plain button above the contents */
  .cols { grid-template-columns: minmax(0, 1fr); }
  .col-side { margin-top: 2em; }
  header.site .wrap { gap: .6em 1.2em; }
  .site-search { order: 3; flex-basis: 100%; }
  .site-search input { width: 100%; box-sizing: border-box; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 1em; }
  h1 { font-size: 2.1em; }
  .browse-head h1, .work > header h1, .profile-who h1 { font-size: 2.4em; }
  .poster-col { position: static; flex-direction: row; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.5em; }
  .poster-col .poster { width: 8.5em; }
  .reader { padding: 0; font-size: 1.05em; }
  .reading-area { margin-top: 2em; padding-top: 1.5em; }
  .poster-col form.want, .poster-col .actions { flex: 1 1 8em; }
  .pieces, .col-main .pieces { --ph: 10.5em; gap: 1.4em .9em; }
  .poster.lg > img { min-height: 4.25em; max-height: 17em; }
  dl.profile-stats { width: 100%; display: grid; grid-template-columns: repeat(5, 1fr); }
  dl.profile-stats > div { padding: 0 .2em; }
  dl.profile-stats dd { font-size: 1.5em; }
  dl.profile-stats dt { font-size: .56em; letter-spacing: .04em; }
  .avatar.lg { width: 4.5em; height: 4.5em; }
  .avatar.lg.blank { font-size: 1.7em; width: 2.6em; height: 2.6em; }
  header.site nav > ul { gap: .5em 1em; }
}

/* ---- printing a piece: just the writing */
@media print {
  .work-layout { display: block; }
  .text { border: 0; padding: 0; }
  body { background: #fff; color: #000; }
  .reader { color: #000; max-width: none; }
  a { color: inherit; text-decoration: none; }
}

/* ---- a cover, full size (opened by clicking it on a piece's page) */
a.cover-open { display: block; cursor: zoom-in; }
a.cover-open:hover .poster { outline: 2px solid var(--accent); outline-offset: -2px; }
dialog.cover-view { width: fit-content; height: fit-content; max-width: 94vw; max-height: 94vh; padding: 0; border: 0; border-radius: 0; background: none; overflow: visible; cursor: zoom-out; }
dialog.cover-view::backdrop { background: rgb(0 0 0 / .9); }
dialog.cover-view img { display: block; max-width: 94vw; max-height: 94vh; width: auto; height: auto; }
dialog.cover-view form { position: fixed; top: .8em; right: .8em; }
dialog.cover-view button { background: none; color: #fff; font-size: 2em; line-height: 1; padding: .1em .3em; }
