:root {
  --bg: #f6f3ec; --ink: #221f1a; --muted: #756c5c; --card: #fffdf8;
  --line: #d9d1c1; --accent: #8a2f1f; --pd: #3f6b4a; --cr: #8a6d1f;
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#1c1a16; --ink:#ece6d8; --muted:#a0967f; --card:#26231d;
          --line:#3e392f; --accent:#e0664b; --pd:#8dbb95; --cr:#d1b04f; }
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink);
       font: 16px/1.55 Georgia, 'Times New Roman', serif; padding: 2rem 1rem; }
.wrap { max-width: 980px; margin: 0 auto; }
header h1 { font-size: 2.2rem; letter-spacing: .22em; font-weight: 400; }
header p { color: var(--muted); margin: .3rem 0 1.5rem; font-style: italic; }
header p.browse { font-style: normal; font-size: .9rem; margin-bottom: 1.4rem; }
header p.browse a { color: var(--accent); }
.collections { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.chip { font: inherit; font-size: .85rem; cursor: pointer; padding: .35rem .9rem;
  text-decoration: none; display: inline-block; line-height: 1.4;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.intro { background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 1.4rem 1.6rem; margin-bottom: 1.8rem; }
.intro h2 { font-size: 1.4rem; font-weight: 500; margin-bottom: .8rem; }
.intro p, .intro ul { margin-bottom: .8rem; font-size: .93rem; }
.intro ul { margin-left: 1.2rem; } .intro li { margin-bottom: .3rem; } .intro a { color: var(--accent); }
.controls { display: grid; grid-template-columns: minmax(0, 2fr) repeat(6, minmax(0, 1fr));
  gap: .6rem; margin-bottom: 1.4rem; }
@media (max-width: 700px) { .controls { grid-template-columns: 1fr 1fr; }
  .controls input { grid-column: 1 / -1; } }
input, select { font: inherit; font-size: .95rem; padding: .45rem .7rem; min-width: 0; width: 100%;
  border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--ink); }
.count { color: var(--muted); font-size: .85rem; margin-bottom: .8rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.card { display: block; text-decoration: none; color: inherit;
        background: var(--card); border: 1px solid var(--line); border-radius: 6px;
        padding: 1rem 1.1rem; cursor: pointer; transition: transform .08s; }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: .3rem; }
.meta { font-size: .78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.badge { font-weight: 700; padding: .1rem .5rem; border-radius: 999px; font-size: .7rem; color: var(--bg); }
.badge.pd { background: var(--pd); } .badge.cr { background: var(--cr); }
.badge.stub { background: var(--muted); }
.more { color: var(--muted); font-size: .85rem; margin-top: 1.4rem; text-align: center; }
.more button { font: inherit; font-size: .9rem; cursor: pointer; padding: .5rem 1.4rem;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; }
.more button:hover { border-color: var(--accent); color: var(--accent); }
.stub-note { font-size: .82rem; color: var(--muted); margin-top: .9rem; font-style: italic; }
.movements { margin-top: .5rem; font-size: .75rem; color: var(--accent); }
.card img { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: 4px;
  margin-bottom: .7rem; background: var(--line); }
.hero { margin: 0 0 1rem; }
.hero img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain;
  background: var(--bg); border-radius: 4px; }
.hero figcaption, .daily figcaption { font-size: .72rem; color: var(--muted); margin-top: .35rem; }
.hero figcaption a, .daily figcaption a { color: inherit; }
.daily figure { margin: 0 0 .4rem; }
.daily img { display: block; width: 100%; height: 300px; max-height: 300px; object-fit: cover;
  border-radius: 4px; }
dialog { max-width: 680px; width: 92%; margin: auto; max-height: 88vh; overflow-y: auto;
         border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); padding: 1.6rem; }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog h2 { margin-bottom: .3rem; }
dialog h4 { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin: 1.1rem 0 .4rem; }
dialog .body { margin-top: 1rem; white-space: pre-wrap; font-size: .92rem; }
dialog button { margin-top: 1.2rem; font: inherit; padding: .4rem 1rem; cursor: pointer;
  background: var(--accent); color: var(--bg); border: none; border-radius: 4px; }
.links { display: flex; flex-wrap: wrap; gap: .5rem; }
.links a { font-size: .85rem; text-decoration: none; padding: .35rem .8rem;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink); }
.links a:hover { border-color: var(--accent); color: var(--accent); }
.links a.museum, .links a.free { border-color: var(--pd); font-weight: 600; }
.links a.amazon, .links a.marketplace { color: var(--muted); }
.links.related a { font-size: .82rem; }
.links.related span { color: var(--muted); }
.works { font-size: .88rem; margin: 0; padding-left: 1.1rem; }
.works li { margin-bottom: .2rem; } .works span { color: var(--muted); }
.museum-works li { margin-bottom: .45rem; }
.museum-works a { color: var(--accent); font-size: .82rem; }
.museum-works a.print { color: var(--muted); }
dialog .meta a { color: var(--accent); }
.daily { display: grid; gap: .4rem; background: var(--card); border: 1px solid var(--line);
  border-radius: 6px; padding: 1.2rem 1.4rem; margin-bottom: 1.8rem; }
.daily .kicker { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.daily h2 { font-size: 1.5rem; font-weight: 500; }
.daily p { font-size: .92rem; line-height: 1.6; margin-top: .4rem; }
@media (max-width: 700px) { .daily p { display: -webkit-box; -webkit-line-clamp: 5;
  -webkit-box-orient: vertical; overflow: hidden; } }
.daily button { justify-self: start; margin-top: .6rem; font: inherit; font-size: .85rem; cursor: pointer;
  padding: .4rem 1rem; background: var(--accent); color: var(--bg); border: none; border-radius: 4px; }
footer { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  text-align: center; color: var(--muted); font-size: .9rem; }
footer .disclosure { margin: 1rem auto 0; max-width: 46rem; font-size: .8rem; line-height: 1.5; opacity: .85; }
footer a { color: inherit; }

/* --- the standalone artist page (ui/artist/<slug>.html) ------------------
   Generated by scripts/build_db.py with the same markup and classes the dialog
   uses, so one stylesheet serves both. The page is the indexable copy of an
   entry; the dialog is the same content without a navigation. */
.sitebar { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.6rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.sitebar a.brand { font-size: 1.1rem; letter-spacing: .22em; text-decoration: none; color: var(--ink); }
.sitebar a.brand:hover { color: var(--accent); }
.sitebar .tagline { font-size: .8rem; color: var(--muted); font-style: italic; }
article { max-width: 44rem; }
article h1 { font-size: 2rem; font-weight: 500; margin-bottom: .4rem; }
article h2 { font-size: 1.15rem; font-weight: 600; margin: 1.6rem 0 .5rem; }
article h4 { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 1.4rem 0 .5rem; }
article p { margin-bottom: .8rem; font-size: .95rem; }
article .meta a { color: var(--accent); }
.backlink { margin-top: 2rem; font-size: .9rem; }
.backlink a { color: var(--accent); }
