@view-transition {
  navigation: auto;
}

:root {
  color-scheme: light;
  --bg: #fff;
  --fg: #000;
  --pad: clamp(14px, 1.8vw, 28px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000;
  --fg: #fff;
}

* { box-sizing: border-box; }

/* Public collection behaves as an interface, not a text document. Prevent
   accidental text highlights while keeping editable controls usable. */
body, body * {
  -webkit-user-select: none;
  user-select: none;
}
input, textarea, select, option {
  -webkit-user-select: text;
  user-select: text;
}

html {
  min-width: 320px;
  background: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.2;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { border: 0; }
.symbol-use { display: block; max-width: 100%; fill: currentColor; }
::selection { background: transparent; color: inherit; }

/* Cross-document shared symbol. pageswap and pagereveal assign this class
   only to the one SVG that participates in the current navigation. */
.vt-shared {
  view-transition-name: symbol-shared;
}

/* Keep the logo geometry transition generous while leaving the document
   transition itself to the browser. */
::view-transition-group(root) {
  animation-duration: 360ms;
  animation-timing-function: cubic-bezier(.22, 1, .36, 1);
}
::view-transition-group(symbol-shared) {
  animation-duration: 760ms;
  animation-timing-function: cubic-bezier(.16, 1, .3, 1);
  z-index: 10000;
}
::view-transition-old(symbol-shared),
::view-transition-new(symbol-shared) {
  animation-duration: inherit;
  height: 100%;
  object-fit: contain;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 360ms;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 58px;
  padding: 10px var(--pad);
  border-bottom: 1px solid var(--fg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--bg); }
}
.brandline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: baseline;
  min-width: 0;
}
.site-title {
  margin: 0;
  font-size: inherit;
  font-weight: 500;
  letter-spacing: -.015em;
}
.site-meta {
  color: var(--fg);
  white-space: nowrap;
  font-size: 12px;
}
.site-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.icon-button,
.search-input {
  height: 34px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: var(--bg);
}
.icon-button {
  position: relative;
  width: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .22s var(--ease);
}
.icon-button svg {
  width: 16px;
  height: 16px;
  overflow: visible;
}
.icon-button .invert-symbol { width: 17px; height: 17px; }
.icon-button .color-menu-symbol { width: 17px; height: 17px; }
.symbol-use, .detail-symbol {
  -webkit-user-drag: none;
}
.density-icon {
  transform-origin: 50% 50%;
  transition: opacity .2s var(--ease), transform .32s var(--ease);
}
.density-icon--editorial { opacity: 1; transform: scale(1); }
.density-icon--compact { opacity: 0; transform: scale(.76); }
html[data-density="compact"] .density-icon--editorial { opacity: 0; transform: scale(1.16); }
html[data-density="compact"] .density-icon--compact { opacity: 1; transform: scale(1); }
.icon-button:hover,
.icon-button.is-active {
  background: var(--fg);
  color: var(--bg);
}
.icon-button[aria-expanded="true"] {
  background: var(--fg);
  color: var(--bg);
}
.icon-button:active { transform: scale(.92); }

.search-wrap { position: relative; }
.search-input {
  width: clamp(128px, 14vw, 208px);
  padding: 0 12px;
  outline: none;
  transition: width .3s var(--ease);
}
.search-input:focus {
  width: clamp(180px, 20vw, 260px);
}
.search-input::placeholder {
  color: var(--fg);
  opacity: 1;
}


/* Palette control */
.palette-control { position: relative; }
.palette-popover {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 100;
  width: 224px;
  border: 1px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  padding: 10px;
}
.palette-title {
  margin-bottom: 9px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.palette-swatches { display: grid; gap: 7px; margin-bottom: 10px; }
.palette-swatches span { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: center; font-size: 11px; }
.palette-swatches i { width: 22px; height: 22px; display: block; border: 1px solid var(--fg); background: var(--swatch, var(--bg)); }
.palette-buttons { display: grid; grid-template-columns: 1fr auto; border: 1px solid var(--fg); }
.palette-buttons button { min-height: 32px; padding: 0 10px; background: var(--bg); color: var(--fg); border: 0; border-right: 1px solid var(--fg); cursor: pointer; }
.palette-buttons button:last-child { border-right: 0; }
.palette-buttons button:hover { background: var(--fg); color: var(--bg); }
.palette-note { margin-top: 8px; font-size: 9px; line-height: 1.35; }
.detail-actions { display: flex; align-items: center; gap: 6px; pointer-events: auto; }

/* Index */
.collection {
  padding: 0 var(--pad) var(--pad);
}
.collection-status {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  min-height: 48px;
  align-items: center;
  border-bottom: 1px solid var(--fg);
  color: var(--fg);
  font-size: 12px;
}
.collection-mode {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.collection-mode [data-sort-label] {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.symbol-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-left: 1px solid var(--fg);
}
.symbol-card {
  min-width: 0;
  border-right: 1px solid var(--fg);
  border-bottom: 1px solid var(--fg);
}
.symbol-card[hidden] { display: none; }
.symbol-link {
  display: block;
  min-width: 0;
}
.symbol-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg);
}
.symbol-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0 solid var(--bg);
  pointer-events: none;
  transition: border-width .42s var(--ease);
}
.symbol-optical {
  display: grid;
  place-items: center;
  width: min(50%, 190px);
  height: min(50%, 190px);
  transform: scale(var(--optical-scale, 1));
  transform-origin: 50% 50%;
}
.symbol-art [data-symbol-image] {
  width: 100%;
  height: 100%;
  object-fit: contain;
  color: var(--fg);
  fill: currentColor;
  transform: scale(1);
  transition: transform .58s var(--ease);
  will-change: transform;
  scroll-margin-top: 22vh;
}
.symbol-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 16px;
  min-height: 82px;
  padding: 10px 10px 12px;
  align-content: start;
  background: var(--bg);
  border-top: 1px solid var(--fg);
}
.symbol-name {
  font-weight: 500;
  letter-spacing: -.012em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.symbol-year {
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.symbol-designer {
  grid-column: 1 / -1;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
.symbol-designer strong {
  color: var(--fg);
  font-weight: 500;
}

/* Density: Editorial is the reading view; Compact is the visual index. */
html[data-density="compact"] .symbol-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
html[data-density="compact"] .symbol-info {
  display: none;
}
html[data-density="compact"] .symbol-optical {
  width: min(62%, 150px);
  height: min(62%, 150px);
}

/* Strong hover: symbol/background swap, preserving the palette roles. */
.symbol-link:hover .symbol-art,
.symbol-link:focus-visible .symbol-art {
  background: var(--fg);
}
.symbol-link:hover .symbol-art [data-symbol-image],
.symbol-link:focus-visible .symbol-art [data-symbol-image] {
  transform: scale(1.15);
  color: var(--bg);
  fill: currentColor;
}
.symbol-link:hover .symbol-art::after,
.symbol-link:focus-visible .symbol-art::after {
  border-width: 7px;
}

.symbol-link:focus-visible,
.icon-button:focus-visible,
.search-input:focus-visible,
.back-link:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: -2px;
}

/* Detail */
.detail-page {
  height: 100svh;
  overflow: hidden;
}
.detail-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 58px;
  padding: 10px var(--pad);
  border-bottom: 1px solid var(--fg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  pointer-events: none;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .detail-header { background: var(--bg); }
}
.detail-header > * { pointer-events: auto; }
.back-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: var(--bg);
}
.back-link svg {
  width: 13px;
  height: 13px;
}
.back-link:hover {
  background: var(--fg);
  color: var(--bg);
}
.detail-scroll {
  height: 100svh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}
.detail-scroll::-webkit-scrollbar { display: none; }
.symbol-stage {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: grid;
  place-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--fg);
}
.detail-symbol-shell {
  display: grid;
  place-items: center;
  transform: scale(var(--optical-scale, 1));
  transform-origin: 50% 50%;
}
.detail-symbol-shell--large {
  width: min(52vw, 620px, 60svh);
  height: min(52vw, 620px, 60svh);
}
.detail-symbol-shell--small {
  width: clamp(54px, 6.6vw, 104px);
  height: clamp(54px, 6.6vw, 104px);
}
.detail-symbol {
  width: 100%;
  height: 100%;
  object-fit: contain;
  color: var(--fg);
  fill: currentColor;
}
.hero-credit {
  position: absolute;
  left: 50%;
  bottom: var(--pad);
  max-width: min(48vw, 560px);
  transform: translateX(-50%);
  color: var(--fg);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-credit strong {
  font-weight: 500;
}
.scroll-cue {
  position: absolute;
  right: var(--pad);
  bottom: var(--pad);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  cursor: pointer;
  background: none;
  padding: 0;
  font-size: 12px;
}
.scroll-cue svg {
  width: 13px;
  height: 13px;
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(4px); }
}
.detail-meta {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(240px, .8fr) auto;
  gap: 16px 28px;
  align-items: baseline;
  padding: 12px var(--pad) 14px;
  border-top: 1px solid var(--fg);
  background: var(--bg);
}
.detail-name {
  margin: 0;
  font-size: inherit;
  font-weight: 500;
  letter-spacing: -.012em;
}
.detail-year {
  color: var(--fg);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.detail-designer {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--fg);
  font-size: 12px;
}
.detail-designer strong {
  color: var(--fg);
  font-weight: 500;
}

/* Site footer / submission */
.site-footer {
  display: flex;
  align-items: flex-end;
  min-height: 132px;
  padding: 28px var(--pad) max(28px, env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--fg);
}
.submit-mark,
.detail-submit {
  display: inline-flex;
  width: fit-content;
  color: var(--fg);
  font: inherit;
  text-decoration: none;
  text-underline-offset: .22em;
}
.submit-mark:hover,
.submit-mark:focus-visible,
.detail-submit:hover,
.detail-submit:focus-visible {
  text-decoration: underline;
}
.submit-mark:focus-visible,
.detail-submit:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}
.detail-submit {
  justify-self: end;
  font-size: 12px;
  white-space: nowrap;
}

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

@media (max-width: 1400px) {
  html[data-density="compact"] .symbol-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
  .symbol-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html[data-density="compact"] .symbol-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .detail-meta { grid-template-columns: minmax(0, 1fr) auto; }
  .detail-designer { grid-column: 1; }
  .detail-submit { grid-column: 2; justify-self: end; }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
    padding-block: 10px;
  }
  .site-actions { width: 100%; }
  .search-wrap { flex: 1; }
  .search-input,
  .search-input:focus { width: 100%; }
  .collection-mode > span:last-child { display: none; }
  .symbol-grid { grid-template-columns: 1fr; }
  html[data-density="compact"] .symbol-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .symbol-info {
    min-height: 80px;
    padding: 9px 8px 11px;
  }
  html[data-density="compact"] .symbol-optical {
    width: 62%;
    height: 62%;
  }
  .detail-symbol-shell--large {
    width: min(72vw, 480px, 56svh);
    height: min(72vw, 480px, 56svh);
  }
  .detail-meta {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
  .detail-designer { grid-column: 1; padding-right: 0; }
  .detail-submit { grid-column: 2; justify-self: end; }
}

@media (max-width: 430px) {
  .brandline { gap: 3px 11px; }
  .site-meta:last-child { display: none; }
  .symbol-info {
    font-size: 12px;
    min-height: 76px;
  }
  .symbol-link:hover .symbol-art [data-symbol-image],
  .symbol-link:focus-visible .symbol-art [data-symbol-image] {
    transform: scale(1.10);
  }
  .detail-symbol-shell--large {
    width: min(74vw, 54svh);
    height: min(74vw, 54svh);
  }
  .hero-credit {
    left: var(--pad);
    right: 72px;
    bottom: max(var(--pad), env(safe-area-inset-bottom));
    max-width: none;
    transform: none;
  }
  .scroll-cue {
    bottom: max(var(--pad), env(safe-area-inset-bottom));
  }
  .scroll-cue span { display: none; }
  .detail-meta {
    gap: 6px 14px;
    font-size: 13px;
  }
}

@media (hover: none) {
  .symbol-link:hover .symbol-art {
    background: var(--bg);
  }
  .symbol-link:hover .symbol-art [data-symbol-image] {
    transform: none;
    color: var(--fg);
  fill: currentColor;
  }
  .symbol-link:hover .symbol-art::after {
    border-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(root),
  ::view-transition-group(symbol-shared),
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: 160ms !important; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* v3.5 — three density states, palette families, detail browsing */
.density-icon--wall { opacity: 0; transform: scale(.62); }
html[data-density="wall"] .density-icon--editorial,
html[data-density="wall"] .density-icon--compact { opacity: 0; transform: scale(.62); }
html[data-density="wall"] .density-icon--wall { opacity: 1; transform: scale(1); }
html[data-density="compact"] .density-icon--wall { opacity: 0; transform: scale(.72); }

.palette-family {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 0 9px;
  border-top: 1px solid var(--fg);
  font-size: 10px;
}
.palette-family span { text-transform: uppercase; letter-spacing: .07em; }
.palette-family select {
  min-width: 0;
  width: 100%;
  height: 28px;
  border: 1px solid var(--fg);
  border-radius: 0;
  background: var(--bg);
  color: var(--fg);
  padding: 0 22px 0 7px;
  font: inherit;
  font-size: 10px;
}

html[data-density="wall"] .symbol-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
html[data-density="wall"] .symbol-info { display: none; }
html[data-density="wall"] .symbol-optical {
  width: 70%;
  height: 70%;
}
html[data-density="wall"] .symbol-art::after { transition-duration: .28s; }
html[data-density="wall"] .symbol-link:hover .symbol-art [data-symbol-image],
html[data-density="wall"] .symbol-link:focus-visible .symbol-art [data-symbol-image] {
  transform: scale(1.09);
}
html[data-density="wall"] .symbol-link:hover .symbol-art::after,
html[data-density="wall"] .symbol-link:focus-visible .symbol-art::after {
  border-width: 3px;
}

.detail-neighbors {
  position: fixed;
  inset: 50% var(--pad) auto var(--pad);
  z-index: 58;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  transform: translateY(-50%);
}
.detail-neighbor {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  color: var(--fg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  transition: transform .22s var(--ease), background .22s var(--ease), color .22s var(--ease);
}
.detail-neighbor svg { width: 14px; height: 14px; }
.detail-neighbor:hover,
.detail-neighbor:focus-visible { background: var(--fg); color: var(--bg); }
.detail-neighbor:active { transform: scale(.9); }
.detail-neighbor:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

@media (max-width: 1400px) {
  html[data-density="wall"] .symbol-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  html[data-density="wall"] .symbol-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  html[data-density="wall"] .symbol-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  html[data-density="wall"] .symbol-optical { width: 68%; height: 68%; }
  .detail-neighbors { inset-inline: 10px; }
  .detail-neighbor { width: 32px; height: 32px; }
}
@media (max-width: 420px) {
  html[data-density="wall"] .symbol-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (hover: none) {
  html[data-density="wall"] .symbol-link:hover .symbol-art [data-symbol-image] { transform: none; }
  html[data-density="wall"] .symbol-link:hover .symbol-art::after { border-width: 0; }
}


/* v3.5.5 — UI-free slideshow + clearer color control */
.icon-button .color-menu-symbol { width: 17px; height: 17px; }
.icon-button .slideshow-button-symbol { width: 17px; height: 17px; }

html[data-slideshow="true"],
html[data-slideshow="true"] body {
  overflow: hidden;
  overscroll-behavior: none;
}
.slideshow {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  cursor: none;
  touch-action: manipulation;
}
.slideshow-stage {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 96px);
}
.slideshow-symbol {
  display: block;
  width: min(78vw, 1280px);
  height: min(76svh, 920px);
  overflow: visible;
  fill: currentColor;
  color: var(--fg);
  transform: scale(var(--slide-optical-scale, 1));
  transform-origin: 50% 50%;
  view-transition-name: slideshow-symbol;
  -webkit-user-drag: none;
}
::view-transition-group(slideshow-symbol) {
  z-index: 20000;
  animation-duration: 760ms;
  animation-timing-function: cubic-bezier(.16, 1, .3, 1);
}
::view-transition-old(slideshow-symbol),
::view-transition-new(slideshow-symbol) {
  height: 100%;
  object-fit: contain;
  mix-blend-mode: normal;
}
::view-transition-old(slideshow-symbol) { animation: iom-slide-old 760ms cubic-bezier(.16,1,.3,1) both; }
::view-transition-new(slideshow-symbol) { animation: iom-slide-new 760ms cubic-bezier(.16,1,.3,1) both; }
@keyframes iom-slide-old { to { opacity: 0; transform: scale(.975); } }
@keyframes iom-slide-new { from { opacity: 0; transform: scale(1.025); } }
@media (max-width: 760px) {
  .slideshow-stage { padding: 22px; }
  .slideshow-symbol { width: 84vw; height: 76svh; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(slideshow-symbol),
  ::view-transition-old(slideshow-symbol),
  ::view-transition-new(slideshow-symbol) { animation-duration: 160ms !important; }
}
