/* Scrapbook v2. Platform-owned palette; tenant color is an optional wordmark
   accent. Content surfaces and semantic states do not derive from the tenant.
   These values are exploratory, not an adopted production theme. */
:root {
  --platform-paper: #f4f1e9;
  --platform-surface: #fffcf6;
  --platform-ink: #292d29;
  --platform-muted: #62655e;
  --platform-action: #3e534b;
  --platform-action-hover: #2d4038;
  --platform-soft: #e9ede5;
  --platform-rule: #d9d8cd;
  --platform-memory: #eee4d6;
  --platform-voice: #e2e9e9;
  --platform-milestone: #e8ebdd;
  --tenant-accent: #4f3a63;
  --color-primary: var(--platform-action);
  --color-primary-text: var(--platform-action);
  --color-primary-hover: var(--platform-action-hover);
  --color-primary-soft: var(--platform-soft);
  --color-highlight: #c6a16a;
  --color-ink: var(--platform-ink);
  --color-ink-muted: var(--platform-muted);
  --color-canvas: var(--platform-paper);
  --color-card: var(--platform-surface);
  --color-rule: var(--platform-rule);
}
body { letter-spacing: -.012em; }
h1 { font-size: clamp(32px, 3.5vw, 42px); font-weight: 500; letter-spacing: -.045em; }
h2,h3 { font-weight: 500; letter-spacing: -.035em; }
.wordmark { color: var(--tenant-accent); }
.wordmark strong { letter-spacing: -.035em; font-weight: 600; }
.site-header { background: var(--platform-surface); min-height: 94px; }
.prototype-strip { background: #e9e8e0; color: var(--platform-muted); }
.prototype-strip a { color: var(--platform-ink); }
.primary-nav a[aria-current=page] { background: #e9ede5; }
.mini-avatar { border-color: #c7cec3; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .12em; }
.welcome { margin-bottom: 28px; }
.welcome p:last-child { max-width: 58ch; font-size: 15px; }
.years-link { border-color: var(--platform-rule); }
.tag { color: var(--platform-action); background: var(--platform-soft); }
.button { font-weight: 500; }
.button.secondary { border-color: #aeb9ab; }
.text-link { font-weight: 500; }
.filter-bar .chip { border-color: #cbcdbf; }
.avatar { background: #e7e1d3; color: #635d4c; }
.people-feature { background: var(--platform-surface); }
.people-feature h2 { font-size: 27px; }
.person-name { font-weight: 500; }
.invite-note { background: #e9ece2; border-color: #d2d8c9; }
.invite-note h2 { font-size: 23px; }
.prototype-note { background: #edf0e9; }
.close-dialog { color: var(--platform-action); }
.search-input, textarea { border-color: #b7bcad; }

/* A stable Home frame with one meaningful lead and a dependable people route. */
.home-stage { display: grid; grid-template-columns: minmax(0,1.62fr) minmax(270px,1fr); gap: 28px; align-items: start; margin-bottom: 42px; }
.home-stage.first-visit { grid-template-columns: minmax(270px,1fr) minmax(0,1.62fr); }
.home-side { display: grid; gap: 24px; }
.compact-people { padding: 24px 24px 15px; background: #faf8f1; box-shadow: none; }
.compact-people h2 { font-size: 23px; max-width: none; }
.compact-people .people-preview { margin-top: 14px; }
.compact-people .person-row { padding: 15px 0; }
.small-letter { padding: 22px 8px 10px; border-top: 1px solid var(--platform-rule); }
.small-letter h3 { font-size: 23px; line-height: 1.3; margin: 12px 0 8px; max-width: 22ch; }
.small-letter p:not(.eyebrow) { font-size: 13px; color: var(--platform-muted); }
.small-letter .text-link { font-size: 13px; }
.home-story { background: var(--platform-surface); border: 1px solid var(--platform-rule); border-radius: 12px; padding: 10px; box-shadow: 0 3px 8px #3d423008; }
.home-story-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 12px 20px; }
.fresh-note { font-size: 12px; color: var(--platform-action); white-space: nowrap; }
.home-story-image { width: 100%; height: auto; max-height: 470px; object-fit: contain; background: #ebe7de; border-radius: 5px; }
.home-story-copy { padding: 23px 18px 15px; }
.home-story-copy h2 { font-size: 30px; max-width: 30ch; margin-bottom: 12px; }
.home-story-copy h2 a { text-decoration: none; }
.home-story-copy h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.home-story-copy>p:not(.tile-meta) { font-size: 15px; color: var(--platform-muted); max-width: 58ch; }
.home-story-copy blockquote { font: 400 30px/1.5 'Source Serif 4',Georgia,serif; margin: 24px 0; max-width: 34ch; }
.home-story-text { background: var(--platform-memory); padding: 22px; }
.home-story-text .home-story-copy { padding-top: 10px; }
.story-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 15px; margin-top: 16px; }
.quiet-button { min-height: 44px; color: var(--platform-action); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; padding: 7px 0; }
.gathering-lead { background: #e6ebdf; padding: 32px; border-radius: 12px; border: 1px solid #ced7c6; }
.gathering-date { display: flex; align-items: center; gap: 20px; margin: 15px 0 24px; }
.gathering-date>strong { font: 500 100px/1 'Source Serif 4',Georgia,serif; color: var(--platform-action); letter-spacing: -.06em; }
.gathering-date>span { font-size: 16px; line-height: 1.7; }
.gathering-date .tag { font-size: 12px; margin-left: auto; border: 1px solid #bcc8b7; background: none; }
.gathering-lead h2 { font-size: 33px; max-width: 20ch; margin-bottom: 18px; }
.gathering-lead>p:not(.eyebrow) { max-width: 52ch; font-size: 16px; }
.gathering-facts { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--platform-muted); padding: 22px 0; margin: 22px 0; border-top: 1px solid #c6cdbf; border-bottom: 1px solid #c6cdbf; }

/* Content proportions drive the mosaic. Sparse row placement preserves DOM
   reading order: there is no dense backfilling or visual-only reordering. */
.archive-heading { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.archive-heading h1 { font-size: clamp(35px,4vw,48px); }
.archive-heading .page-heading { margin-bottom: 28px; }
.archive-heading .page-heading>p:last-child { font-size: 16px; line-height: 1.7; }
.archive-stamp { font: 500 22px/1.35 'Source Serif 4',Georgia,serif; color: #757a66; border: 1px solid #c6c9b6; padding: 17px 22px; transform: rotate(3deg); border-radius: 50%; text-align: center; margin-right: 12px; }
.archive-stamp em { font-weight: 400; }
.archive-search-row { display: grid; grid-template-columns: minmax(0,1fr) 240px; gap: 22px; max-width: 870px; }
.archive-search-row .search-input { max-width: none; background: #fbfaf6; }
.search-label { font-weight: 500; font-size: 13px; }
.archive-select { background: #fbfaf6; border: 1px solid #b7bcad; border-radius: 6px; padding: 12px; width: 100%; min-height: 49px; color: var(--platform-ink); font: inherit; font-size: 15px; }
.archive-select:focus-visible { outline: 3px solid var(--platform-action); outline-offset: 3px; }
.filter-bar { margin: 22px 0 5px; gap: 8px; }
.filter-bar .chip { border-radius: 5px; font-size: 13px; min-height: 44px; }
.archive-count { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 10px 0 20px; border-bottom: 1px solid var(--platform-rule); padding-bottom: 12px; }
.archive-count .muted { font: italic 15px/1.4 'Source Serif 4',Georgia,serif; }
.archive-count .result-count { margin: 0; font-size: 13px; }
.archive-grid.mosaic { grid-template-columns: repeat(3,minmax(0,1fr)); grid-auto-rows: 8px; grid-auto-flow: row; align-items: start; gap: 22px; }
.mosaic .piece-wide { grid-column: span 2; }
.archive-tile { border-color: var(--platform-rule); background: var(--platform-surface); box-shadow: 0 2px 5px #37382806; border-radius: 9px; }
.archive-tile>a { height: auto; }
.archive-tile img { height: auto; width: 100%; object-fit: contain; }
.archive-tile .tile-copy { padding: 21px; }
.archive-tile .tile-meta { display: flex; gap: 14px; justify-content: space-between; width: 100%; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--platform-muted); margin-bottom: 12px; }
.archive-tile h3 { font-size: 22px; line-height: 1.3; font-weight: 500; }
.archive-tile .credit { font-size: 12px; line-height: 1.6; }
.archive-tile .tile-action { font-size: 12px; font-weight: 500; padding-top: 15px; }
.piece-photograph { padding: 8px 8px 0; }
.piece-photograph img { border-radius: 3px; }
.piece-photograph .tile-copy { padding: 17px 12px 20px; }
.piece-memory { background: var(--platform-memory); border-color: #e0d6c7; }
.piece-memory .tile-copy { padding: 27px; }
.piece-memory h3 { font: 600 12px/1.4 var(--font-body); letter-spacing: .035em; }
.piece-memory blockquote { font: 400 26px/1.45 'Source Serif 4',Georgia,serif; letter-spacing: -.018em; margin: 20px 0 8px; }
.piece-transcript { background: var(--platform-voice); border-color: #d0dcda; }
.piece-transcript .tile-copy { padding: 26px; }
.piece-transcript blockquote { font-size: 18px; line-height: 1.65; margin-top: 17px; }
.voice-lines { display: block; margin: 7px 0 23px; color: #778c86; line-height: 1; font-size: 18px; letter-spacing: .02em; }
.piece-document { background: #efe9dc; padding: 14px 14px 0; border-color: #d8d1c1; }
.piece-document img { box-shadow: 0 2px 6px #4a402520; }
.piece-document .tile-copy { padding: 20px 8px; }
.piece-milestone { background: var(--platform-milestone); border-color: #d8ddca; }
.piece-milestone .tile-copy { padding: 24px; }
.milestone-year { font: 400 57px/1.15 'Source Serif 4',Georgia,serif; letter-spacing: -.06em; color: #687354; padding: 5px 0 17px; }
.milestone-body { font-size: 14px; margin-top: 15px; line-height: 1.65; color: var(--platform-muted); }
.archive-end { text-align: center; padding: 35px 0 12px; color: var(--platform-muted); font-size: 14px; }
.archive-end .button { min-width: 250px; }
.home-archive { align-items: start; }
.home-archive .archive-tile { height: auto; }
.home-archive .piece-photograph img { max-height: 260px; }
.home-archive .piece-memory blockquote { font-size: 24px; }

/* A quieter reading room: image and its context, followed by explicit browsing. */
dialog[data-kind=item] { max-width: 1090px; width: calc(100% - 40px); }
dialog[data-kind=item] #detail-body { padding: 0; }
.item-viewer { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(270px,1fr); }
.item-media { background: #e9e5db; padding: 26px; display: flex; align-items: center; justify-content: center; min-width: 0; }
.item-media .detail-photo { margin: 0; max-height: 65dvh; width: 100%; height: auto; object-fit: contain; background: none; box-shadow: 0 4px 18px #302c2415; }
.item-context { padding: 36px 30px; }
.item-context #dialog-title { font-size: 29px; line-height: 1.23; margin: 14px 0 15px; }
.item-context>p:not(.eyebrow):not(.detail-credit):not(.item-footnote) { color: var(--platform-muted); font-size: 15px; line-height: 1.8; }
.item-provenance { border-top: 1px solid var(--platform-rule); margin-top: 25px; padding-top: 20px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.item-provenance span { color: var(--platform-muted); }
.item-provenance strong { font-weight: 500; }
.item-context .detail-actions { flex-direction: column; align-items: start; gap: 9px; }
.item-footnote { font-size: 12px; line-height: 1.7; color: var(--platform-muted); margin-top: 25px; }
.text-media { flex-direction: column; align-items: start; padding: 40px; background: var(--platform-memory); }
.text-media.transcript { background: var(--platform-voice); }
.text-media.milestone { background: var(--platform-milestone); }
.text-media .detail-quote { font: 400 31px/1.5 'Source Serif 4',Georgia,serif; margin: 28px 0; }
.text-media>p { font-size: 13px; color: var(--platform-muted); }
.detail-year { font: 400 90px/1 'Source Serif 4',Georgia,serif; color: #687354; margin-top: 30px; }
.item-pagination { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--platform-rule); padding: 12px 24px; font-size: 13px; }
.item-pagination a { min-height: 44px; display: flex; align-items: center; text-decoration: none; color: var(--platform-action); }
.item-pagination a:hover { text-decoration: underline; }
.item-pagination>span { color: var(--platform-muted); }

@media(max-width:900px) {
  .home-stage,.home-stage.first-visit { grid-template-columns: minmax(0,1.35fr) minmax(245px,1fr); gap: 22px; }
  .home-story-head { flex-wrap: wrap; padding-bottom: 15px; }
  .home-story-copy h2 { font-size: 26px; }
  .compact-people { padding: 22px 19px 15px; }
  .compact-people h2 { font-size: 22px; }
  .archive-grid.mosaic { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .item-viewer { grid-template-columns: minmax(0,1fr) minmax(260px,1fr); }
  .item-media { padding: 20px; }
  .item-context { padding: 26px 24px; }
}
@media(max-width:760px) {
  .site-header { min-height: unset; }
  #main { padding-top: 26px; }
  .welcome h1 { font-size: 32px; }
  .welcome .eyebrow { font-size: 10px; }
  .home-stage,.home-stage.first-visit { grid-template-columns: 1fr; gap: 24px; }
  .home-story-head { padding: 12px 7px 17px; }
  .home-story-head .eyebrow { font-size: 10px; }
  .home-story-head .tag,.fresh-note { font-size: 11px; }
  .home-story-copy { padding: 20px 12px 12px; }
  .home-story-copy h2 { font-size: 26px; }
  .home-side { gap: 20px; }
  .home-story-text { padding: 17px; }
  .home-story-copy blockquote { font-size: 27px; }
  .small-letter { padding: 20px 4px 0; }
  .gathering-lead { padding: 25px; }
  .gathering-date { gap: 16px; flex-wrap: wrap; }
  .gathering-date>strong { font-size: 82px; }
  .gathering-date .tag { margin-left: 0; }
  .gathering-lead h2 { font-size: 29px; }
  .archive-heading h1 { font-size: 35px; }
  .archive-heading .page-heading>p:last-child { font-size: 15px; }
  .archive-stamp { display: none; }
  .archive-search-row { grid-template-columns: minmax(0,1fr) 190px; gap: 15px; }
  .archive-count .muted { display: none; }
  .archive-grid.mosaic { gap: 17px; }
  .piece-memory .tile-copy,.piece-transcript .tile-copy { padding: 22px; }
  .piece-memory blockquote { font-size: 24px; }
  .archive-tile h3 { font-size: 21px; }
  .item-viewer { grid-template-columns: 1fr; }
  .item-context { padding: 27px 24px; }
  .item-context #dialog-title { font-size: 28px; }
  .item-media { padding: 22px; }
  .item-media .detail-photo { max-height: 55dvh; }
  .text-media { padding: 29px; }
  .text-media .detail-quote { font-size: 28px; }
  dialog[data-kind=item] { width: calc(100% - 16px); }
  .item-pagination { padding: 10px 17px; font-size: 12px; }
}
@media(max-width:540px) {
  .archive-grid.mosaic { grid-template-columns: minmax(0,1fr); }
  .mosaic .piece-wide { grid-column: auto; }
  .archive-search-row { grid-template-columns: 1fr; gap: 14px; }
  .archive-search-row>div:last-child { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px; }
  .archive-search-row>div:last-child label { margin: 0; }
  .archive-select { min-height: 44px; padding: 10px 12px; font-size: 14px; }
  .filter-bar { gap: 6px; }
  .filter-bar .chip { padding: 8px 10px; font-size: 12px; }
  .archive-tile .tile-copy { padding: 23px; }
  .piece-photograph .tile-copy { padding: 17px 13px 20px; }
  .piece-memory blockquote { font-size: 27px; }
}

input::placeholder,textarea::placeholder { color: var(--platform-muted); opacity: 1; }
