:root { color-scheme: light; font-family: system-ui, -apple-system, sans-serif; color: #242927; background: #f6f1e7; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; }
main { max-width: 76rem; margin: auto; padding: 1.3rem clamp(1rem, 5vw, 4rem) max(2rem, env(safe-area-inset-bottom)); }
h1, h2, .name { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; }
h1 { margin: 0; font-size: clamp(2.7rem, 7.6vw, 5.2rem); line-height: 1; letter-spacing: -.055em; }
h2 { font-size: clamp(1.65rem, 4vw, 2.8rem); margin: 0; line-height: 1.11; overflow-wrap: anywhere; }
p { margin: .55rem 0 1rem; }
a { color: #215346; text-underline-offset: .2em; }
.muted { color: #515c52; }
.masthead, .hero, .dialog-head, nav, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.masthead, .hero, .dialog-head { justify-content: space-between; }
.masthead { border-bottom: 1px solid #d5ccbd; padding-bottom: .8rem; }
.name { color: #242927; font-size: 1.32rem; text-decoration: none; }
.hero { gap: 1.15rem; align-items: end; padding: clamp(2rem, 6vw, 4.5rem) 0 1rem; }
.hero p { margin-bottom: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { min-height: 44px; cursor: pointer; border: 1px solid #b5b4a2; border-radius: .4rem; background: #fffdf6; padding: .5rem .85rem; }
button:hover { background: #e8eee1; }
button:disabled { opacity: .6; cursor: wait; }
button.quiet { background: transparent; border-color: transparent; }
button.quiet:hover { background: #e8eee1; }
button.primary { background: #284f41; color: #fffdf6; border-color: #284f41; }
button.primary:hover { background: #365f50; }
:is(input,select,textarea):not([type=hidden]) { display: block; width: 100%; min-width: 0; min-height: 44px; padding: .6rem .65rem; border: 1px solid #b5b4a2; border-radius: .4rem; background: #fffdf6; }
textarea { resize: vertical; line-height: 1.6; }
:focus-visible { outline: 2px solid #3c725e; outline-offset: 3px; }
.archive-grid { display: grid; grid-template-columns: minmax(15rem, 1fr) minmax(0, 2.25fr); gap: clamp(1rem, 3.5vw, 3rem); align-items: start; }
.catalogue { min-width: 0; padding-top: .6rem; }
label { display: grid; gap: .3rem; font-size: .95rem; }
.filters { margin-top: .6rem; padding: .65rem 0; border-top: 1px solid #d5ccbd; border-bottom: 1px solid #d5ccbd; }
.filters summary { min-height: 40px; padding: .4rem 0; cursor: pointer; color: #304d42; }
.filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .55rem; }
.wide { grid-column: 1 / -1; }
.list-count { margin: .75rem 0 .4rem; font-size: .9rem; }
.results { list-style: none; padding: 0; margin: 0; max-height: 65vh; overflow-y: auto; overscroll-behavior: contain; }
.results li + li { border-top: 1px solid #e3dace; }
.results button { color: #234b3e; display: block; width: 100%; border-color: transparent; background: transparent; text-align: left; overflow-wrap: anywhere; }
.results button[aria-pressed=true], .results button:hover { background: #e4ecdf; }
.paper { background: #fffaf0; border: 1px solid #ddd2c2; border-radius: .45rem; padding: clamp(1rem, 4.5vw, 3rem); min-width: 0; }
.standalone { max-width: 47rem; margin: 2rem auto; }
.poem { font: clamp(1.12rem, 2.1vw, 1.32rem)/1.7 Georgia, 'Times New Roman', serif; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; margin: 1.25rem 0; }
.quote { padding: .65rem 0 .65rem 1rem; border-left: 2px solid #a68d62; margin: .5rem 0 1.3rem; }
.quote figcaption { color: #515c52; font-size: .9rem; }
.quote blockquote { font: 1.18rem/1.45 Georgia, serif; white-space: pre-wrap; margin: .3rem 0; }
.status, .form-status { color: #663b2b; }
.status { min-height: 2rem; margin: .75rem 0; }
.back-to-list { display: none; }
dialog { padding: 1.2rem; width: min(94vw, 29rem); max-height: min(90dvh, 58rem); color: inherit; border: 1px solid #c8c0b1; border-radius: .65rem; background: #fdf8ed; overflow-y: auto; }
dialog.editor { width: min(94vw, 48rem); }
dialog::backdrop { background: rgb(25 33 32 / 45%); }
dialog form { display: grid; gap: .75rem; }
dialog h2 { font-size: 1.8rem; }
dialog .form-status { margin: 0; }
.dialog-head { align-items: start; margin-bottom: .35rem; }
.dialog-head button { font-size: 1.3rem; padding: 0; width: 44px; }
.dialog-list { padding-inline-start: 1.4rem; }
.dialog-list li { margin-block: .6rem; overflow-wrap: anywhere; }
.dialog-list .actions { gap: .25rem; }
.share-output { overflow-wrap: anywhere; }
@media (max-width: 45rem) {
  main { padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right)); }
  .masthead { align-items: flex-start; }
  .archive-grid { grid-template-columns: minmax(0,1fr); }
  .results { max-height: 30dvh; }
  .back-to-list { display: inline-block; margin-bottom: .7rem; }
  dialog { max-height: 89dvh; }
  :is(input,select,textarea) { font-size: 16px; }
  .paper { scroll-margin-block: .6rem; }
}
