/* Art history admin — plain, dense, readable. Follows the OS light/dark setting unless the header toggle chose a
   theme (data-theme on <html>, static/theme.js — as on the public site). */
:root {
  --bg: #fbfaf7; --fg: #1f1d1a; --muted: #6b665e; --line: #dedad2; --panel: #ffffff;
  --accent: #7a3e12; --accent-fg: #ffffff; --ok: #1f6b3a; --err: #a4221b; --err-bg: #fbeceb; --ok-bg: #e9f5ec;
  --code: #f1eee8; --caret: #1f1d1a;
  color-scheme: light;  /* the browser's own parts (checkboxes, scrollbars, date pickers) match */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171614; --fg: #e9e5de; --muted: #a39d93; --line: #35322d; --panel: #1f1e1b;
    --accent: #e3a36f; --accent-fg: #1a1208; --ok: #7ccf95; --err: #f08a82; --err-bg: #3a1d1b; --ok-bg: #1b3122;
    --code: #2a2824; --caret: #fffaf2;  /* the text cursor: bright on the dark background */
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171614; --fg: #e9e5de; --muted: #a39d93; --line: #35322d; --panel: #1f1e1b;
  --accent: #e3a36f; --accent-fg: #1a1208; --ok: #7ccf95; --err: #f08a82; --err-bg: #3a1d1b; --ok-bg: #1b3122;
  --code: #2a2824; --caret: #fffaf2;
  color-scheme: dark;
}
* { box-sizing: border-box; }
input, textarea, [contenteditable] { caret-color: var(--caret); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; margin: .5rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 .75rem; border-bottom: 1px solid var(--line); padding-bottom: .25rem; }
.muted { color: var(--muted); }
code, pre { background: var(--code); border-radius: 4px; padding: 0 .25em; font-size: .9em; }
pre { padding: .5em; overflow-x: auto; }

.top { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; padding: .6rem 16px;
  border-bottom: 1px solid var(--line); background: var(--panel); }
.top .brand { font-weight: 600; text-decoration: none; color: var(--fg); }
.top nav { display: flex; flex-wrap: wrap; gap: .25rem .9rem; flex: 1; }
.top nav a { text-decoration: none; }
/* menu groups: collection · context · reference · tools; a thin line between groups */
/* the menu on its own row under title, search and login: one line on a desktop screen */
.top nav { column-gap: .75rem; flex-basis: 100%; order: 3; }
.top .top-search { margin-left: auto; }
.top nav .nav-group { display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
/* a line before every group; the menu shifted left by line + padding and that strip clipped, so a group that starts a
   row (the menu wraps on narrower screens) has no line and no indent */
.top nav .nav-group { border-left: 1px solid var(--line); padding-left: .75rem; }
.top nav { margin-left: calc(-.75rem - 1px); clip-path: inset(-.5rem -.5rem -.5rem calc(.75rem + 1px)); }
@media (max-width: 760px) {  /* phones: the menu below the title, groups as rows without lines */
  .top nav { flex-direction: column; gap: .3rem; }
  .top .top-search { margin-left: 0; }
  .top nav { margin-left: 0; clip-path: none; }
  .top nav .nav-group { border-left: 0; padding-left: 0; }
}
form.inline { display: inline; margin: 0; }

.flash { padding: .6rem .8rem; border-radius: 6px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--err-bg); color: var(--err); }
.flash.warn { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--fg); border-left: 4px solid var(--accent); }
.auto-banner .button { margin-left: .4rem; }
.errors { background: var(--err-bg); color: var(--err); padding: .6rem 1.5rem; border-radius: 6px; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; }

.bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.bar .grow { flex: 1; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .75rem; text-decoration: none; color: var(--fg); }
.card b { display: block; font-size: 1.4rem; }

dl.fields { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: .35rem 1rem; }
dl.fields dt { color: var(--muted); }
dl.fields dd { margin: 0; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }

.form { display: grid; gap: .9rem; max-width: 980px; }
/* entry forms in sections (forms.js SECTIONS): a slim title, short fields in pairs on wide screens */
.form-nav { color: var(--muted); margin: -.4rem 0 0; }
.form-nav a { color: var(--muted); text-decoration: none; }
.form-nav a:hover { color: var(--accent); text-decoration: underline; }
.form-section { display: grid; gap: .9rem; scroll-margin-top: 1rem; }
.form-section-title { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  margin: .7rem 0 -.2rem; padding-bottom: .2rem; border-bottom: 1px solid var(--line); }
.form-section[hidden] { display: none; }
.field-pair { display: grid; gap: .9rem 1.4rem; }
@media (min-width: 900px) { .field-pair { grid-template-columns: 1fr 1fr; align-items: start; } }
.field label { display: block; font-weight: 600; margin-bottom: .2rem; }
.field .hint { color: var(--muted); font-size: .85rem; margin-top: .15rem; }
/* a field the error messages are about: a clear red frame and label (the first one gets the focus, editor/errors.js) */
.field.has-error input, .field.has-error textarea, .field.has-error select { border: 2px solid var(--err); box-shadow: 0 0 0 3px color-mix(in srgb, var(--err) 18%, transparent); }
.field.has-error > label, .field.has-error .label-row > label { color: var(--err); }
.error-fields a { color: var(--err); }
.row { display: flex; gap: .5rem; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
input, select, textarea { width: 100%; font: inherit; color: var(--fg); background: var(--panel);
  border: 1px solid var(--line); border-radius: 6px; padding: .4rem .5rem; }
textarea { min-height: 5rem; resize: vertical; }
textarea.md { min-height: 11rem; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

button, .button { font: inherit; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg);
  border-radius: 6px; padding: .4rem .9rem; cursor: pointer; text-decoration: none; display: inline-block; }
button.secondary, .button.secondary { background: transparent; color: var(--accent); }
button.danger, .button.danger { background: var(--err); border-color: var(--err); color: #fff; }
button.link { background: none; border: none; padding: 0; color: var(--accent); text-decoration: underline; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.diff td.old { color: var(--err); }
.diff td.new { color: var(--ok); }
.tag { font-size: .8rem; border: 1px solid var(--line); border-radius: 999px; padding: 0 .5rem; color: var(--muted); white-space: nowrap; }
.login { max-width: 340px; margin: 12vh auto; }

/* Markdown editor (src/admin/editor): toolbar + CodeMirror with live styling + server-rendered preview */
.md-editor { display: flex; flex-direction: column; }
.md-toolbar { display: flex; flex-wrap: wrap; gap: .25rem; padding: .3rem; border: 1px solid var(--line); border-bottom: none;
  border-radius: 6px 6px 0 0; background: var(--code); }
.md-toolbar .md-spacer { flex: 1; }
button.md-tool { background: transparent; color: var(--fg); border: 1px solid transparent; padding: .1rem .55rem; font-size: .9rem; }
button.md-tool:hover { border-color: var(--line); background: var(--panel); }
/* the spell check language of a text (EN / DE, recognised as you type; click to switch) */
button.md-tool.md-lang { font-size: .72rem; letter-spacing: .06em; color: var(--muted); border-color: var(--line); margin-right: .3rem; }
.md-toolbar.previewing button.md-tool:not(:last-child) { visibility: hidden; }
.md-preview { border: 1px solid var(--line); border-radius: 0 0 6px 6px; padding: .5rem .6rem; background: var(--panel); overflow-wrap: anywhere; }

/* Map picker on place forms (src/admin/editor/map.js; Leaflet + Geoman styles come from static/map.css) */
.map-picker { margin-top: .5rem; }
.map-search { display: flex; gap: .5rem; margin-bottom: .4rem; }
.map-search input { flex: 1; }
.map-results { font-size: .9rem; }
.map-result { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; padding: .3rem 0; border-bottom: 1px solid var(--line); }
.map-result .actions { gap: 1rem; }
.map-canvas { height: 420px; border: 1px solid var(--line); border-radius: 6px; margin-top: .4rem; z-index: 0; }
.map-pin { background: var(--accent); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 1px 4px rgba(0,0,0,.4); }
.leaflet-container { font: inherit; }
details > summary { cursor: pointer; }

/* Search (top bar + results page) */
.top-search input { width: 12rem; padding: .25rem .5rem; }
.search-results { display: grid; gap: .1rem; }
.search-hit { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.small { font-size: .88rem; margin-top: .15rem; }
mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; border-radius: 2px; padding: 0 .1em; }

/* Pickers (src/admin/editor/autocomplete.js) */
.ac { position: relative; }
.ac-list { position: absolute; z-index: 1000; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: .2rem 0; list-style: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.15);
  max-height: 320px; overflow-y: auto; }
.ac-item { padding: .35rem .6rem; cursor: pointer; }
.ac-item[aria-selected="true"], .ac-item:hover { background: var(--code); }
.ac-empty { padding: .35rem .6rem; }
.ac-chosen:empty { display: none; }

/* Revert / restore (src/admin/revert-ui.js) */
.history-actions { white-space: nowrap; font-size: .88rem; }
.history-actions a { display: block; }
.revert-item { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .8rem .8rem; margin: 0 0 .9rem; background: var(--panel); }
.revert-item.has-problem { border-color: var(--err); }
.revert-item legend { padding: 0 .3rem; font-weight: 600; }
.revert-item legend .muted { font-weight: 400; }
.revert-fields td, .revert-fields th { font-size: .9rem; }
.revert-fields tr.rf-conflict { background: color-mix(in srgb, var(--err) 8%, transparent); }
.revert-fields tr.rf-already { opacity: .6; }
.choice { white-space: nowrap; margin-right: .6rem; font-weight: 400; }
.choice input, .revert-item legend input, .warnbox input { width: auto; margin-right: .25rem; }
.tag.warn { color: var(--err); border-color: var(--err); }
.tag.ok { color: var(--ok); border-color: var(--ok); }
.warnbox { background: var(--err-bg); color: var(--err); padding: .4rem .6rem; border-radius: 6px; }
.err { color: var(--err); }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: .7rem 0; border-top: 1px solid var(--line); }

/* Word diff for long texts (src/admin/textdiff.js) */
.wdiff { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.wdiff del { color: var(--err); background: var(--err-bg); text-decoration: line-through; border-radius: 2px; }
.wdiff ins { color: var(--ok); background: var(--ok-bg); text-decoration: none; border-radius: 2px; }
.wd-gap { color: var(--muted); padding: 0 .3em; }
/* pages: unpublished changes (drafts against the site) — in the editor, the outline and the review page */
.page-changes { margin: .6rem 0 1rem; border: 1px solid var(--line); border-left: 3px solid var(--warn, #b26a00); border-radius: 4px; padding: .4rem .7rem; }
.page-changes summary { cursor: pointer; font-weight: 600; }
.page-changes-diff { max-height: 24rem; overflow: auto; margin-top: .4rem; font-size: .92rem; }
.page-pending { color: var(--warn, #b26a00); font-size: .8rem; white-space: nowrap; }
.page-change { margin: 1.4rem 0; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.page-change .page-changes-diff { max-height: none; border: 1px solid var(--line); border-radius: 4px; padding: .5rem .7rem; }
.page-form [hidden] { display: none; }   /* a button's own display would show it */
.page-settings { margin: 1rem 0 1.5rem; border: 1px solid var(--line); border-radius: 4px; padding: .4rem .7rem; }
.page-settings summary { cursor: pointer; font-weight: 600; }
.page-change .actions { display: flex; gap: .6rem; align-items: center; margin-top: .5rem; }
.legend-del { color: var(--err); background: var(--err-bg); } .legend-ins { color: var(--ok); background: var(--ok-bg); text-decoration: none; }
.revert-fields tr.rf-merge td { background: color-mix(in srgb, var(--ok) 6%, transparent); }

/* Live connection (src/admin/editor/live.js): status, presence, drafts */
.live-status { position: fixed; right: 12px; bottom: 10px; z-index: 50; font-size: .8rem; padding: .2rem .6rem;
  border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); max-width: 70vw; }
.live-status.ok { color: var(--ok); }
.live-status.warn { color: var(--err); border-color: var(--err); }
.presence-bar { margin: 0 0 .8rem; padding: .35rem .7rem; border-radius: 6px; background: var(--ok-bg); font-size: .9rem; }
.presence-tag, .presence-badge { margin-left: .4rem; font-weight: 400; }
.presence-badge.editing, .presence-tag { color: var(--accent); border-color: var(--accent); }
.flash.draft { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--fg); }
.tag.planned { border-color: var(--accent); color: var(--fg); }
.planned-due { margin-top: .3rem; padding: .3rem .5rem; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.planned-reminder ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.flash.draft .actions { margin-left: .6rem; display: inline-flex; }

/* Wikidata comparison (src/admin/wikidata-ui.js) */
.wd-table tr.wd-same td, .wd-table tr.wd-same th { opacity: .55; }
.wd-table tr.wd-differs, .wd-table tr.wd-more-precise, .wd-table tr.wd-start-only { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.wd-table tr.wd-declined { opacity: .7; }
.wd-table .choice { display: inline-block; margin: 0 .8rem .15rem 0; }
.wd-table input[type=checkbox], .wd-table input[type=radio], .wd-image input { width: auto; margin-right: .25rem; }
.wd-image { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.wd-images { display: grid; gap: 1rem; }
.wd-image img { max-width: 260px; max-height: 260px; border-radius: 6px; border: 1px solid var(--line); }

/* Data quality (src/admin/quality.js) */
.tag.qa-error { color: var(--err); border-color: var(--err); }
.tag.qa-warning { color: var(--accent); border-color: var(--accent); }
.card.qa-error b { color: var(--err); }
.card.qa-warning b { color: var(--accent); }
.card.active { outline: 2px solid var(--accent); }
.qa-group h2 { display: flex; gap: .5rem; align-items: center; }
.qa-actions { white-space: nowrap; }
.qa-ack input { width: 13rem; padding: .2rem .4rem; font-size: .85rem; }
.qa-ack button { padding: .2rem .6rem; font-size: .85rem; }
.qa-box { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .8rem; margin: 0 0 1rem; background: var(--panel); }
.qa-box.has-error { border-color: var(--err); }
.qa-box ul { margin: .3rem 0; padding-left: 1.1rem; }
.qa-box li { margin: .2rem 0; }
.bar select { width: auto; flex: 0 1 auto; }
.bar .choice input { width: auto; }

/* Images (artworks, artists, institutions): list thumbnails and the preview on the entry's page (src/admin/images.js) */
table.with-thumbs td { vertical-align: middle; }
td.thumb { width: 76px; padding: .25rem .5rem; }
td.thumb img, .thumb-empty { display: block; width: 64px; height: 64px; object-fit: cover; border-radius: 4px;
  background: var(--code); border: 1px solid var(--line); }
.image-preview { margin: 0 0 1rem; }
.image-preview img { display: block; max-width: min(100%, 500px); max-height: 420px; border-radius: 6px; border: 1px solid var(--line); }
.image-preview figcaption { margin-top: .3rem; }
.thumbs-artist td.thumb img, .thumbs-person td.thumb img { object-position: center 20%; }  /* portraits: keep the face in the square */
/* the "Images" section: all of an entry's images in order, the first one is the main image (migration 017) */
.image-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.image-item { margin: 0; border: 1px solid var(--line); border-radius: 6px; padding: .5rem; }
.image-item.main { border-color: var(--accent, #555); }
.image-item img { display: block; width: 100%; height: 150px; object-fit: contain; background: var(--line); border-radius: 4px; }
.image-item figcaption { margin-top: .4rem; font-size: .9rem; overflow-wrap: anywhere; }
.image-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .3rem; align-items: center; }
.image-edit-preview { max-width: 250px; max-height: 250px; border-radius: 6px; border: 1px solid var(--line); }
.row.dims { align-items: center; }
.row.dims .x { flex: 0 0 auto; min-width: 0; color: var(--muted); }

/* dimensions: a note when only the height is filled in (pure CSS — :has() and :placeholder-shown, no script) */
.dims-height-only { display: none; }
.field:has(.dims input[name$="_h"]:not(:placeholder-shown)):has(.dims input[name$="_w"]:placeholder-shown):has(.dims input[name$="_d"]:placeholder-shown) .dims-height-only { display: block; }

/* names in several languages (src/admin/editor/names.js): the name at full width, below it a compact line with
   language · role · Add reading · remove; the reading panel opens under the field */
.name-meta { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .35rem; }
.name-meta > * { width: auto; flex: 0 0 auto; }
.name-meta .lang-input { width: 10rem; }
.name-meta select { width: 10rem; }
.name-meta button.small, .reading-panel button.small { padding: .25rem .7rem; font-size: .88rem; }
.name-meta .n-remove { margin-left: auto; }
/* a name's context (152): when it was in use, a note */
.name-context { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .35rem; }
.name-context .n-period { flex: 0 1 13rem; }
.name-context .n-note { flex: 1 1 16rem; }
.names-list .name-context-shown { display: block; margin-top: .1rem; }
.reading-panel { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .4rem; padding: .45rem .6rem;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.reading-panel[hidden] { display: none; }
.reading-panel .reading-input { width: 14rem; }
.reading-panel b { font-size: 1.15rem; }
.ruby-preview { font-size: 1.5rem; line-height: 2.4; margin-top: .2rem; }
.ruby-preview[hidden] { display: none; }
.ruby-preview rt { font-size: .5em; color: var(--muted, inherit); }
.names-editor { display: grid; gap: .6rem; }
.names-editor > button { justify-self: start; }
.names-row { padding: .55rem .6rem; border: 1px solid var(--line); border-radius: 6px; }
.reading-note:empty { display: none; }

/* unpublished changes in the shared working copy (src/admin/editor/unpublished.js) */
.field.unpublished { outline: 2px solid color-mix(in srgb, var(--accent) 75%, transparent); outline-offset: 6px; border-radius: 3px; }
.field.unpublished > label::after { content: 'unpublished'; margin-left: .5rem; padding: 0 .4rem; border-radius: 999px; font-size: .75rem;
  font-weight: 600; color: var(--accent-fg); background: var(--accent); vertical-align: middle; }
.published-value { font-style: italic; overflow-wrap: anywhere; }
.unpublished-summary { margin: 0 0 1rem; color: var(--accent); font-weight: 600; }
.unpublished-summary[hidden] { display: none; }

/* materials: click to add, from the medium or from terms used before (src/admin/editor/materials.js) */
.material-suggestions { display: grid; gap: .3rem; margin-top: .35rem; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
button.chip { padding: .1rem .55rem; font-size: .85rem; border-radius: 999px; background: transparent; color: var(--fg); border: 1px solid var(--line); }
button.chip:hover { border-color: var(--accent); color: var(--accent); }
button.chip.suggested { border-color: var(--accent); color: var(--accent); }

/* dimensions: notice after converting pasted inches / mm (src/admin/editor/dims.js) */
.dims-notice { color: var(--accent); }
.dims-notice[hidden] { display: none; }

/* further measurements: one box per part (src/admin/editor/dims.js) */
.dimset-editor { display: grid; gap: .6rem; }
.dimset-editor > button { justify-self: start; }
.dimset-row { padding: .55rem .6rem; border: 1px solid var(--line); border-radius: 6px; display: grid; gap: .4rem; }
.dimset-row .d-part { width: 16rem; }
.dimset-row .name-meta { margin-top: 0; justify-content: space-between; }

/* glossary: links in previews and pages, the [[ completion list (CodeMirror autocomplete) */
.md a.glossary-link { text-decoration: underline dotted; text-underline-offset: 3px; }
.md a.glossary-link.missing { color: var(--err); }
.cm-tooltip-autocomplete { background: var(--panel); border: 1px solid var(--line); color: var(--fg); }
.cm-tooltip-autocomplete ul li[aria-selected] { background: var(--accent); color: var(--accent-fg); }
.cm-completionDetail { margin-left: .6rem; opacity: .7; font-style: normal; }

/* image search (src/admin/imagesearch.js) */
.find-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.find-item img { height: 170px; }
.source-tabs { display: flex; gap: 1rem; flex-wrap: wrap; }

/* bibliography: footnotes and the list of sources in previews and pages (src/markdown.js), the citation of a source */
.md sup.fn-ref a { text-decoration: none; padding: 0 .1em; }
.md section.footnotes { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .4rem; font-size: .88rem; }
.md section.footnotes ol { padding-left: 1.4rem; margin: .2rem 0; }
.md section.bibliography { font-size: .88rem; }
.md section.bibliography h4 { margin: .8rem 0 .3rem; }
.md ul.source-list { list-style: none; padding-left: 0; }
.md ul.source-list li { margin-bottom: .3rem; padding-left: 1.2rem; text-indent: -1.2rem; }
.md .missing, .md a.missing { color: var(--err); }
.citation { font-size: 1.05rem; line-height: 1.5; padding: .6rem .8rem; border-left: 3px solid var(--accent); background: var(--panel); }
.form .field[hidden] { display: none; }
/* optional field groups behind a button (forms.js GROUPS: an artwork's series fields) */
details.field-group { margin: 0.25rem 0 1rem; }
details.field-group > summary { display: inline-block; list-style: none; }
details.field-group > summary::-webkit-details-marker { display: none; }
details.field-group[open] > summary { margin-bottom: 0.5rem; }
details.field-group[open] { border-left: 3px solid var(--line); padding-left: 0.75rem; }

/* live search (src/admin/editor/livesearch.js): the header's dropdown */
.top-search { position: relative; }
.top-search-list { position: absolute; top: 100%; right: 0; z-index: 50; min-width: 22rem; max-width: 90vw; margin-top: .25rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px rgb(0 0 0 / .18); }
.top-search-list[hidden] { display: none; }
.top-search-list a { display: flex; justify-content: space-between; gap: .8rem; padding: .4rem .7rem; color: var(--fg); text-decoration: none; }
.top-search-list a:hover, .top-search-list a.active { background: var(--accent); color: var(--accent-fg); }
.top-search-list a.all { border-top: 1px solid var(--line); color: var(--accent); }
.top-search-list a.all:hover, .top-search-list a.all.active { color: var(--accent-fg); }
.live-status-search[hidden] { display: none; }

/* duplicates (src/admin/duplicates.js) */
.dup-box ul, .dup-confirm ul { margin: .4rem 0; padding-left: 1.2rem; }
.dup-confirm label.choice { display: block; margin-top: .2rem; }
.merge-summary li { margin: .3rem 0; }

/* sources for facts (src/admin/citations.js): W database · M institution · L literature · P primary · ? none */
details.cite { display: inline-block; vertical-align: baseline; }
details.cite > summary { list-style: none; cursor: pointer; display: inline-flex; gap: 2px; }
details.cite > summary::-webkit-details-marker { display: none; }
.cite-badge { display: inline-block; min-width: 1.15em; padding: 0 .25em; border-radius: 3px; font-size: .7rem; line-height: 1.35;
  font-weight: 600; text-align: center; border: 1px solid var(--line); color: var(--muted); }
.cite-database { color: var(--fg); background: color-mix(in srgb, var(--muted) 18%, transparent); }
.cite-institution { color: var(--accent-fg); background: var(--accent); border-color: var(--accent); }
.cite-scholarly, .cite-primary { color: var(--bg); background: var(--ok); border-color: var(--ok); }
.cite-none { border-style: dashed; }
.cite-text { font-style: italic; }
.cite-outdated { color: var(--bg); background: var(--err); border-color: var(--err); }
.cite-badge.cite-pending { border: 1px dotted currentColor; background: transparent; color: var(--fg); }  /* in the working copy, not published yet */
.cite-warn { color: var(--err); }
/* the sources of a value: a dialog in the middle of the screen (position: fixed — no table cuts it off); the
   dimmed backdrop is the summary's ::after, so a click beside the dialog closes it like the summary itself */
details.cite > summary { cursor: pointer; }
details.cite[open] > summary::after { content: ''; position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .5); cursor: default; }
.cite-panel { position: fixed; z-index: 61; left: 50%; top: 12vh; transform: translateX(-50%); width: min(38rem, calc(100vw - 32px));
  max-height: 76vh; overflow: auto; padding: .9rem 1rem; background: var(--panel); color: var(--fg); text-align: left;
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.45); white-space: normal; font-size: .95rem; }
.cite-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .5rem; }
.cite-panel ul { margin: 0 0 .8rem; padding-left: 1.1rem; }
.cite-panel li { margin: .25rem 0; }
.cite-panel .cite-add { border-top: 1px solid var(--line); padding-top: .7rem; }
.cite-more > summary { cursor: pointer; margin: .3rem 0; }
.cite-badge.cite-none { color: var(--accent); border-color: var(--accent); }
.cite-legend { margin-top: -.4rem; }
.cite-legend .cite-badge { margin: 0 .1rem; }

/* drag-and-drop ordering (editor/sortable.js): the provenance */
.drag-cell { width: 1.6rem; padding-right: 0; }
.drag-handle { cursor: grab; touch-action: none; user-select: none; background: none; border: 0; padding: .1rem .25rem;
  color: var(--muted); font-size: 1.1rem; line-height: 1; border-radius: 4px; }
.drag-handle:hover, .drag-handle:focus-visible { color: var(--fg); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.sort-saving { opacity: .6; pointer-events: none; }

/* the edit page: the sources dialogs after the form, opened by a button next to each field's label */
.cite-dialogs > details.cite > summary { position: absolute; width: 0; height: 0; padding: 0; overflow: hidden; font-size: 0; }
.cite-trigger { display: inline-flex; gap: 2px; vertical-align: middle; background: none; border: 0; padding: 0 .1rem; cursor: pointer; }
.label-row { display: flex; align-items: baseline; gap: .35rem; }
.label-row > label { margin-bottom: .2rem; }
.cite-actions { margin-top: .6rem; }

/* dragging (editor/sortable.js): the floating copy and the gap where it lands */
.sort-ghost { position: fixed; z-index: 70; margin: 0; pointer-events: none; background: var(--panel); border-collapse: collapse;
  box-shadow: 0 8px 28px rgba(0,0,0,.4); border: 1px solid var(--accent); border-radius: 4px; opacity: .97; }
/* the chapters of a page: number, ⠿ handle, title in one row (the list's own numbers sat under the handles) */
.page-chapters { list-style: none; padding-left: 0; counter-reset: chapter; }
.page-chapters > li { counter-increment: chapter; display: flex; align-items: baseline; gap: .25rem; margin: .15rem 0; }
.page-chapters > li::before { content: counter(chapter) "."; min-width: 1.6rem; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.page-chapters > li > a { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.page-chapters > li > .page-pending { flex: none; }
.page-chapters .drag-handle { padding: 0 .15rem; }
.page-chapters > li.sort-placeholder { counter-increment: none; }
.page-chapters > li.sort-placeholder::before { content: none; }
.page-overwrite { margin: .6rem 0; padding: .5rem .7rem; border: 1px solid var(--err); border-radius: 4px; }
.page-outline-intro { margin: .2rem 0; }
li.sort-placeholder { list-style: none; border: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 6px; }
ol.sort-ghost { list-style: none; padding: .2rem .4rem; }
.sort-placeholder td { padding: 0; border: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 7%, transparent); }
body.sorting, body.sorting * { cursor: grabbing !important; user-select: none; }

/* the sources dialog: status line, quick-select chips, "also for" */
.cite-status:empty { display: none; }
.cite-status { margin: -.2rem 0 .5rem; }
.cite-ok { color: var(--ok); }
.cite-recent { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: .4rem 0 .6rem; }
.cite-recent:empty { display: none; }
.cite-recent > span { flex-basis: 100%; }
.cite-chip { font-size: .85rem; padding: .15rem .55rem; border-radius: 999px; background: var(--code); color: var(--fg);
  border: 1px solid var(--line); cursor: pointer; }
.cite-chip:hover, .cite-chip:focus-visible { border-color: var(--accent); }
.cite-chip-institution { border-left: 4px solid var(--accent); }
.cite-chip-scholarly, .cite-chip-primary { border-left: 4px solid var(--ok); }
.cite-also { display: flex; flex-wrap: wrap; gap: .1rem .9rem; margin: .3rem 0 .5rem; }
.cite-also > div { flex-basis: 100%; }
.cite-chip-page { color: var(--muted); font-size: .8em; }

/* Enrich (enrich.js) and the Quality queue (quality.js, routes/queue.js) */
.enrich-sources { margin: .3rem 0 1rem; padding-left: 1.1rem; }
.enrich-sources li { margin: .15rem 0; }
.enrich-merged td > div { margin: .15rem 0; }
.enrich-same { color: var(--muted); }
.flash.inline { display: inline-block; padding: .1rem .5rem; }
.queue-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-start; margin: .4rem 0 1rem; padding: .7rem .9rem;
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; }
.queue-bar .small > div { margin-top: .2rem; }
details.qa-folded > summary { cursor: pointer; list-style: none; }
details.qa-folded > summary::-webkit-details-marker { display: none; }
details.qa-folded > summary h2 { display: inline; }
details.qa-folded > summary h2::after { content: ' ▸'; color: var(--muted); }
details.qa-folded[open] > summary h2::after { content: ' ▾'; }
.qa-tools { margin: .3rem 0 .6rem; }
.queue-bar > .grow { flex: 1 1 20rem; }
.rel-other { display: inline-flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.rel-other .ac { display: inline-block; }
input.rel-picker { width: 13rem; padding: .15rem .4rem; }
/* provenance: implied lines (the artist first, a loan last — view provenance_chain) */
table.provenance tbody.implied td { font-style: italic; color: var(--muted); }
table.provenance tbody.implied a { color: inherit; }
.tag.implied { font-style: normal; border-style: dashed; }
.tag.flagged, .tag.era { color: var(--err); border-color: var(--err); }  /* provenance flag (068); a gap touching 1933–1945 (078) */
details.research { margin-top: .75rem; }
details.research ul { margin: .4rem 0; }

/* Where the provenance is silent (078): the coverage bar and the gap lines of the provenance table */
figure.coverage { margin: .5rem 0 1rem; }
figure.coverage svg { width: 100%; height: 28px; display: block; }
figure.coverage .cov-era { fill: var(--err-bg); }
figure.coverage .cov-documented { fill: var(--accent); }
figure.coverage .cov-presumed { fill: var(--accent); opacity: .45; }
figure.coverage rect.cov-presumed-seg { stroke: var(--accent); stroke-width: 1; vector-effect: non-scaling-stroke; }
figure.coverage rect.cov-gap { fill: var(--panel); stroke: var(--err); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
figure.coverage figcaption { display: flex; flex-wrap: wrap; gap: .25rem .75rem; justify-content: space-between; margin-top: .25rem; }
figure.coverage .cov-legend { flex-basis: 100%; }
figure.coverage .cov-legend i { display: inline-block; width: .9em; height: .7em; margin: 0 .2em 0 .6em; vertical-align: middle; }
figure.coverage i.cov-documented { background: var(--accent); }
figure.coverage i.cov-presumed-key { background: repeating-linear-gradient(45deg, var(--accent) 0 2px, transparent 2px 4px); }
figure.coverage i.cov-gap { border: 1.5px solid var(--err); background: var(--panel); }
figure.coverage i.cov-era { background: var(--err-bg); }
.cov-warn { color: var(--err); }
table.provenance tbody.gap td { padding-top: .35rem; padding-bottom: .35rem; background: var(--err-bg); }
table.provenance tbody.gap td:first-child { border-left: 3px solid var(--err); }
/* what became of it (103): destroyed closes the table with a heavy rule, lost / partly destroyed are marked lighter */
table.provenance tbody.fate td { padding-top: .45rem; padding-bottom: .45rem; }
table.provenance tbody.fate-destroyed td { border-bottom: 3px solid var(--err); }
table.provenance tbody.fate-lost td { border-bottom: 2px dotted var(--err); }
table.provenance tbody.fate b { color: var(--err); }
/* "+ Create …" in the [[ suggestions: the type chooser (editor.js typeChooser) */
.link-create { position: absolute; z-index: 1000; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; max-width: 34rem;
  background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.link-create label { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-weight: normal; }
.link-create select { width: auto; margin: 0; }
.link-create .hint { flex-basis: 100%; margin: 0; }
.link-create .hint.error { color: var(--err); }
/* list pages: a group heading inside the results (artworks: "Works by a matching artist" after the title matches) */
tr.list-group td { padding-top: .9rem; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* biography × provenance (086): conclusions derived from dates and places */
.inference { font-style: italic; color: var(--muted); }
/* provenance records (104): the evidence under a step — a compact list, folded when long */
ul.records, ol.records-edit { margin: .25rem 0 0; padding-left: 1.1rem; }
ul.records li, ol.records-edit li { margin: .1rem 0; }
details.records > summary { cursor: pointer; color: var(--muted); }
.record-date { font-variant-numeric: tabular-nums; }

/* pages (migration 114): the image list of a page, and images in its preview */
.page-image-list { list-style: none; padding: 0; display: grid; gap: .4rem; }
.page-image-list li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.page-image-list img { width: 64px; height: 48px; object-fit: cover; border-radius: 3px; border: 1px solid var(--border, #ddd); }
.md-preview img { max-width: 100%; height: auto; }
/* [[#Heading]] to no heading of the page (src/pages.js) */
.page-link-missing { color: #c62828; text-decoration: underline dashed; }
.page-image-missing { display: inline-block; padding: .1rem .4rem; border: 1px dashed #c62828; color: #c62828; font-family: monospace; font-size: .85em; }
.page-figure { display: block; } .page-caption { display: block; font-size: .85em; color: var(--muted, #666); }
.md-preview .task { list-style: none; } .md-preview mark { background: #fff3a3; }
/* a page's chapters beside the editor (116) */
.page-layout { display: grid; grid-template-columns: minmax(12rem, 17rem) 1fr; gap: 1.5rem; align-items: start; }
.page-outline { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; font-size: .92rem; }
.page-outline h2 { font-size: 1rem; margin: .4rem 0; } .page-outline ol { padding-left: 1.3rem; margin: .3rem 0; }
.page-outline a.on { font-weight: 700; } .page-main { min-width: 0; }
@media (max-width: 900px) { .page-layout { grid-template-columns: 1fr; } .page-outline { position: static; max-height: none; } }
/* editor tools (as in the adenai editor): the box menu, the find panel; the extras in the preview (src/md-extras.js) */
.md-toolbar { flex-wrap: wrap; }
.md-boxmenu { position: relative; display: inline-block; }
.md-boxlist { position: absolute; top: 100%; left: 0; z-index: 20; display: flex; flex-direction: column; min-width: 11rem; padding: .25rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.md-boxlist[hidden] { display: none; }
.md-boxlist button.md-tool { text-align: left; }
.md-editor .cm-panels { background: var(--panel); color: var(--fg); border-color: var(--line); }
.md-editor .cm-search input, .md-editor .cm-search button { font: inherit; font-size: .85rem; }
/* the find panel inside a form field: the admin's input width, block labels and CodeMirror's light buttons undone */
.md-editor .cm-panel.cm-search { padding: .45rem 2rem .45rem .6rem; line-height: 2.1; }
.md-editor .cm-search .cm-textfield { width: 16rem; max-width: 100%; padding: .15rem .45rem; margin: 0 .3rem 0 0; vertical-align: middle;
  border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--fg); }
.md-editor .cm-search label { display: inline-flex; align-items: center; gap: .25rem; margin: 0 .7rem 0 0; font-weight: normal; font-size: .85rem; color: var(--fg); vertical-align: middle; }
.md-editor .cm-search input[type=checkbox] { width: auto; margin: 0; accent-color: var(--accent); }
.md-editor .cm-search .cm-button { background: transparent; background-image: none; color: var(--fg); border: 1px solid var(--line);
  border-radius: 4px; padding: .1rem .6rem; margin: 0 .3rem 0 0; vertical-align: middle; text-transform: none; }
.md-editor .cm-search .cm-button:hover { border-color: var(--accent); color: var(--accent); }
.md-editor .cm-search button[name=close] { background: none; border: 0; color: var(--muted); font-size: 1.2rem; line-height: 1; padding: .1rem .35rem;
  top: .35rem; right: .35rem; }
.md-editor .cm-search button[name=close]:hover { color: var(--fg); }
.md-editor .cm-searchMatch { background: rgba(255, 213, 0, .35); } .md-editor .cm-searchMatch-selected { background: rgba(255, 140, 0, .5); }
.md mark, .md-preview mark { background: #ffe58a; color: #1b1a17; padding: 0 .1em; }
.md .spoiler, .md-preview .spoiler { background: var(--fg); color: transparent; border-radius: 3px; cursor: pointer; }
.md .spoiler:focus, .md-preview .spoiler:focus, .md .spoiler:hover, .md-preview .spoiler:hover { background: var(--panel); color: inherit; }
.md li.task, .md-preview li.task { list-style: none; margin-left: -1.2rem; } .task-box { display: inline-block; width: 1.2rem; }
.callout { border-left: 4px solid var(--accent); background: var(--panel); padding: .4rem .8rem; margin: .8rem 0; border-radius: 0 6px 6px 0; }
.callout-title { font-weight: 700; margin: .2rem 0; }
.callout-warning, .callout-important { border-left-color: #d9822b; } .callout-tip, .callout-example { border-left-color: #2f8a55; }
.callout-quote { border-left-color: var(--muted); font-style: italic; } .callout-question, .callout-todo { border-left-color: #7a5fb0; }
/* changelog + roadmap (src/admin/routes/changelog.js) */
.changelog-preview { padding-left: 1.2rem; } .changelog-preview li { margin: .25rem 0; }
.cl-kind { display: inline-block; font-size: .75rem; font-weight: 600; border-radius: 4px; padding: 0 .4rem; margin-right: .3rem; background: var(--panel); border: 1px solid var(--line); }
.cl-neu { color: #2f8a55; } .cl-verbessert { color: #2b6cb0; } .cl-behoben { color: #c05621; } .cl-inhalt { color: #7a5fb0; } .cl-technik { color: var(--muted); }
.roadmap-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; align-items: start; }
.roadmap-col { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; }
.roadmap-col h2 { font-size: 1rem; margin: .2rem 0 .5rem; }
.roadmap-list { width: 100%; border-collapse: separate; border-spacing: 0 .4rem; }
.roadmap-list td { vertical-align: top; border: 0; padding: .2rem; } .roadmap-card { background: var(--bg); border-radius: 6px; }
.roadmap-moves { display: flex; flex-wrap: wrap; gap: .1rem .6rem; margin-top: .2rem; }

.link-button { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; } .link-button.small { font-size: .8rem; }
.recently-deleted li { margin: .2rem 0; } .restore-preview { border: 1px solid var(--line); border-radius: 6px; padding: .3rem .9rem; margin: .6rem 0; }

/* light / dark toggle in the header (static/theme.js): Auto → Light → Dark, remembered per browser */
button.theme-toggle { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: .1rem .6rem; font-size: .8rem; white-space: nowrap; }
button.theme-toggle:hover { color: var(--fg); border-color: var(--accent); }

/* roadmap (136): topic colours (roadmap_areas.color) and the columns' colours — light, then dark */
:root {
  --a-blue: #2b6cb0; --a-teal: #1f7a7a; --a-purple: #7a5fb0; --a-pink: #b83280; --a-red: #c53030;
  --a-brown: #8a5a2b; --a-olive: #6b7a1f; --a-indigo: #4c51bf; --a-cyan: #0e7490; --a-slate: #4a5568;
  --st-jetzt: #2f8a55; --st-naechstes: #b8860b; --st-spaeter: #d9822b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --a-blue: #7fb3ee; --a-teal: #5fc4c4; --a-purple: #b9a2e6; --a-pink: #f08cc4; --a-red: #f08a82;
    --a-brown: #d2a679; --a-olive: #b5c45f; --a-indigo: #a3a8f0; --a-cyan: #67d0e6; --a-slate: #a0aec0;
    --st-jetzt: #6fcf97; --st-naechstes: #e8c547; --st-spaeter: #f0a46b;
  }
}
:root[data-theme="dark"] {
  --a-blue: #7fb3ee; --a-teal: #5fc4c4; --a-purple: #b9a2e6; --a-pink: #f08cc4; --a-red: #f08a82;
  --a-brown: #d2a679; --a-olive: #b5c45f; --a-indigo: #a3a8f0; --a-cyan: #67d0e6; --a-slate: #a0aec0;
  --st-jetzt: #6fcf97; --st-naechstes: #e8c547; --st-spaeter: #f0a46b;
}
.area-blue { --area: var(--a-blue); } .area-teal { --area: var(--a-teal); } .area-purple { --area: var(--a-purple); }
.area-pink { --area: var(--a-pink); } .area-red { --area: var(--a-red); } .area-brown { --area: var(--a-brown); }
.area-olive { --area: var(--a-olive); } .area-indigo { --area: var(--a-indigo); } .area-cyan { --area: var(--a-cyan); }
.area-slate { --area: var(--a-slate); }
.tag.area { color: var(--area); border-color: currentColor; background: color-mix(in srgb, var(--area) 10%, transparent); }
.roadmap-col.roadmap-jetzt { border-top: 3px solid var(--st-jetzt); }
.roadmap-col.roadmap-naechstes { border-top: 3px solid var(--st-naechstes); }
.roadmap-col.roadmap-spaeter { border-top: 3px solid var(--st-spaeter); }
.roadmap-col.roadmap-erledigt { border-top: 3px solid var(--line); opacity: .7; }
.roadmap-jetzt > h2::before, .roadmap-naechstes > h2::before, .roadmap-spaeter > h2::before { content: ''; display: inline-block;
  width: .6rem; height: .6rem; border-radius: 50%; margin-right: .4rem; vertical-align: .05em; }
.roadmap-jetzt > h2::before { background: var(--st-jetzt); } .roadmap-naechstes > h2::before { background: var(--st-naechstes); }
.roadmap-spaeter > h2::before { background: var(--st-spaeter); }
.roadmap-areas td { vertical-align: middle; } .inline-form label { display: inline; font-weight: normal; }
/* "[" suggestions of a bullet's topic (editor.js topicCompletions): a dot in the topic's colour */
.cm-tooltip-autocomplete li.cm-topic .cm-completionLabel::before { content: ''; display: inline-block; width: .6rem; height: .6rem;
  border-radius: 50%; background: var(--area); margin-right: .45rem; vertical-align: .05em; }
.cm-tooltip-autocomplete li.cm-topic .cm-completionLabel { color: var(--area); font-weight: 600; }
.cm-tooltip-autocomplete li.cm-topic[aria-selected] .cm-completionLabel { color: inherit; }
/* feedback from visitors (routes/feedback.js) */
.nav-count { display: inline-block; min-width: 1.2em; padding: 0 .35em; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-size: .75rem; text-align: center; }
.feedback-tabs { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .5rem 0 1rem; }
.feedback-tabs a.on { font-weight: 700; text-decoration: none; }
.feedback-card { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: .7rem .9rem; margin: 0 0 .9rem; }
.feedback-card.fb-read, .feedback-card.fb-planned { border-left-color: var(--line); }
.feedback-card.fb-done, .feedback-card.fb-dismissed { border-left-color: var(--line); opacity: .75; }
.feedback-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.feedback-head .tag { margin-left: 0; }
.fb-kind-bug { color: var(--err); border-color: currentColor; } .fb-kind-idea { color: var(--ok); border-color: currentColor; }
.fb-kind-content { color: var(--accent); border-color: currentColor; }
.feedback-page { margin: .4rem 0; }
.feedback-elements { margin: .2rem 0 .5rem; padding-left: 1.4rem; font-size: .9rem; }
.feedback-message { margin: .4rem 0; padding: .4rem .7rem; border-left: 3px solid var(--line); white-space: pre-wrap; }
.feedback-note { display: grid; gap: .2rem; margin: .4rem 0; } .feedback-note textarea { min-height: 2.6rem; } .feedback-note button { justify-self: start; }
.feedback-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ac-item.ac-new b { color: var(--accent); } .ac-item.ac-new { border-top: 1px dashed var(--line); }
.ac-item.ac-cited { opacity: .5; cursor: not-allowed; } .cite-chip.cite-chip-used { opacity: .5; cursor: default; }

/* Enrich: "Search elsewhere" — sites opened with the name searched (lookups.js) */
.lookups { margin: .4rem 0 1rem; line-height: 2.1; }
.lookups a.button.small { padding: .2rem .65rem; font-size: .85rem; white-space: nowrap; }

/* The test environment's notice (config.testEnv) */
.test-env { background: #fff3c4; color: #5a4300; border-bottom: 1px solid #e0c766; padding: .45rem 1rem; font-size: .9rem; text-align: center; }
.test-env a { color: inherit; text-decoration: underline; }
