/* The gallery's look (2026-11 rethink): white paper, black ink, a red
   accent, and the candy-coloured pills of the owner's own site, with the
   pixel, dither and halftone motifs she asked for. Three fonts, all free
   and served from here (see fonts/LICENSE.txt): Pixelify Sans for the
   name and numbers, Instrument Serif for titles and artists' names, IBM
   Plex Mono for everything small. Light only, on purpose: it is a white
   wall. */

@font-face { font-family: "Pixelify"; src: url("fonts/PixelifySans.3eebebe78288.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Instrument"; src: url("fonts/InstrumentSerif.9b8dd1ecf641.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument"; src: url("fonts/InstrumentSerif-Italic.bc891bdd08ad.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex"; src: url("fonts/IBMPlexMono.16796c7cc5d4.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url("fonts/IBMPlexMono-Medium.3bd6f090515e.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #ffffff; --ink: #111111; --muted: #6b6b6b; --line: #111111; --soft: #e9e9e9;
  --red: #ff0000; --pink: #ff1f7a; --green: #2bff2b; --blue: #6fa3ff; --cyan: #a6f1ff; --yellow: #ffe600;
  --serif: "Instrument", Georgia, "Times New Roman", serif;
  --mono: "Plex", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pixel: "Pixelify", "Silkscreen", monospace;
  --gutter: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--serif);
}
a { color: inherit; }
a:hover { color: var(--red); }
.mono { font-family: var(--mono); font-size: .78rem; letter-spacing: .01em; }
.dots { color: var(--muted); }
.muted { color: var(--muted); }
.n { color: var(--muted); font-family: var(--pixel); font-size: .85em; }
kbd { font-family: var(--pixel); font-size: .7em; padding: 0 .3em; border: 1px solid currentColor; margin-left: .3em; vertical-align: middle; }

/* ---- header: the name with a glow, and the pills ---- */
.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem;
  padding: .9rem var(--gutter); border-bottom: 2px solid var(--line);
  background:
    radial-gradient(circle at 1px 1px, rgba(0,0,0,.14) 1px, transparent 1.2px) 0 0 / 7px 7px;
}
.brand { text-decoration: none; font-family: var(--pixel); font-weight: 700; font-size: 1.9rem; line-height: 1; letter-spacing: .02em; }
.brand-glow { color: var(--ink); text-shadow: 0 0 10px var(--green), 0 0 22px rgba(43,255,43,.55); }
.brand:hover .brand-glow { color: var(--red); text-shadow: 0 0 10px var(--pink), 0 0 22px rgba(255,31,122,.6); }
.pills { display: flex; flex-wrap: wrap; gap: .4rem .5rem; align-items: center; margin-left: auto; }
.pill, .pill:link, .pill:visited {
  display: inline-block; padding: .3rem .85rem; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--bg); color: var(--ink); text-decoration: none; font-family: var(--mono);
  font-size: .8rem; line-height: 1.4; cursor: pointer; box-shadow: 0 0 0 0 transparent;
  transition: transform .08s ease, box-shadow .12s ease;
}
.pill:hover { transform: translateY(-1px); color: inherit; }
.pill:active { transform: translateY(1px); }
.pill-works, .pill-works:link, .pill-works:visited { background: var(--pink); color: #fff; border-color: var(--pink); box-shadow: 0 0 12px rgba(255,31,122,.55); }
.pill-artists, .pill-artists:link, .pill-artists:visited { background: var(--ink); color: #fff; border-color: var(--ink); font-family: var(--serif); font-size: .95rem; padding-top: .2rem; padding-bottom: .2rem; }
.pill-browse, .pill-browse:link, .pill-browse:visited { background: #fff; color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 1rem; padding-top: .15rem; padding-bottom: .15rem; }
.pill-lost, .pill-lost:link, .pill-lost:visited { background: var(--red); color: var(--cyan); border-color: var(--red); border-radius: 2px; font-family: var(--pixel); font-weight: 700; font-size: .95rem; letter-spacing: .04em; }
.pill-review, .pill-review:link, .pill-review:visited { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 0 12px rgba(111,163,255,.6); }
.pill-admin, .pill-admin:link, .pill-admin:visited { background: #fff; color: var(--ink); border-style: dashed; }
.pill-dither { background: #fff; font-family: var(--pixel); font-size: .9rem; }
.pill-dither[aria-pressed="true"] { background: var(--ink); color: var(--green); text-shadow: 0 0 6px var(--green); }
.pill.small { padding: .1rem .6rem; font-size: .72rem; }
.pill.big { padding: .55rem 1.3rem; font-size: 1rem; }
@media (max-width: 560px) {
  .top { gap: .4rem .75rem; padding: .7rem var(--gutter); }
  .brand { font-size: 1.5rem; }
  .pills { margin-left: 0; gap: .3rem .35rem; }
  .pill { padding: .2rem .6rem; font-size: .74rem; }
}

main { max-width: 1680px; margin: 0 auto; padding: 1rem var(--gutter) 3rem; }
.foot { padding: 1.5rem var(--gutter) 2rem; border-top: 1px solid var(--soft); color: var(--muted); display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---- the front page's hero ---- */
.hero { margin: 1.2rem 0 1.4rem; }
.hero-title { font-family: var(--pixel); font-weight: 700; font-size: clamp(3rem, 9vw, 7rem); line-height: .95; margin: 0; letter-spacing: .01em;
  color: var(--ink); text-shadow: 0 0 14px var(--green), 0 0 40px rgba(43,255,43,.45); }
.hero-sub { font: italic 1.5rem/1.2 var(--serif); margin: .4rem 0 0; }
.hero-count { margin: .5rem 0 0; color: var(--muted); }
h1 { font: 400 2.2rem/1.1 var(--serif); margin: 0 0 .4rem; overflow-wrap: anywhere; }
h2 { font: 400 1.5rem/1.2 var(--serif); margin: 0 0 .6rem; overflow-wrap: anywhere; }
h2 a { text-decoration: none; }
h2.section { margin-top: 2rem; }
.intro { margin: .8rem 0 1.4rem; max-width: 48rem; }
.intro p { margin: 0 0 .3rem; }
.kicker { margin: 0; color: var(--muted); text-transform: lowercase; }
.crumbs a { color: var(--muted); }

/* ---- filters: square mono boxes, one row ---- */
.filters { display: flex; flex-wrap: wrap; gap: .45rem .5rem; align-items: center; margin: 0 0 1rem; }
.filters input, .filters select, .filters button {
  font: 500 .8rem/1.4 var(--mono); color: var(--ink); background: var(--bg);
  border: 2px solid var(--ink); border-radius: 0; padding: .4rem .55rem; min-width: 0;
}
.filters select { max-width: 100%; appearance: none; -webkit-appearance: none; padding-right: 1.6rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 13px) 55%, calc(100% - 8px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.filters input[type=search] { flex: 1 1 16rem; }
.filters .check { display: flex; gap: .35rem; align-items: center; font-family: var(--mono); font-size: .8rem; }
.filters .go { cursor: pointer; background: var(--ink); color: #fff; }
.filters .go:hover { background: var(--red); border-color: var(--red); }
.filters .reset { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.count { color: var(--muted); margin: 0 0 .8rem; }
.chips { margin: -.4rem 0 .8rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; gap: .4rem; align-items: baseline; padding: .05rem .3rem .05rem .65rem; border: 2px solid var(--ink); border-radius: 999px; font-family: var(--mono); font-size: .78rem; overflow-wrap: anywhere; background: var(--yellow); }
.chip a { text-decoration: none; padding: 0 .3rem; }

/* ---- the grid: tiles flow in rows, each sized by its picture's shape (--r),
   so every picture in a row is the same height and nothing is cropped.
   The dithered copy is the tile's background: it shows while the real
   thumbnail loads, pixel by pixel, and in dither mode instead of it. ---- */
.grid { display: flex; flex-wrap: wrap; gap: 14px; --h: 240px; }
.grid::after { content: ""; flex: 1000000 1 0; }
.grid.small { --h: 120px; gap: 8px; }
@media (max-width: 560px) { .grid { gap: 8px; --h: 130px; } }
.card {
  display: block; position: relative; min-width: 0;
  flex: calc(var(--r, 1) * 100) 1 calc(var(--r, 1) * var(--h));
  text-decoration: none; background: var(--soft); border: 2px solid var(--ink); overflow: hidden;
}
.card img { display: block; width: 100%; height: auto; background-size: 100% 100%; background-repeat: no-repeat; image-rendering: pixelated; }
.card img.loaded { image-rendering: auto; }
.card:hover { box-shadow: 4px 4px 0 var(--ink); }
.card:hover::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; opacity: .55;
  background: radial-gradient(circle at 2px 2px, rgba(255,31,122,.9) 1.1px, transparent 1.5px) 0 0 / 6px 6px;
}
.card.blur img { filter: blur(18px); }
.card.blur:hover img, .card.blur:focus img { filter: none; }
.noimg { display: flex; align-items: center; justify-content: center; aspect-ratio: var(--r, 1); padding: .75rem; text-align: center; color: var(--muted); font-family: var(--mono); font-size: .75rem; }
.badge { position: absolute; top: .4rem; right: .4rem; padding: .05rem .5rem; background: var(--ink); color: var(--green); font-family: var(--pixel); font-size: .8rem; letter-spacing: .03em; }
.cap { display: flex; justify-content: space-between; gap: .5rem; padding: .3rem .5rem; font-family: var(--mono); font-size: .74rem; border-top: 2px solid var(--ink); background: #fff; }
.cap .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cap .when { color: var(--muted); flex: none; font-family: var(--pixel); font-size: .85rem; }
/* dither mode: every picture becomes its one-bit copy */
body.dither .card img[data-dither], body.dither .fig img[data-dither] { opacity: 0; }
body.dither .card img, body.dither .fig img { image-rendering: pixelated; }
body.dither .fig img[data-dither] { opacity: 0; }
body.dither .brand-glow { text-shadow: none; }
body.dither .card:hover::before { display: none; }

/* ---- one work ---- */
.work { display: grid; grid-template-columns: minmax(0, 1fr) 23rem; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .work { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; } }
.media .fig { margin: 0 0 1.25rem; }
.media img, .media video { display: block; max-width: 100%; height: auto; max-height: 86vh; margin: 0 auto; width: auto; background: var(--soft); background-size: 100% 100%; background-repeat: no-repeat; border: 2px solid var(--ink); }
.media video { width: 100%; }
.media figcaption { color: var(--muted); font-family: var(--mono); font-size: .75rem; text-align: center; margin-top: .35rem; }
.media audio { display: block; width: 100%; }
.zoom { cursor: zoom-in; display: block; }
.modes { display: flex; justify-content: center; gap: .35rem; margin-top: .45rem; flex-wrap: wrap; }
.mode { font: inherit; background: #fff; border: 1px solid var(--ink); border-radius: 0; padding: .1rem .55rem; cursor: pointer; text-decoration: none; color: var(--ink); }
.mode.on { background: var(--ink); color: var(--green); }
.ascii { font: 7px/7px var(--mono); margin: 0 auto; overflow: auto; max-width: 100%; letter-spacing: 0; white-space: pre; background: #fff; border: 2px solid var(--ink); padding: 6px; }
@media (max-width: 560px) { .ascii { font-size: 4px; line-height: 4px; } }
.download { margin: 0; padding: 1.25rem; background: var(--soft); border: 2px solid var(--ink); text-align: center; overflow-wrap: anywhere; }
.label { position: sticky; top: 1rem; }
@media (max-width: 900px) { .label { position: static; } }
.label .artist { margin: .1rem 0 0; font-size: 2rem; line-height: 1.05; }
.label .artist a { text-decoration: none; }
.label .handle, .label .date { margin: .15rem 0 0; color: var(--muted); }
.label .date { margin-bottom: 1rem; }
.label .title { margin: -.5rem 0 1rem; font: italic 1.25rem/1.3 var(--serif); overflow-wrap: anywhere; }
.label .title cite { font-style: inherit; }
.text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 1rem; }
.text.small { font-size: .95rem; }
.text.quoter { color: var(--muted); font-size: .95rem; }
.note { border-left: 3px solid var(--red); padding: .25rem 0 .25rem .75rem; font-size: .95rem; margin: 0 0 1rem; }
.meta { color: var(--muted); margin: .3rem 0; overflow-wrap: anywhere; }
.links { margin: 1rem 0 .5rem; overflow-wrap: anywhere; font-family: var(--mono); font-size: .8rem; }
.terms { margin: 1rem 0; }
.terms dt { color: var(--muted); margin-top: .5rem; }
.terms dd { margin: .15rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.tag, .tag:link, .tag:visited { display: inline-block; padding: 0 .5rem; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font-family: var(--mono); font-size: .76rem; line-height: 1.6; background: #fff; }
.tag:hover { background: var(--yellow); color: var(--ink); }
.tag .n { margin-left: .2rem; }
.edit { margin: 1.2rem 0 0; }
.notice { border-left: 3px solid var(--red); padding: .25rem 0 .25rem .75rem; margin: 0 0 1.25rem; font-size: .95rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 2px solid var(--ink); }
.pager a { text-decoration: none; }
.pages { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 2px solid var(--ink); }
.pages a { text-decoration: none; }
.pages .off { color: var(--soft); }
.pages .numbers { display: flex; flex-wrap: wrap; gap: .25rem .75rem; justify-content: center; font-family: var(--pixel); font-size: 1rem; }
.pages .current { color: var(--red); }
.pages .gap { color: var(--muted); }
.related, .vocab { margin-top: 2.5rem; }
.termlist { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.termlist li { padding: .3rem 0 .3rem calc(var(--depth, 0) * 1.5rem); border-top: 1px solid var(--soft); overflow-wrap: anywhere; }
.termlist li.unused a { color: var(--muted); }
.termcloud { max-width: 60rem; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.termimage { display: block; max-width: min(100%, 320px); height: auto; margin: .5rem 0 1rem; border: 2px solid var(--ink); }
.empty { color: var(--muted); }
.missing { border-top: 1px solid var(--soft); padding: .75rem 0; max-width: 46rem; }
.missing .text { margin: .25rem 0; }

/* ---- the lightbox: the picture alone on white, Esc or a click closes ---- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(255,255,255,.97); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox img { max-width: 100vw; max-height: 100vh; width: auto; height: auto; }
.lightbox .close { position: absolute; top: 1rem; right: 1rem; font: inherit; background: var(--ink); color: var(--green); border: 0; padding: .2rem .6rem; cursor: pointer; }

/* ---- the review screen ---- */
.queues { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 1rem; }
.queue, .queue:link, .queue:visited { padding: .2rem .7rem; border: 2px solid var(--ink); text-decoration: none; background: #fff; }
.queue.on { background: var(--ink); color: #fff; }
.queue.on .n { color: var(--green); }
.flash { background: var(--yellow); padding: .4rem .7rem; border: 2px solid var(--ink); display: inline-block; }
.review { display: grid; grid-template-columns: minmax(0, 1fr) 26rem; gap: 1.5rem; align-items: start; }
@media (max-width: 1000px) { .review { grid-template-columns: minmax(0, 1fr); } }
.review-pos { margin: 0 0 .5rem; color: var(--muted); }
.review-media .fig { margin: 0 0 1rem; }
.review-media img, .review-media video { display: block; max-width: 100%; max-height: 78vh; height: auto; width: auto; margin: 0 auto; border: 2px solid var(--ink); background: var(--soft); background-size: 100% 100%; }
.review-media video { width: 100%; }
.review-panel { position: sticky; top: .5rem; border: 2px solid var(--ink); padding: 1rem; box-shadow: 6px 6px 0 var(--ink); background: #fff; }
@media (max-width: 1000px) { .review-panel { position: static; } }
.review-panel .artist { margin: 0; font-size: 1.6rem; }
.review-panel .artist a { text-decoration: none; }
.review-panel .handle, .review-panel .date { margin: .1rem 0 0; color: var(--muted); }
.review-panel .date { margin-bottom: .6rem; }
.verdict { margin: .8rem 0; padding: .5rem .7rem; border: 2px solid var(--ink); font-size: 1rem; }
.verdict-art { background: #e8ffe8; }
.verdict-not-art { background: #ffe3e3; }
.verdict-unsure { background: var(--yellow); }
.verdict .why { display: block; color: var(--muted); font-size: .85rem; margin-top: .2rem; }
.sugg { border: 1px solid var(--ink); padding: .5rem .7rem .7rem; margin: .6rem 0 0; }
.sugg legend { padding: 0 .3rem; }
.opt { display: block; margin: .15rem 0; overflow-wrap: anywhere; }
.opt input[type=checkbox] { accent-color: var(--red); }
.opt input[type=text], .sugg select, .sugg input[type=text] { font: inherit; font-family: var(--mono); font-size: .78rem; border: 1px solid var(--ink); border-radius: 0; padding: .25rem .4rem; width: 100%; margin-top: .3rem; background: #fff; }
.taglist { display: flex; flex-wrap: wrap; gap: .25rem .3rem; max-height: 14rem; overflow: auto; }
.tagopt { display: inline-flex; align-items: center; gap: .25rem; padding: 0 .5rem 0 .3rem; border: 1px solid var(--muted); border-radius: 999px; font-family: var(--mono); font-size: .74rem; margin: 0; color: var(--muted); }
.tagopt.sure { border-color: var(--ink); color: var(--ink); }
.tagopt:has(input:checked) { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.answers { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 .5rem; }
.answers .pill { font-family: var(--mono); }
.alike { margin-top: .5rem; }
.alike h3 { margin: 0 0 .4rem; color: var(--muted); }
.status-inbox { color: var(--pink); } .status-catalogued { color: var(--ink); } .status-rejected { color: var(--red); }

/* ---- send to artlivia ---- */
.addform textarea { width: min(100%, 48rem); display: block; border: 2px solid var(--ink); border-radius: 0; padding: .5rem; font-size: .85rem; margin: .4rem 0 .6rem; }
.problems { color: var(--red); }
.howto { margin-top: 2rem; max-width: 48rem; }
.howto li { margin: .4rem 0; }
