/*
  Halloran & Vey: auction house website (Screenery template)
  A rare books saleroom after dark: oxblood and bottle-green leather grounds, walnut panels, vellum paper for anything you write on,
  gilt rules and tooling, wax seals, marginal notes in the specialists' hands. Old Standard TT for display, Cardo for reading.

  Contents
   1. Tokens
   2. Base and browser surfaces
   3. Grounds: leather (ox, green), walnut, vellum, gilt rules
   4. Components: buttons, fields, selects, chips, checks, status, margin notes, toast
   5. Header
   6. Hero: binding, candle
   7. Catalogue: filters, lot cards
   8. Lot desk and bidding slip
   9. Register to bid
  10. How bidding works
  11. Consignments
  12. Reading room
  13. Questions
  14. Footer
  15. Motion
  16. Narrow screens
*/

/* ---------- 1. Tokens ---------- */
:root {
  /* Leather, wood, paper, metal, wax */
  --night: #140e0b;        /* page ground, the room with the lamps off */
  --walnut: #231711;       /* panelled sections */
  --walnut-2: #2f2018;     /* raised walnut: catalogue entries */
  --walnut-3: #3c2a1f;     /* hover, wells */
  --ox: #4a1418;           /* oxblood morocco */
  --ox-deep: #34100f;
  --ox-bright: #7a1f24;    /* oxblood ink on vellum, primary buttons */
  --ox-press: #5e171b;
  --bottle: #1b3326;       /* bottle-green morocco */
  --bottle-deep: #12251b;
  --gilt: #d4b06a;         /* gilt, as text and rules on dark grounds */
  --gilt-bright: #ecd08e;
  --gilt-deep: #a8873f;
  --vellum: #f0e5cc;       /* paper and text on dark */
  --vellum-2: #e2d2ae;     /* paper shade, rules on paper */
  --vellum-3: #fbf6ea;     /* inputs on paper */
  --ink: #24160f;          /* iron-gall ink on paper */
  --ink-soft: #55402f;     /* secondary on paper (7:1) */
  --parch-dim: #cdbd9a;    /* secondary on dark (8:1 on walnut) */
  --wax: #8a2128;
  --err-paper: #8f1d22;
  --err-dark: #f2a596;
  --ok-paper: #1f4a32;
  --ok-dark: #a9d6b5;

  /* Lines */
  --rule-gilt: color-mix(in srgb, var(--gilt) 45%, transparent);
  --rule-gilt-soft: color-mix(in srgb, var(--gilt) 22%, transparent);
  --rule-ink: color-mix(in srgb, var(--ink) 28%, transparent);

  /* Type */
  --display: "Old Standard TT", "Iowan Old Style", Georgia, serif;
  --text: "Cardo", "Iowan Old Style", Georgia, serif;

  --fs-xs: 0.875rem;    /* 14 */
  --fs-sm: 0.96875rem;  /* 15.5 */
  --fs-md: 1.125rem;    /* 18, body (Cardo runs small) */
  --fs-lg: 1.3125rem;   /* 21 */
  --fs-xl: 1.75rem;     /* 28 */
  --fs-h2: clamp(2.2rem, 1.3rem + 2.8vw, 3.6rem);
  --fs-h1: clamp(2.7rem, 1.4rem + 4.2vw, 5.4rem);

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --s-9: 120px;
  --gutter: clamp(16px, 4vw, 56px);
  --wrap: 1260px;

  /* Shape and depth */
  --r-1: 2px;
  --r-2: 4px;
  --r-pill: 999px;
  --lift: 0 2px 3px rgb(0 0 0 / 0.35), 0 18px 40px -18px rgb(0 0 0 / 0.7);
  --lift-paper: 0 1px 0 rgb(255 255 255 / 0.4) inset, 0 3px 6px rgb(0 0 0 / 0.3), 0 26px 50px -24px rgb(0 0 0 / 0.8);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t-mid: 340ms;

  /* Walnut figure: turbulence stretched along the grain */
  --wood: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='300'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004 .09' numOctaves='3' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .38 0 0 0 0 .24 0 0 0 .15 -.03'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E");

  /* Leather grain tile (feTurbulence), laid over every leather ground */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .7 -.18'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 2. Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--vellum);
  font-family: var(--text);
  font-size: var(--fs-md);
  line-height: 1.55;
  font-variant-numeric: oldstyle-nums proportional-nums;
  text-rendering: optimizeLegibility;
  accent-color: var(--ox-bright);
  caret-color: var(--gilt);
  scrollbar-color: var(--gilt-deep) var(--night);
}
::selection { background: var(--gilt); color: var(--ink); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb { background: var(--gilt-deep); border: 3px solid var(--night); border-radius: 6px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gilt-bright); outline-offset: 3px; border-radius: 2px; }
.vellum :focus-visible, .vellum-page :focus-visible, .slip :focus-visible { outline-color: var(--ox-bright); }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--s-4); top: -60px; z-index: 50; padding: var(--s-3) var(--s-4); background: var(--gilt); color: var(--ink); }
.skip:focus { top: var(--s-4); }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
[hidden] { display: none !important; }
.num, table, .slip__facts dd, .money input { font-variant-numeric: lining-nums tabular-nums; }

/* ---------- 3. Grounds ---------- */
.leather { position: relative; isolation: isolate; }
.leather::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain);
  opacity: 0.5;
  mix-blend-mode: multiply;
}
.leather--ox { background: radial-gradient(120% 90% at 70% 10%, #5e1a1e 0%, var(--ox) 45%, var(--ox-deep) 100%); }
.leather--green { background: radial-gradient(120% 90% at 30% 0%, #234231 0%, var(--bottle) 50%, var(--bottle-deep) 100%); }
.walnut {
  background:
    var(--wood) 0 0 / 600px 300px,
    linear-gradient(180deg, var(--walnut), #1c120d);
}
.vellum {
  background: radial-gradient(130% 100% at 20% 0%, var(--vellum-3) 0%, var(--vellum) 55%, var(--vellum-2) 100%);
  color: var(--ink);
  box-shadow: var(--lift-paper);
  border-radius: var(--r-1);
}
.vellum-page {
  background: radial-gradient(140% 90% at 50% 0%, var(--vellum-3), var(--vellum) 60%, var(--vellum-2));
  color: var(--ink);
}

/* A double gilt fillet, as tooled across a spine */
.gilt-rule { display: block; height: 5px; border-block: 1px solid var(--rule-gilt); max-width: 260px; }

/* Section heads */
.sec-head { display: grid; gap: var(--s-4); margin-bottom: var(--s-7); max-width: 60ch; }
.sec-head h2 { font-size: var(--fs-h2); color: var(--vellum); }
.sec-head__lede { color: var(--parch-dim); font-size: var(--fs-lg); line-height: 1.5; }
.sec-head--ink h2 { color: var(--ink); }
.sec-head--ink .sec-head__lede { color: var(--ink-soft); }

/* ---------- 4. Components ---------- */
.btn {
  --bg: var(--gilt); --fg: var(--ink); --bd: var(--gilt);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  border: 1px solid var(--bd); border-radius: var(--r-1);
  background: var(--bg); color: var(--fg);
  font-family: var(--display); font-size: 1.0625rem; letter-spacing: 0.02em; text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.btn:hover { --bg: var(--gilt-bright); }
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 44px; padding: 0 var(--s-4); font-size: 1rem; }
.btn--gilt { box-shadow: inset 0 0 0 3px var(--gilt), inset 0 0 0 4px var(--gilt-deep); }
.btn--line { --bg: transparent; --fg: var(--gilt); --bd: var(--rule-gilt); }
.btn--line:hover { --bg: rgb(212 176 106 / 0.12); --fg: var(--gilt-bright); }
.btn--ox { --bg: var(--ox-bright); --fg: var(--vellum); --bd: var(--ox-press); }
.btn--ox:hover { --bg: var(--ox-press); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading::after {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link-btn {
  min-height: 44px; padding: 0 var(--s-2); border: 0; background: none; cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.24em; text-decoration-thickness: 1px;
  color: inherit; font-style: italic;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--rule-gilt); border-radius: 50%; background: transparent; color: var(--gilt); cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out);
}
.icon-btn:hover { background: rgb(212 176 106 / 0.14); }

/* Fields: on paper by default */
.field { display: grid; gap: 6px; align-content: start; min-width: 0; border: 0; padding: 0; margin: 0; }
.field__label { font-family: var(--display); font-size: var(--fs-sm); letter-spacing: 0.01em; }
.field__hint { font-size: var(--fs-xs); color: var(--ink-soft); font-style: italic; }
.field__err { font-size: var(--fs-xs); color: var(--err-paper); display: flex; gap: 6px; align-items: baseline; }
.field__err::before { content: ""; flex: none; width: 7px; height: 7px; transform: rotate(45deg) translateY(-1px); background: currentColor; }
.field input, .field textarea, .select select {
  width: 100%; min-height: 48px; padding: 10px 14px;
  background: var(--vellum-3); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--ink) 38%, transparent); border-radius: var(--r-1);
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: #6c5844; opacity: 1; }
.field input:focus, .field textarea:focus, .select select:focus { outline: none; border-color: var(--ox-bright); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ox-bright) 30%, transparent); }
.field [aria-invalid="true"] { border-color: var(--err-paper); background: #fbefe6; }
.select { position: relative; display: block; }
.select select { appearance: none; padding-right: 40px; cursor: pointer; }
.select::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; pointer-events: none;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-70%) rotate(45deg);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-4); margin-bottom: var(--s-5); }

.check { display: flex; gap: var(--s-3); align-items: flex-start; cursor: pointer; font-size: var(--fs-sm); line-height: 1.45; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; }
.field--radios { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: center; }
.field--radios legend { width: 100%; margin-bottom: 6px; }
.radio { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; cursor: pointer; }
.radio input { width: 20px; height: 20px; margin: 0; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); margin-top: var(--s-5); }
.form-msg { font-size: var(--fs-sm); font-style: italic; }
.form-msg.is-error { color: var(--err-paper); font-style: normal; }

/* Status lines in the bidding slip */
.status {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3) var(--s-4); margin-bottom: var(--s-4);
  border: 1px solid currentColor; border-radius: var(--r-1);
  font-size: var(--fs-sm); line-height: 1.45;
}
.status .icon { margin-top: 2px; }
.status b { font-family: var(--display); font-weight: 700; }
.status--winning { color: var(--ok-paper); background: #e3ead8; }
.status--outbid { color: var(--err-paper); background: #f6e0d6; }
.status--error { color: var(--err-paper); background: #f6e0d6; border-style: dashed; }
.status--closed { color: var(--ink-soft); background: var(--vellum-2); }
.status--won { color: var(--ok-paper); background: #e3ead8; }
.status--info { color: var(--ink); background: var(--vellum-2); }
.status__seal { width: 54px; height: 54px; flex: none; margin: -4px 0 -4px -4px; }

/* Marginal notes in the specialists' hands */
.margin-note {
  position: relative;
  max-width: 34ch;
  margin-top: var(--s-6);
  padding-left: 30px;
  font-style: italic; font-size: var(--fs-md); line-height: 1.45;
  color: var(--gilt);
  transform: rotate(-1.2deg);
  transform-origin: left top;
}
.margin-note::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18' fill='%23d4b06a'%3E%3Ccircle cx='10' cy='4' r='2.400'/%3E%3Ccircle cx='4' cy='14' r='2.400'/%3E%3Ccircle cx='16' cy='14' r='2.400'/%3E%3C/svg%3E") no-repeat center / contain;
}

.toast {
  position: fixed; left: 16px; right: 16px; bottom: 20px; z-index: 40;
  width: fit-content; max-width: 460px; margin: 0 auto; padding: var(--s-3) var(--s-5);
  background: var(--vellum); color: var(--ink); border-radius: var(--r-1); box-shadow: var(--lift-paper);
  font-size: var(--fs-sm); text-align: center;
}

/* ---------- 5. Header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-5);
  min-height: 72px; padding: var(--s-2) var(--gutter);
  background: color-mix(in srgb, var(--night) 96%, var(--ox));
  border-bottom: 1px solid var(--rule-gilt-soft);
  box-shadow: 0 4px 0 -3px var(--rule-gilt-soft);
}
.logo { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; }
.logo__seal { width: 40px; height: 40px; }
.logo__name { font-family: var(--display); font-size: 1.5rem; letter-spacing: 0.01em; white-space: nowrap; }
.logo__name i { color: var(--gilt); }
.top__nav { display: flex; gap: var(--s-1); }
.top__nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3);
  text-decoration: none; color: var(--parch-dim); font-size: var(--fs-sm);
  transition: color var(--t-fast) var(--ease-out);
}
.top__nav a:hover { color: var(--gilt-bright); text-decoration: underline; }
.top__cta.is-registered { --bg: transparent; --fg: var(--gilt); box-shadow: none; border-color: var(--rule-gilt); }

/* ---------- 6. Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: center; gap: var(--s-7);
  min-height: min(88vh, 860px);
  padding: var(--s-8) var(--gutter) var(--s-8);
  max-width: none;
  overflow: hidden;
}
.hero__text { max-width: 640px; justify-self: end; width: 100%; display: grid; gap: var(--s-5); }
.hero__title { font-size: var(--fs-h1); line-height: 1.02; letter-spacing: -0.02em; }
.hero__title i { color: var(--gilt); font-style: italic; }
.hero__sale { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); font-family: var(--display); font-size: var(--fs-lg); color: var(--gilt); }
.hero__sale span { display: inline-flex; align-items: center; gap: var(--s-4); }
.hero__sale span + span::before { content: ""; width: 6px; height: 6px; background: var(--gilt-deep); transform: rotate(45deg); }
.hero__lede { font-size: var(--fs-lg); line-height: 1.55; max-width: 56ch; }
.hero__when { color: var(--parch-dim); max-width: 56ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }
.hero__next {
  display: inline-flex; align-items: center; gap: var(--s-3); justify-self: start;
  min-height: 44px; padding: var(--s-2) 0;
  color: var(--parch-dim); text-decoration: none; border-bottom: 1px solid var(--rule-gilt-soft);
}
.hero__next b { color: var(--vellum); font-weight: 400; font-style: italic; }
.hero__next:hover b { text-decoration: underline; }
.hero__next .icon { color: var(--gilt); }

.hero__art { position: relative; margin: 0; justify-self: start; width: min(100%, 440px); aspect-ratio: 360 / 480; }
.binding { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 30px 40px rgb(0 0 0 / 0.55)) drop-shadow(0 4px 6px rgb(0 0 0 / 0.4)); transform: rotate(-3deg); }
.candle { position: absolute; right: -14%; bottom: -2%; width: 23%; filter: drop-shadow(0 12px 14px rgb(0 0 0 / 0.5)); }
.candlelight {
  position: absolute; width: 130%; aspect-ratio: 1; right: -68%; bottom: -42%;
  background: radial-gradient(closest-side, rgb(255 196 110 / 0.22), rgb(255 196 110 / 0.06) 55%, transparent);
  pointer-events: none;
}
.candle__flame { transform-origin: 40px 44px; }

/* ---------- 7. Catalogue ---------- */
.catalogue { padding: var(--s-9) 0 var(--s-8); }
.cat { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: var(--s-7); align-items: start; }
.filters { position: sticky; top: 96px; display: grid; gap: var(--s-5); }
.filters__group { border: 0; margin: 0; padding: 0 0 var(--s-5); border-bottom: 1px solid var(--rule-gilt-soft); }
.filters__group legend { font-family: var(--display); font-size: var(--fs-lg); color: var(--gilt); margin-bottom: var(--s-3); padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--rule-gilt); border-radius: var(--r-pill);
  font-size: var(--fs-sm); color: var(--vellum);
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.chip:hover span { background: rgb(212 176 106 / 0.12); }
.chip input:checked + span { background: var(--gilt); color: var(--ink); border-color: var(--gilt); }
.chip input:focus-visible + span { outline: 2px solid var(--gilt-bright); outline-offset: 2px; }
.filters__est { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.filters__est legend { grid-column: 1 / -1; }
.filters__foot { display: grid; gap: var(--s-2); justify-items: start; }
.filters__foot .field { width: 100%; }
.filters__foot .link-btn { padding-left: 0; }
.filters .field__label { color: var(--parch-dim); font-family: var(--text); font-style: italic; }
.filters .select select { background: var(--walnut-2); color: var(--vellum); border-color: var(--rule-gilt); min-height: 44px; }
.filters .select select option { background: var(--walnut); color: var(--vellum); }
.filters .select::after { color: var(--gilt); }
.filters .link-btn { color: var(--gilt); }

.cat__count { color: var(--parch-dim); font-style: italic; margin-bottom: var(--s-4); }
.lots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: var(--s-5); }
.lot {
  position: relative; display: grid; grid-template-rows: auto auto 1fr auto auto; gap: var(--s-2);
  padding: 0 0 var(--s-4);
  background: var(--walnut-2);
  border: 1px solid var(--rule-gilt-soft);
  border-radius: var(--r-2);
  box-shadow: inset 0 0 0 5px var(--walnut-2), inset 0 0 0 6px var(--rule-gilt-soft), var(--lift);
  transition: transform var(--t-mid) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.lot:hover { transform: translateY(-3px); border-color: var(--rule-gilt); }
.lot.is-current { border-color: var(--gilt); box-shadow: inset 0 0 0 5px var(--walnut-2), inset 0 0 0 6px var(--rule-gilt), var(--lift); }
.lot__art {
  display: grid; place-items: center; height: 190px; margin: 6px 6px var(--s-2);
  background: radial-gradient(80% 90% at 50% 40%, #24402f, #142a1f);
  border-radius: 2px 2px 0 0;
}
.lot__art svg { height: 158px; width: auto; filter: drop-shadow(0 10px 10px rgb(0 0 0 / 0.5)); transition: transform var(--t-mid) var(--ease-out); }
.lot:hover .lot__art svg { transform: translateY(-4px) rotate(-1.5deg); }
.lot__no {
  position: absolute; top: 12px; left: 18px;
  font-family: var(--display); font-style: italic; font-size: 2.4rem; line-height: 1; color: var(--gilt);
  font-variant-numeric: oldstyle-nums;
}
.lot__title, .lot__desc, .lot__meta, .lot__close { padding-inline: var(--s-4); }
.lot__title { font-size: 1.45rem; line-height: 1.15; }
.lot__title a { text-decoration: none; }
.lot__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-2); }
.lot__title a:hover { text-decoration: underline; text-decoration-color: var(--gilt); }
.lot__title a:focus-visible { outline: none; }
.lot:has(a:focus-visible) { outline: 2px solid var(--gilt-bright); outline-offset: 3px; }
.lot__desc { font-size: var(--fs-sm); color: var(--parch-dim); font-style: italic; line-height: 1.4; }
.lot__meta { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); margin: var(--s-2) 0 0; padding-top: var(--s-3); border-top: 1px solid var(--rule-gilt-soft); margin-inline: var(--s-4); padding-inline: 0; }
.lot__meta dt { font-size: var(--fs-xs); color: var(--parch-dim); }
.lot__meta dd { margin: 0; font-size: var(--fs-sm); font-variant-numeric: lining-nums tabular-nums; }
.lot__close { font-size: var(--fs-xs); color: var(--gilt); display: flex; align-items: center; gap: 6px; font-variant-numeric: lining-nums tabular-nums; }
.lot__close.is-soon { color: var(--err-dark); }
.lot__close.is-closed { color: var(--parch-dim); }
.cat__empty { display: grid; gap: var(--s-4); justify-items: start; padding: var(--s-7) var(--s-6); border: 1px dashed var(--rule-gilt); border-radius: var(--r-2); color: var(--parch-dim); font-style: italic; max-width: 60ch; }

/* ---------- 8. Lot desk and bidding slip ---------- */
.desk { padding: var(--s-8) 0 var(--s-9); }
.desk::after {
  /* the tooled border of a desk blotter */
  content: ""; position: absolute; inset: 14px; pointer-events: none;
  border: 1px solid var(--rule-gilt-soft); outline: 1px solid var(--rule-gilt-soft); outline-offset: -6px;
}
.desk__wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: var(--s-6) var(--s-7); align-items: start; }
.desk__nav { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s-4); }
.desk__pos { font-family: var(--display); font-size: var(--fs-lg); color: var(--gilt); min-width: 9ch; text-align: center; }
.desk__lot { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.desk__art { position: relative; display: grid; place-items: center; padding: var(--s-5) var(--s-3); }
.desk__art svg { width: 100%; height: auto; max-width: 200px; filter: drop-shadow(0 24px 22px rgb(0 0 0 / 0.55)); transform: rotate(-2deg); }
.desk__art::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 6px; height: 10px; background: radial-gradient(closest-side, rgb(0 0 0 / 0.5), transparent); }
.desk__no {
  position: absolute; top: -10px; left: -6px; font-family: var(--display); font-style: italic; font-size: 4.6rem; line-height: 1; color: var(--gilt);
  text-shadow: 0 2px 10px rgb(0 0 0 / 0.5);
}
.desk__text { display: grid; gap: var(--s-4); }
.desk__title { font-size: clamp(1.9rem, 1.2rem + 1.8vw, 2.9rem); }
.desk__by { font-style: italic; color: var(--parch-dim); font-size: var(--fs-lg); line-height: 1.45; }
.desk__note { max-width: 62ch; }
.desk__cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); margin-top: var(--s-3); padding-top: var(--s-5); border-top: 1px solid var(--rule-gilt-soft); }
.desk__cols h3 { font-size: var(--fs-xl); color: var(--gilt); margin-bottom: var(--s-2); }
.desk__cols p, .prov { font-size: var(--fs-sm); line-height: 1.55; }
.prov { margin: 0; padding-left: 1.3em; display: grid; gap: var(--s-2); }
.prov li::marker { color: var(--gilt); font-family: var(--display); font-style: italic; }
.desk__text .margin-note { margin-top: var(--s-2); }

.slip { padding: var(--s-6) var(--s-5) var(--s-5); position: sticky; top: 92px;
  background: radial-gradient(130% 100% at 20% 0%, var(--vellum-3) 0%, var(--vellum) 55%, var(--vellum-2) 100%);
  color: var(--ink); box-shadow: var(--lift-paper); border-radius: var(--r-1);
}
.slip__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-2) var(--s-4); padding-bottom: var(--s-4); border-bottom: 3px double var(--rule-ink); }
.slip__head h3 { font-size: 1.6rem; }
.slip__timer { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-soft); font-variant-numeric: lining-nums tabular-nums; }
.slip__timer.is-soon { color: var(--err-paper); font-weight: 700; }
.slip__timer.is-closed { color: var(--ink-soft); }
.slip__facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3) var(--s-4); margin: var(--s-4) 0; }
.slip__facts dt { font-size: var(--fs-xs); color: var(--ink-soft); font-style: italic; }
.slip__facts dd { margin: 0; font-size: var(--fs-md); }
.slip__facts .slip__cur { font-family: var(--display); font-size: 1.9rem; line-height: 1.1; color: var(--ox-bright); }
.slip__facts dd.is-bump { animation: bump 700ms var(--ease-out); }
@keyframes bump { 0% { background: rgb(212 176 106 / 0.6); } 100% { background: transparent; } }

.money { display: flex; align-items: stretch; }
.money > span { display: grid; place-items: center; min-width: 44px; border: 1px solid color-mix(in srgb, var(--ink) 38%, transparent); border-right: 0; border-radius: var(--r-1) 0 0 var(--r-1); background: var(--vellum-2); font-family: var(--display); font-size: 1.2rem; }
.money input { border-radius: 0 var(--r-1) var(--r-1) 0; font-size: 1.25rem; font-family: var(--display); }
.quick { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-3) 0 var(--s-4); }
.quick button {
  min-height: 40px; padding: 0 var(--s-3); border: 1px solid var(--rule-ink); border-radius: var(--r-pill); background: transparent; cursor: pointer;
  font-size: var(--fs-sm); font-variant-numeric: lining-nums tabular-nums;
}
.quick button:hover { background: var(--vellum-2); }
.quick button[aria-pressed="true"] { background: var(--ink); color: var(--vellum); border-color: var(--ink); }
.sums { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); margin-bottom: var(--s-4); }
.sums th, .sums td { padding: 7px 0; border-bottom: 1px solid var(--rule-ink); text-align: right; font-weight: 400; }
.sums th[scope="row"] { text-align: left; color: var(--ink-soft); }
.sums thead th { font-size: var(--fs-xs); font-style: italic; color: var(--ink-soft); padding-left: var(--s-2); }
.sums td { padding-left: var(--s-3); }
.sums__total th, .sums__total td { border-bottom: 3px double var(--rule-ink); font-family: var(--display); font-size: 1.05rem; color: var(--ink) !important; }
.slip__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.slip__actions .btn { flex: 1 1 200px; }
.slip.is-closed .slip__form { opacity: 0.55; }
.history { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--rule-ink); }
.history h4 { font-size: 1.25rem; margin-bottom: var(--s-2); }
.history ol { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); font-variant-numeric: lining-nums tabular-nums; }
.history li { display: flex; justify-content: space-between; gap: var(--s-3); padding: 5px 0; border-bottom: 1px dotted var(--rule-ink); }
.history li.is-you { color: var(--ok-paper); font-weight: 700; }
.history li:first-child { animation: none; }
.field .money input[aria-invalid="true"] { background: #fbefe6; }

/* ---------- 9. Register to bid ---------- */
.register { padding: var(--s-9) 0; }
.register__wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-7); align-items: start; }
.register__intro { display: grid; gap: var(--s-4); }
.register__intro h2 { font-size: var(--fs-h2); }
.register__intro p { color: var(--parch-dim); font-size: var(--fs-lg); max-width: 44ch; }
.paddle-form, .valuation { position: relative; padding: var(--s-6); }
.paddle {
  display: grid; justify-items: center; gap: var(--s-2); text-align: center;
  margin-top: var(--s-5); padding: var(--s-6) var(--s-5) var(--s-5);
  border: 1px solid var(--rule-ink); outline: 1px solid var(--rule-ink); outline-offset: -6px;
}
.paddle:focus { outline: 1px solid var(--rule-ink); }
.paddle__seal { width: 84px; height: 84px; margin-top: -60px; filter: drop-shadow(0 4px 4px rgb(0 0 0 / 0.3)); }
.paddle__label { font-style: italic; color: var(--ink-soft); }
.paddle__no { font-family: var(--display); font-size: 4.4rem; line-height: 1; color: var(--ox-bright); font-variant-numeric: lining-nums; }
.paddle__who { max-width: 40ch; margin-bottom: var(--s-3); }
.paddle-form.is-done .form-grid, .paddle-form.is-done .check, .paddle-form.is-done .form-foot { display: none; }
.paddle-form.is-done .paddle { margin-top: var(--s-6); }

/* ---------- 10. How bidding works ---------- */
.how { padding: var(--s-9) 0; }
.how__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7); align-items: start; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: var(--s-5); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; column-gap: var(--s-4); padding-bottom: var(--s-5); border-bottom: 1px solid var(--rule-ink); }
.steps li::before { content: counter(step); grid-row: span 2; font-family: var(--display); font-style: italic; font-size: 2.8rem; line-height: 0.9; color: var(--ox-bright); font-variant-numeric: oldstyle-nums; }
.steps h3 { font-size: var(--fs-xl); margin-bottom: var(--s-2); }
.steps p { color: var(--ink-soft); max-width: 52ch; }
.how__tables { display: grid; gap: var(--s-6); }
.ledger { width: 100%; border-collapse: collapse; border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); }
.ledger caption { text-align: left; font-family: var(--display); font-size: var(--fs-xl); padding-bottom: var(--s-3); caption-side: top; }
.ledger th, .ledger td { padding: 9px var(--s-2); border-bottom: 1px solid var(--rule-ink); text-align: left; font-weight: 400; }
.ledger td:last-child { text-align: right; }
.ledger thead th { font-style: italic; color: var(--ink-soft); font-size: var(--fs-sm); }
.ledger thead th:last-child { text-align: right; }
.ledger tbody tr.is-live { background: color-mix(in srgb, var(--gilt) 30%, transparent); }
.ledger__total th, .ledger__total td { font-family: var(--display); font-size: 1.15rem; border-bottom: 0; }
.how__fine { font-size: var(--fs-sm); color: var(--ink-soft); font-style: italic; max-width: 60ch; }

/* ---------- 11. Consignments ---------- */
.consign { padding: var(--s-9) 0; }
.consign__wrap { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: var(--s-7); align-items: start; }
.consign__intro { display: grid; gap: var(--s-5); }
.consign__intro h2 { font-size: var(--fs-h2); }
.consign__intro > p { font-size: var(--fs-lg); max-width: 46ch; }
.terms { margin: 0; display: grid; gap: var(--s-3); }
.terms div { display: grid; gap: 2px; padding-bottom: var(--s-3); border-bottom: 1px solid var(--rule-gilt-soft); }
.terms dt { font-family: var(--display); color: var(--gilt); }
.terms dd { margin: 0; color: var(--parch-dim); }
.valuation__title { font-size: var(--fs-xl); margin-bottom: var(--s-5); }
.valuation > .field { margin-bottom: 0; }
.received { display: flex; gap: var(--s-4); align-items: center; margin-top: var(--s-5); padding: var(--s-4); border: 1px solid var(--rule-ink); }
.received:focus { outline: 1px solid var(--rule-ink); }
.received__seal { width: 76px; height: 76px; flex: none; }
.received__title { font-family: var(--display); font-size: var(--fs-xl); }
.valuation.is-done .form-grid, .valuation.is-done > .field, .valuation.is-done .form-foot { display: none; }

/* ---------- 12. Reading room ---------- */
.room { padding: var(--s-9) 0; }
.room__wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7); align-items: start; }
.room__art { position: sticky; top: 110px; }
.room__art { margin: 0; border: 1px solid var(--rule-gilt-soft); padding: 8px; box-shadow: var(--lift); background: var(--walnut-2); }
.room__art svg { width: 100%; height: auto; }
.room__text { display: grid; gap: var(--s-4); }
.room__text h2 { font-size: var(--fs-h2); }
.room__text > p { font-size: var(--fs-lg); max-width: 50ch; }
.room__address { display: flex; gap: var(--s-3); font-style: normal; color: var(--parch-dim); }
.room__address .icon { color: var(--gilt); margin-top: 4px; }
.room__now { font-family: var(--display); color: var(--gilt); }
.hours { width: 100%; max-width: 460px; border-collapse: collapse; border-top: 3px double var(--rule-gilt); border-bottom: 3px double var(--rule-gilt); }
.hours th, .hours td { padding: 8px var(--s-2); text-align: left; font-weight: 400; border-bottom: 1px solid var(--rule-gilt-soft); }
.hours td { text-align: right; color: var(--parch-dim); }
.hours tr.is-today th, .hours tr.is-today td { color: var(--ink); background: var(--gilt); }
.room__rules { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; color: var(--parch-dim); }
.room__rules li::marker { color: var(--gilt); }

/* ---------- 13. Questions ---------- */
.faq { padding: var(--s-9) 0; }
.faq__wrap { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: var(--s-7); align-items: start; }
.faq__wrap h2 { font-size: var(--fs-h2); }
.faq__list { border-top: 3px double var(--rule-gilt); }
.faq details { border-bottom: 1px solid var(--rule-gilt-soft); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  min-height: 60px; padding: var(--s-3) 0; cursor: pointer; list-style: none;
  font-family: var(--display); font-size: var(--fs-lg);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background: linear-gradient(var(--gilt), var(--gilt)) center / 14px 1.5px no-repeat, linear-gradient(var(--gilt), var(--gilt)) center / 1.5px 14px no-repeat;
  transition: transform var(--t-mid) var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--gilt-bright); }
.faq details p { padding: 0 0 var(--s-5); max-width: 62ch; color: var(--vellum); }

/* ---------- 14. Footer ---------- */
.foot { background: var(--night); padding: var(--s-8) 0 var(--s-5); border-top: 1px solid var(--rule-gilt-soft); }
.foot__wrap { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.4fr; gap: var(--s-6); }
.foot__seal { width: 56px; height: 56px; margin-bottom: var(--s-3); }
.foot__name { font-family: var(--display); font-size: 1.6rem; }
.foot__name i { color: var(--gilt); }
.foot__brand p:last-child { color: var(--parch-dim); font-size: var(--fs-sm); max-width: 30ch; margin-top: var(--s-2); }
.foot__col h2 { font-size: 1.5rem; color: var(--gilt); margin-bottom: var(--s-3); }
.foot__col p, .foot__col li { font-size: var(--fs-sm); color: var(--parch-dim); }
.foot__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot__col a { display: inline-flex; min-height: 32px; align-items: center; }
.foot__col a:hover { color: var(--gilt-bright); }
.foot__news .field__label { color: var(--gilt); font-size: var(--fs-lg); }
.inline-field { display: flex; gap: var(--s-2); }
.inline-field input { flex: 1; min-width: 0; background: var(--walnut-2) !important; color: var(--vellum) !important; border-color: var(--rule-gilt) !important; }
.inline-field input::placeholder { color: #a8987a !important; }
.foot__news .field__err { color: var(--err-dark); }
.foot__news .form-msg { color: var(--ok-dark); }
.foot__fine { margin-top: var(--s-7); padding-top: var(--s-4); border-top: 1px solid var(--rule-gilt-soft); color: #a8987a; font-size: var(--fs-xs); font-style: italic; }

/* ---------- 15. Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Signature: the gilt tooling is pressed into the binding, line by line, as the page opens */
  .tool > rect, .tool > ellipse, .tool > path, .tool > circle {
    stroke-dasharray: 1; stroke-dashoffset: 0;
    animation: tool 2.4s var(--ease-out) both;
  }
  .tool > rect:nth-of-type(2) { animation-delay: 0.25s; }
  .tool > ellipse { animation-delay: 0.7s; }
  .tool > ellipse + ellipse { animation-delay: 0.9s; }
  .tool > path { animation-delay: 1.2s; animation-duration: 1.8s; }
  .tool > circle { animation-delay: 1.8s; animation-duration: 1.2s; }
  .tool > g { animation: gild 1.4s var(--ease-out) 0.5s both; }
  .tool-fill { animation: gild 1s var(--ease-out) 1.6s both; }
  @keyframes tool { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes gild { from { opacity: 0; } to { opacity: 1; } }

  /* The candle breathes; the light on the page follows it */
  .candle__flame { animation: flame 3.2s ease-in-out infinite; }
  .room__lamp { animation: halo 3.2s ease-in-out infinite; }
  .candlelight { animation: halo 3.2s ease-in-out infinite; }
  @keyframes flame { 0%, 100% { transform: scale(1, 1) skewX(0deg); } 30% { transform: scale(0.96, 1.06) skewX(-2deg); } 55% { transform: scale(1.03, 0.97) skewX(1.5deg); } 80% { transform: scale(0.98, 1.03) skewX(-1deg); } }
  @keyframes halo { 0%, 100% { opacity: 1; } 40% { opacity: 0.82; } 70% { opacity: 0.94; } }

  /* Quiet supporting moves */
  .desk__lot.is-swapping { animation: swap var(--t-mid) var(--ease-out); }
  @keyframes swap { from { opacity: 0.35; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .paddle:not([hidden]) .paddle__seal, .received:not([hidden]) .received__seal, .status__seal { animation: press 600ms var(--ease-out) both; }
  @keyframes press { from { transform: scale(1.5) rotate(-14deg); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---------- 16. Narrow screens ---------- */
@media (max-width: 1100px) {
  .desk__wrap { grid-template-columns: minmax(0, 1fr); }
  .slip { position: static; max-width: 640px; }
  .foot__wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .top { flex-wrap: wrap; row-gap: 0; padding-bottom: 0; }
  .top__nav { order: 3; width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); overflow-x: auto; border-top: 1px solid var(--rule-gilt-soft); scrollbar-width: none; }
  .top__nav::-webkit-scrollbar { display: none; }
  .top__nav a { white-space: nowrap; padding: 0 var(--s-3) 0 0; margin-right: var(--s-3); }
  html { scroll-padding-top: 124px; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: var(--s-7); gap: var(--s-6); }
  .hero__text { justify-self: start; }
  .hero__art { justify-self: center; width: min(54vw, 320px); order: -1; }
  .cat { grid-template-columns: 1fr; gap: var(--s-6); }
  .filters { position: static; grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-5); }
  .filters__est, .filters__foot { align-self: start; }
  .register__wrap, .consign__wrap, .room__wrap, .faq__wrap, .how__grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .room__art { order: 2; position: static; }
  .filters .filters__group:nth-child(2) { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 640px) {
  :root { --s-9: 80px; --s-8: 56px; }
  .logo__name { font-size: 1.25rem; }
  .logo__seal { width: 34px; height: 34px; }
  .filters { grid-template-columns: 1fr; }
  .filters .filters__group:nth-child(2) { order: 0; }
  /* catalogue entries become index-card rows: the book left, the entry right */
  .lots { grid-template-columns: 1fr; gap: var(--s-3); }
  .lot { grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto auto auto auto; column-gap: var(--s-3); row-gap: 4px; padding: 6px 0 var(--s-3); }
  .lot__art { grid-row: 1 / span 4; height: auto; min-height: 150px; margin: 0 0 0 6px; border-radius: 2px 0 0 2px; align-self: stretch; }
  .lot__art svg { height: 96px; }
  .lot__no { top: 10px; left: 14px; font-size: 1.6rem; }
  .lot__title { font-size: 1.3rem; padding: var(--s-2) var(--s-3) 0 0; }
  .lot__desc, .lot__close { padding-inline: 0 var(--s-3); }
  .lot__meta { margin: 4px var(--s-3) 0 0; padding-top: var(--s-2); }
  .desk::after { inset: 8px; }
  .desk__lot { grid-template-columns: 1fr; gap: var(--s-4); }
  .desk__art { max-width: 200px; justify-self: center; padding-top: var(--s-4); }
  .desk__cols { grid-template-columns: 1fr; }
  .slip { padding: var(--s-5) var(--s-4) var(--s-4); }
  .sums { font-size: var(--fs-xs); }
  .form-grid { grid-template-columns: 1fr; }
  .paddle-form, .valuation { padding: var(--s-5) var(--s-4); }
  .foot__wrap { grid-template-columns: 1fr; }
  .steps li { grid-template-columns: 40px 1fr; }
  .steps li::before { font-size: 2.2rem; }
  .candle { right: -18%; }
}
@media (max-width: 400px) {
  .top__cta { padding: 0 var(--s-3); }
}
