/* Catalog pages for www.stampedestamps.store - the same look as the five hand-written pages and Stamp Stories.
   Generated pages link this one file instead of carrying the CSS 420 times. */
@font-face {
  font-family: "League Gothic";
  font-style: normal;
  font-weight: 400;
  font-display: optional; /* W12 step 2: with the preload, used only if it is in hand by the first paint, so the page never jumps */
  src: url("/fonts/league-gothic-latin-400-normal.woff2") format("woff2");
}
:root {
  --purple: #4B006E; --lilac: #D7B8F0; --page: #F6F4FA; --grid: #E7E2EF; --paper: #FFFFFF;
  --ink: #1F1D2B; --cancel: #B3261E; --soft: #5B566A; --link: var(--purple); --head: var(--ink); /* W7: headings in ink; purple = clickable */
  --edge: rgba(75,0,110,.55); --rule: #DCD5E6;
  --gothic: "League Gothic","Oswald","Arial Narrow",Impact,sans-serif;
  --serif: Charter,"Bitstream Charter","Sitka Text",Cambria,Georgia,serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --page: #1C1A22; --grid: transparent; --paper: #2A2732; --ink: #ECE8F3; --cancel: #FF8A80;
    --soft: #B9B2C6; --link: var(--lilac); --head: var(--ink); --edge: rgba(215,184,240,.5); --rule: #3A3644; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background-color: var(--page); color: var(--ink); font: 1.0625rem/1.6 var(--serif);
  background-image: linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px);
  background-size: 24px 24px;
}
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cancel); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: .5rem; z-index: 9; background: var(--paper); padding: .4rem .7rem; }
h1, h2, h3 { font-family: var(--gothic); font-weight: 400; letter-spacing: .01em; line-height: 1.05; color: var(--head); margin: 0; }
main { display: block; max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

/* Selvage header with the 5-page menu */
.selvage { background: var(--purple); color: #fff; }
.selvage a { color: #fff; }
.selvage :focus-visible { outline-color: #fff; }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1.5rem;
  max-width: 72rem; margin: 0 auto; padding: .7rem 1rem; }
.mark { font-family: var(--gothic); font-size: 2rem; line-height: 1; text-decoration: none; letter-spacing: .02em; }
.mark small { font-family: var(--serif); font-size: .95rem; letter-spacing: 0; opacity: .92; margin-left: .45rem; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; }
.menu a { font-size: .98rem; text-decoration: none; padding: .15rem 0; border-bottom: 2px solid transparent; }
.menu a:hover { border-bottom-color: var(--lilac); }
.menu a[aria-current="page"] { border-bottom-color: #fff; }
/* menu links at least 24 px tall (WCAG 2.2 target size): 32 px, and 43 px on phones (W13) */
.menu a { display: inline-block; }
@media (max-width: 43.99rem) { .top { row-gap: 0; } .menu ul { gap: 0 .9rem; } .menu a { padding: .7rem 0 .3rem; } }
/* Header search on every page; every search box on the site searches our catalog (W4, Douglas 2026-10-17) */
.hfind { display: flex; gap: .4rem; margin: 0; }
.hfind input { width: 11rem; min-width: 0; font: inherit; font-size: 1rem; padding: .4rem .6rem; color: #1F1D2B; background: #fff; border: 2px solid #fff; border-radius: 3px; }
.hfind button { font-family: var(--gothic); font-size: 1.15rem; letter-spacing: .03em; line-height: 1; padding: .35rem .8rem; color: #4B006E; background: #fff; border: 2px solid #fff; border-radius: 3px; cursor: pointer; }
.hfind button:hover { text-decoration: underline; }
@media (min-width: 44rem) { .top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 1.5rem; } .menu { justify-self: end; } }
@media (min-width: 44rem) and (max-width: 67.99rem) { .top { grid-template-columns: auto 1fr; } .hfind { grid-column: 1 / -1; justify-self: end; margin: 0 0 .6rem; } }
@media (max-width: 43.99rem) { .menu ul { gap: 0 .6rem; } .hfind { flex: 1 1 100%; margin: 0 0 .55rem; } .hfind input { flex: 1; width: auto; padding: .35rem .6rem; } }
@media (max-width: 22.49rem) { .menu ul { gap: 0 .3rem; } .menu a { font-size: .9rem; } }
/* phones: the catalog page's own catalog search sits right under the header, so the header box is not repeated (W4) */
@media (max-width: 43.99rem) { .own-search .hfind { display: none; } }

/* Perforated stamp edge */
.perf { position: relative; isolation: isolate; --r: 5px; }
.perf::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--paper);
  -webkit-mask: radial-gradient(var(--r),#0000 96%,#000) round calc(-1.5*var(--r)) calc(-1.5*var(--r))/calc(3*var(--r)) calc(3*var(--r)),
    linear-gradient(#000 0 0) no-repeat 50%/calc(100% - 3*var(--r)) calc(100% - 3*var(--r));
  mask: radial-gradient(var(--r),#0000 96%,#000) round calc(-1.5*var(--r)) calc(-1.5*var(--r))/calc(3*var(--r)) calc(3*var(--r)),
    linear-gradient(#000 0 0) no-repeat 50%/calc(100% - 3*var(--r)) calc(100% - 3*var(--r));
}
.edged { filter: drop-shadow(0 0 1px var(--edge)); }

/* Catalog index */
.hero h1 { font-size: clamp(2.6rem, 9vw, 4.4rem); }
.hero .lede { font-size: 1.15rem; max-width: 50ch; margin: .6rem 0 1rem; }
.asof { color: var(--soft); font-size: .95rem; margin: 0; }
.find { margin: 1.4rem 0 .4rem; display: grid; gap: .7rem; grid-template-columns: 1fr; }
.find label { display: block; font-family: var(--gothic); font-size: 1.35rem; color: var(--head); }
.find input, .find select { width: 100%; font: inherit; font-size: 1.05rem; padding: .65rem .8rem; color: var(--ink);
  background: var(--paper); border: 2px solid var(--purple); border-radius: 3px; }
@media (prefers-color-scheme: dark) { .find input, .find select { border-color: var(--lilac); } }
.count { margin: .4rem 0 0; color: var(--soft); font-size: .95rem; }
.empty { background: var(--paper); border-left: 4px solid var(--purple); padding: 1rem 1.1rem; margin: 1rem 0; }
.empty p { margin: .2rem 0; }
.empty button { font: inherit; color: var(--link); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.stamps { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.stamps li { display: flex; }
.stamps li[hidden] { display: none; }
.stamps .card { flex: 1; display: flex; flex-direction: column; gap: .55rem; padding: 1.15rem 1.1rem 1rem; text-decoration: none; color: var(--ink); }
.stamps .ph { height: 10rem; display: flex; align-items: center; justify-content: center; }
.stamps .ph img { display: block; width: 100%; height: 100%; object-fit: contain; } /* C2c: fill the box, so a srcset copy is never drawn smaller */
.stamps .tx { height: 10rem; display: flex; align-items: center; justify-content: center; text-align: center; padding: .6rem;
  border: 2px solid var(--rule); font-family: var(--gothic); font-size: 1.5rem; line-height: 1.05; color: var(--soft); }
.stamps .tx small, .item-stamp .tx small { display: block; margin-top: .4rem; font-family: var(--serif); font-size: .85rem; letter-spacing: 0; color: var(--soft); }
.stamps .tx > span, .item-stamp .tx > span { color: var(--head); }
.stamps .t { font-family: var(--gothic); font-size: 1.3rem; line-height: 1.1; color: var(--link); }
.stamps .c { font-size: .9rem; color: var(--soft); margin-top: auto; }
.stamps .more { font-size: .9rem; color: var(--soft); }
.stamps .more a { color: var(--soft); }
.stamps a.card:hover .t { text-decoration: underline 1px; }
.badge { align-self: flex-start; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--head);
  border: 1.5px solid currentColor; padding: .05rem .45rem; border-radius: 2px; }

/* Item page. Phones first (W10, 2026-10-17): a shorter photo and the "See it on eBay" button straight under the title,
   so the title and the button show without scrolling; the 44rem block below restores the wide layout. */
.crumbs { font-size: .95rem; color: var(--soft); margin: 0 0 .8rem; }
.crumbs a { color: var(--soft); }
.item { display: grid; gap: 1rem; align-items: start; }
.item-stamp { --r: 7px; padding: .9rem; }
.item-stamp .frame { border: 2px solid var(--purple); padding: .6rem; display: flex; align-items: center; justify-content: center; min-height: 12rem; }
.item-stamp img { display: block; max-width: 100%; max-height: 36vh; height: auto; object-fit: contain; }
.buy { display: flex; flex-direction: column; }
.buy .facts { order: 1; }
.item-stamp .tx { font-family: var(--gothic); font-size: 2rem; line-height: 1.05; color: var(--soft); text-align: center; padding: 1rem; }
@media (prefers-color-scheme: dark) { .item-stamp .frame { border-color: var(--lilac); } }
.item h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.04; }
.facts { list-style: none; padding: 0; margin: 1rem 0; }
.facts li { padding: .45rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 7rem 1fr; gap: .6rem; }
.facts b { font-weight: 400; color: var(--soft); }
.note { color: var(--soft); font-size: .95rem; margin: .4rem 0 0; max-width: 50ch; }
.btn { display: block; text-align: center; background: var(--purple); color: #fff; font-family: var(--gothic);
  font-size: 1.8rem; letter-spacing: .03em; line-height: 1; padding: 1rem 1rem; margin: 1.2rem 0 .6rem;
  text-decoration: none; border-radius: 4px; border: 2px solid var(--purple); }
@media (prefers-color-scheme: dark) { .btn { border-color: var(--lilac); } }
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform .08s ease-out; }
  .btn:active { transform: translateY(1px); }
}
.related { margin: 2.6rem 0 0; }
.related h2 { font-size: 2rem; border-bottom: 2px solid var(--purple); padding-bottom: .35rem; }
@media (prefers-color-scheme: dark) { .related h2 { border-color: var(--lilac); } }
/* "About this issue": checked facts below the photo and the eBay button, so the first screen is unchanged */
.issue { margin: 2.2rem 0 0; max-width: 40rem; }
.issue h2 { font-size: 2rem; border-bottom: 2px solid var(--purple); padding-bottom: .35rem; }
@media (prefers-color-scheme: dark) { .issue h2 { border-color: var(--lilac); } }
.issue .facts { margin: .3rem 0 .5rem; }

/* Issue pages (2026-11-21): one page per checked Scott number, /catalog/issue/scott-<number>.html. A page with one
   listing uses the item page's own layout above; these rules cover the rest. */
.item.solo { grid-template-columns: minmax(0, 1fr); } /* several listings, or none: no photo beside the heading */
.item h1 span { display: block; font-size: .62em; line-height: 1.12; margin-top: .3rem; } /* the issue's name, under its Scott number */
.key { margin: .8rem 0 0; max-width: 50ch; }
/* phones, one listing: the button comes straight under the heading, as on item pages; then the face value and date, then the words */
.item-stamp + .buy .key { order: 1; }
.item-stamp + .buy .note, .item-stamp + .buy .asof { order: 2; }
.buy .asof, .related .asof { margin-top: .4rem; }
.item-stamp .frame a { display: block; } /* the photo opens the listing's catalog page */
.btn.alt { background: transparent; color: var(--link); border-color: var(--link); }
.shelf .stamps li { flex-direction: column; }
.shelf .btn { display: block; font-size: 1.35rem; padding: .6rem .8rem; margin: .55rem 0 0; }
.related .note { margin-top: .8rem; }
.pager { display: flex; flex-wrap: wrap; gap: .2rem 1.6rem; margin: 2.2rem 0 .6rem; }
.pager a { display: inline-block; padding: .35rem 0; }
.jump ul { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .1rem 1.3rem; }
.jump a { display: inline-block; padding: .35rem 0; }
.numbers { list-style: none; padding: 0; margin: .4rem 0 0; max-width: 46rem; }
.numbers li { display: grid; grid-template-columns: 8rem minmax(0, 1fr) auto; gap: .1rem .9rem; align-items: baseline;
  padding: .45rem 0; border-bottom: 1px solid var(--rule); }
.numbers a { font-family: var(--gothic); font-size: 1.3rem; line-height: 1.25; text-decoration: none; }
.numbers a:hover { text-decoration: underline 1px; }
.numbers .on { font-size: .9rem; color: var(--soft); white-space: nowrap; }
@media (max-width: 43.99rem) {
  .numbers li { grid-template-columns: minmax(0, 1fr) auto; }
  .numbers .what { grid-column: 1 / -1; grid-row: 2; }
}

/* Footer */
footer.selvage { margin-top: 2rem; }
.foot { max-width: 72rem; margin: 0 auto; padding: 1.4rem 1rem 1.8rem; display: flex; flex-wrap: wrap; gap: .4rem 2rem; align-items: baseline; }
.sign { font-family: var(--gothic); font-size: 1.7rem; margin: 0; }
.foot p { margin: 0; }
.tags { flex-basis: 100%; font-size: .9rem; opacity: .85; }

@media (min-width: 44rem) {
  .find { grid-template-columns: 2fr 1fr 1fr; align-items: end; }
  .item { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
  .crumbs { margin-bottom: 1.2rem; }
  .item-stamp { padding: 1.4rem; }
  .item-stamp .frame { padding: 1rem; min-height: 14rem; }
  .item-stamp img { max-height: 70vh; }
  .buy { display: block; }
  .btn { display: inline-block; padding: 1rem 2.8rem; }
}
