:root {
  --bg: #fafaf8;
  --fg: #171717;
  --muted: #737373;
  --line: #e7e5e0;
  --soft: #f0efeb;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --wide: 1360px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.site-head,
main,
.site-foot {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 24px;
}

.site-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 28px;
  padding-bottom: 8px;
}

.brand {
  font: 400 28px/1 var(--serif);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.tagline {
  margin: 0;
  color: var(--muted);
}

/* search */

.search { margin: 40px 0 16px; }

.search input {
  width: 100%;
  padding: 18px 22px;
  font: 400 22px/1.3 var(--sans);
  color: var(--fg);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.search input:focus { border-color: #a3a3a3; }

.search input::placeholder { color: #a8a29e; }

.search input::-webkit-search-cancel-button { filter: grayscale(1); opacity: 0.5; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
}

.chip {
  padding: 6px 13px;
  font: inherit;
  font-size: 13px;
  color: #404040;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.chip:hover { background: var(--soft); }
.chip .n { color: var(--muted); font-size: 12px; }
.chip.on { color: #fafaf8; background: #171717; border-color: #171717; }
.chip.on .n { color: #bdbdbd; }

.count-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin: 28px 0 14px;
}

.count {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.toggle input { margin: 0; accent-color: #171717; }

/* grid and cards */

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 24px;
}

@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .grid { grid-template-columns: 1fr; } }

.card {
  display: block;
  text-decoration: none;
  min-width: 0;
  /* The browser skips the layout and paint of cards far off screen. */
  content-visibility: auto;
  contain-intrinsic-size: auto 260px;
}

.shot {
  position: relative;
  contain: layout paint;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--soft);
  border-radius: 8px;
  outline: 1px solid rgba(0, 0, 0, 0.05);
  outline-offset: -1px;
}

.shot iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 800px;
  border: 0;
  background: #fff;
  transform: scale(var(--scale, 0.25));
  transform-origin: 0 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.shot.loaded iframe { opacity: 1; }

.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.shot.loaded img { opacity: 1; }

.shot.big iframe { pointer-events: auto; }

.shot.nosite { background: #f5f4f1; }

.ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: #a8a29e;
  font: 400 17px/1.3 var(--serif);
  text-align: center;
  overflow-wrap: anywhere;
}

.card-body {
  display: block;
  padding-top: 12px;
}

.card-name {
  display: block;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
}

.card-meta .handle {
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta > span { flex: none; }
.card-meta > .handle { flex: 0 1 auto; }

.more-wrap {
  display: flex;
  justify-content: center;
  margin: 48px 0;
}

.more {
  padding: 10px 22px;
  font: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.more:hover { background: var(--soft); }

.empty,
.loading {
  color: var(--muted);
  grid-column: 1 / -1;
  padding: 40px 0;
}

/* account */

.account { padding: 32px 0 64px; }

.back {
  display: inline-block;
  margin-bottom: 32px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.back:hover { color: var(--fg); }

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

@media (max-width: 860px) {
  .account-grid { grid-template-columns: 1fr; gap: 32px; }
}

.avatar {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
}

.avatar.initial {
  display: flex;
  align-items: center;
  justify-content: center;
  font: 400 36px/1 var(--serif);
  color: var(--muted);
}

.account h1 {
  margin: 20px 0 2px;
  font: 400 34px/1.15 var(--serif);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.xlink {
  color: var(--muted);
  text-decoration: none;
}

.xlink:hover { color: var(--fg); text-decoration: underline; }

.bio {
  margin: 18px 0 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.tag {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 1px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}

.shot.big { border-radius: 10px; }

.shot-link { display: block; }

.open-site {
  display: inline-flex;
  gap: 10px;
  align-items: baseline;
  margin-top: 14px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
  font-weight: 500;
}

.open-site span {
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
}

.open-site:hover { background: var(--soft); }

.account h2 {
  margin: 40px 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.links li { border-bottom: 1px solid var(--line); }

.links a {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  text-decoration: none;
  min-width: 0;
}

.links a:hover .link-label { text-decoration: underline; }

.link-label {
  flex: none;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-host {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.link-path { color: #a8a29e; }

.links .none { padding: 12px 0; color: var(--muted); }

.notfound { padding: 80px 0; }

.notfound h1 {
  font: 400 30px/1.2 var(--serif);
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.site-foot {
  padding-top: 24px;
  padding-bottom: 40px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 540px) {
  .site-head, main, .site-foot { padding-left: 16px; padding-right: 16px; }
  .search { margin-top: 24px; }
  .search input { font-size: 18px; padding: 15px 18px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .chip { flex: none; }
  .account h1 { font-size: 28px; }
}
