diff --git a/src/auctions.ts b/src/auctions.ts
index 24f38dd..0c867d2 100644
--- a/src/auctions.ts
+++ b/src/auctions.ts
@@ -1,7 +1,7 @@
import { Database } from 'bun:sqlite'
import { mkdirSync } from 'node:fs'
import { dirname } from 'node:path'
-import { randomBytes } from 'node:crypto'
+import { createHash, randomBytes } from 'node:crypto'
import { Hono } from 'hono'
import { RateLimiter } from './ratelimit.js'
@@ -62,9 +62,14 @@ function validImage(type: string, bytes: Uint8Array): boolean {
return false
}
+// The stylesheet URL carries a hash of its contents, so a browser never keeps an old copy
+// after a deploy (a cached pre-theme stylesheet left the Blue switch doing nothing).
+let cssVersion: string | undefined
+const cssHref = () => `/style.css?v=${(cssVersion ??= createHash('sha256').update(AUCTIONS_CSS).digest('hex').slice(0, 12))}`
+
function page(theme: AuctionTheme, title: string, body: string, description = 'A home for art, artists and the stories behind every piece.', canonicalPath = '/') {
return `
-