/* ==========================================================================
   images.html — the image library.

   The page has one job the rest of the site does not: let someone compare the
   SHAPE of 175 pictures quickly. So every tile is drawn at roughly the same
   area with its true aspect kept, which makes a 3.2:1 header band and a
   0.44:1 vertical banner read as different objects on sight. Everything else
   here is chrome around that: a sticky filter bar, a dense size index, and a
   detail overlay that carries the paths.
   ========================================================================== */

.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- Sticky filter bar --------------------------------------------------- */

.tools {
  position: sticky; top: 64px; z-index: 30;
  margin: -8px -32px 0;
  padding: 14px 32px 12px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--neutral-200);
}
.tools__row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.tools__row--chips { margin-top: 8px; }

.tools__search { flex: 1 1 300px; min-width: 220px; display: block; }
.tools__search input {
  width: 100%; box-sizing: border-box;
  font: 500 var(--text-s)/1.4 var(--font-sans);
  color: var(--neutral-900);
  padding: 9px 14px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-full);
  background: var(--neutral-50);
}
.tools__search input::placeholder { color: var(--neutral-300); font-weight: 400; }
.tools__search input:focus-visible {
  outline: none; border-color: var(--brand-600); background: var(--neutral-white);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}

.tools__count {
  margin: 0; flex: none;
  font-size: var(--text-xs); font-weight: 600; color: var(--neutral-400);
  font-variant-numeric: tabular-nums;
}
.tools__reset {
  flex: none; border: 0; background: none; cursor: pointer;
  font: 600 var(--text-xs)/1 var(--font-sans);
  color: var(--brand-600); padding: 6px 8px; border-radius: var(--radius-full);
}
.tools__reset:hover { background: var(--brand-50); }

.tools__legend {
  flex: none; width: 46px;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--neutral-300);
}
.chip {
  border: 1px solid var(--neutral-200); background: var(--neutral-white);
  border-radius: var(--radius-full); cursor: pointer;
  padding: 5px 10px 5px 12px;
  font: 500 var(--text-xs)/1.2 var(--font-sans);
  color: var(--neutral-600);
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--neutral-300); color: var(--neutral-900); }
.chip__n {
  font-variant-numeric: tabular-nums; font-size: 10px; font-weight: 600;
  color: var(--neutral-300);
}
.chip[aria-pressed="true"] {
  background: var(--neutral-900); border-color: var(--neutral-900); color: #fff;
}
.chip[aria-pressed="true"] .chip__n { color: rgba(255, 255, 255, .55); }
.chip:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }

/* ---- Orientation strip --------------------------------------------------- */

.sec--first { margin-top: 48px; }

.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact {
  flex: 1 1 120px; padding: 16px 18px;
  border: 1px solid var(--neutral-200); border-radius: var(--radius-2xl);
  background: var(--neutral-50);
}
.fact b {
  display: block; font-size: 30px; line-height: 1; letter-spacing: -0.03em;
  font-weight: 700; color: var(--neutral-900); font-variant-numeric: tabular-nums;
}
.fact span {
  display: block; margin-top: 6px;
  font-size: var(--text-xs); color: var(--neutral-400);
}

.aside {
  margin: 20px 0 0; padding-left: 16px;
  border-left: 2px solid var(--neutral-200);
  font-size: var(--text-s); line-height: 1.6; color: var(--neutral-400);
  max-width: 660px;
}

/* ---- Shape index --------------------------------------------------------- */

.shx__wrap { overflow-x: auto; }
.shx { width: 100%; border-collapse: collapse; font-size: var(--text-s); text-align: left; }
.shx thead th {
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--neutral-300); padding: 0 16px 8px 0;
  border-bottom: 1px solid var(--neutral-200); white-space: nowrap;
}
.shx td {
  padding: 9px 16px 9px 0; border-bottom: 1px solid var(--neutral-100);
  color: var(--neutral-600); line-height: 1.5; vertical-align: baseline;
}
.shx__dim {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; color: var(--neutral-900) !important; font-weight: 600;
  white-space: nowrap;
}
.shx__ar, .shx__c {
  font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--neutral-400) !important; font-size: var(--text-xs);
}
.shx__head th {
  padding: 26px 0 8px; border-bottom: 1px solid var(--neutral-200);
  font-weight: 400;
}
.shx__head:first-child th { padding-top: 14px; }
.shx__jump {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: 700 var(--text-m)/1.3 var(--font-sans);
  letter-spacing: -0.01em; color: var(--neutral-900);
  border-bottom: 2px solid var(--brand-100);
}
.shx__jump:hover { border-bottom-color: var(--brand-600); }
.shx__jump:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 3px; }
.shx__n {
  display: inline-block; margin-left: 8px;
  font-size: 11px; font-weight: 700; color: var(--brand-600);
  font-variant-numeric: tabular-nums;
}
.shx__blurb {
  display: block; margin-top: 5px; max-width: 720px;
  font-size: var(--text-s); font-weight: 400; line-height: 1.55; color: var(--neutral-400);
}
.gtag {
  display: inline-block; margin: 8px 4px 0 0;
  padding: 2px 8px; border-radius: var(--radius-full);
  background: var(--neutral-100); color: var(--neutral-400);
  font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}

/* ---- Already placed ------------------------------------------------------ */

.uses { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.use {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 18px 0; border-bottom: 1px solid var(--neutral-100);
}
.use__body { flex: 1; min-width: 0; }
.use__head { margin: 0; font-size: var(--text-xs); display: flex; flex-wrap: wrap;
  align-items: center; gap: 6px; }
.use__arrow { color: var(--neutral-300); }
.use__conf {
  padding: 1px 7px; border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.use__conf--high { background: var(--green-50); color: var(--green-800); }
.use__conf--medium { background: var(--amber-50); color: var(--amber-800); }
.use__src { margin: 8px 0 0; font-size: var(--text-s); color: var(--neutral-900); }
.use__src .iset__fmeta { font-size: 11.5px; color: var(--neutral-400); white-space: normal; }
.use__src code { color: var(--neutral-600); }
.use__head code, .use__src code { word-break: break-all; }
.use__note {
  margin: 6px 0 0; max-width: 74ch;
  font-size: var(--text-s); line-height: 1.6; color: var(--neutral-400);
}

/* ---- Theme + shape headings ---------------------------------------------- */

.grp .sec__label { text-transform: uppercase; }

.shapeblock { margin-top: 40px; }
.shapeblock__head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin: 0 0 16px; padding-bottom: 8px;
  border-bottom: 1px solid var(--neutral-200);
}
.shapeblock__name {
  font-size: var(--text-s); font-weight: 700; letter-spacing: -0.01em;
  color: var(--neutral-900);
}
.shapeblock__dims {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; color: var(--neutral-300); font-weight: 400;
}
.shapeblock__n {
  margin-left: auto; font-size: 11px; font-weight: 600; color: var(--neutral-300);
  font-variant-numeric: tabular-nums;
}

/* ---- A variant set ------------------------------------------------------- */

.iset {
  border: 1px solid var(--neutral-200); border-radius: var(--radius-2xl);
  padding: 18px 20px 14px; margin-bottom: 12px; background: var(--neutral-white);
}
.iset__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.iset__kicker {
  display: block; font-size: 10px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--neutral-300); margin-bottom: 3px;
}
.iset__title {
  margin: 0; font-size: var(--text-m); font-weight: 700; letter-spacing: -0.01em;
  color: var(--neutral-900);
}
.iset__meta { margin: 0; display: flex; align-items: baseline; gap: 12px; }
.iset__dim {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; color: var(--neutral-600);
}
.iset__n { font-size: 11px; color: var(--neutral-300); font-variant-numeric: tabular-nums; }
.iset__dupflag {
  color: var(--amber-800); background: var(--amber-50);
  padding: 1px 6px; border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700;
}
.iset__note {
  margin: 10px 0 0; max-width: 76ch;
  font-size: var(--text-s); line-height: 1.6; color: var(--neutral-400);
}
.iset__note em { color: var(--neutral-600); font-style: normal; font-weight: 600; }

.iset__strip {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
  margin-top: 16px;
}

/* ---- One tile ------------------------------------------------------------ */

.tile {
  position: relative; display: block; padding: 0; cursor: pointer;
  width: var(--tw); border: 1px solid var(--neutral-200);
  border-radius: 10px; background: var(--neutral-100); overflow: hidden;
  line-height: 0;
}
.tile img { display: block; width: 100%; height: var(--th); object-fit: cover; }
.tile:hover { border-color: var(--brand-600); box-shadow: var(--shadow-card); }
.tile:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }

.tile__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 6px 4px;
  font: 600 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #fff; text-align: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .72) 100%);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile__use {
  position: absolute; top: 5px; right: 5px;
  padding: 2px 6px; border-radius: var(--radius-full);
  background: var(--brand-600); color: #fff;
  font: 700 9px/1.4 var(--font-sans); letter-spacing: .04em; text-transform: uppercase;
}
.tile--sm { flex: none; }

/* ---- Set footer: uses + file paths --------------------------------------- */

.iset__used {
  list-style: none; margin: 14px 0 0; padding: 10px 12px;
  background: var(--brand-50); border-radius: var(--radius-lg);
  font-size: var(--text-xs); line-height: 1.7; color: var(--brand-800);
}
.iset__used code { background: rgba(255, 255, 255, .7); }

.iset__files { margin-top: 12px; }
.iset__files summary {
  cursor: pointer; font-size: 11px; font-weight: 600; color: var(--neutral-300);
  list-style: none; padding: 4px 0;
}
.iset__files summary::-webkit-details-marker { display: none; }
.iset__files summary::before { content: "▸ "; }
.iset__files[open] summary::before { content: "▾ "; }
.iset__files summary:hover { color: var(--brand-600); }
.iset__files ul {
  list-style: none; margin: 6px 0 0; padding: 0;
  font-size: 11.5px; line-height: 1.9; color: var(--neutral-400);
}
.iset__files code {
  background: none; padding: 0; color: var(--neutral-600);
  font-size: 11.5px; word-break: break-all;
}
.iset__fmeta {
  font-size: 10.5px; color: var(--neutral-300); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.empty {
  margin-top: 72px; padding: 48px; text-align: center;
  border: 1px dashed var(--neutral-200); border-radius: var(--radius-2xl);
  color: var(--neutral-400); font-size: var(--text-s);
}

/* ---- Detail overlay ------------------------------------------------------ */

.lb { position: fixed; inset: 0; z-index: 90; display: flex;
  align-items: center; justify-content: center; padding: 32px; }
.lb[hidden] { display: none; }
.lb__scrim { position: absolute; inset: 0; background: rgba(15, 23, 42, .78); }
.lb__box {
  position: relative; margin: 0; z-index: 1;
  display: flex; gap: 28px; align-items: flex-start;
  max-width: 1000px; max-height: calc(100vh - 64px); overflow: auto;
  padding: 28px; border-radius: var(--radius-2xl);
  background: var(--neutral-white); box-shadow: 0 24px 80px rgba(2, 6, 23, .45);
}
.lb__x {
  position: absolute; top: 10px; right: 12px;
  border: 0; background: none; cursor: pointer;
  font-size: 24px; line-height: 1; color: var(--neutral-300); padding: 4px 8px;
}
.lb__x:hover { color: var(--neutral-900); }
.lb__img { flex: none; }
.lb__img img {
  display: block; max-height: 62vh; width: auto; border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
}
.lb__meta { flex: 1; min-width: 260px; text-align: left; }
.lb__kicker {
  margin: 0; font-size: 10px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--neutral-300);
}
.lb__title {
  margin: 6px 0 16px; font-size: var(--h6); line-height: 1.2;
  letter-spacing: -0.02em; color: var(--neutral-900);
}
.lb__dl {
  margin: 0; display: grid; grid-template-columns: 92px 1fr; gap: 7px 14px;
  font-size: var(--text-xs); line-height: 1.55;
}
.lb__dl dt { color: var(--neutral-300); font-weight: 600; }
.lb__dl dd { margin: 0; color: var(--neutral-600); }
.lb__dl code { font-size: 11px; word-break: break-all; }
.lb__hint {
  margin: 18px 0 0; font-size: 11px; line-height: 1.5; color: var(--neutral-300);
  border-top: 1px solid var(--neutral-100); padding-top: 12px;
}

@media (max-width: 760px) {
  .tools { margin-inline: -20px; padding-inline: 20px; }
  .use { flex-direction: column; gap: 12px; }
  .tile { max-width: 100%; }
  .tile img { width: 100%; height: auto; }
  .lb__box { flex-direction: column; padding: 20px; gap: 18px; }
  .lb__img img { max-height: 40vh; }
}

/* A set whose every file ships an alpha channel. The 400px mirror is JPEG, so
   the transparency is flattened in the tile — the tag is how you know. */
.iset__alpha {
  color: var(--purple-800); background: var(--purple-50);
  padding: 1px 6px; border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700; letter-spacing: .03em;
}

/* ---- The 2026 website set -------------------------------------------------
   Two generations now sit side by side: the original Figma export and the
   redrawn set at 2x. A superseded tile is dimmed rather than removed, because
   several sections still ship the old file and hiding it would make the page
   disagree with the system. */
.tile__v2, .tile__old {
  position: absolute; top: 6px; left: 6px;
  padding: 2px 7px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .02em; line-height: 15px;
}
.tile__v2  { background: var(--brand-600); color: #fff; }
.tile__old { background: var(--neutral-200); color: var(--neutral-600); }
.tile--old { opacity: .55; }
.tile--old:hover, .tile--old:focus-visible { opacity: 1; }

/* ---- Animations -----------------------------------------------------------
   A clip is judged by what it shows, so the card leads with the picture and
   keeps the facts underneath: duration, native size, frame rate, and the real
   weight of each format on offer. The stage plays a compressed preview; the
   weights are the originals, which is what matters when choosing what to embed. */
.mo__group { margin-top: 28px; }
.mo__grouph {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--neutral-400);
}
.mo__groupn { font-size: 11px; font-weight: 500; }
.mo__row {
  display: grid; gap: 16px; margin-top: 12px;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
}
.mo {
  margin: 0; border: 1px solid var(--neutral-200); border-radius: var(--radius-2xl);
  overflow: hidden; background: var(--neutral-white);
}
.mo__stage { position: relative; background: var(--neutral-100); }
.mo__v { display: block; width: 100%; height: auto; }
.mo__play {
  position: absolute; inset: 0; margin: auto; width: 46px; height: 46px;
  display: grid; place-items: center; border: 0; cursor: pointer;
  border-radius: 999px; background: rgba(255,255,255,.92); color: var(--neutral-900);
  box-shadow: 0 2px 10px rgba(15,23,42,.24);
}
.mo__play svg { width: 22px; height: 22px; }
.mo[data-playing] .mo__play { opacity: 0; pointer-events: none; }
.mo__meta { padding: 12px 14px 14px; }
.mo__title { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.mo__sub { margin-top: 2px; font-size: 12px; color: var(--neutral-400); }
.mo__fmts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; list-style: none; padding: 0; }
.mo__fmt {
  display: flex; align-items: baseline; gap: 5px;
  padding: 3px 8px; border-radius: 999px; background: var(--neutral-100);
  font-size: 11px; color: var(--neutral-600);
}
.mo__fmt code { font-size: 11px; font-weight: 700; color: var(--neutral-900); }
.mo__group {
  font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--brand-600);
}
