:root {
  --ground: #11100D;
  --panel: #191714;
  --ink: #E6DFCF;
  --ink-hi: #F1EBDD;
  --muted: #A39C8A;
  --faint: #8F8877;
  --accent: #C9573C;
  --gutter: 40px;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --serif: 'Instrument Serif', Georgia, serif;
  --news: 'Newsreader', Georgia, serif;
}

html { background: var(--ground); scrollbar-width: none; }
html::-webkit-scrollbar { width: 0; height: 0; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--mono); }
a { color: var(--ink); }
a:hover { color: #FFFFFF; }
button { font: inherit; }

.track { position: relative; height: 560vh; }
.stage {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden;
  perspective: 1100px; perspective-origin: 50% 50%;
}
.p3d { transform-style: preserve-3d; }

.grid {
  position: absolute; inset: 0; padding: 0 var(--gutter); pointer-events: none;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
}
.grid span { border-left: 1px solid rgba(230, 223, 207, .04); border-right: 1px solid rgba(230, 223, 207, .04); }

/* ---- the stack of objects ---- */
.field { position: absolute; inset: 0; pointer-events: none; }
.ob { position: absolute; left: 50%; top: 50%; width: 0; height: 0; will-change: transform, opacity; }
.drop { position: absolute; left: 0; top: 0; animation: arDrop 1050ms cubic-bezier(.7, 0, .18, 1) both; }
.edge { position: absolute; will-change: transform, opacity; }
.edge-solid { position: absolute; inset: 0; box-sizing: border-box; border-radius: 1px; opacity: 0; border-top-style: solid; border-bottom-style: solid; }
.edge-mark { position: absolute; top: 0; bottom: 0; }
.edge-line { position: absolute; inset: 0; }
.face { position: absolute; opacity: 0; backface-visibility: hidden; will-change: transform, opacity; pointer-events: none; }

.obj { display: block; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.obj .objc { width: 100%; height: 100%; transition: transform .45s cubic-bezier(.2, .8, .2, 1), filter .45s; }
.obj:hover .objc { transform: scale(1.045); filter: brightness(1.08); }
.obj:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }

.book { width: 100%; height: 100%; box-sizing: border-box; border-radius: 2px 4px 4px 2px; display: flex; box-shadow: 0 30px 60px rgba(0, 0, 0, .45); }
.book-spine { width: 12px; background: rgba(0, 0, 0, .28); }
.book-cover { flex-grow: 1; margin: 12px; border: 1px solid rgba(241, 235, 221, .28); padding: 18px 16px; display: flex; flex-direction: column; justify-content: space-between; }
.book-top { display: flex; flex-direction: column; gap: 12px; }
.book-title { font-family: var(--serif); font-size: 27px; line-height: 1.05; }
.book-author { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; opacity: .75; }
.book-foot { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: .16em; opacity: .7; }

.article { width: 100%; height: 100%; box-sizing: border-box; background: #E3D9C3; color: #1B1914; padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 30px 60px rgba(0, 0, 0, .4); }
.article-meta { display: flex; justify-content: space-between; font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; color: #5C5546; border-bottom: 1px solid #1B1914; padding-bottom: 6px; }
.article-title { font-family: var(--news); font-weight: 600; font-size: 21px; line-height: 1.08; letter-spacing: -.01em; }
.article-dek { font-family: var(--news); font-size: 11.5px; line-height: 1.4; color: #3A352B; }
.article-cols { flex-grow: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; border-top: 1px solid rgba(27, 25, 20, .25); padding-top: 8px; }
.article-cols span { background: repeating-linear-gradient(to bottom, rgba(27, 25, 20, .16) 0 2px, transparent 2px 7px); }

.photo { width: 100%; height: 100%; box-sizing: border-box; background: #ECE6D8; padding: 10px 10px 0; display: flex; flex-direction: column; box-shadow: 0 30px 60px rgba(0, 0, 0, .5); }
.photo-img { flex-grow: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.photo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pending { font-size: 8.5px; letter-spacing: .22em; text-transform: uppercase; color: rgba(241, 235, 221, .75); }
.photo-cap { height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 8.5px; letter-spacing: .1em; color: #3A352B; }
.photo-cap span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-cap span:last-child { color: #7A7262; }

.tape { width: 100%; height: 100%; box-sizing: border-box; background: #1C1A17; border: 1px solid #3A362F; border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 30px 60px rgba(0, 0, 0, .55); }
.tape-label { background: #E3D9C3; color: #1B1914; border-radius: 3px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; border-top: 4px solid var(--accent); }
.tape-title { font-family: var(--serif); font-size: 17px; line-height: 1.05; }
.tape-meta { font-size: 8px; letter-spacing: .16em; text-transform: uppercase; color: #5C5546; }
.tape-deck { flex-grow: 1; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.tape-reel { width: 34px; height: 34px; border-radius: 50%; border: 6px solid var(--ink); box-sizing: border-box; opacity: .8; }
.tape-play { height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid rgba(230, 223, 207, .35); color: var(--ink); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }

/* ---- title ---- */
.title { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; pointer-events: none; opacity: 0; will-change: transform, opacity; padding: 0 16px; text-align: center; }
.title h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 11vw, 156px); line-height: 1; letter-spacing: -.02em; color: var(--ink-hi); white-space: nowrap; text-shadow: 0 10px 60px rgba(17, 16, 13, .9); }
.title-rule { width: 70vw; height: 2px; background: var(--accent); transform: scaleX(0); }
.title p { margin: 0; font-size: 11px; line-height: 1.8; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }

/* ---- chrome ---- */
.fade { animation: arFade 1000ms cubic-bezier(.19, 1, .22, 1) both; }
.chrome-top { position: absolute; top: 32px; left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); z-index: 2; }
.brand { color: var(--ink); font-weight: 500; }
.chrome-right { display: flex; align-items: center; gap: 24px; }
.counter { color: var(--ink); }
.chrome-bottom { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 32px; display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); pointer-events: none; }
.cue-wrap { display: flex; align-items: flex-end; gap: 14px; }
.cue-track { width: 1px; height: 40px; background: rgba(230, 223, 207, .12); position: relative; overflow: hidden; }
.cue { position: absolute; inset: 0; background: var(--accent); animation: arCue 2200ms cubic-bezier(.65, 0, .35, 1) infinite; }
.key { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 10px; letter-spacing: .18em; opacity: 0; }
.key b { font-weight: 400; color: var(--ink); }
.key b.accent { color: var(--accent); }

.chip { height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid rgba(230, 223, 207, .22); background: transparent; color: var(--muted); font: 500 10px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; cursor: pointer; transition: color .25s, border-color .25s, background .25s; }
.chip:hover { color: var(--ink); border-color: rgba(230, 223, 207, .55); }
.chip.on { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---- index ---- */
.index { position: absolute; inset: 0; padding: 100px var(--gutter) 88px; box-sizing: border-box; display: flex; flex-direction: column; gap: 22px; opacity: 0; pointer-events: none; }
.index-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.index-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; }
.index-name h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 6vw, 72px); line-height: 1; color: var(--ink-hi); }
.index-name span { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.index-tools { display: flex; gap: 12px 28px; align-items: center; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-views { padding-left: 28px; border-left: 1px solid rgba(230, 223, 207, .16); }
.readout { min-height: 20px; font-size: 11px; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.index-body { flex-grow: 1; min-height: 0; display: flex; flex-direction: column; }

.tl { flex-grow: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.tl-cols, .tl-axis { display: grid; grid-template-columns: repeat(32, minmax(0, 1fr)); column-gap: 4px; }
.tl-cols { align-items: end; }
.tl-col { display: flex; flex-direction: column-reverse; }
.tl-base { height: 1px; background: rgba(230, 223, 207, .35); margin-top: 8px; }
.tl-axis { margin-top: 10px; }
.tl-tick { position: relative; height: 14px; }
.tl-tick i { position: absolute; left: 0; top: -10px; width: 1px; height: 6px; background: rgba(230, 223, 207, .5); }
.tl-tick span { position: absolute; left: 0; top: 0; font-size: 10px; letter-spacing: .1em; color: var(--faint); white-space: nowrap; }
.tle { display: flex; align-items: center; width: 100%; height: 44px; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer; transition: opacity .3s; }
.tle.dim { opacity: .14; }
.tl-line { display: block; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--tl, 0)); transition: box-shadow .2s, filter .2s; }
.tle:hover .tl-line, .tle:focus-visible .tl-line { filter: brightness(1.35); box-shadow: 0 0 0 2px var(--ground), 0 0 0 3px var(--ink); }
.tle:focus-visible { outline: none; }

.list { flex-grow: 1; min-height: 0; overflow-y: auto; border-top: 1px solid rgba(230, 223, 207, .22); }
.row { position: relative; display: grid; grid-template-columns: 110px minmax(0, 2fr) 150px minmax(0, 1.3fr) 90px; gap: 24px; align-items: center; width: 100%; min-height: 56px; padding: 0; margin: 0; border: 0; border-bottom: 1px solid rgba(230, 223, 207, .14); background: transparent; color: var(--muted); font: 400 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-align: left; cursor: pointer; }
.row .rt { font-family: var(--serif); font-size: 24px; letter-spacing: 0; text-transform: none; color: var(--ink-hi); }
.row .ry { text-align: right; color: var(--ink); }
.row .rl { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.row:hover .rl, .row:focus-visible .rl { transform: scaleX(1); }
.row:focus-visible { outline: none; }

/* ---- detail drawer ---- */
.detail { position: absolute; inset: 0; z-index: 5; }
.scrim { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; background: rgba(10, 9, 7, .6); cursor: pointer; animation: scIn .4s ease both; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); box-sizing: border-box; background: var(--panel); border-left: 1px solid rgba(230, 223, 207, .14); padding: 28px 40px 40px; display: flex; flex-direction: column; gap: 26px; overflow-y: auto; animation: drIn .6s cubic-bezier(.2, .8, .2, 1) both; }
.drawer-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.close { width: 44px; height: 44px; flex-shrink: 0; border-radius: 22px; border: 1px solid rgba(230, 223, 207, .25); background: transparent; color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.close:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.visual { flex-shrink: 0; border-radius: 3px; box-sizing: border-box; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, .4); }
.visual.has-img { padding: 0; }
.visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.visual-top { font-size: 9px; letter-spacing: .22em; text-transform: uppercase; opacity: .75; }
.visual-text { font-family: var(--serif); font-size: 30px; line-height: 1.05; }
.drawer h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 42px; line-height: 1.02; color: var(--ink-hi); }
.drawer-body { display: flex; flex-direction: column; gap: 12px; }
.drawer-body p { margin: 0; font-family: var(--news); font-size: 17px; line-height: 1.5; color: #CFC7B6; }
.play { align-self: flex-start; height: 44px; padding: 0 20px; border-radius: 22px; border: 1px solid rgba(230, 223, 207, .35); background: transparent; color: var(--ink); font: 400 10px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; cursor: not-allowed; opacity: .7; }
.drawer audio { width: 100%; }
.meta { display: flex; flex-direction: column; border-top: 1px solid rgba(230, 223, 207, .18); }
.meta div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(230, 223, 207, .1); font-size: 11px; line-height: 1.5; letter-spacing: .12em; text-transform: uppercase; }
.meta dt { color: var(--faint); }
.meta dd { margin: 0; color: var(--ink); }

/* ---- motion ---- */
@keyframes arDrop { 0% { transform: translate3d(0, -84vh, 0); opacity: 0 } 10% { opacity: 1 } 100% { transform: translate3d(0, 0, 0); opacity: 1 } }
@keyframes arFade { from { opacity: 0; transform: translate3d(0, 8px, 0) } to { opacity: 1; transform: none } }
@keyframes arCue { 0% { transform: scaleY(0); transform-origin: 50% 0 } 45% { transform: scaleY(1); transform-origin: 50% 0 } 55% { transform: scaleY(1); transform-origin: 50% 100% } 100% { transform: scaleY(0); transform-origin: 50% 100% } }
@keyframes drIn { from { transform: translate3d(48px, 0, 0); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes scIn { from { opacity: 0 } to { opacity: 1 } }
@media (prefers-reduced-motion: reduce) {
  .drop, .fade, .cue, .drawer, .scrim { animation: none; }
  .obj .objc, .row .rl { transition: none; }
}

/* ---- phone ---- */
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 16px; }
  .grid span:nth-child(n+5) { display: none; }
  .chrome-top { top: 16px; }
  .chrome-right { gap: 14px; }
  .chrome-bottom { bottom: 20px; }
  .title h1 { white-space: normal; }
  .title p { letter-spacing: .2em; }
  .index { padding: 76px var(--gutter) 96px; gap: 16px; }
  .chips-views { padding-left: 0; border-left: 0; }
  .chip { padding: 0 12px; }
  .tl-cols, .tl-axis { column-gap: 2px; }
  .tl-tick span { font-size: 9px; letter-spacing: 0; }
  .tl-tick.minor span { display: none; }
  .tl-tick.last span { left: auto; right: 0; }
  .row { grid-template-columns: 76px minmax(0, 1fr) 64px; gap: 12px; padding: 8px 0; }
  .row .rtype, .row .rcreator { display: none; }
  .row .rt { font-size: 20px; }
  .drawer { padding: 20px var(--gutter) 32px; border-left: 0; }
  .drawer h3 { font-size: 34px; }
  .meta div { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
}
