/* The archive: the index page's own register — dark, at rest, trips stacked like
   tags in a drawer. Deliberately its own world, separate from site.css, which
   dresses the light "document" pages. */

:root {
  --ink: #0F1A17;      /* deep green-black — night water, not pure black */
  --stock: #F3EDE0;    /* tag stock */
  --rule: #2A3A35;
  --muted: #7E8F87;
  --stamp: #6D6252;
  --disp: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--ink);
  color: var(--stock);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--stock); outline-offset: 4px; border-radius: 3px; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

/* ---- masthead ---- */
.masthead {
  display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  padding: clamp(48px, 9vw, 92px) 0 30px;
  border-bottom: 1px solid var(--rule);
}
.masthead h1 {
  font-family: var(--disp);
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 144;
  font-weight: 500;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: .9;
  letter-spacing: -.028em;
}
.stats {
  margin-left: auto; text-align: right;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.stats b { color: var(--stock); font-weight: 700; }

/* ---- the stack ---- */
.tags { list-style: none; display: flex; flex-direction: column; gap: 16px; padding: 30px 0 90px; }

.tag {
  position: relative;
  background: var(--stock); color: #221E17;
  border-radius: 3px;
  display: grid; grid-template-columns: 56px 1fr auto;
  align-items: center; min-height: 132px;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .75);
}
.tag .punch { position: relative; height: 100%; border-right: 1px dashed rgba(34, 30, 23, .28); }
.tag .punch::before {
  content: ""; position: absolute; left: 50%; top: 26px; transform: translateX(-50%);
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--ink); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6);
}
.tag .body { padding: 20px 22px; min-width: 0; }
.tag .code {
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(2.3rem, 6vw, 3.3rem); line-height: .86; letter-spacing: .02em;
  color: var(--tone-light);
}
.tag .name {
  font-family: var(--disp); font-variation-settings: "SOFT" 20, "WONK" 1;
  font-weight: 600; font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  line-height: 1.1; margin: 8px 0 6px; letter-spacing: -.01em;
}
.tag .meta {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .09em;
  color: var(--stamp); font-variant-numeric: tabular-nums;
}
.tag .right { padding: 20px 22px 20px 6px; }

.flag {
  position: absolute; top: 0; right: 0;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .16em;
  background: var(--tone-light); color: var(--stock);
  padding: 4px 10px; border-radius: 0 3px 0 3px;
}

/* inline-block so it hugs its content — as a block it stretched to fill the
   full-width grid cell the mobile layout gives it */
.live {
  display: inline-block; border: 1px solid var(--tone-light); border-radius: 3px;
  padding: 11px 15px; text-align: center; min-width: 116px;
}
.live .num {
  font-family: var(--mono); font-weight: 700; font-size: 2rem; line-height: 1;
  color: var(--tone-light); font-variant-numeric: tabular-nums;
}
.live .lbl {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--stamp); margin-top: 5px;
}

/* Abstract place-fills stand in until real photographs are uploaded. */
.strip { display: flex; gap: 5px; }
.shot {
  width: 64px; height: 88px; border-radius: 2px; display: block;
  background: linear-gradient(180deg, var(--f1) 0 42%, var(--f2) 42% 68%, var(--f3) 68%);
}
.shot.b { background: linear-gradient(180deg, var(--f2) 0 55%, var(--f3) 55%); }
.shot.c { background: linear-gradient(160deg, var(--f3), var(--f1)); }

.empty, .failed {
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  padding: 40px 0 90px; line-height: 1.7;
}
.failed { color: #E08A70; }

footer {
  border-top: 1px solid var(--rule); padding: 24px 0 40px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
  color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap;
}
footer a { border-bottom: 1px solid var(--rule); }

@media (max-width: 620px) {
  .tag { grid-template-columns: 40px 1fr; }
  .tag .right { grid-column: 2; padding: 0 22px 20px; }
  .shot { width: 54px; height: 72px; }
  .stats { margin-left: 0; text-align: left; }
}

/* One orchestrated moment: the stack settles on load. */
@media (prefers-reduced-motion: no-preference) {
  .tag { animation: settle .5s cubic-bezier(.2, .8, .3, 1) backwards; transition: transform .22s ease, box-shadow .22s ease; }
  .tag:nth-child(1) { animation-delay: .04s }
  .tag:nth-child(2) { animation-delay: .11s }
  .tag:nth-child(3) { animation-delay: .18s }
  .tag:nth-child(4) { animation-delay: .25s }
  .tag:nth-child(n+5) { animation-delay: .3s }
  @keyframes settle { from { opacity: 0; transform: translateY(-13px) rotate(-.7deg); } to { opacity: 1; transform: none; } }
  .tag:hover { transform: translateX(5px); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .85); }
}
