/* Commissioner variable font, served locally without external font requests.
Source: https://fonts.googleapis.com/css2?family=Commissioner:wght@100..900&display=swap

Copyright 2019 The Commissioner Project Authors (https://github.com/kosbarts/Commissioner)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded, 
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

*/
/* cyrillic-ext */
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/commissioner-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/commissioner-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/commissioner-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/commissioner-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/commissioner-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/commissioner-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Classic archive layout. The shared palette is animated in theme.css. */
:root {
  color-scheme: light;
  --paper: #fff;
  --white: #fff;
  --ink: #302828;
  --muted: #756b69;
  --line: #ccc;
  --accent: #822626;
  --accent-dark: #822626;
  --wash: #f5eded;
  --error: #9b4235;
  --sidebar: #e9e9e9;
  --control: #efefef;
  --font-archive: Georgia, "Times New Roman", serif;
  --font-listing-heading-size: 20px;
  font-family: var(--font-archive);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
}
/* Generated icons, downsampled to 128px for UI masks. Full-resolution sources and prompts: ../frontend-assets/icons/manifest.json. */
.icon { display: inline-block; width: 18px; height: 18px; flex: none; background: currentColor; mask-image: var(--icon-image); mask-mode: alpha; mask-repeat: no-repeat; mask-size: var(--icon-scale); mask-position: var(--icon-position); -webkit-mask-image: var(--icon-image); -webkit-mask-repeat: no-repeat; -webkit-mask-size: var(--icon-scale); -webkit-mask-position: var(--icon-position); pointer-events: none; }
.icon-fish { --icon-image: url("/assets/fish.png"); --icon-scale: 118.550%; --icon-position: 48.471% 64.015%; }
.icon-search { --icon-image: url("/assets/search.png"); --icon-scale: 132.776%; --icon-position: 42.893% 59.368%; }
.icon-arrow { --icon-image: url("/assets/arrow-right.png"); --icon-scale: 133.090%; --icon-position: 47.755% 59.301%; }
.icon-chevron { --icon-image: url("/assets/chevron-down.png"); --icon-scale: 125.261%; --icon-position: 50.198% 82.228%; }
.icon-close { --icon-image: url("/assets/close.png"); --icon-scale: 145.064%; --icon-position: 49.487% 54.877%; }
.icon-back { transform: rotate(180deg); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; line-height: 1.5; }
button, input, select { font: inherit; color: inherit; border-radius: 3px; min-width: 0; }
option, optgroup, textarea { font: inherit; }
button, select { cursor: pointer; }
button, select, input { border: 1px solid var(--line); background: var(--white); }
button { padding: 6px 12px; background: linear-gradient(var(--white), var(--control)); }
button:hover:not(:disabled) { border-color: var(--muted); }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: none; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -80px; left: 16px; z-index: 5; padding: 8px 14px; background: var(--white); }
.skip-link:focus { top: 8px; }
.site-header { background: var(--white); }
.header-inner { max-width: 1500px; padding: 16px 28px; margin: auto; display: flex; align-items: center; gap: 28px; }
.wordmark { color: var(--accent-dark); font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -1.2px; text-decoration: none; white-space: nowrap; }
.wordmark:hover { text-decoration: none; }
.fish-scene { --swim-duration: 24s; display: block; position: relative; flex: 1; min-width: 28px; height: 40px; color: var(--accent-dark); overflow: hidden; pointer-events: none; }
/* The path's width is the available distance, keeping both turns inside the header. */
.fish-path { position: absolute; top: 8px; left: 0; right: 28px; height: 28px; animation: fish-patrol var(--swim-duration) ease-in-out infinite; }
.fish-swimmer { position: absolute; left: 0; top: 0; width: 28px; height: 28px; animation: fish-turn var(--swim-duration) linear infinite; }
.fish-shape { position: absolute; inset: 0; transform-origin: 80% 50%; animation: fish-swim 2.8s ease-in-out infinite; }
.fish-shape > .icon { position: absolute; inset: 0; width: 28px; height: 28px; }
.fish-body { clip-path: inset(0 0 0 25%); }
.fish-tail { clip-path: inset(0 73% 0 0); transform-origin: 27% 50%; animation: fish-tail-stroke .64s ease-in-out infinite; }
.fish-bubbles { position: absolute; left: -3px; top: 13px; width: 1px; height: 1px; }
.fish-bubbles > span { position: absolute; left: 0; top: 0; width: 4px; height: 4px; border: 1px solid currentColor; border-radius: 50%; opacity: 0; animation: fish-bubble-rise 1.8s linear infinite; --drift: -25px; }
.fish-bubbles > span:nth-child(2) { width: 3px; height: 3px; animation-delay: -.6s; --drift: -19px; }
.fish-bubbles > span:nth-child(3) { width: 3px; height: 3px; animation-delay: -1.2s; --drift: -31px; }
@keyframes fish-patrol {
  0%, 2%, 98%, 100% { transform: translateX(0); }
  48%, 52% { transform: translateX(100%); }
}
@keyframes fish-turn {
  0%, 48% { transform: scaleX(1); }
  50%, 98% { transform: scaleX(-1); }
  100% { transform: scaleX(1); }
}
@keyframes fish-swim {
  0%, 100% { transform: translateY(.6px) rotate(2deg); }
  50% { transform: translateY(-.8px) rotate(-2deg); }
}
@keyframes fish-tail-stroke {
  0%, 100% { transform: scaleX(.86) skewY(-11deg); }
  50% { transform: scaleX(1) skewY(11deg); }
}
@keyframes fish-bubble-rise {
  0% { transform: translate(0, 0) scale(.55); opacity: 0; }
  12% { opacity: .8; }
  45% { transform: translate(calc(var(--drift) * .4), -5px) scale(.85); opacity: .65; }
  80% { transform: translate(calc(var(--drift) * .8), -12px) scale(1); opacity: .4; }
  100% { transform: translate(var(--drift), -18px) scale(1.15); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fish-path, .fish-swimmer, .fish-shape, .fish-tail, .fish-bubbles > span { animation: none; }
  .fish-bubbles { display: none; }
}
.archive-navigation { background: var(--theme-header, #822626); color: #fff8f2; }
.navigation-inner { max-width: 1500px; margin: auto; padding: 8px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.browse-link { color: inherit; text-decoration: none; font-size: 19px; white-space: nowrap; }
.browse-link:focus-visible { outline-color: #fff8f2; }
.search-form { width: min(100%, 460px); margin: 0; }
.search-box { display: flex; align-items: center; min-height: 38px; gap: 10px; padding: 0 10px; border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: 5px; }
.search-box > .icon { width: 20px; height: 20px; color: var(--muted); }
.search-box input { flex: 1; width: 100%; min-width: 0; border: 0; background: none; padding: 7px 0; font-size: 16px; outline: none; }
.search-box input:focus-visible { outline: none; }
.search-box input::-webkit-search-cancel-button, .search-box input::-webkit-search-decoration { appearance: none; }
.clear-search { display: grid; place-items: center; padding: 4px; border: 0; background: none; color: var(--muted); }
.clear-search .icon { width: 13px; height: 13px; }
main { width: 100%; max-width: 1500px; padding: 28px 28px 40px; margin: 0 auto; flex: 1; }
.directory-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; column-gap: 24px; }
.directory-toolbar, .directory-results { grid-column: 1; min-width: 0; }
/* Share the first result's row, regardless of pagination or selected-tag height. */
.filter-sidebar { grid-column: 2; grid-row: 2; min-width: 0; }
/* Keep result-column updates from moving a focused filter in the sidebar. */
.directory-layout:has(.filter-sidebar:focus-within) :is(.directory-toolbar, .directory-results) { overflow-anchor: none; }
.author-context { margin: 0 0 18px; font-size: 14px; }
.results-wrap { position: relative; min-height: 150px; }
.results-loader { display: none; position: absolute; inset: 0; z-index: 2; align-items: center; padding-top: min(10vh, 70px); flex-direction: column; gap: 12px; background: var(--theme-loader); color: var(--accent-dark); pointer-events: none; }
.loading-spinner { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--accent-dark); border-radius: 50%; animation: search-spin .7s linear infinite; }
@keyframes search-spin { to { transform: rotate(360deg); } }
section[aria-busy="true"] .results-loader { display: flex; }
.work-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.work-blurb { min-width: 0; padding: 15px 17px; border: 1px solid var(--line); background: var(--white); overflow-wrap: anywhere; }
.blurb-header { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: start; gap: 8px 14px; }
.blurb-heading { min-width: 0; }
.blurb-title { display: inline; margin: 0; font-size: var(--font-listing-heading-size); line-height: 1.4; font-weight: 400; }
.author { font-size: 16px; line-height: 1.5; }
.author-link { color: var(--accent); }
.work-date { padding-top: 3px; font-size: 13px; white-space: nowrap; }
.fandoms { margin-top: 5px; line-height: 1.6; font-size: 15px; }
.tag-link { color: var(--accent); text-decoration: underline dotted; text-underline-offset: 3px; }
.tag-link:hover { text-decoration-style: solid; }
.tag-item:not(:last-child)::after { content: ", "; white-space: pre-wrap; }
.tag-strip { margin-top: 13px; font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
.warning-tag { font-weight: 700; }
.warning-tag .tag-link { color: var(--ink); }
.tag-toggle { display: inline; margin-left: 5px; padding: 0; border: 0; background: none; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; line-height: inherit; }
.tag-toggle:hover { text-decoration-thickness: 2px; }
.search-tags { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-bottom: 16px; font-size: 14px; }
.search-tags-label { color: var(--muted); }
.selected-tag { padding: 2px 7px; border: 1px solid var(--line); background: var(--wash); text-decoration: none; }
.blurb-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; margin: 15px 0 0; font-size: 16px; line-height: 1.6; }
.blurb-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 18px; margin: 22px 0 0; font-size: 15px; font-variant-numeric: tabular-nums; }
.blurb-stats > div { display: flex; gap: 5px; }
.blurb-stats dd { margin: 0; }
/* AO3's unmodified 25px artwork; provenance and license: /assets/ao3-icons-NOTICE.txt. */
.metadata-symbols { display: grid; grid-template-columns: repeat(2, 25px); gap: 3px; padding-top: 2px; }
.metadata-symbol { display: block; width: 25px; height: 25px; background-image: url("/assets/ao3-imageset.png"); background-repeat: no-repeat; }
.symbol-rating-general-audience { background-position: -50px -25px; }
.symbol-rating-teen { background-position: 0 -25px; }
.symbol-rating-mature { background-position: -75px -25px; }
.symbol-rating-explicit { background-position: -25px -25px; }
.symbol-rating-notrated, .symbol-warning-no { background-position: -150px 0; }
.symbol-category-gen { background-position: -50px 0; }
.symbol-category-femslash { background-position: -25px 0; }
.symbol-category-het { background-position: -75px 0; }
.symbol-category-slash { background-position: 0 0; }
.symbol-category-multi { background-position: -100px 0; }
.symbol-category-other { background-position: -125px 0; }
.symbol-warning-yes { background-position: -150px -25px; }
.symbol-warning-choosenotto { background-position: -125px -25px; }
.symbol-complete-yes { background-position: -175px -25px; }
.symbol-complete-no { background-position: -100px -25px; }
/* Missing archived metadata stays distinct from an explicit "Not Rated" or no warnings. */
.symbol-unknown { background-position: 0 -50px; }
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 24px; }
.pagination-top { margin: 0 0 22px; }
.pagination > button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--accent-dark); min-height: 36px; }
.pagination > button:disabled { color: var(--muted); }
.pagination .icon { width: 14px; height: 14px; }
.page-numbers { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3px; min-width: 0; font-variant-numeric: tabular-nums; }
.page-link { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 4px 6px; color: var(--accent-dark); white-space: nowrap; }
.page-link[aria-current="page"] { font-weight: 700; text-decoration: none; }
.page-jump { position: relative; display: inline-flex; }
.page-gap { min-width: 30px; min-height: 36px; padding: 4px; border: 0; background: none; color: var(--ink); }
.page-jump-form { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: flex-end; gap: 8px; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 4px 16px rgb(0 0 0 / 16%); }
.pagination-top .page-jump-form { bottom: auto; top: calc(100% + 8px); }
.page-jump-form label { display: grid; gap: 7px; font-size: 13px; white-space: nowrap; }
.page-jump-form input { width: 110px; min-height: 36px; padding: 6px 8px; font-size: 16px; }
.page-jump-form button { min-height: 36px; }
.filter-panel { padding: 15px 18px 20px; border: 1px solid var(--line); border-radius: 3px; background: var(--sidebar); }
.filter-panel > summary { font-size: var(--font-listing-heading-size); line-height: 1.4; font-weight: 400; cursor: pointer; }
.filter-panel > summary::marker { font-size: 13px; }
.filter-content { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.filter-label { display: block; margin: 0 0 5px; font-size: 16px; }
.filter-content > input, .filter-content select, .tag-filter-form input { width: 100%; min-height: 34px; padding: 5px 8px; font-size: 15px; }
.filter-content select { padding-left: 7px; }
.select-field { position: relative; }
.select-field select { display: block; appearance: none; min-height: 36px; padding-right: 32px; box-shadow: none; }
.select-field > .icon { position: absolute; right: 10px; top: 50%; width: 12px; height: 12px; transform: translateY(-50%); }
.filter-heading { margin: 22px 0 0; padding: 8px 0 6px; border-top: 1px solid var(--line); font-size: var(--font-listing-heading-size); font-weight: 400; }
.filter-group { border-top: 1px solid var(--line); }
/* The select already supplies the edge above the first filter group. */
#filter-groups > .filter-group:first-child { border-top: 0; }
.filter-group > summary { padding: 5px 0; cursor: pointer; font-size: 16px; }
.filter-group[open] > summary { font-weight: 700; }
.filter-options { display: grid; gap: 4px; padding: 3px 0 6px 12px; }
.filter-option { display: flex; align-items: flex-start; gap: 7px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; cursor: pointer; }
.filter-option input { width: 15px; height: 15px; flex: none; margin: 3px 0 0; accent-color: var(--accent-dark); }
.filter-option input { appearance: none; position: relative; border: 1px solid var(--muted); border-radius: 3px; padding: 0; background: var(--white); cursor: pointer; }
.filter-option input:checked::after, .filter-option input:indeterminate::after { position: absolute; inset: -4px -1px 0; content: "✓"; text-align: center; font: bold 17px/20px sans-serif; color: var(--accent-dark); }
.filter-option input:indeterminate::after { content: "×"; font-size: 20px; }
.filter-name { flex: 1; min-width: 0; }
.filter-count { flex: none; min-width: 10ch; text-align: right; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 2px; white-space: nowrap; }
.filter-status:empty { display: none; }
.filter-more { margin: 4px 0 10px 12px; padding: 4px 9px; font-size: 13px; }
.filter-count-help { padding-top: 2px; }
.filter-retry { border: 0; padding: 0; color: var(--accent-dark); background: none; text-decoration: underline; cursor: pointer; font: inherit; }
.filter-help { margin: 2px 0 12px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.group-tag-form { margin: 4px 0 10px; }
#additional-tag-form { margin-top: 16px; }
.clear-filters { display: inline-block; margin-top: 20px; }
.message { padding: 12px 15px; margin: 0 0 18px; }
.total-status { margin: 0 0 12px; font-size: 14px; }
.total-status button { margin-left: 8px; }
.error { color: var(--error); background: var(--theme-error-background); }
.empty { padding: 70px 10px; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); }
footer { width: 100%; padding: 12px max(28px, calc((100% - 1444px) / 2)); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; color: #fff8f2; background: var(--theme-header, #822626); font-size: 14px; }
.footer-links { display: inline-flex; align-items: baseline; gap: 20px; margin-left: auto; }
.footer-contact { color: inherit; white-space: nowrap; }
#reader { max-width: 840px; margin: 0 auto; }
.back-to-results { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; }
main:has(.work-not-found:not([hidden])) { display: grid; place-items: center; }
.work-not-found { padding: 36px 0 48px; text-align: center; }
.work-not-found-art { display: block; width: min(340px, 80%); height: auto; margin: 0 auto 24px; filter: brightness(calc(1 + var(--theme-progress, 0) * .8)); }
.work-not-found-code { margin: 0 0 4px; color: var(--muted); font-size: 26px; font-weight: 700; letter-spacing: .35em; padding-left: .35em; }
.work-not-found h1 { margin: 0 0 16px; color: var(--accent-dark); font-size: clamp(32px, 4vw, 48px); line-height: 1.2; }
.work-not-found h1:focus { outline: none; }
.work-not-found-copy { font-size: clamp(18px, 2vw, 22px); line-height: 1.5; }
.work-not-found-copy p { margin: 0; }
.work-not-found-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 18px; margin-top: 32px; }
.work-not-found-actions a { display: inline-flex; align-items: center; justify-content: center; min-width: 144px; min-height: 44px; padding: 8px 24px; border: 1px solid var(--line); border-radius: 3px; background: var(--white); color: var(--accent); font-size: 18px; font-weight: 600; text-decoration: none; }
.work-not-found-actions a:hover { border-color: var(--muted); background: var(--control); }
.work-not-found-actions .work-not-found-primary { background: #822626; border-color: #822626; color: #fff8f2; }
.work-not-found-actions .work-not-found-primary:hover { background: #6b1f1f; border-color: #6b1f1f; }
@media (max-width: 480px) {
  .work-not-found { padding: 20px 0 32px; }
  .work-not-found-actions { gap: 12px; }
  .work-not-found-actions a { min-width: 128px; padding-inline: 16px; font-size: 16px; }
}
.work-header h1 { margin: 0; font-size: 38px; line-height: 1.2; font-weight: 600; letter-spacing: -.7px; overflow-wrap: anywhere; }
.work-authors { color: var(--muted); margin: 14px 0 26px; line-height: 1.6; }
.work-facts { display: flex; flex-wrap: wrap; gap: 16px 30px; margin: 0 0 24px; padding: 18px 0; border-block: 1px solid var(--line); }
.work-facts div { display: grid; gap: 6px; }
.work-facts dt { color: var(--muted); }
.work-facts dd { margin: 0; }
.work-summary { color: #755c55; font-size: 17px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.chapter-bar { display: flex; gap: 12px; align-items: center; border-block: 1px solid var(--line); padding: 15px 0; margin: 36px 0; font-size: 12px; }
.chapter-bar input { width: 70px; padding: 8px; appearance: textfield; -moz-appearance: textfield; }
.chapter-bar input::-webkit-inner-spin-button, .chapter-bar input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.chapter-bar button { padding: 8px 12px; display: inline-flex; align-items: center; justify-content: center; }
.chapter-bar button:first-child { margin-right: auto; }
.chapter-bar button:last-child { margin-left: auto; }
.chapter-text { font-size: 19px; line-height: 1.85; max-width: 72ch; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 auto; }
.chapter-text[aria-busy="true"] { opacity: .45; }
.chapter-text.formatted { white-space: normal; }
.chapter-text.formatted p { margin: 0 0 1.15em; }
.chapter-text.formatted > :first-child { margin-top: 0; }
.chapter-text.formatted :is(h1,h2,h3,h4,h5,h6) { font-family: inherit; line-height: 1.35; margin: 1.5em 0 .8em; }
.chapter-text.formatted h1 { font-size: 1.65em; }
.chapter-text.formatted h2 { font-size: 1.45em; }
.chapter-text.formatted h3 { font-size: 1.25em; }
.chapter-text.formatted blockquote { margin: 1.4em 0; padding: 0 0 0 1.25em; border-left: 2px solid var(--line); }
.chapter-text.formatted hr { width: 40%; border: 0; border-top: 1px solid var(--line); margin: 2em auto; }
.chapter-text.formatted :is(ul,ol) { padding-inline-start: 1.7em; }
.chapter-text.formatted pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.chapter-text.formatted code { font-size: .9em; }
.chapter-text.formatted table { border-collapse: collapse; display: block; max-width: 100%; overflow-x: auto; }
.chapter-text.formatted :is(td,th) { border: 1px solid var(--line); padding: .35em .6em; }
.chapter-text.formatted .fmt-left { text-align: left; }
.chapter-text.formatted .fmt-right { text-align: right; }
.chapter-text.formatted .fmt-center { text-align: center; }
.chapter-text.formatted .fmt-justify { text-align: justify; }
.chapter-text.formatted .fmt-italic { font-style: italic; }
.chapter-text.formatted .fmt-roman { font-style: normal; }
.chapter-text.formatted .fmt-bold { font-weight: bold; }
.chapter-text.formatted .fmt-normal { font-weight: normal; }
.chapter-text.formatted .fmt-underline { text-decoration: underline; }
.chapter-text.formatted .fmt-strike { text-decoration: line-through; }
.chapter-text.formatted .fmt-pre { white-space: pre-wrap; }
.chapter-text.formatted .fmt-preline { white-space: pre-line; }
.chapter-text.formatted .fmt-super { vertical-align: super; font-size: .8em; }
.chapter-text.formatted .fmt-sub { vertical-align: sub; font-size: .8em; }
.chapter-text.formatted .fmt-indent-1 { text-indent: 1em; }
.chapter-text.formatted .fmt-indent-2 { text-indent: 2em; }
.chapter-text.formatted .fmt-indent-3 { text-indent: 3em; }
.chapter-text.formatted .fmt-indent-4 { text-indent: 4em; }
.chapter-text.formatted .fmt-margin-1 { margin-inline-start: 1em; }
.chapter-text.formatted .fmt-margin-2 { margin-inline-start: 2em; }
.chapter-text.formatted .fmt-margin-3 { margin-inline-start: 3em; }
.chapter-text.formatted .fmt-margin-4 { margin-inline-start: 4em; }
.chapter-text.formatted span.fmt-image::before { content: "[Image unavailable in this reader]"; font-size: .85em; color: var(--muted); }
.chapter-text.formatted img { display: block; max-width: 100%; height: auto; margin: 1em auto; }
.next-chapter-bottom { display: flex; align-items: center; gap: 9px; width: max-content; margin: 40px 0 0 auto; font-size: 12px; }

.work-header h1 { font-family: var(--font-archive); }
.work-tags { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 20px 0 28px; font-size: 14px; }
.work-facts { display: flex; flex-wrap: wrap; }
@media (min-width: 851px) {
  .filter-sidebar { position: sticky; top: 16px; }
  /* Keep expanded filter groups reachable even on short desktop viewports. */
  .filter-panel { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; }
  .filter-panel > summary { list-style: none; }
  .filter-panel > summary::-webkit-details-marker { display: none; }
}
@media (max-width: 1100px) and (min-width: 851px) {
  .directory-layout { grid-template-columns: minmax(0, 1fr) 260px; column-gap: 18px; }
  .blurb-header { grid-template-columns: 58px minmax(0, 1fr); }
  .work-date { grid-column: 2; padding: 0; }
  .pagination { gap: 6px; }
  .page-link { padding-inline: 4px; font-size: 14px; }
}
@media (max-width: 850px) {
  .fish-scene { --swim-duration: 16s; }
  .directory-layout { grid-template-columns: minmax(0, 1fr); }
  .filter-sidebar { grid-column: 1; grid-row: 1; margin-bottom: 20px; }
  .directory-toolbar { grid-row: 2; }
  .directory-results { grid-row: 3; }
  .filter-panel { padding: 11px 15px; }
  /* Match the collapsed mobile state before the app module initializes the panel. */
  .filter-panel:not([data-initialized]) > .filter-content { display: none; }
  .filter-panel:not([data-initialized]) > summary { list-style-type: disclosure-closed; }
  .filter-content { padding-bottom: 6px; }
  .header-inner, .navigation-inner { padding-inline: 20px; }
  main { padding: 20px 20px 32px; }
  .filter-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  :root { --font-listing-heading-size: 18px; }
  .header-inner { padding: 16px; gap: 12px; }
  .fish-scene { --swim-duration: 8s; }
  .wordmark { font-size: 34px; }
  .navigation-inner { flex-wrap: wrap; padding: 8px 16px 10px; gap: 7px; }
  .browse-link { font-size: 17px; }
  .search-form { width: 100%; }
  main { padding: 18px 12px 28px; }
  .work-blurb { padding: 12px; }
  .blurb-header { grid-template-columns: 53px minmax(0, 1fr); gap: 5px 10px; }
  .author { font-size: 15px; }
  .work-date { grid-column: 2; padding: 0; font-size: 12px; }
  .fandoms, .tag-strip { font-size: 14px; }
  .blurb-stats { gap: 4px 12px; font-size: 14px; }
  .pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .pagination > button:first-child { justify-self: start; }
  .pagination > button:last-child { justify-self: end; }
  .page-numbers { grid-row: 2; grid-column: 1 / -1; font-size: 14px; }
  .page-link { padding: 4px 5px; }
  .filter-options { grid-template-columns: 1fr; }
  .work-header h1 { font-size: 28px; }
  .chapter-text { font-size: 18px; }
  .chapter-bar { gap: 6px; }
  .chapter-bar input { width: 52px; }
  .chapter-bar button { padding: 8px; }
  footer { padding: 12px 16px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-spinner { animation-duration: 2s; }
}
