/* ===================================================================
   ARCHIVE — single-column case-file stack. Warm paper, minimal, refined.
   Scoped under .theme-archive.
   =================================================================== */
.theme-archive {
  --a-paper: #f7f4ec;
  --a-card: #fffdf7;
  --a-ink: #22201a;
  --a-muted: #7a7362;
  --a-line: #ddd6c4;
  --a-hair: #e6e0d2;
  --a-red: #b04a2f;
  --a-read-bg: #fbf9f2;
  --a-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --a-serif: "Lora", Georgia, serif;
  --a-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  background: var(--a-paper);
  color: var(--a-ink);
  font-family: var(--a-sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.theme-archive a { color: var(--a-red); text-decoration: none; }
.theme-archive :focus-visible { outline: 2px solid var(--a-red); outline-offset: 3px; }

.theme-archive .a-site { max-width: 48rem; margin: 0 auto; padding: 0 1.5rem 6rem; }

/* --- Header --- */
.theme-archive .a-head { position: relative; padding: 3.6rem 0 1.4rem; overflow: hidden; }
.theme-archive .a-stamp { position: absolute; top: 1.4rem; right: -0.4rem; z-index: 0; font-family: var(--a-mono); font-weight: 500; font-size: clamp(2.6rem, 10vw, 6rem); letter-spacing: .12em; color: var(--a-red); opacity: .09; transform: rotate(-8deg); pointer-events: none; user-select: none; }
.theme-archive .a-head > *:not(.a-stamp) { position: relative; z-index: 1; }
.theme-archive .a-fileno { font-family: var(--a-mono); font-size: .74rem; letter-spacing: .14em; color: var(--a-muted); text-transform: uppercase; margin-bottom: .9rem; }
.theme-archive .a-wordmark { margin: 0; font-size: clamp(2rem, 5.5vw, 3.2rem); line-height: 1.02; letter-spacing: -0.02em; }
.theme-archive .a-wordmark a { color: var(--a-ink); }
.theme-archive .a-w1 { font-weight: 200; }
.theme-archive .a-w2 { font-weight: 600; }
.theme-archive .a-rule { height: 1px; background: var(--a-ink); opacity: .85; margin: 0 auto 2.4rem; }

/* --- Case-file stack --- */
.theme-archive .a-empty { font-family: var(--a-mono); color: var(--a-muted); }
.theme-archive .a-stack { display: flex; flex-direction: column; }
.theme-archive .a-record { display: grid; grid-template-columns: 70px 1fr; gap: 1.3rem; align-items: start; padding: 1.6rem 0; border-top: 1px solid var(--a-hair); color: var(--a-ink); transition: padding-left .18s ease; }
.theme-archive .a-record:first-child { border-top: none; }
.theme-archive .a-record:hover { padding-left: .5rem; }

/* Fixed 70px type block */
.theme-archive .a-block { width: 70px; height: 70px; display: grid; place-items: center; flex: none; border-radius: 3px; }
.theme-archive .a-block-tag { font-family: var(--a-mono); font-size: .72rem; font-weight: 500; letter-spacing: .06em; }
.theme-archive .a-block-doc { border: 1.5px solid var(--a-ink); color: var(--a-ink); background: transparent; }
.theme-archive .a-block-photo { background: var(--a-ink); color: var(--a-paper); }
.theme-archive .a-block-video { border: 1.5px solid var(--a-red); }
.theme-archive .a-block-video .a-tri { width: 30px; height: 30px; fill: var(--a-red); }
.theme-archive .a-block-none { border: 1.5px solid var(--a-line); color: var(--a-muted); }

.theme-archive .a-record-body { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.theme-archive .a-exhibit { font-family: var(--a-mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--a-muted); }
.theme-archive .a-mini { color: var(--a-red); margin-left: .5rem; }
.theme-archive .a-record-title { font-size: 1.4rem; font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; }
.theme-archive .a-record:hover .a-record-title { color: var(--a-red); }
.theme-archive .a-record-ex { color: var(--a-muted); font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Reading view --- */
.theme-archive .a-post-head { padding-bottom: 1.4rem; }
.theme-archive .a-backlink { font-family: var(--a-mono); font-size: .74rem; margin: 0 0 1.1rem; }
.theme-archive .a-post-title { font-size: clamp(1.9rem, 5vw, 2.9rem); font-weight: 300; line-height: 1.1; letter-spacing: -0.015em; margin: .3rem 0 0; }
.theme-archive .a-reading { background: var(--a-read-bg); border: 1px solid var(--a-hair); border-radius: 6px; padding: 2.8rem clamp(1.2rem, 4vw, 3rem); }
.theme-archive .a-article { max-width: 65ch; margin: 0 auto; }
.theme-archive .reading-body { font-size: 1.08rem; line-height: 1.8; font-weight: 400; }
.theme-archive .reading-body p { margin: 0 0 1.35rem; }

.theme-archive .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin: 2rem 0; }
.theme-archive .gallery-item { display: block; border: 1px solid var(--a-line); background: #fff; padding: 4px; }
.theme-archive .gallery-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }

.theme-archive .video-embed { position: relative; aspect-ratio: 16/9; margin: 2rem 0; border: 1px solid var(--a-ink); background: #000; }
.theme-archive .video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.theme-archive .a-docs-head { font-family: var(--a-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--a-muted); margin: 2.4rem 0 .9rem; padding-bottom: .3rem; border-bottom: 1px solid var(--a-ink); }
.theme-archive .doc-cards { display: grid; gap: .55rem; }
.theme-archive .doc-card { display: flex; align-items: center; gap: .9rem; padding: .85rem .95rem; background: #fff; border: 1px solid var(--a-line); border-left: 4px solid var(--a-red); color: var(--a-ink); transition: transform .15s ease; }
.theme-archive .doc-card:hover { transform: translateX(2px); }
.theme-archive .doc-card-icon { color: var(--a-ink); display: grid; place-items: center; flex: none; }
.theme-archive .doc-card-icon .doc-glyph { width: 30px; height: 30px; }
.theme-archive .doc-card-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.theme-archive .doc-card-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-archive .doc-card-meta { display: flex; gap: .5rem; align-items: center; font-family: var(--a-mono); font-size: .68rem; color: var(--a-muted); }
.theme-archive .doc-card-badge { background: var(--a-red); color: #fff; padding: .06rem .4rem; letter-spacing: .04em; }

@media (max-width: 560px) {
  .theme-archive .a-record { grid-template-columns: 54px 1fr; gap: 1rem; }
  .theme-archive .a-block { width: 54px; height: 54px; }
  .theme-archive .a-record-ex { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-archive * { transition: none !important; }
}
