/* Home: the match (claim, years between, record), start links, the story wall. Owner: Home + Map agent. */

/* the match: one strip of film across the table */
.match { background: var(--film); margin-top: 8px; padding: 10px 0 12px; box-shadow: 0 18px 40px #0008; }
.match-rail { display: flex; justify-content: space-between; gap: 12px; padding: 0 2px 8px; }
.match-rail:last-child { padding: 8px 2px 0; }
.match-cells { display: grid; grid-template-columns: 1fr .85fr 1fr; gap: 6px; height: 290px; }
.match-claim, .match-rec { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 26px; overflow: hidden; text-decoration: none; }
.match-claim { color: #f3f1ea; background: #0d0e0d; justify-content: center; }
/* no artwork: the claim sentence is the picture */
.match-claim p { font-size: clamp(30px, 3.3vw, 48px); line-height: 1.04; letter-spacing: -.01em; text-wrap: balance; }
.match-rec p { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.18; }
.match-rec img { position: absolute; right: 22px; top: 18px; width: 92px; height: auto; border: 1px solid #bbb; transform: rotate(2deg); box-shadow: 0 4px 12px #0003; }
.match-rec .edge { order: -1; margin-top: auto; }
.match-claim:hover p, .match-rec:hover p { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.match-gap { position: relative; display: grid; place-items: center; }
.match-years { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; }
.match-years i { background: #101010; position: relative; }
.match-years i::after { content: attr(data-y); position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 9px; color: #6a6a62; font-stretch: 62%; }
.match-arc { position: absolute; left: -3%; width: 106%; top: 12%; height: 42%; overflow: visible; fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 0; animation: match-draw 1.1s .3s cubic-bezier(.6, 0, .3, 1) backwards; }
.match-arc path { vector-effect: non-scaling-stroke; }
@keyframes match-draw { from { stroke-dashoffset: 1; } }
.match-fit { position: relative; text-align: center; margin-top: 46px; }
.match-fit .cond { display: block; font-size: clamp(40px, 4.4vw, 56px); color: #fff; }
.match-fit .edge { display: block; margin-top: 4px; color: var(--ink); }
.match-fit span { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; color: #0b0b0a; background: var(--ok); padding: 3px 10px; }
.match-fit.is-part span { background: var(--part); }
.match-gap:has(.is-part) .match-arc { stroke: var(--part); }
.match-under { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding-top: 16px; font-size: 14px; color: var(--dim); }
.match-under a { color: var(--ink); font-weight: 600; }

/* start links: four short film frames */
.home-doors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding-top: 34px; }
.home-doors .neg-pic { aspect-ratio: 3 / 1; }
.home-doors .neg-pic .cond { font-size: clamp(22px, 13cqi, 46px); }
.home-doors .neg-foot { display: none; }
.home-doors .neg:hover .neg-pic .cond { color: var(--edge); }
.home-rest .page-h { padding-top: 36px; padding-bottom: 16px; }
.home-rest .page-h h1 { font-size: clamp(38px, 5.2vw, 64px); }
.home-wall { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }

/* the static first paint shows only on the home route */
.not-home #app > .match, .not-home #app > .match-under, .not-home #app > .home-rest { display: none; }

@media (max-width: 720px) {
  .match { padding: 8px 0 10px; margin-top: 0; }
  .match .wrap { padding: 0 12px; }
  .match-cells { grid-template-columns: 1fr; height: auto; }
  .match-claim, .match-rec { min-height: 150px; padding: 16px; }
  .match-claim p { font-size: 28px; }
  .match-rec { padding-right: 96px; }
  .match-rec p { font-size: 18px; }
  .match-rec img { width: 66px; right: 14px; top: 14px; }
  .match-gap { height: 46px; }
  .match-years i::after, .match-arc { display: none; }
  .match-fit { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px; align-items: center; }
  .match-gap { height: auto; min-height: 46px; padding: 6px 0; }
  .match-fit .edge { margin: 0; }
  .match-fit .cond { font-size: 26px; }
  .match-fit span { margin: 0; }
  .match-under { padding-top: 12px; }
  .home-doors { padding-top: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 6px; }
  .home-doors .neg-pic { aspect-ratio: 2 / 1; }
  .home-rest .page-h { padding-top: 22px; padding-bottom: 10px; }
  .home-rest .page-h .legend { display: none; }
  .home-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }

}
/* paper frames leave the title less than half the picture; keep long words whole */
.home-wall .neg-paper .neg-pic .cond { font-size: clamp(14px, 8.5cqi, 40px); overflow-wrap: normal; hyphens: manual; }
/* the marks under the strip arrive with the data; their room is held from the first paint */
.match-marks { display: inline-flex; min-width: calc(var(--n) * 23px - 5px); }
