/* Lotdesk — one ink on catalogue stock. The page is built like the house's printed sale: ruled
   entries, the lot number in a plate at the margin, the estimate in its bracket at the end of the line,
   and the state struck across it. Mobile first: the phone at the lot is the target, the desk is the
   enhancement. */
@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/bodoni-moda-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Karla";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/karla-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f7f4ed;        /* catalogue stock */
  --card: #fffdf9;         /* the leaf itself */
  --ink: #181310;          /* warm near-black, the printing ink */
  --ink-2: #5a5148;
  --rule: #ded6c8;
  --rule-strong: #b7ab98;
  --accent: #8c1220;       /* claret: the house's own ink, the SOLD stamp, the estimate bracket */
  --accent-deep: #6d0d18;
  --warn: #7a4200;
  --warn-bg: #fdf2e0;
  --ok: #1c5c3a;
  --ok-bg: #eef4ef;
  --display: "Bodoni Moda", "Bodoni MT", Didot, "Times New Roman", serif;
  --text: "Karla", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Roboto Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--text);
  overflow-wrap: anywhere;
  padding-bottom: 1rem;
}
.is-app { padding-bottom: 6rem; }   /* room for the outbox bar */
a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -0.005em; }
h1 { font-size: clamp(1.6rem, 7vw, 2.4rem); margin: 0 0 .55rem; }
h2 { font-size: 1.24rem; margin: 0 0 .5rem; }
h3 { font-size: 1.03rem; margin: .8rem 0 .3rem; }
p { margin: .5rem 0; }
ul, ol { margin: .4rem 0; padding-left: 1.15rem; }
li { margin: .3rem 0; }

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1rem; }
.wrap-wide { max-width: 62rem; }

/* the masthead: the house's name over a double rule, as a catalogue carries it */
.topbar { background: var(--card); border-bottom: 3px double var(--rule-strong); }
.topbar-in { max-width: 46rem; margin: 0 auto; padding: .5rem 1rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; justify-content: space-between; }
.brand-link { text-decoration: none; color: var(--ink); }
.brand { font-family: var(--display); font-weight: 600; font-size: 1.22rem; letter-spacing: .01em; }
.brand-mark { display: inline-block; width: .58em; height: .58em; margin-right: .4em; background: var(--accent); }
.topbar nav { display: flex; flex-wrap: wrap; gap: .1rem .3rem; align-items: center; }
.topbar nav a, .topbar nav .who, .topbar nav button { display: inline-block; padding: .55rem .5rem; min-height: 44px; line-height: 1.4; font-size: .98rem; }
.topbar .who { color: var(--ink-2); max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cta-small { border: 2px solid var(--accent); color: var(--accent-deep) !important; }
.inline { display: inline; margin: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .5rem 0 0; }
.inline-form select, .inline-form input { width: auto; min-width: 10rem; }
.linklike { background: none; border: 0; padding: .55rem .4rem; font: inherit; color: var(--accent-deep); text-decoration: underline; cursor: pointer; min-height: 44px; }
.linklike[disabled] { color: var(--ink-2); text-decoration: none; cursor: default; }

main { padding: 1rem 0 3rem; }
section { background: var(--card); border: 1px solid var(--rule); border-top: 2px solid var(--rule-strong); padding: .9rem 1rem 1.05rem; margin: 0 0 .9rem; }
section.limits { background: #fbf9f3; }
section.hero { border-top: 3px double var(--accent); padding: 1.2rem 1rem 1.3rem; }
.hero h1 { max-width: 30rem; }
.lede { font-size: 1.04rem; color: var(--ink-2); max-width: 36rem; }
.fine { font-size: .89rem; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.empty { color: var(--ink-2); }
.page-head { margin: 0 0 .8rem; }
.page-head .lede { margin-top: .2rem; }
.banner { background: #f6efee; border: 1px solid #e2cdce; padding: .6rem .7rem; font-size: .93rem; }
.warn { background: var(--warn-bg); border: 1px solid #edd9b6; padding: .7rem .8rem; font-size: .95rem; }
.notice { padding: .55rem .7rem; font-size: .95rem; }
.notice-ok { background: var(--ok-bg); border: 1px solid #cfe3d6; color: var(--ok); }
.notice-bad { background: #fdf1f0; border: 1px solid #eed3d0; color: #8c2f22; }
code { font: .92em var(--mono); background: #f1ece2; padding: 0 .25em; }
.group-count { font: .78rem/1.5 var(--mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.group-head { font-family: var(--display); border-bottom: 1px solid var(--rule-strong); padding-bottom: .15rem; margin-top: 1.1rem; }

/* buttons: thumb-sized, never smaller than 44 px, never a hover-only affordance */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1rem;
  font: 600 1rem/1.2 var(--text);
  background: var(--card); color: var(--accent-deep);
  border: 2px solid var(--accent);
  text-decoration: none; cursor: pointer;
}
.btn-buy { background: var(--accent); color: #fff; }
.btn-quiet { background: var(--card); color: var(--ink); border-color: var(--rule-strong); }
.cta-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.btn:active { transform: translateY(1px); }
button[disabled] { opacity: .6; }

label.field { display: block; margin: 0 0 .6rem; }
.field-label { display: block; font-size: .87rem; color: var(--ink-2); margin-bottom: .15rem; }
.field-hint { display: block; font-size: .85rem; color: var(--ink-2); margin-top: .15rem; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--rule-strong); padding: .6rem .55rem; min-height: 46px;
}
textarea { min-height: 90px; }
.card-form { margin-top: .4rem; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 .8rem; }
@media (min-width: 30rem) { .form-grid { grid-template-columns: 1fr 1fr; } }
.narrow { max-width: 30rem; }
.composer { border-top: 2px solid var(--rule-strong); padding-top: .6rem; }

/* --- the signature: the catalogue entry ---------------------------------------------------- */
.lots { list-style: none; padding: 0; margin: 0; }
.lotline {
  display: grid; grid-template-columns: 2.6rem 1fr; gap: 0 .6rem;
  border-top: 1px solid var(--rule); padding: .7rem 0;
}
.lotline:first-child { border-top: 0; }
.lot-no {
  font: 600 1.05rem/1.6 var(--mono); color: var(--accent-deep);
  border: 1px solid var(--rule-strong); border-bottom-width: 2px; background: #fff;
  min-height: 2rem; display: flex; align-items: center; justify-content: center;
}
.lot-body { min-width: 0; }
.lot-title { font-family: var(--display); font-size: 1.06rem; margin: 0; }
.lot-desc { margin: .15rem 0 0; }
.lot-cond { margin: .2rem 0 0; font-size: .95rem; }
.lot-cond-label { font: .76rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.lot-meta { margin: .3rem 0 0; font-size: .86rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: .2rem .8rem; }
.lot-side { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .35rem; }
.lot-hammer { font: .85rem/1.5 var(--mono); color: var(--accent-deep); }
.lot-reason { grid-column: 1 / -1; margin: .35rem 0 0; font-size: .93rem; color: var(--warn); }
@media (min-width: 40rem) {
  .lotline { grid-template-columns: 2.8rem 1fr auto; }
  .lot-side { grid-column: auto; grid-row: 1; flex-direction: column; align-items: flex-end; margin-top: 0; }
}

/* the estimate in its bracket, the way a printed catalogue carries it */
.est { display: inline-flex; align-items: stretch; font: 600 .95rem/1.6 var(--mono); color: var(--accent-deep); white-space: nowrap; }
.est-bracket { display: inline-block; width: .5rem; border-left: 2px solid var(--accent); border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent); }
.est-bracket:last-child { border-left: 0; border-right: 2px solid var(--accent); }
.est-figure { padding: .1rem .25rem; }
.est-empty .est-bracket { border-color: var(--rule-strong); }
.est-empty .est-note { font: .82rem/1.6 var(--text); color: var(--ink-2); padding-left: .3rem; }

/* the state: in the catalogue is a plain word, sold and withdrawn are struck across the line */
.st { display: inline-block; border: 1px solid var(--rule-strong); border-bottom-width: 2px; padding: .05rem .35rem; font: .78rem/1.6 var(--mono); background: #fff; white-space: nowrap; }
.st-catalogued { border-color: var(--accent); color: var(--accent-deep); background: #fbf3f3; }
.st-hammered, .st-withdrawn {
  border: 2px solid var(--accent); color: var(--accent-deep); text-transform: uppercase;
  letter-spacing: .08em; transform: rotate(-1.2deg);
}
.st-withdrawn { border-color: var(--ink-2); color: var(--ink-2); }
.state-withdrawn .lot-title { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--ink-2); }
.grade { display: inline-block; font: .78rem/1.6 var(--mono); border-bottom: 1px solid var(--rule-strong); }

/* the sections, in the order the room is worked */
.sections { list-style: none; padding: 0; margin: 0; }
.sections li { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: baseline; border-top: 1px solid var(--rule); padding: .45rem 0; }
.sections li:first-child { border-top: 0; }
.section-name { font-family: var(--display); font-size: 1.02rem; }
.section-count { font: .85rem/1.5 var(--mono); color: var(--ink-2); }
.section-controls { margin-left: auto; display: flex; gap: .3rem; }
.statline { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.stat { font: .92rem/1.6 var(--mono); }

/* photographs */
.photos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: .7rem; }
.photos img { width: 100%; max-width: 26rem; border: 1px solid var(--rule-strong); background: #fff; display: block; }
.photo-meta { display: block; font: .82rem/1.5 var(--mono); color: var(--ink-2); margin-top: .2rem; }
.preview img { width: 100%; max-width: 22rem; border: 1px solid var(--rule-strong); display: block; }
.preview figcaption { font-size: .85rem; color: var(--ink-2); }

/* proof list on the landing */
.proof-list { list-style: none; padding: 0; }
.proof-list li { border-top: 1px solid var(--rule); padding: .5rem 0; }
.proof-list a { font-weight: 600; }
.proof-list span { display: block; color: var(--ink-2); font-size: .95rem; }
.work li { margin: .5rem 0; }
.price-line { font-family: var(--display); font-size: 2rem; margin: .2rem 0; }
.price-unit { font: 1rem/1.4 var(--text); color: var(--ink-2); }
.cols { display: grid; grid-template-columns: 1fr; gap: .8rem; }
@media (min-width: 42rem) { .cols { grid-template-columns: 1fr 1fr; } }
.vendor { border-top: 1px solid var(--rule); padding: .6rem 0; }
.vendor:first-child { border-top: 0; }
details summary { cursor: pointer; padding: .3rem 0; min-height: 32px; }
.plan-on { background: var(--ok-bg); border: 1px solid #cfe3d6; color: var(--ok); padding: .6rem .7rem; font-size: .95rem; }
.plan-off { background: var(--warn-bg); border: 1px solid #edd9b6; padding: .7rem .8rem; margin: 0 0 .9rem; }
.plan-off p { margin: .2rem 0; }

/* the outbox: what the phone has written and not sent */
.outbox { position: sticky; bottom: 0; background: #fff; border-top: 3px solid var(--accent); padding: .5rem 1rem .7rem; margin: 0 -1rem -1rem; }
.outbox-demo { position: static; margin: 0; border: 1px solid var(--rule-strong); border-top-width: 3px; }
.outbox-head { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: space-between; }
.outbox-head p { margin: 0; font-size: .95rem; }
.outbox-list { list-style: none; padding: 0; margin: .3rem 0 0; }
.outbox-item { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: baseline; font-size: .92rem; }
.outbox-item.is-error { color: #8c2f22; }
.outbox-why { font-size: .88rem; }
.outbox-note { font-size: .9rem; margin: .3rem 0 0; color: var(--ink-2); }
.outbox-note.is-warn { color: var(--warn); }
.outbox-note.is-ok { color: var(--ok); }

table.grid { border-collapse: collapse; width: 100%; font-size: .93rem; background: #fff; }
table.grid th, table.grid td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.grid th { font: 600 .8rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.foot { max-width: 46rem; margin: 0 auto; padding: .5rem 1rem 2.5rem; color: var(--ink-2); font-size: .88rem; border-top: 1px solid var(--rule); }
.foot-links { display: flex; flex-wrap: wrap; gap: .2rem .9rem; }
.foot-links a, .foot p a { display: inline-block; padding: .3rem 0; min-height: 36px; }
.legal h2 { margin-top: 1.1rem; }

@media (min-width: 48rem) {
  section { padding: 1.1rem 1.3rem 1.3rem; }
  .hero { padding: 1.6rem 1.4rem; }
}

/* --- the printed catalogue ------------------------------------------------------------------ */
.print-bar { max-width: 62rem; margin: .6rem auto 0; padding: 0 1rem; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; font-size: .92rem; color: var(--ink-2); }
.sheet { max-width: 62rem; margin: 0 auto; padding: 1rem; background: #fff; }
.sheet-head { border-bottom: 3px double var(--ink); padding-bottom: .6rem; margin-bottom: 1rem; }
.sheet-title h1 { font-size: 1.9rem; margin: 0; }
.sheet-house { font: 600 .85rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin: .1rem 0 0; }
.sheet-sub { margin: .2rem 0 .6rem; font-size: .95rem; }
.title-block { border-collapse: collapse; width: 100%; font-size: .9rem; }
.title-block th, .title-block td { text-align: left; border: 1px solid var(--rule); padding: .3rem .45rem; vertical-align: top; }
.title-block th { font: 600 .78rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); width: 14%; }
.sheet-group h2 { border-bottom: 1px solid var(--ink); padding-bottom: .15rem; margin-top: 1.4rem; }
.entries { list-style: none; padding: 0; margin: .5rem 0 0; }
.entry { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0 .6rem; border-top: 1px solid var(--rule); padding: .55rem 0; break-inside: avoid; }
.entry:first-child { border-top: 0; }
.entry-no { font: 600 1rem/1.6 var(--mono); color: var(--accent-deep); border: 1px solid var(--rule-strong); border-bottom-width: 2px; text-align: center; align-self: start; }
.entry-title { font-family: var(--display); font-size: 1.04rem; margin: 0; }
.entry-desc { margin: .1rem 0 0; font-size: .96rem; }
.entry-cond { margin: .15rem 0 0; font-size: .9rem; color: var(--ink-2); }
.entry-meta { margin: .2rem 0 0; font-size: .82rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: .2rem .8rem; }
.entry-state, .entry-reason { font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.entry-reason { color: var(--warn); }
.entry-est { grid-column: 1 / -1; }
@media (min-width: 48rem) {
  .entry { grid-template-columns: 2.6rem 1fr auto; }
  .entry-est { grid-column: auto; grid-row: 1; align-self: start; }
}
.sheet-notes { border-top: 2px solid var(--rule-strong); margin-top: 1.2rem; padding-top: .5rem; font-size: .9rem; }
.sheet-line { color: var(--ink-2); }
.sheet-foot { margin-top: 1.2rem; }

@media print {
  body { background: #fff; padding: 0; }
  .no-print, .topbar, .foot { display: none !important; }
  main.sheet { max-width: none; padding: 0; }
  a { color: var(--ink); text-decoration: none; }
  .entry, .sheet-group { break-inside: avoid; }
  @page { margin: 14mm; }
}
