:root {
  --page: #f1efe9;
  --surface: #fffefa;
  --ink: #252b27;
  --muted: #70746c;
  --rule: #dcded4;
  --accent: #a84730;
  --accent-soft: #efe3da;
  --site-width: 780px;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button svg, a svg { flex-shrink: 0; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 650; letter-spacing: -.8px; line-height: 1.2; }
::selection { background: #e8ccbd; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.site-width { width: min(var(--site-width), calc(100% - 40px)); margin-inline: auto; }
.site-main { margin-top: 32px; }
/* All views share the layout's container; individual pages never set their own width. */
.shell, .single-exchange, .single-empty { width: 100%; margin: 0; padding: 0; }
.rust { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -70px; z-index: 10; padding: 12px; background: var(--surface); color: var(--ink); }
.skip-link:focus { top: 12px; }

/* A compact masthead gives every page the same identity and alignment. */
.masthead { background: #222824; color: #fffdf5; border-top: 3px solid #b9583c; border-bottom: 1px solid #151c16; }
.masthead-inner { min-height: 98px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.masthead-brand { flex-shrink: 0; }
.wordmark { display: block; width: fit-content; white-space: nowrap; font: 700 35px/1.05 var(--serif); letter-spacing: -1.6px; }
.wordmark span { color: #df8b67; }
.masthead-brand p { font-size: 13px; color: #bfc5b9; margin-top: 5px; letter-spacing: .2px; }
.masthead-nav { display: flex; flex-shrink: 0; align-items: center; gap: 25px; font-size: 12px; }
.masthead-nav a { padding: 9px 0; color: #e2e5dc; white-space: nowrap; }
.masthead-nav a:hover, .masthead-nav a[aria-current] { color: #efac86; }
.masthead-nav .nav-submit { display: flex; gap: 15px; align-items: center; border: 1px solid #596252; border-radius: 4px; padding: 9px 13px; }
.nav-submit span { font-size: 17px; line-height: 1; color: #e39b73; }
.masthead-nav .nav-submit:hover { border-color: #aab29f; }
.site-footer { padding: 21px 0 30px; margin-top: 26px; border-top: 1px solid #d4d7cc; color: var(--muted); font-size: 11px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.site-footer p { font-size: 10px; margin-top: 12px; color: #7c8175; }
.site-footer a:hover { color: var(--accent); }

/* The homepage: one exchange, one photo, one next-click interaction. */
.single-exchange { background: var(--surface); border: 1px solid #d6d9cd; border-radius: 6px; overflow: hidden; box-shadow: 0 3px 12px #30392308; }
.exchange-dialogue { padding: 27px 29px 25px; font-size: 22px; line-height: 1.5; letter-spacing: -.25px; overflow-wrap: anywhere; }
.exchange-dialogue p + p { margin-top: 19px; }
.exchange-dialogue .smith-line { border-left: 2px solid #c47959; padding-left: 16px; }
.exchange-dialogue strong { font-weight: 650; }
.exchange-dialogue .smith-line strong { color: var(--accent); }
.message-wording { margin-top: 19px; padding: 13px 16px 15px; background: #edf5ff; border-radius: 10px; }
.message-wording .message-label { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: #0066d6; font: 600 11px/1.4 var(--sans); letter-spacing: .6px; text-transform: uppercase; }
.message-label svg { color: #007aff; flex-shrink: 0; }
.text-board-image { display: block; width: 100%; height: auto; }
.next-exchange-image { display: block; cursor: pointer; line-height: 0; }
.next-exchange-image img { display: block; width: 100%; height: auto; }
.next-exchange-image:focus-visible { outline-offset: -4px; outline-width: 4px; }
.next-hint { display: flex; align-items: center; justify-content: center; gap: 8px; background: #f6f5ef; color: #696f60; font-size: 11px; padding: 11px 16px; border-bottom: 1px solid #e6e7dc; }
.next-hint svg { color: var(--accent); }
.single-credit-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 23px; color: #6f7567; font-size: 11px; }
.single-credit { min-width: 0; overflow-wrap: anywhere; }
.single-excerpt { color: #818776; font-size: 10px; }
.single-sharing { display: flex; align-items: center; flex-shrink: 0; gap: 14px; }
.single-sharing button { display: inline-flex; gap: 6px; align-items: center; background: transparent; color: var(--ink); border: 1px solid #d7dbce; border-radius: 4px; padding: 6px 9px; font-size: 10px; }
.single-sharing button:hover { background: #eeefe6; border-color: #9da58e; }
.single-sharing .edit-exhibit { border: 1px solid #a7b29e; border-radius: 4px; background: #eef1e7; color: #414f37; padding: 6px 10px; font-size: 10px; }
.single-sharing .edit-exhibit:hover { background: #e4e9db; text-decoration: none; }
.single-credit-row a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.single-empty { padding: 35px 0; line-height: 2; }
.single-empty a { color: var(--accent); text-decoration: underline; }

/* Shared text, controls, and forms. */
.eyebrow { display: block; font: 10px/1.6 var(--mono); letter-spacing: 1.2px; color: var(--muted); }
.back-link { display: inline-block; font-size: 12px; color: var(--muted); margin-bottom: 24px; }
.back-link:hover { color: var(--accent); }
.form-page h1, .admin-page h1, .story-page h1 { font-size: 34px; margin: 9px 0 16px; }
.page-intro { font-size: 14px; line-height: 1.75; color: var(--muted); margin-bottom: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 43px; padding: 12px 18px; border: 1px solid transparent; border-radius: 4px; font-size: 12px; font-weight: 550; line-height: 1.4; }
.button-dark { background: var(--ink); color: #fffefa; }
.button-dark:hover { background: #424d3c; }
.button-outline { border-color: #cdd2c3; background: transparent; }
.button-outline:hover { background: #e9ebdf; }
.button-danger { color: #923c2c; background: #fbf0e9; border-color: #d7b6a8; }
.button-danger:hover { background: #f2dfd3; border-color: #b56a52; }
.delete-exhibit { border-top: 1px solid var(--rule); margin-top: 28px; padding-top: 22px; }
.button-small { padding: 9px 12px; min-height: 36px; font-size: 11px; }
.text-button { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 9px 0; color: var(--muted); font-size: 12px; }
.text-button:hover { color: var(--accent); }
.flash { padding: 14px 18px; margin-top: 20px; background: #e7eddc; border: 1px solid #c6cfb7; border-radius: 4px; font-size: 13px; }
.flash.alert, .form-errors { background: #f3e5dc; border: 1px solid #d8b9a6; color: #813e29; }
.form-errors { padding: 15px 19px; margin-bottom: 24px; border-radius: 4px; font-size: 13px; line-height: 1.7; }
.form-errors ul { margin: 7px 0 0; padding-left: 18px; }
.form-tabs { display: flex; gap: 25px; border-bottom: 1px solid #cfd4c5; margin-bottom: 23px; }
.form-tabs a { padding: 10px 1px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 13px; color: var(--muted); }
.form-tabs a.active { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.form-panel, .story-panel { background: var(--surface); border: 1px solid #d6d9cd; border-radius: 6px; padding: 28px; }
.form-panel > .flash { margin-top: 0; margin-bottom: 20px; }
.field { margin-bottom: 23px; }
.field > label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.field input, .field textarea, .field select { width: 100%; padding: 11px 12px; color: var(--ink); background: #fff; border: 1px solid #cdd3c2; border-radius: 4px; font-size: 14px; line-height: 1.6; }
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8f9686; }
.field-note { font-size: 11px; line-height: 1.75; color: var(--muted); margin-top: 8px; }
.form-footnote { margin-top: 17px; }
.checkbox-field { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.7; color: var(--muted); margin-bottom: 22px; }
.checkbox-field input { accent-color: var(--accent); margin-top: 4px; flex-shrink: 0; }
.honeypot { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.thanks-page { text-align: center; padding: 40px 0; }
.thanks-mark { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 25px; background: #e1e7d4; color: #63784b; }
.thanks-page h1 { font-size: 36px; margin: 14px 0 20px; }
.thanks-page p { line-height: 1.8; color: var(--muted); margin-bottom: 24px; }
.prose { color: #59624f; line-height: 1.85; font-size: 15px; }
.prose p { margin-bottom: 21px; }
.prose p:last-child { margin-bottom: 0; }
.prose .lead { font-size: 23px; line-height: 1.45; font-weight: 550; color: var(--ink); }
.prose h2 { color: var(--ink); font-size: 23px; margin: 28px 0 14px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Collection and curator pages use exactly the same outside edges as the home. */
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 23px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading h2 { font-size: 34px; }
.record-count { font: 9px var(--mono); letter-spacing: .5px; color: var(--muted); padding-bottom: 5px; white-space: nowrap; }
.collection-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #cfd4c5; }
.sort-tabs { display: flex; gap: 23px; }
.sort-tabs a { display: block; padding: 13px 0; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 12px; color: var(--muted); }
.sort-tabs a.active { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.sort-tabs a:hover { color: var(--accent); }
.reveal-toggle { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.reveal-toggle input { accent-color: var(--accent); width: 13px; height: 13px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 0; }
.category-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: block; padding: 7px 10px; font-size: 10px; color: #6e7861; border: 1px solid #d2d8c6; border-radius: 4px; }
.chip.selected { color: #34412a; border-color: #aeb99e; background: #e4e9db; }
.chip:hover { border-color: #9aa88a; }
.search-form { display: flex; align-items: center; width: 100%; border: 1px solid #d2d8c6; background: #fbfcf6; border-radius: 4px; }
.search-form input { min-width: 0; width: 100%; border: 0; background: none; padding: 9px 12px; font-size: 12px; color: var(--ink); }
.search-form input:focus { outline: none; }
.search-form:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-form button { background: none; border: 0; padding: 9px 12px; color: var(--muted); }
.search-summary { padding-bottom: 18px; font-size: 12px; color: var(--muted); }
.search-summary a { color: var(--accent); text-decoration: underline; margin-left: 9px; }
.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.entry-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid #d6d9cd; border-radius: 5px; background: var(--surface); padding: 20px 21px 0; }
.entry-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 23px; }
.exhibit-label { font: 9px var(--mono); letter-spacing: .6px; color: #78816b; }
.entry-category { font: 9px var(--mono); color: #78816b; border-left: 1px solid var(--rule); padding-left: 8px; }
.pick-label { color: var(--accent); font: 9px var(--mono); margin-left: auto; }
.speaker { display: flex; align-items: center; gap: 7px; color: #677457; font: 9px var(--mono); letter-spacing: .6px; }
.speaker-initial { display: inline-flex; align-items: center; justify-content: center; width: 21px; height: 21px; background: #eaf0df; border: 1px solid #d5dfc7; border-radius: 50%; font: 8px var(--sans); letter-spacing: 0; }
.jack-initial { color: var(--accent); background: #f3e8df; border-color: #e6ccba; }
.setup { font: 20px/1.45 var(--serif); margin: 12px 0 23px; overflow-wrap: anywhere; }
.reply { margin-bottom: 24px; padding-left: 13px; border-left: 2px solid #cfad94; }
.reply summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; }
.reply summary::-webkit-details-marker { display: none; }
.reply .speaker { color: var(--accent); }
.punchline { font: 21px/1.4 var(--serif); color: var(--accent); margin-top: 10px; overflow-wrap: anywhere; }
.archive-continuation { margin-top: 23px; font: 20px/1.45 var(--serif); overflow-wrap: anywhere; }
.archive-continuation .punchline { margin-top: 16px; }
.reveal-label { color: var(--accent); font-size: 10px; }
.reply[open] .reveal-label { display: none; }
.entry-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #e3e7da; padding: 12px 0; margin-top: auto; }
.entry-credit { font-size: 10px; min-width: 0; }
.entry-credit > a { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; overflow-wrap: anywhere; }
.credit-prefix { color: var(--muted); }
.excerpt-note { display: block; font: 8px var(--mono); color: var(--muted); margin-top: 3px; }
.share-button { display: flex; align-items: center; gap: 5px; border: 0; padding: 7px 0 7px 7px; background: none; font-size: 10px; color: var(--muted); }
.share-button:hover { color: var(--accent); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 25px; color: var(--muted); font-size: 12px; }
.pagination > div { display: flex; gap: 10px; }
.collection-note { display: flex; align-items: center; justify-content: center; gap: 13px; padding-top: 28px; font-size: 11px; color: var(--muted); line-height: 1.8; }
.collection-note p > span { font-size: 10px; }
.asterisk { color: var(--accent); font-size: 25px; }
.empty-state { text-align: center; padding: 40px 15px; color: var(--muted); }
.empty-state h2, .empty-state h3 { color: var(--ink); font-size: 26px; margin: 12px 0; }
.empty-state p { font-size: 13px; margin-bottom: 22px; }
.admin-heading { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.admin-tabs { border-bottom: 1px solid #cfd4c5; }
.admin-row { display: flex; align-items: center; gap: 19px; padding: 20px 4px; border-bottom: 1px solid #d7ddce; }
.admin-row:hover { background: #e8ecdf; }
.admin-row > div { flex: 1; min-width: 0; }
.admin-row strong { font-size: 14px; font-weight: 600; }
.admin-row p { font-size: 11px; margin-top: 6px; color: var(--muted); overflow-wrap: anywhere; }
.admin-row > span:last-child { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }

@media (max-width: 600px) {
  .site-width { width: calc(100% - 32px); }
  .site-main { margin-top: 22px; }
  .masthead-inner { min-height: 86px; gap: 16px; }
  .wordmark { font-size: 30px; }
  .masthead-brand p { font-size: 12px; margin-top: 4px; }
  .masthead-nav { gap: 15px; font-size: 11px; }
  .masthead-nav .nav-submit { gap: 9px; padding: 8px 10px; }
  .exchange-dialogue { padding: 22px 20px; font-size: 19px; line-height: 1.5; }
  .exchange-dialogue p + p { margin-top: 17px; }
  .exchange-dialogue .smith-line { padding-left: 12px; }
  .message-wording { padding: 12px 14px 14px; }
  .single-credit-row { padding: 13px 15px; gap: 10px; font-size: 10px; }
  .single-sharing { gap: 10px; }
  .single-credit-row:has(.edit-exhibit) { flex-wrap: wrap; }
  .single-sharing button { font-size: 9px; padding: 6px 8px; gap: 4px; }
  .single-excerpt { display: block; font-size: 9px; margin-top: 3px; }
  .next-hint { font-size: 10px; padding: 10px; }
  .site-footer { margin-top: 23px; padding-top: 18px; }
  .site-footer nav { gap: 9px 17px; }
  .site-footer p { font-size: 9px; }
  .form-page h1, .admin-page h1, .story-page h1, .section-heading h2 { font-size: 29px; }
  .form-panel, .story-panel { padding: 22px 20px; }
  .field input, .field textarea, .field select { font-size: 16px; }
  .page-intro { font-size: 13px; }
  .two-fields { grid-template-columns: 1fr; gap: 0; }
  .thanks-page h1 { font-size: 30px; }
  .section-heading { gap: 15px; }
  .record-count { font-size: 8px; }
  .sort-tabs { gap: 17px; }
  .sort-tabs a { font-size: 10px; }
  .reveal-toggle { font-size: 10px; gap: 4px; }
  .reveal-toggle input { width: 12px; height: 12px; }
  .category-filters { gap: 6px; }
  .chip { font-size: 10px; padding: 7px 9px; }
  .entry-grid { grid-template-columns: 1fr; gap: 16px; }
  .entry-card { padding: 21px 21px 0; }
  .setup { font-size: 21px; }
  .punchline { font-size: 22px; }
  .entry-credit { font-size: 10px; }
  .collection-note { justify-content: flex-start; gap: 11px; }
  .collection-note p > span { font-size: 9px; }
  .pagination, .pagination .button { font-size: 10px; }
  .pagination .button { padding: 9px 11px; }
  .admin-row { gap: 12px; }
  .admin-row > span:last-child { display: none; }
}
@media (max-width: 360px) {
  .masthead-inner { gap: 10px; }
  .wordmark { font-size: 26px; }
  .masthead-nav { font-size: 10px; gap: 11px; }
  .masthead-nav .nav-submit { padding: 7px; }
  .nav-submit span { display: none; }
  .masthead-brand p { font-size: 11px; }
  .single-sharing { gap: 8px; }
  .single-sharing button svg { display: none; }
  .sort-tabs { gap: 12px; }
  .collection-controls { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
