/* Graphics from Earth (the Magpie archive). Black page, white type, one typeface.
   Structure comes from solid blocks; the only rule in use is the 1px --line hairline between rows. */
:root {
  color-scheme: dark;
  --bg: #000; --ink: #fff; --soft: #c4c4c4; --mute: #8c8c8c; --line: #262626;
  --block: #141414; --block-2: #202020; --block-3: #2c2c2c;
  --accent: oklch(0.63 0.115 28); --accent-2: color-mix(in oklab, var(--accent) 84%, #fff);
  --c-all: #5d6373; --c-img: #3f76a0; --c-shot: #4a9aa8; --c-view: #7a4d7c;
  --alert: #ff3b1f; --lime: #c3ff00;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --u: 64px; --r: 10px; /* the module: every block is a whole number of these tall */
  --side: calc(var(--u) * 4); --pad: 44px; --bar: var(--u);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); scrollbar-color: #333 transparent; }
body { min-height: 100vh; display: grid; align-items: start; align-content: start; /* rows keep their own height: spare room goes below the page, never between the header and the content */ grid-template-columns: var(--side) minmax(0, 1fr); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
/* A few faint stars, fixed behind everything. */
body::before { content: ""; position: fixed; top: 0; left: 0; width: 1px; height: 1px; z-index: -1; pointer-events: none; border-radius: 50%; background: transparent;
  box-shadow:
    6vw 9vh 0 0 rgba(255,255,255,.34), 13vw 71vh 0 0 rgba(255,255,255,.22), 19vw 38vh 0 .5px rgba(255,255,255,.4),
    27vw 14vh 0 0 rgba(255,255,255,.26), 31vw 88vh 0 0 rgba(255,255,255,.3), 36vw 52vh 0 0 rgba(255,255,255,.18),
    42vw 6vh 0 .5px rgba(255,255,255,.36), 47vw 67vh 0 0 rgba(255,255,255,.24), 53vw 29vh 0 0 rgba(255,255,255,.3),
    58vw 93vh 0 0 rgba(255,255,255,.2), 63vw 46vh 0 .5px rgba(255,255,255,.42), 68vw 11vh 0 0 rgba(255,255,255,.22),
    72vw 78vh 0 0 rgba(255,255,255,.32), 77vw 33vh 0 0 rgba(255,255,255,.2), 82vw 59vh 0 1px rgba(255,255,255,.3),
    86vw 4vh 0 0 rgba(255,255,255,.28), 90vw 84vh 0 0 rgba(255,255,255,.24), 94vw 24vh 0 .5px rgba(255,255,255,.38),
    97vw 63vh 0 0 rgba(255,255,255,.2), 23vw 96vh 0 0 rgba(255,255,255,.26), 50vw 82vh 0 0 rgba(255,255,255,.16),
    74vw 97vh 0 0 rgba(255,255,255,.22), 39vw 31vh 0 0 rgba(255,255,255,.16), 88vw 42vh 0 0 rgba(255,255,255,.18); }
::selection { background: var(--accent); color: #fff; }
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* sidebar: a stack of blocks */
#sidebar { display: flex; flex-direction: column; min-height: 0; height: 100vh; position: sticky; top: 0; }
/* The title is the first block of the list, the same height as a row. */
#sidebar header { flex: none; display: flex; height: var(--u); border-radius: var(--r); color: var(--lime); } /* the title is the highlight colour at every width */
/* The whole block leads home; on hover it flips to the highlight, and the logo's two colours swap. */
#sidebar header:hover { background: var(--lime); color: #000; }
.logo .lg { fill: var(--lime); }
.logo .lk { fill: #000; }
#sidebar header:hover .logo .lg { fill: #000; }
#sidebar header:hover .logo .lk { fill: var(--lime); }
h1 { flex: 1; display: flex; font-size: 21px; font-weight: 700; letter-spacing: -0.04em; line-height: .95; margin: 0; }
h1 a { flex: 1; text-decoration: none; display: flex; align-items: center; gap: 10px; padding: 0 18px 0 22px; }
.logo { flex: none; width: 40px; height: 40px; margin-left: -8px; }
#count { color: var(--mute); font-size: 12px; font-weight: 700; }
#filter { margin: 0; height: var(--bar); padding: 0 22px; border: 0; border-radius: 0; background: var(--block); outline: none; font-weight: 700; }
#filter::placeholder { color: var(--mute); }
#filter:focus { background: var(--block-2); }
#sources { overflow-y: auto; flex: 1; scrollbar-width: none; display: flex; flex-direction: column; padding: 1px 0 1px 1px; }
/* Every row is its source's colour; hovering or selecting one turns it neon. */
.src { position: relative; flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; height: var(--u); padding: 0 18px 0 22px; text-decoration: none; background: var(--c); color: #fff; overflow: hidden; }
.src:hover, .src.on { background: var(--lime); color: #000; }
.src .cover { display: none; }
.avatar { background: var(--block-2) center/cover; }
.src b { display: block; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src small { display: block; font-size: 12px; line-height: 1.25; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src .n { font-size: 12px; font-weight: 700; opacity: .8; }

/* main */
#main { padding: 0; min-width: 0; } /* content runs flush against the list */
#main:not(.is-home) { padding: 1px 1px 0; }
#main.is-home { padding: 0; } /* the covers run flush against the list and the window edges */

/* first run */
.empty { max-width: 560px; margin: 12vh 0 0 var(--pad); color: var(--soft); font-size: 16px; }
.empty h2 { color: var(--ink); font-size: clamp(40px, 5vw, 68px); font-weight: 700; letter-spacing: -0.04em; line-height: .96; margin: 0 0 28px; }
.empty ol { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 2px; }
.empty li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; padding: 16px 18px; background: var(--block); }
.empty li::before { content: counter(step, decimal-leading-zero); color: var(--mute); font-size: 12px; font-weight: 700; padding-top: 3px; }
.empty code { font: inherit; color: var(--ink); }

/* home: every source */
.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.home-head h2 { font-size: clamp(44px, 6vw, 88px); font-weight: 700; letter-spacing: -0.045em; line-height: .92; margin: 0; }
.home-head p { margin: 0; color: var(--mute); text-align: right; font-weight: 700; }
.home { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--u) * 4), 1fr)); gap: 1px; padding: 1px; }
.card { display: block; height: calc(var(--u) * 5 - 1px); /* with the 1px gap, a row is still 5 units */ overflow: hidden; text-decoration: none; background: var(--c, var(--block)); }
.card:hover .cover { opacity: .85; }
.card .cover { display: block; height: calc(var(--u) * 4 - 1px); background: var(--block-2) center/cover; }
.card b { display: block; padding: 11px 16px 0; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card small { display: block; padding: 0 16px 16px; color: #fff; opacity: .8; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* a source */
.head { display: flex; gap: 28px; align-items: flex-start; padding: 56px var(--pad) 44px; scroll-margin-top: 64px; }
.tools { padding-top: 6px; }
.jump { align-self: stretch; flex: none; min-width: 96px; padding: 0 22px; border: 0; border-radius: 0; background: var(--lime); color: #000; font-weight: 700; white-space: nowrap; }
.jump:hover { background: var(--lime); }
.head > div:not(.avatar):not(.tools) { flex: 1; min-width: 0; }
.avatar { flex: none; width: 104px; height: 104px; }
.head h2 { font-size: clamp(40px, 5.2vw, 76px); font-weight: 700; letter-spacing: -0.045em; line-height: .94; margin: 0 0 0 -3px; outline: none; overflow-wrap: anywhere; }
.head h2:focus { background: var(--block); }
.handle { color: var(--mute); margin-top: 12px; font-weight: 700; }
.bio { white-space: pre-wrap; margin: 16px 0 0; max-width: 60ch; font-size: 16px; line-height: 1.4; color: var(--soft); }
.chips { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 20px; }
.chip { display: inline-flex; align-items: center; white-space: nowrap; background: var(--block); padding: 0 14px; height: 40px; font-weight: 700; }
.chip:hover { background: var(--block-2); }
.chip a { text-decoration: none; max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.tools { flex: none; display: flex; gap: 2px; align-items: center; }

/* Buttons that sit together share one colour: the source's. */
.btn { border: 0; background: var(--accent); color: #fff; border-radius: 0; height: 44px; padding: 0 18px; white-space: nowrap; font-weight: 700; transition: background .12s; }
.btn:hover { background: var(--accent-2); }
.btn[disabled] { opacity: .5; cursor: default; }
select.btn { appearance: none; max-width: 150px; }
.tools .btn { background: var(--block); color: var(--soft); }
.tools .btn:hover { background: var(--block-2); color: var(--ink); }
.quiet { background: none; border: 0; color: var(--mute); padding: 0; text-decoration: none; font-weight: 700; }
.quiet:hover { color: var(--ink); }

/* every section opens with the same bar */
.panel h3, .batch > header, .viewbar { display: flex; align-items: center; gap: 14px; min-height: var(--bar); margin: 0; padding: 0 0 0 18px; background: var(--block); font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.tabs { display: flex; align-self: stretch; margin-left: auto; flex: none; }
.tabs button { border: 0; border-radius: 0; background: none; padding: 0 18px; min-height: var(--bar); color: var(--mute); font-weight: 700; white-space: nowrap; }
.tabs button i { font-style: normal; font-weight: 400; opacity: .7; margin-left: 6px; }
.tabs button:hover { background: var(--block-2); color: var(--ink); }
.tabs button.on { background: var(--c-all); color: #fff; }
.tabs button.on[data-t="images"] { background: var(--c-img); }
.tabs button.on[data-t="shots"] { background: var(--c-shot); }
.tabs.view button.on { background: var(--c-view); }

.panels { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; margin: 0; padding-bottom: 96px; }
@media (max-width: 1100px) { .panels { grid-template-columns: 1fr; } }
.panel { min-width: 0; padding: 0 18px 18px; background: #0a0a0a; }
.panel h3 { margin: 0 -18px 18px; justify-content: space-between; padding-right: 18px; }
.panel p { margin: 0 0 14px; max-width: 64ch; }
.panel > p:first-of-type:not(.fine) { font-size: 16px; line-height: 1.4; }
.panel dl, .panel ul.points { display: grid; margin: 0 0 16px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.panel dl { grid-template-columns: 112px minmax(0, 1fr); }
.panel dt, .panel dd { padding: 8px 0; border-bottom: 1px solid var(--line); }
.panel dt, .panel ul.points b { color: var(--mute); font-weight: 400; }
.panel dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.panel ul.points li { display: grid; grid-template-columns: 112px minmax(0, 1fr); padding: 8px 0; border-bottom: 1px solid var(--line); }
.panel ul:not(.points) { margin: 0 0 14px; padding-left: 17px; color: var(--soft); }
.panel .fine { color: var(--mute); font-size: 12.5px; }
.panel .fine a { overflow-wrap: anywhere; }
.credit { font-size: 16px; line-height: 1.5; white-space: pre-wrap; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 0 0 16px; margin: 0 0 16px; outline: none; min-height: 3em; overflow-wrap: anywhere; }
.spin { display: inline-block; width: 11px; height: 11px; border: 2px solid var(--block-3); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

.bio a, .panel p a, .panel li a, .panel dd a { text-decoration: underline; text-decoration-color: #4a4a4a; text-underline-offset: 3px; }
.bio a:hover, .panel p a:hover, .panel li a:hover, .panel dd a:hover { text-decoration-color: #fff; }

/* posts / every image switch */
/* The top bar is as tall as a row of the list beside it. */
.viewbar, .viewbar .tabs button { min-height: 64px; }
.viewbar { margin-top: 0; padding: 0; gap: 0; position: sticky; top: 0; z-index: 4; }
.viewbar .tabs.types, .viewbar .tabs.view, .viewbar .tabs.places { margin-left: 0; }
.tabs.places button { padding: 0 16px; color: var(--soft); font-size: 12.5px; letter-spacing: .06em; }
.tabs.places button:hover { background: var(--lime); color: #000; }
.tabs.places { box-shadow: inset -1px 0 0 var(--line); }
.tabs.pick button.on { background: var(--lime); color: #000; }
.tabs.pick button.on.drop { background: var(--alert); }
.tile .chk.keep.drop.on { background: var(--alert); color: #000; }
.tile .chk.keep.drop.on i { color: var(--alert); }
.tabs.pick .prune { color: var(--alert); }
.tabs.pick .prune:hover { background: var(--alert); color: #000; }
/* Picking keepers: the ones not chosen fall back, the chosen ones carry a lime mark. */
.grid.picking .tile img { cursor: pointer; }
.grid.picking .tile .acts, .grid.picking .tile .chk.dock-chk { display: none; }
.grid.picking .tile .chk.keep { opacity: 1; }
.lb-fig .acts .kept { background: var(--lime); color: #000; }
.viewbar + .batch { margin-top: 0; }
.batch { scroll-margin-top: 64px; }

/* a capture and its images */
.batch { margin-top: 0; }
.batch > header { margin-bottom: 0; }
.batch > header a { text-decoration: none; min-width: 0; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch > header a:hover { text-decoration: underline; text-underline-offset: 3px; }
.batch > header span { color: var(--mute); font-size: 12.5px; font-weight: 400; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batch > header .quiet { font-size: 12.5px; padding: 0 18px; white-space: nowrap; }
.batch > header .quiet:first-of-type:last-child, .batch > header span + .quiet { margin-left: auto; }
/* Masonry: images at their own shape, packed by script (see layoutGrids); featured ones are two columns wide. */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--u) * 4), 1fr)); grid-auto-rows: 1px; grid-auto-flow: dense; column-gap: 1px; row-gap: 0; padding: 1px 0 0; }
.grid .tile { margin-bottom: 1px; }
.tile { position: relative; margin: 0; overflow: hidden; background: var(--block); }
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.tile .acts, .lb-fig .acts { position: absolute; inset: auto 8px 8px 8px; display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.tile:hover .acts, .tile:focus-within .acts { opacity: 1; }
.tile .acts { flex-wrap: wrap; }
.tile .acts .on { background: var(--accent); }
.tile .acts button, .tile .acts a, .lb-fig .acts button, .lb-fig .acts a { background: #000; color: #fff; border: 0; border-radius: 0; padding: 7px 10px; font-size: 12px; font-weight: 700; text-decoration: none; }
.tile .acts button:hover, .tile .acts a:hover, .lb-fig .acts button:hover, .lb-fig .acts a:hover { background: var(--accent); }
.tile .acts .del, .lb-fig .acts .del { margin-left: auto; }
.tile .dim { position: absolute; top: 8px; left: 8px; background: #000; color: #fff; padding: 1px 6px; font-size: 11px; opacity: 0; transition: opacity .12s; }
.tile:hover .dim { opacity: 1; }
.tile .stack, .tile .shot-tag { position: absolute; left: 0; background: #000; color: #fff; padding: 5px 10px; font-size: 11.5px; font-weight: 700; pointer-events: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .stack { top: 0; }
.grid.picking .tile .stack { top: 34px; }
.tile .shot-tag { bottom: 0; background: var(--c-shot); }
.tile.shot:hover .shot-tag { opacity: 0; }
/* Full-page screenshots: the tile shows the top of the page; the lightbox scrolls the whole thing. */
/* Full-page screenshots are far too tall to show whole, so the tile shows the top of the page. */
.tile.shot img { object-position: top; }


/* Two checkboxes on every image: Keep (top left, lime) and Dock (top right, the source's colour).
   Unticked ones appear on hover; ticked ones stay. No outlines. */
.tile .chk { position: absolute; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 9px; border: 0; border-radius: 0; background: #000; color: #fff; font-size: 12px; font-weight: 700; opacity: 0; transition: opacity .12s; }
.tile .chk i { width: 16px; height: 16px; border: 2px solid currentColor; display: grid; place-items: center; font-style: normal; font-size: 11px; line-height: 1; }
.tile .chk.keep { left: 0; display: none; } /* only while picking keepers */
.grid.picking .tile .chk.keep { display: flex; }
.tile :focus-visible, .lb-thumb:focus-visible { outline: none; }
.tile .chk.dock-chk { right: 0; }
.tile:hover .chk, .tile .chk:focus-visible, .tile .chk.on { opacity: 1; }
.tile .chk.keep.on { background: var(--lime); color: #000; }
.tile .chk.dock-chk.on { background: var(--accent); color: #fff; }
.tile .chk.keep.on i { background: #000; border-color: #000; color: var(--lime); }
.tile .chk.dock-chk.on i { background: #fff; border-color: #fff; color: var(--accent); }

.dock { position: sticky; bottom: 0; z-index: 5; margin-top: 0; min-height: var(--u); display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 2px 12px 2px 18px; background: var(--block-2); box-shadow: 0 12px 48px #000, 0 0 0 2px #000; }
.dock-head b { display: block; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.dock-head span { color: var(--mute); font-size: 12.5px; }
.dock-strip { flex: 1 1 240px; min-width: 0; display: flex; gap: 2px; overflow-x: auto; padding: 4px 2px; scrollbar-width: thin; }
.dock-item { position: relative; flex: 0 0 52px; height: 52px; background: var(--block-3) center/cover; cursor: grab; }
.dock-item .pos { position: absolute; left: 0; bottom: 0; background: #000; color: #fff; padding: 0 5px; font-size: 10px; font-weight: 700; line-height: 15px; }
.dock-item button { position: absolute; top: 0; right: 0; width: 18px; height: 18px; border-radius: 0; border: 0; padding: 0; background: var(--accent); color: #fff; font-size: 10px; line-height: 1; opacity: 0; }
.dock-item:hover button, .dock-item button:focus-visible { opacity: 1; }
.dock-acts { display: flex; gap: 2px; align-items: center; }
.dock .quiet { margin: 0 8px 0 14px; }

/* Extract buttons beside links */
.xbtn { margin-left: 8px; padding: 0; border: 0; background: none; color: var(--mute); font: inherit; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; vertical-align: baseline; white-space: nowrap; }
.xbtn::before { content: "↓ "; }
.xbtn:hover { color: var(--accent-2); }
.xlink { white-space: nowrap; }
.chip .xbtn { margin-left: 12px; }

/* messages */
#lightbox[hidden], #toast[hidden], #status[hidden], #stale[hidden] { display: none; }
#toast, #status { position: fixed; left: 50%; transform: translateX(-50%); background: var(--block-3); color: #fff; padding: 14px 18px; font-size: 13px; font-weight: 700; box-shadow: 0 12px 48px #000; max-width: 80vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#toast { bottom: 24px; z-index: 20; }
#status { top: 16px; z-index: 60; background: var(--c-img); }
#stale { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: 12px 18px; background: var(--alert); color: #000; font-size: 13px; font-weight: 700; text-align: center; }

/* lightbox carousel */
#lightbox { position: fixed; inset: 0; z-index: 10; background: #000; color: #fff; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; min-height: var(--bar); padding: 0 0 0 18px; font-size: 13px; font-weight: 700; background: var(--block); }
.lb-dim { color: var(--mute); font-weight: 400; }
.lb-queue { display: flex; align-items: center; gap: 14px; color: var(--mute); }
.lb-queue .btn { height: var(--bar); }
.lb-close { justify-self: end; background: none; border: 0; color: inherit; font-size: 16px; width: var(--bar); height: var(--bar); }
.lb-close:hover, .lb-nav:hover { background: var(--block-2); }
.lb-stage { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 12px 0; min-height: 0; cursor: zoom-out; }
.lb-nav { flex: 0 0 52px; height: 52px; border: 0; background: var(--block); color: inherit; font-size: 28px; line-height: 1; padding-bottom: 4px; }
.lb-fig { position: relative; margin: 0; min-width: 0; height: 100%; display: flex; align-items: center; cursor: default; }
.lb-fig img { display: block; max-width: calc(100vw - 160px); max-height: calc(100vh - 180px); object-fit: contain; }
.lb-fig .acts { inset: auto 12px 12px 12px; }
.lb-fig:hover .acts, .lb-fig:focus-within .acts { opacity: 1; }
.lb-fig .acts button, .lb-fig .acts a { padding: 9px 14px; font-size: 13px; }
.lb-fig .acts .on { background: var(--accent); }
.lb-strip { display: flex; gap: 2px; justify-content: safe center; overflow-x: auto; padding: 14px 20px 18px; scrollbar-width: thin; }
.lb-thumb { position: relative; flex: 0 0 56px; height: 56px; border: 0; border-radius: 0; padding: 0; background: var(--block) center/cover; opacity: .4; }
.lb-thumb:hover { opacity: .8; }
.lb-thumb.on { opacity: 1; }
.lb-thumb.queued { opacity: .9; }
.lb-thumb span { position: absolute; top: 0; right: 0; width: 16px; height: 16px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.lb-fig.shot { display: block; overflow-y: auto; max-height: calc(100vh - 180px); height: auto; align-self: center; }
.lb-fig.shot img { max-height: none; width: min(1100px, calc(100vw - 160px)); height: auto; }
.lb-fig.shot .acts { position: sticky; bottom: 12px; margin: -40px 12px 0; opacity: 1; }

.src.home-row { display: none; }
/* Phones: the title itself is the dropdown. Tapping it opens the list beneath; the grids are three
   across; Publish sits in the bottom corner like a footer. */
@media (max-width: 820px) {
  :root { --side: 0px; --pad: 20px; }
  body { grid-template-columns: minmax(0, 1fr); }
  #sidebar { display: block; height: auto; min-height: 0; position: sticky; top: 0; z-index: 8; background: #000; }
  #sidebar header, #sidebar header:hover { background: #000; color: var(--lime); border-radius: 0; }
  #sidebar header:hover .logo .lg { fill: var(--lime); }
  #sidebar header:hover .logo .lk { fill: #000; }
  h1 a::after { content: "▾"; margin-left: auto; font-size: 20px; letter-spacing: 0; transition: transform .15s; }
  #sidebar.open h1 a::after { transform: rotate(180deg); }
  #sources { display: none; position: absolute; top: var(--u); left: 0; right: 0; max-height: calc(100vh - var(--u) - 12px); overflow-y: auto; padding: 0 1px 1px; box-shadow: 0 24px 60px #000; }
  #sidebar.open #sources { display: flex; }
  .src.home-row { display: grid; background: var(--lime); color: #000; }
  #publish { position: fixed; left: 1px; bottom: 1px; z-index: 9; margin: 0; background: #000; }
  .home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card { height: auto; }
  .card .cover { height: auto; aspect-ratio: 1; }
  .card b { padding: 8px 8px 0; font-size: 12px; }
  .card small { padding: 0 8px 8px; font-size: 10px; }
  .head { flex-wrap: wrap; }
  .batch > header, .viewbar { flex-wrap: wrap; }
  .viewbar { top: var(--u); }
}

/* The published site: the same page with every tool that changes the archive taken away. */
.tools .btn.is-public { background: var(--lime); color: #000; }
html.static .chk, html.static .tabs.pick, html.static .xbtn, html.static .tools, html.static .dock,
html.static .acts button, html.static .panel h3 .quiet, html.static .panel .btn, html.static .batch > header .quiet,
html.static #stale, html.static #count, html.static .lb-queue { display: none !important; }

/* Publish sits in the bottom left corner: quiet when the live site is up to date, lime when
   there is something to put live. */
#publish { flex: none; align-self: flex-start; height: 44px; margin: 0 0 1px 1px; padding: 0 16px; border: 0; border-radius: var(--r); background: none; color: var(--mute); font-size: 12px; font-weight: 700; white-space: nowrap; }
#publish:hover { background: var(--block-2); color: var(--ink); }
#publish.dirty { background: var(--lime); color: #000; }

/* Rounded corners: every image and card on its own; the list as one block, so only the top of
   its first row and the bottom of its last are rounded. */
.tile, .card, .lb-fig img, .avatar { border-radius: var(--r); }
.card { overflow: hidden; }
.dock-item, .lb-thumb { border-radius: 6px; overflow: hidden; }
.src:nth-child(2) { border-top-left-radius: var(--r); border-top-right-radius: var(--r); } /* the first child is the phone-only home row */
@media (max-width: 820px) { .src:nth-child(2) { border-radius: 0; } }
.src:last-child { border-bottom-left-radius: var(--r); border-bottom-right-radius: var(--r); }
html.static .acts button { display: none !important; }

/* The tools on a thumbnail always sit on one line: small type, tight boxes, and the active ones
   (Cover, Feature) are marked by colour instead of a longer label. */
.tile .acts { flex-wrap: nowrap; inset: auto 6px 6px 6px; gap: 1px; }
.tile .acts button, .tile .acts a { flex: 0 1 auto; min-width: 0; padding: 5px 6px; font-size: 10px; line-height: 1.2; white-space: nowrap; overflow: hidden; }

/* The live site: no Save, and the way to the source is a round arrow in the bottom right corner. */
html.static .acts a[download] { display: none !important; }
html.static .tile .acts, html.static .lb-fig .acts { inset: auto 10px 10px auto; margin: 0; }
html.static .acts .src-link { flex: none; width: 36px; height: 36px; padding: 0; border-radius: 50%; background: #000; color: #fff; font-size: 0; display: grid; place-items: center; overflow: visible; }
html.static .acts .src-link::before { content: "↗"; font-size: 17px; font-weight: 400; line-height: 1; }
html.static .acts .src-link:hover { background: var(--lime); color: #000; }
html.static .lb-fig .acts .src-link { width: 44px; height: 44px; }

/* Dragging a thumbnail to a new place: the one being moved fades, and a lime bar shows which
   side of the target it will land on. */
.tile[draggable="true"] { cursor: grab; }
.tile.dragging { opacity: .35; }
.tile.drop-before::after, .tile.drop-after::after { content: ""; position: absolute; top: 0; bottom: 0; width: 6px; background: var(--lime); z-index: 3; pointer-events: none; }
.tile.drop-before::after { left: 0; }
.tile.drop-after::after { right: 0; }

/* The two big controls in a thumbnail's top right corner: a checkbox for the dock, and an X to
   delete. Large targets, side by side; both appear on hover and the tick stays when docked. */
.tile .big { position: absolute; top: 0; z-index: 2; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 0; background: #000; color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .12s; }
.tile:hover .big, .tile .big:focus-visible, .tile .big.on { opacity: 1; }
.tile .xdel { right: 0; font-size: 22px; line-height: 1; }
.tile .xdel:hover { background: var(--alert); color: #000; }
.tile .dock-chk { right: 44px; }
.tile .dock-chk i { width: 22px; height: 22px; border: 2px solid currentColor; display: grid; place-items: center; font-style: normal; font-size: 15px; font-weight: 700; line-height: 1; }
.tile .dock-chk:hover { background: var(--accent); }
.tile .dock-chk.on { background: var(--accent); }
.tile .dock-chk.on i { background: #fff; border-color: #fff; color: var(--accent); }
.tile .dock-chk:only-of-type, .tile .dock-chk:last-of-type { right: 44px; }
.grid.picking .tile .big, html.static .tile .big { display: none !important; }
.tabs.pick .undo { color: var(--ink); }

/* Every button rounds its corners when pointed at. */
button, .btn, .acts a { transition: border-radius .12s, background .12s, color .12s; }
button:hover, .btn:hover, .acts a:hover, .tabs button:hover, .jump:hover { border-radius: var(--r); }


/* Text on a row, card or button takes black or white to suit how bright its colour is. */
.src { color: var(--t, #fff); }
.src.on, .src:hover { color: #000; }
.card { color: var(--t, #fff); }
.card small { color: inherit; }
#navtoggle { color: var(--t, #fff) !important; }
.btn, .tile .dock-chk.on, .tile .acts .on, .lb-fig .acts .on, .tile .acts button:hover, .tile .acts a:hover { color: var(--accent-ink, #fff); }
.tools .btn { color: var(--soft); }
.tile .dock-chk.on i { background: var(--accent-ink, #fff); border-color: var(--accent-ink, #fff); }
