/* ═══════════════════════════════════════════════════════════════
   Work Canvas: the archive. Sits on base.css (tokens, nav, reticle, HUD,
   buttons, footer, placeholders) and adds the page's own pieces.
   ═══════════════════════════════════════════════════════════════ */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Header ── */
.arc-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); grid-template-rows: auto 1fr; gap: 0 clamp(24px, 4vw, 72px); align-items: end; padding: clamp(120px, 15vw, 190px) var(--gut) clamp(28px, 4vw, 56px); }
.arc-label { grid-column: 1 / -1; }
.arc-label b { font-weight: 400; color: var(--acc); }
.arc-title { font-family: var(--display); font-weight: 700; font-size: clamp(64px, 11.2vw, 196px); line-height: .84; letter-spacing: -.045em; display: flex; flex-direction: column; }
.arc-line { display: block; overflow: hidden; padding-bottom: .06em; }
.arc-line:last-child { padding-left: .5em; }
/* "layers." is drawn three times: the word, and two outlined echoes behind
   it in the accent colours that drift with the pointer (--ex, --ey). */
.arc-echo { padding-top: .14em; padding-right: .3em; margin-top: -.14em; }
.arc-echo em { position: relative; display: inline-block; }
.arc-echo em::before, .arc-echo em::after { content: attr(data-text); position: absolute; left: 0; top: 0; color: transparent; pointer-events: none; -webkit-text-stroke: var(--stroke) var(--violet); opacity: .55; transform: translate(calc(var(--ex, .5) * .1em + .03em), calc(var(--ey, .5) * -.1em - .03em)); transition: opacity .6s; }
.arc-echo em::after { -webkit-text-stroke-color: var(--cyan); opacity: .3; transform: translate(calc(var(--ex, .5) * .2em + .06em), calc(var(--ey, .5) * -.2em - .06em)); }
html:not(.realm) .arc-echo em::before, html:not(.realm) .arc-echo em::after { -webkit-text-stroke-color: var(--faint); }
.arc-title em { -webkit-text-stroke-color: var(--acc); }
.arc-title .ch { display: inline-block; will-change: transform; }
.arc-title .ch.sp { width: .24em; }
.arc-side { display: grid; gap: 20px; padding-bottom: .9vw; }
.arc-count { display: flex; align-items: flex-end; gap: 14px; }
.arc-count b { font-family: var(--display); font-weight: 600; font-size: clamp(64px, 7.5vw, 128px); line-height: .8; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--acc); }
.arc-count .mono { color: var(--dim); font-size: 10px; line-height: 1.6; padding-bottom: 4px; }
.arc-note { color: var(--dim); font-size: clamp(15px, 1.15vw, 17px); max-width: 40ch; }
.arc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.realm .arc-actions .btn-solid { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.realm .arc-actions .btn-solid:hover { background: #b8a9ff; border-color: #b8a9ff; }

/* ── Ticker: an outlined band of platform names that runs with the scroll ── */
.arc-ticker { overflow: hidden; padding: 6px 0 clamp(10px, 2vw, 26px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.arc-ticker-track { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); width: max-content; will-change: transform; font-family: var(--display); font-weight: 700; font-size: clamp(40px, 6.4vw, 110px); line-height: 1; letter-spacing: -.02em; text-transform: uppercase; }
.arc-ticker-track span { color: transparent; -webkit-text-stroke: 1px var(--faint); transition: -webkit-text-stroke-color .4s; }
.arc-ticker-track i { font-style: normal; font-size: .42em; color: var(--acc); }
@media (hover: hover) { .arc-ticker-track span:hover { -webkit-text-stroke-color: var(--acc); } }

/* ── Filters: two rows of pills that stay under the nav ── */
.arc-filters { position: sticky; top: max(10px, env(safe-area-inset-top)); z-index: 60; display: flex; flex-direction: column; align-items: stretch; padding: 10px var(--gut); transition: top .5s var(--ease); }
.arc-panel { display: grid; gap: 8px; }
.nav:not(.hide) ~ main .arc-filters { top: 86px; }
.arc-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.arc-row-k { flex: none; width: 44px; color: var(--faint); font-size: 10px; text-shadow: 0 1px 8px var(--bg); }
.arc-scroll { min-width: 0; overflow-x: auto; scrollbar-width: none; border-radius: 100px; border: 1px solid var(--line); background: rgba(6, 6, 7, .62); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }
.arc-scroll::-webkit-scrollbar { display: none; }
.arc-pills { position: relative; display: flex; gap: 2px; padding: 5px; width: max-content; }
.arc-pill { position: relative; z-index: 1; display: inline-flex; align-items: baseline; gap: 6px; padding: 9px 15px; border-radius: 100px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; color: var(--dim); transition: color .35s var(--ease), background .25s; }
.arc-pill .arc-c { font-size: 8.5px; letter-spacing: .06em; opacity: .7; }
.arc-pill[aria-pressed="true"] { color: var(--acc-ink); }
.arc-pill:disabled { opacity: .3; cursor: default; }
@media (hover: hover) { .arc-pill:not([aria-pressed="true"]):not(:disabled):hover { color: var(--ink); background: rgba(242, 253, 255, .07); } }
.arc-blob { position: absolute; left: 0; top: 5px; bottom: 5px; width: 0; border-radius: 100px; background: var(--acc); box-shadow: 0 0 26px rgba(123, 187, 255, .45); transition: transform .55s cubic-bezier(.3, 1.35, .4, 1), width .55s cubic-bezier(.3, 1.35, .4, 1), background 1.3s; pointer-events: none; }
html:not(.realm) .arc-blob { box-shadow: none; }
/* Once the bar sticks under the nav, the two rows fold into one slim line:
   each row takes half the width and scrolls on its own, the labels go,
   and the pills shrink. Back at the top they open up again. */
.arc-sentinel { height: 0; }
.arc-row, .arc-pill, .arc-scroll { transition: padding .45s var(--ease), font-size .45s var(--ease), gap .45s var(--ease), flex-basis .45s var(--ease); }

/* ── The pill: what the two rows fold into once they stick ── */
.arc-mini { display: none; align-self: flex-start; align-items: center; gap: 10px; max-width: 100%; min-height: 46px; padding: 6px 8px 6px 16px; border-radius: 100px; border: 1px solid var(--line); background: rgba(6, 6, 7, .7); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 16px 44px rgba(0, 0, 0, .5); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); transition: border-color .3s, box-shadow .3s, transform .3s var(--ease); }
.arc-mini:hover, .arc-mini[aria-expanded="true"] { border-color: var(--acc); box-shadow: 0 16px 44px rgba(0, 0, 0, .5), 0 0 30px rgba(123, 187, 255, .25); }
.arc-mini:active { transform: scale(.97); }
.arc-mini-ico { flex: none; color: var(--acc); }
.arc-mini-t { min-width: 0; display: flex; gap: 8px; white-space: nowrap; overflow: hidden; }
.arc-mini-t span { overflow: hidden; text-overflow: ellipsis; }
.arc-mini-t i { font-style: normal; color: var(--faint); }
.arc-mini-n { flex: none; padding: 7px 11px; border-radius: 100px; background: var(--acc); color: var(--acc-ink); font-weight: 500; font-size: 10px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.arc-mini-chev { flex: none; margin-right: 6px; color: var(--dim); transition: transform .4s var(--ease); }
.arc-mini[aria-expanded="true"] .arc-mini-chev { transform: rotate(180deg); }
.arc-mini.pop { animation: miniPop .5s cubic-bezier(.3, 1.6, .4, 1); }
@keyframes miniPop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.arc-filters.stuck .arc-mini { display: inline-flex; }
/* Stuck, the rows wait in a panel that drops down under the pill. */
.arc-filters.stuck .arc-panel { position: absolute; left: var(--gut); top: calc(100% - 2px); width: min(calc(100vw - 2 * var(--gut)), 1120px); padding: 12px; border-radius: 24px; border: 1px solid var(--line); background: rgba(6, 6, 7, .86); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); opacity: 0; visibility: hidden; transform: translateY(-10px) scale(.97); transform-origin: 28px 0; transition: opacity .3s ease, transform .45s var(--ease), visibility .3s; }
.arc-filters.stuck.open .arc-panel { opacity: 1; visibility: visible; transform: none; }
.arc-filters.stuck .arc-panel .arc-scroll { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }

/* Button icons, with a little life on hover. */
.arc-ico { flex: none; transition: transform .6s cubic-bezier(.3, 1.6, .4, 1); }
@media (hover: hover) {
  .btn:hover .arc-ico-shuffle { transform: scaleX(-1); }
  .btn:hover .arc-ico-dice { transform: rotate(90deg) scale(1.08); }
}
.btn:active .arc-ico-dice { transform: rotate(180deg); }

/* ── Grid: masonry columns, each starting a little lower than the last ── */
.arc-grid { display: flex; align-items: flex-start; gap: clamp(10px, 1.3vw, 22px); padding: clamp(24px, 3vw, 44px) var(--gut) clamp(90px, 10vw, 160px); min-height: 60svh; }
.arc-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: clamp(10px, 1.3vw, 22px); padding-top: var(--off, 0px); will-change: transform; }

.arc-card { position: relative; display: block; width: 100%; padding: 0; border: 0; text-align: left; color: #fff; cursor: pointer; perspective: 900px; opacity: 0; translate: 0 80px; scale: .9; transition: opacity .9s var(--ease), translate 1.1s var(--ease), scale 1.1s var(--ease); }
.arc-card.in { opacity: 1; translate: none; scale: 1; }
.arc-col:nth-child(2) .arc-card { transition-delay: .06s; }
.arc-col:nth-child(3) .arc-card { transition-delay: .12s; }
.arc-col:nth-child(4) .arc-card { transition-delay: .18s; }
.arc-col:nth-child(5) .arc-card { transition-delay: .24s; }
.arc-card:focus-visible { outline: none; }
.arc-card:focus-visible .arc-inner { outline: 2px solid var(--acc); outline-offset: 3px; }

.arc-inner { position: relative; display: block; aspect-ratio: var(--ar, 9 / 16); border-radius: 18px; overflow: hidden; background: var(--bg-2); outline: 1px solid var(--line); box-shadow: 0 30px 60px rgba(0, 0, 0, .5); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease), outline-color .4s, box-shadow .6s var(--ease); --gx: 50%; --gy: 0%; }
.arc-inner.tilting { transition: transform .12s linear, outline-color .4s, box-shadow .6s var(--ease); }
.arc-inner img, .arc-inner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.arc-inner img { transition: opacity .6s ease, transform 1.2s var(--ease); }
.arc-inner.ph img { opacity: 0; }
.arc-inner video { opacity: 0; transition: opacity .45s ease; }
.arc-inner video.on { opacity: 1; }
.arc-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(2, 3, 10, .82), transparent 42%), linear-gradient(to bottom, rgba(2, 3, 10, .45), transparent 22%); pointer-events: none; transition: opacity .5s; }
.arc-top { position: absolute; left: 12px; right: 12px; top: 11px; display: flex; justify-content: space-between; gap: 8px; font-size: 9px; letter-spacing: .14em; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.arc-top b { font-weight: 500; color: var(--acc); }
.arc-top span { padding: 4px 8px; margin: -4px -4px 0 0; border-radius: 100px; background: rgba(6, 6, 7, .45); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.arc-bottom { position: absolute; left: 12px; right: 12px; bottom: 12px; display: grid; gap: 4px; }
.arc-name { font-family: var(--display); font-weight: 600; font-size: clamp(15px, 1.35vw, 21px); line-height: 1.08; letter-spacing: -.01em; text-shadow: 0 2px 12px rgba(0, 0, 0, .7); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arc-kind { font-size: 9px; letter-spacing: .14em; color: rgba(255, 255, 255, .7); }
.arc-play { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; display: grid; place-items: center; color: var(--acc-ink); background: var(--acc); box-shadow: 0 0 40px rgba(123, 187, 255, .6); opacity: 0; transform: scale(.4); transition: opacity .35s, transform .5s cubic-bezier(.3, 1.6, .4, 1); }
.arc-glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .28), transparent 46%); mix-blend-mode: overlay; }

@media (hover: hover) {
  .arc-card:hover .arc-inner { outline-color: var(--acc); box-shadow: 0 46px 90px rgba(0, 0, 0, .7), 0 0 56px rgba(123, 187, 255, .38); }
  .arc-card:hover .arc-inner img { transform: scale(1.05); }
  .arc-card:hover .arc-glare { opacity: 1; }
  .arc-card:hover .arc-play { opacity: 1; transform: none; }
  .arc-card:hover .arc-shade { opacity: .75; }
  /* The others step back so the hovered one reads first. */
  .arc-grid:has(.arc-card:hover) .arc-card:not(:hover) .arc-inner { filter: saturate(.5) brightness(.62); }
  .arc-inner { transition: transform .6s var(--ease), outline-color .4s, box-shadow .6s var(--ease), filter .5s ease; }
}
html:not(.realm) .arc-inner img, html:not(.realm) .arc-inner video { filter: grayscale(1) contrast(1.05); }

/* ── Empty: a mix with nothing in it yet ── */
.arc-empty { padding: 0 var(--gut) clamp(90px, 12vw, 180px); text-align: center; display: grid; justify-items: center; gap: 18px; }
.arc-empty[hidden] { display: none; }
.arc-empty-t { font-family: var(--display); font-weight: 700; font-size: clamp(44px, 8vw, 120px); line-height: .92; letter-spacing: -.035em; }
.arc-empty-t em { -webkit-text-stroke-color: var(--acc); }

/* ── Player ── */
.arc-lb { grid-template-rows: minmax(0, 1fr) auto; gap: clamp(14px, 2.4svh, 26px); }
.arc-lb-stage { position: relative; align-self: center; height: min(72svh, 900px); aspect-ratio: var(--ar, 9 / 16); max-width: min(92vw, 1280px); border-radius: 20px; overflow: hidden; outline: 1px solid var(--acc); box-shadow: 0 0 90px rgba(123, 187, 255, .35); background: #000; transform-origin: 0 0; will-change: transform; }
.arc-lb .arc-lb-stage video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; border-radius: 0; outline: 0; box-shadow: none; }
.arc-lb-meta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(14px, 3vw, 40px); width: min(92vw, 720px); }
.arc-lb-info { text-align: center; display: grid; gap: 8px; justify-items: center; min-width: 0; }
.arc-lb-count { color: var(--acc) !important; font-size: 10px; }
.arc-lb-title { font-family: var(--display); font-weight: 600; font-size: clamp(22px, 3vw, 42px); line-height: 1.02; letter-spacing: -.02em; max-width: 100%; overflow-wrap: anywhere; }
.arc-lb-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.arc-lb-chips .chip { padding: 6px 11px; font-size: 9.5px; color: var(--dim); }
.arc-lb-nav { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); background: rgba(6, 6, 7, .6); font-size: 20px; transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease); }
.arc-lb-nav:hover { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.arc-lb-nav:active { transform: scale(.92); }

/* ── Phones and tablets ── */
@media (max-width: 980px) {
  .arc-hero { grid-template-columns: 1fr; gap: 26px; }
  .arc-side { padding-bottom: 0; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 18px 22px; }
  .arc-actions { grid-column: 1 / -1; }
  .nav:not(.hide) ~ main .arc-filters { top: 80px; }
}
@media (max-width: 640px) {
  .arc-hero { padding-top: 108px; }
  .arc-title { font-size: clamp(54px, 16.5vw, 96px); }
  .arc-side { grid-template-columns: 1fr; }
  .arc-count b { font-size: 72px; }
  .arc-actions .btn { flex: 1; }
  .arc-filters { padding-inline: 12px; }
  .arc-filters.stuck .arc-panel { left: 12px; width: calc(100vw - 24px); }
  .arc-row-k { display: none; }
  .arc-pill { padding: 9px 13px; }
  .arc-grid { padding-inline: 10px; gap: 10px; }
  .arc-col { gap: 10px; }
  .arc-inner { border-radius: 14px; }
  .arc-top { left: 9px; right: 9px; top: 9px; }
  .arc-top span { display: none; }
  .arc-bottom { left: 10px; right: 10px; bottom: 10px; }
  .arc-name { font-size: 14px; }
  .arc-kind { font-size: 8px; }
  .arc-lb-stage { height: min(64svh, 640px); }
  .arc-lb-nav { width: 48px; height: 48px; }
}

/* ── Reduced motion: everything simply sits in place ── */
.still .arc-card { opacity: 1; translate: none; scale: 1; transition: none; }
.still .arc-inner { transform: none !important; }
