/* ============================================================
   MrGreenlee — heritage / industrial museum aesthetic
   Cream paper, engraved serif type, sienna accent, cast iron.
   ============================================================ */

:root {
  --bg:        #f4efe6;   /* cream paper */
  --bg-soft:   #ece5d6;   /* darker cream for plates & cards */
  --ink:       #1a1a1a;   /* near-black headings */
  --body:      #2b2b2b;   /* body text */
  --muted:     #6b6655;   /* secondary text, captions */
  --rule:      #b8ad95;   /* hairline rules */
  --accent:    #8b4513;   /* sienna */
  --accent-dk: #5a2d0c;   /* deep sienna, hover */
  --iron:      #26231e;   /* cast-iron nameplates */
  --iron-edge: #4a453c;   /* nameplate bevel */
  --on-iron:   #e8e0cf;   /* cream lettering on iron */
  --max-w:     1140px;
  --serif-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --serif-text: 'Lora', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--serif-text);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* faint paper grain over everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

/* height:auto is load-bearing: images carry width/height attributes for
   layout stability, and without it the height attribute becomes a fixed
   height wherever CSS overrides the width — stretching the image. */
img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease, color 120ms ease;
}
a:hover { color: var(--accent-dk); border-bottom-color: var(--accent-dk); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--serif-display);
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0;
}

.smallcaps, .kicker {
  font-family: var(--serif-text);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.kicker { display: block; margin-bottom: 14px; }
.kicker a { color: inherit; border: none; }
.kicker a:hover { color: var(--accent); }

/* ---------- Layout ---------- */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Site header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--rule);
  background: rgba(244, 239, 230, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 200ms ease;
}
.site-header.scrolled {
  box-shadow: 0 6px 24px -18px rgba(26, 22, 12, 0.55);
}

.site-header .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.site-title {
  font-family: var(--serif-display);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  border: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-title:hover { color: var(--accent-dk); border: none; }

.site-title .mark {
  width: 26px;
  height: 26px;
  flex: none;
  transform: translateY(2px);
}

.site-nav { display: flex; gap: 12px 32px; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink);
  font-family: var(--serif-text);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  border: none;
  padding-bottom: 3px;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

/* ---------- Hero ---------- */

.hero { padding: 72px 0 24px; }

.hero-logo {
  display: block;
  margin: 0 auto 44px;
  max-width: 720px;
  width: 100%;
}

.hero-title {
  font-size: clamp(2.5rem, 5.4vw, 3.9rem);
  line-height: 1.06;
  margin: 24px 0 16px;
  text-align: center;
  font-style: italic;
  font-weight: 500;
}

.hero-tagline {
  text-align: center;
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 660px;
  margin: 0 auto;
}

.hero .kicker { text-align: center; }

/* framed engraving plate */
.plate {
  margin: 56px 0 0;
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule);
  outline-offset: 5px;
  background: var(--bg);
  overflow: hidden;
}
.plate img {
  width: 100%;
  mix-blend-mode: multiply;   /* melt cream engraving bg into the page */
}
.plate.plate-wide img {
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.plate-caption {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
  font-size: 0.92rem;
}

/* ---------- Stats band ---------- */

.stats-band {
  margin-top: 72px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 34px 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat + .stat { border-left: 1px solid var(--rule); }

.stat .num {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 2.9rem;
  line-height: 1.1;
  color: var(--ink);
}
.stat .num sup { font-size: 55%; font-weight: 500; }

.stat .lbl {
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- Sections ---------- */

section { padding: 64px 0; }
section.tight { padding: 40px 0; }

.section-rule {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 40px;
}
.section-rule::before,
.section-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.section-rule h2 {
  font-size: 2.1rem;
  font-style: italic;
  font-weight: 500;
  text-align: center;
}

.section-sub {
  text-align: center;
  max-width: 640px;
  margin: -22px auto 44px;
  color: var(--muted);
  font-size: 0.98rem;
}

.intro {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.14rem;
  line-height: 1.75;
}

.intro.dropcap { text-align: left; }
.intro.dropcap::first-letter {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 3.4em;
  float: left;
  line-height: 0.82;
  padding: 4px 10px 0 0;
  color: var(--accent);
}

/* ---------- Timeline ---------- */

.timeline { overflow-x: auto; padding-bottom: 8px; }

.tl-rail {
  position: relative;
  min-width: 780px;
  height: 210px;
}

.tl-axis {
  position: absolute;
  left: 0; right: 0;
  top: 105px;
  height: 1px;
  background: var(--rule);
}
.tl-axis::before, .tl-axis::after {
  content: '';
  position: absolute;
  top: -3px;
  width: 7px; height: 7px;
  background: var(--rule);
  transform: rotate(45deg);
}
.tl-axis::before { left: -2px; }
.tl-axis::after { right: -2px; }

.tl-tick {
  position: absolute;
  top: 105px;
  width: 1px;
  height: 9px;
  background: var(--rule);
  transform: translateX(-0.5px);
}
.tl-tick span {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.tl-dot {
  position: absolute;
  top: 105px;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
  transition: transform 150ms ease, background 150ms ease;
}
.tl-dot:hover {
  transform: translate(-50%, -50%) scale(1.45);
  background: var(--accent-dk);
  border-bottom-color: transparent;
}

.tl-dot .tl-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 110px;
  text-align: center;
  line-height: 1.3;
  pointer-events: none;
}
.tl-dot.up .tl-label { bottom: 26px; }
.tl-dot.down .tl-label { top: 40px; }

.tl-label .m {
  display: block;
  font-family: var(--serif-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.tl-label .t {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.tl-label .y {
  display: block;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--muted);
}
.tl-dot:hover .tl-label .m { color: var(--accent-dk); }

/* stem connecting dot to label */
.tl-dot::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  background: var(--rule);
}
.tl-dot.up::after { bottom: 11px; height: 13px; }
.tl-dot.down::after { top: 11px; height: 27px; }

.tl-note {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  font-size: 0.92rem;
  margin-top: 6px;
}

/* ---------- Machine grid ---------- */

.machine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 44px 30px;
}

.machine-card {
  display: block;
  border: none;
  color: inherit;
  position: relative;
}
.machine-card:hover { color: inherit; border: none; }

.machine-card .photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.machine-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.32) saturate(0.75) contrast(1.03);
  transition: filter 600ms ease, transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}
.machine-card:hover .photo img {
  filter: sepia(0) saturate(1) contrast(1);
  transform: scale(1.045);
}
.machine-card .photo::after {           /* inner hairline, sits above photo */
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(26, 26, 26, 0.12);
  pointer-events: none;
}

.no-plate {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--iron);
  color: var(--on-iron);
  font-family: var(--serif-text);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  padding: 4px 9px 3px;
  box-shadow: inset 0 0 0 1px var(--iron-edge), 0 1px 3px rgba(0,0,0,0.35);
}

.status-chip {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(244, 239, 230, 0.92);
  border: 1px solid var(--accent);
  color: var(--accent-dk);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 600;
  padding: 4px 8px 3px;
}

.machine-card .label { margin-top: 15px; text-align: center; }

.machine-card .name {
  font-family: var(--serif-display);
  font-size: 1.45rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.2;
}
.machine-card:hover .name { color: var(--accent-dk); }

.machine-card .meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* ---------- Buildings teaser / two-up plates ---------- */

.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.building-card { border: none; color: inherit; display: block; }
.building-card:hover { border: none; color: inherit; }
.building-card .plate { margin: 0; }
.building-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}
.building-card:hover img { transform: scale(1.03); }
.building-card h3 {
  margin-top: 18px;
  text-align: center;
  font-size: 1.6rem;
  font-style: italic;
}
.building-card:hover h3 { color: var(--accent-dk); }
.building-card p {
  margin: 6px auto 0;
  max-width: 44ch;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.center-cta {
  text-align: center;
  margin-top: 40px;
}
.btn-quiet {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent-dk);
  padding: 11px 26px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 600;
  transition: background 150ms ease, color 150ms ease;
}
.btn-quiet:hover {
  background: var(--accent);
  color: var(--bg);
  border-bottom-color: var(--accent);
}

/* ---------- Machine detail pages ---------- */

.breadcrumb {
  padding: 22px 0 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); border: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 8px; color: var(--rule); }

.machine-hero {
  position: relative;
  padding: 36px 0 8px;
}

.machine-hero .ghost-no {
  position: absolute;
  top: -30px;
  right: -10px;
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: clamp(9rem, 20vw, 17rem);
  line-height: 1;
  color: rgba(26, 26, 26, 0.05);
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

.machine-title { position: relative; z-index: 1; margin-bottom: 34px; }
.machine-title h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.4rem);
  font-style: italic;
  line-height: 1.08;
}
.machine-title .sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1.02rem;
  font-style: italic;
}

.machine-cols {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 4fr);
  gap: 44px;
  align-items: start;
}

.machine-photo { border: 1px solid var(--rule); background: var(--bg-soft); }
.machine-photo img { width: 100%; }
.machine-photo figcaption {
  padding: 10px 14px;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--muted);
  border-top: 1px solid var(--rule);
}

/* cast-iron nameplate */
.nameplate {
  background:
    radial-gradient(circle 4px at 16px 16px, var(--iron-edge) 0 3px, transparent 4px),
    radial-gradient(circle 4px at calc(100% - 16px) 16px, var(--iron-edge) 0 3px, transparent 4px),
    radial-gradient(circle 4px at 16px calc(100% - 16px), var(--iron-edge) 0 3px, transparent 4px),
    radial-gradient(circle 4px at calc(100% - 16px) calc(100% - 16px), var(--iron-edge) 0 3px, transparent 4px),
    linear-gradient(160deg, #2c2924 0%, var(--iron) 55%, #201d19 100%);
  color: var(--on-iron);
  border: 1px solid #171512;
  box-shadow:
    inset 0 0 0 1px var(--iron-edge),
    inset 0 0 60px rgba(0, 0, 0, 0.45),
    0 10px 30px -18px rgba(26, 22, 12, 0.8);
  padding: 30px 30px 26px;
}

.nameplate .np-maker {
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--on-iron);
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--iron-edge);
}
.nameplate .np-maker .place {
  display: block;
  margin-top: 5px;
  font-size: 0.64rem;
  letter-spacing: 0.3em;
  color: #a89f8b;
}

.nameplate dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 18px;
}
.nameplate dt {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #a89f8b;
  padding: 9px 0 8px;
  border-bottom: 1px solid rgba(74, 69, 60, 0.55);
}
.nameplate dd {
  margin: 0;
  font-family: var(--serif-display);
  font-size: 1.12rem;
  font-weight: 500;
  padding: 6px 0 7px;
  border-bottom: 1px solid rgba(74, 69, 60, 0.55);
  text-align: right;
}
.nameplate dt:last-of-type, .nameplate dd:last-of-type { border-bottom: none; }

.nameplate .np-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--iron-edge);
  font-size: 0.9rem;
  font-style: italic;
  color: #cfc6b2;
  text-align: center;
  line-height: 1.5;
}

/* prose */
.machine-prose {
  max-width: 720px;
  margin: 0 auto;
}
.machine-prose h2 {
  font-size: 1.7rem;
  font-style: italic;
  margin: 44px 0 14px;
}
.machine-prose p { margin: 0 0 18px; }

/* gallery + empty state */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--rule);
}

.gallery-empty {
  border: 1px dashed var(--rule);
  padding: 48px 28px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
  background: linear-gradient(180deg, rgba(236, 229, 214, 0.4), transparent);
}
.gallery-empty .orn { font-size: 1.3rem; color: var(--accent); margin-bottom: 10px; }

/* prev / next */
.pager {
  margin-top: 72px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0 0;
}
.pager a { border: none; max-width: 46%; }
.pager .dir {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 4px;
}
.pager .dest {
  font-family: var(--serif-display);
  font-size: 1.3rem;
  color: var(--ink);
  line-height: 1.2;
}
.pager a:hover .dest { color: var(--accent-dk); }
.pager .next { text-align: right; margin-left: auto; }

/* ---------- Buildings page ---------- */

.building-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0;
}
.building-row + .building-row { border-top: 1px solid var(--rule); }
.building-row .plate { margin: 0; }
.building-row h2 {
  font-size: 2.1rem;
  font-style: italic;
  margin-bottom: 14px;
}
.building-row p { margin: 0 0 14px; }
.building-row .kicker { margin-bottom: 10px; }

/* ---------- About page ---------- */

.about-hero { padding: 64px 0 12px; text-align: center; }
.about-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-style: italic;
}

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 640px;
  margin: 0 auto;
}
.principles li {
  padding: 16px 0 16px 34px;
  position: relative;
  border-bottom: 1px solid var(--rule);
}
.principles li:last-child { border-bottom: none; }
.principles li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 26px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: rotate(45deg);
}
.principles strong {
  font-family: var(--serif-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- 404 ---------- */

.lost {
  text-align: center;
  padding: 96px 0;
}
.lost .big {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: clamp(6rem, 18vw, 11rem);
  line-height: 1;
  color: rgba(26, 26, 26, 0.08);
}
.lost h1 { font-style: italic; font-size: 2.2rem; margin: -30px 0 14px; }
.lost p { color: var(--muted); max-width: 46ch; margin: 0 auto 28px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 88px;
  padding: 44px 0 60px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer .mark {
  width: 30px;
  height: 30px;
  margin: 0 auto 16px;
  display: block;
}

.site-footer .foot-nav {
  margin: 12px 0 0;
  display: flex;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
}
.site-footer .foot-nav a {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border: none;
}
.site-footer .foot-nav a:hover { color: var(--accent); }

/* ---------- "From the Catalog" sections ---------- */

.catalog-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(280px, 6fr);
  gap: 48px;
  align-items: center;
}
.catalog-row .plate { margin: 0; }

.period-quote {
  margin: 0 0 24px;
  padding-left: 22px;
  border-left: 2px solid var(--accent);
  font-family: var(--serif-display);
  font-size: 1.22rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
}
.period-quote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--serif-text);
  font-style: normal;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.catalog-specs {
  margin: 0 0 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 18px;
  max-width: 440px;
}
.catalog-specs dt {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  font-weight: 600;
  padding: 8px 0 7px;
  border-bottom: 1px solid var(--rule);
  align-self: center;
}
.catalog-specs dd {
  margin: 0;
  text-align: right;
  font-family: var(--serif-display);
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--ink);
  padding: 6px 0 7px;
  border-bottom: 1px solid var(--rule);
}
.catalog-specs dt:last-of-type,
.catalog-specs dd:last-of-type { border-bottom: none; }

.catalog-note { font-size: 0.95rem; margin: 0 0 14px; }

.credit-line {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 900px) {
  .catalog-row { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- Paper archive ---------- */

.credit-plate {
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule);
  outline-offset: 5px;
  background: var(--bg-soft);
  padding: 26px 30px;
  max-width: 760px;
  margin: 0 auto 26px;
  text-align: center;
  font-size: 0.98rem;
}
.credit-plate .orn { color: var(--accent); font-size: 1.2rem; margin-bottom: 8px; }

.pub-group { margin-bottom: 26px; }

.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list li {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 6px 20px;
  align-items: baseline;
  padding: 14px 4px;
  border-bottom: 1px solid var(--rule);
}
.pub-list li:last-child { border-bottom: none; }

.pub-year {
  font-family: var(--serif-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-dk);
}
.pub-title {
  font-family: var(--serif-display);
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}
.pub-meta {
  display: block;
  margin-top: 2px;
  font-family: var(--serif-text);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
}
.pub-links {
  white-space: nowrap;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 600;
}
.pub-links a { border: none; }
.pub-links a + a { margin-left: 16px; color: var(--muted); }
.pub-links a + a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .pub-list li { grid-template-columns: 52px 1fr; }
  .pub-links { grid-column: 2; white-space: normal; }
}

/* ---------- Collection "at a glance" unit charts ---------- */

.viz-figure { margin: 28px 0 0; }
.viz-figure > figcaption {
  margin-top: 14px;
  font-size: 0.84rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.55;
}

.viz-heading {
  font-family: var(--serif-display);
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}
.viz-sub {
  margin: 3px 0 20px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  font-weight: 600;
}

/* the medallion — one machine (the data mark) */
.med {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: -0.02em;
  line-height: 1;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1),
              background 160ms ease, box-shadow 160ms ease;
}
.med:hover, .med:focus-visible {
  background: var(--accent-dk);
  border-color: var(--accent-dk);
  color: var(--bg);
  transform: translateY(-3px);
  box-shadow: 0 7px 16px -8px rgba(26, 22, 12, 0.6);
  z-index: 3;
  border-bottom-color: var(--accent-dk);
}
.med.pending {                 /* awaiting restoration = hollow */
  background: var(--bg);
  color: var(--accent-dk);
}
.med.pending:hover, .med.pending:focus-visible {
  background: var(--bg-soft);
  color: var(--accent-dk);
  border-color: var(--accent-dk);
}

/* decade columns (unit chart, grows from a shared baseline) */
.viz-scroll { overflow-x: auto; }
.unit-cols {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  align-items: end;
  min-height: 156px;
  border-bottom: 1px solid var(--rule);
}
.unit-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-bottom: 8px;
}
.cap-count {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
}
.unit-axis {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  margin-top: 8px;
}
.unit-axis span {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.viz-scroll > .unit-cols, .viz-scroll > .unit-axis { min-width: 480px; }

/* series rows */
.unit-rows { display: flex; flex-direction: column; }
.unit-row {
  display: grid;
  grid-template-columns: 148px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}
.unit-row:last-child { border-bottom: none; }
.row-label {
  font-family: var(--serif-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}
.row-sub {
  display: block;
  font-family: var(--serif-text);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
}
.row-track { display: flex; gap: 8px; flex-wrap: wrap; }
.row-count {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* legend */
.viz-legend {
  display: flex;
  gap: 26px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.viz-legend .lg {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.84rem;
  color: var(--body);
}
.viz-legend .med-key {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  flex: none;
}
.viz-legend .med-key.pending { background: var(--bg); }

/* table-view twin */
.viz-table-toggle { margin-top: 22px; }
.viz-table-toggle summary {
  cursor: pointer;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-dk);
  font-weight: 600;
}
.viz-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.9rem;
}
.viz-table th, .viz-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
}
.viz-table th {
  font-family: var(--serif-text);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
}
.viz-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* medallion tooltip — cast-iron nameplate */
.viz-tip {
  position: absolute;
  z-index: 200;
  pointer-events: none;
  max-width: 250px;
  background:
    linear-gradient(160deg, #2c2924 0%, var(--iron) 55%, #201d19 100%);
  color: var(--on-iron);
  border: 1px solid #171512;
  box-shadow: inset 0 0 0 1px var(--iron-edge), 0 12px 30px -14px rgba(26, 22, 12, 0.85);
  padding: 11px 14px;
  font-family: var(--serif-text);
}
.viz-tip[hidden] { display: none; }
.viz-tip .vt-no {
  display: block;
  font-family: var(--serif-display);
  font-size: 1.18rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.05;
}
.viz-tip .vt-meta { display: block; margin-top: 3px; font-size: 0.82rem; color: var(--on-iron); }
.viz-tip .vt-status {
  display: block;
  margin-top: 6px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #a89f8b;
}

@media (max-width: 640px) {
  .unit-row { grid-template-columns: 92px 1fr auto; gap: 10px; }
  .row-label { font-size: 0.92rem; }
}

/* ---------- "Through the Catalogs" filmstrip ---------- */

.filmstrip {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding: 6px 4px 18px;
  align-items: flex-start;
}
.frame {
  flex: 0 0 auto;
  width: 200px;
  border: none;
  color: inherit;
  text-align: center;
}
.frame .plate { margin: 0; }
.frame .plate img {
  width: 100%;
  height: 230px;
  object-fit: contain;
}
.frame:hover .plate {
  border-color: var(--accent);
  outline-color: var(--accent);
}
.frame .f-year {
  display: block;
  margin-top: 12px;
  font-family: var(--serif-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent-dk);
  line-height: 1;
}
.frame .f-cap {
  display: block;
  margin-top: 5px;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.5;
}
.frame:hover .f-cap { color: var(--accent-dk); }

/* ---------- Reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal.d1 { transition-delay: 90ms; }
.reveal.d2 { transition-delay: 180ms; }
.reveal.d3 { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .machine-card .photo img,
  .building-card img { transition: none; }
  .med { transition: background 120ms ease; }
  .med:hover, .med:focus-visible { transform: none; box-shadow: none; }
}

/* ---------- Print ---------- */

@media print {
  .site-header, .site-footer, .pager, .center-cta { display: none; }
  body::before { display: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .machine-cols { grid-template-columns: 1fr; }
  .two-up { grid-template-columns: 1fr; }
  .building-row { grid-template-columns: 1fr; gap: 28px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 28px 0; }
  .stat:nth-child(3) { border-left: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container, .container-narrow { padding: 0 20px; }
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .site-nav { gap: 22px; }
  .hero { padding: 48px 0 16px; }
  .section-rule h2 { font-size: 1.65rem; }
  section { padding: 44px 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat + .stat { border-left: none; }
  .machine-grid { gap: 36px 20px; }
  .pager .dest { font-size: 1.05rem; }
  .machine-hero .ghost-no { display: none; }
}
