:root {
  color-scheme: light;
  --paper: #f8f7f3;
  --ink: #24231f;
  --muted: #645f53;
  --quiet: #746d5e;
  --rule: #dcd7cb;
  --matte: #eae6dc;
  --edge: clamp(1rem, 3.45vw, 4.5rem);
  --measure: 105rem;
  --header-height: 3.9rem;
  color: var(--ink);
  background: var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Helvetica Neue", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-height) + .75rem);
}

body {
  min-width: 16rem;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

h1, h2, h3, p, figure {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid #685744;
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: .55rem;
  left: var(--edge);
  padding: .55rem .85rem;
  transform: translateY(-150%);
  color: var(--paper);
  background: var(--ink);
}

.skip-link:focus {
  transform: none;
}

.header-inner, .wall-page, .site-footer {
  width: min(var(--measure), calc(100% - 2 * var(--edge)));
  margin-inline: auto;
}

.site-header {
  z-index: 3;
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.header-inner {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: .45rem 1.15rem;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  column-gap: .56rem;
  font-size: .94rem;
  font-weight: 690;
  white-space: nowrap;
}

.brand-mark {
  width: .57rem;
  height: .57rem;
  flex: none;
  background: currentColor;
}

.site-nav {
  display: flex;
  min-width: 0;
  align-items: stretch;
  column-gap: clamp(.88rem, 3vw, 3rem);
}

.site-nav a {
  position: relative;
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 560;
  white-space: nowrap;
}

.site-nav a:is([aria-current]:not([aria-current="false"]), :hover) {
  color: var(--ink);
}

.site-nav a[aria-current]:not([aria-current="false"])::after {
  position: absolute;
  right: 0;
  bottom: .26rem;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
}

.wall-page {
  --wall-gap: 10px;
  --wall-row-target: 166px;
  --wall-row-limit: 9;
  padding-top: clamp(1.05rem, 2.4vw, 2.6rem);
}

.wall-intro {
  margin-bottom: clamp(.68rem, 1vw, 1.12rem);
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.6;
}

.wall-section + .wall-section {
  margin-top: clamp(3.2rem, 7vw, 7rem);
}

.wall-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem 1rem;
  padding-bottom: clamp(.7rem, 1.18vw, 1.25rem);
  border-bottom: 1px solid var(--ink);
}

.wall-section-header h2 {
  font-size: clamp(1.7rem, 3.5vw, 3.65rem);
  font-weight: 580;
  line-height: 1.12;
}

.wall-section-count {
  flex: none;
  color: var(--muted);
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wall-grid {
  display: grid;
  min-width: 0;
  row-gap: clamp(1.45rem, 2.9vw, 2.9rem);
  padding-top: clamp(.8rem, 1.4vw, 1.35rem);
}

.wall-group, .wall-group-rows {
  min-width: 0;
}

.wall-group-rows {
  overflow-anchor: none;
}

.wall-group-header {
  display: flex;
  align-items: baseline;
  gap: .65rem .75rem;
  margin-bottom: .65rem;
}

.wall-group-title {
  display: inline-flex;
  align-items: center;
  gap: .52rem;
  font-size: .88rem;
  font-weight: 620;
  line-height: 1.4;
}

.wall-swatch {
  width: .72rem;
  height: .72rem;
  flex: none;
  border: 1px solid #24231f30;
  border-radius: 100%;
  background: var(--swatch, var(--matte));
}

.wall-group-hex {
  color: var(--quiet);
  font: 500 .75rem/1.3 ui-monospace, Consolas, monospace;
  letter-spacing: .02em;
  white-space: nowrap;
}

.wall-group-count {
  margin-inline-start: auto;
  color: var(--quiet);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wall-row {
  --wall-row-height: var(--wall-row-target);
  display: flex;
  min-width: 0;
  align-items: stretch;
  gap: var(--wall-gap);
}

.wall-row + .wall-row {
  margin-top: var(--wall-gap);
}

.wall-tile {
  position: relative;
  width: calc(var(--wall-row-height) * var(--tile-ratio, 1));
  height: var(--wall-row-height);
  min-width: 0;
  flex: 0 0 auto;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--matte);
  cursor: zoom-in;
  vertical-align: top;
  touch-action: manipulation;
}

.wall-tile img {
  width: 100%;
  height: 100%;
  pointer-events: none;
  object-fit: contain;
}

.wall-tile::after {
  position: absolute;
  top: .48rem;
  right: .48rem;
  display: grid;
  width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border-radius: 2px;
  color: #fff;
  background: #25231dd9;
  content: "+";
  font: 400 1.08rem/1 system-ui, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.wall-tile:focus-visible::after {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .wall-tile:hover::after {
    opacity: 1;
  }
}

.wall-row.is-expanded {
  justify-content: start;
}

.wall-row.is-expanded .wall-tile {
  --wall-expanded-width: min(100%, 84rem, max(28rem, calc(59rem * var(--tile-ratio, 1))));
  width: var(--wall-expanded-width);
  height: auto;
  aspect-ratio: var(--tile-ratio, 1);
  margin-inline-start: clamp(0px, calc(var(--wall-expand-center, 50%) - var(--wall-expanded-width) / 2), calc(100% - var(--wall-expanded-width)));
  cursor: zoom-out;
}

.wall-row.is-expanded .wall-tile img {
  height: auto;
}

.wall-row.is-expanded .wall-tile::after {
  content: "−";
  opacity: 1;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .45rem 1rem;
  margin-top: clamp(2.5rem, 6.2vw, 6rem);
  padding-block: 1.15rem 1.75rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .85rem;
}

.site-footer a:is(:hover, :focus-visible) {
  text-decoration: underline;
  text-underline-offset: .2em;
}

@media (max-width: 1200px) {
  .wall-page {
    --wall-gap: 8px;
    --wall-row-target: 142px;
    --wall-row-limit: 5;
  }
}

@media (max-width: 820px) {
  :root {
    --edge: clamp(.85rem, 3.4vw, 1.6rem);
    --header-height: 3.55rem;
  }

  .wall-page {
    --wall-gap: 6px;
    --wall-row-target: 116px;
    --wall-row-limit: 3;
  }

  .wall-group-header {
    margin-bottom: .5rem;
  }

  .wall-tile::after {
    top: .34rem;
    right: .34rem;
    width: 1.45rem;
    height: 1.45rem;
  }
}

@media (max-width: 380px) {
  .header-inner {
    column-gap: .57rem;
  }

  .brand {
    column-gap: .34rem;
    font-size: .83rem;
  }

  .brand-mark {
    width: .43rem;
    height: .43rem;
  }

  .site-nav {
    column-gap: clamp(.4rem, 2.1vw, .63rem);
  }

  .site-nav a {
    font-size: .8rem;
  }

  .wall-page {
    --wall-row-target: 100px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
  }
}
