:root {
  color-scheme: light;
  --ink: #181a19;
  --muted: #676d69;
  --faint: #929792;
  --line: rgb(24 26 25 / 11%);
  --canvas: #f5f6f4;
  --surface: #ffffff;
  --accent: #2f6df6;
  --accent-strong: #1f55cd;
  --signal: #ff5c35;
  --success: #1f9d5a;
  --radius: 8px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  font-family:
    Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.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;
}

.topbar {
  min-height: 64px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(18px) saturate(160%);
}

.topbar-inner,
.intro-inner,
.controls-inner,
.catalog,
.footer-inner {
  width: min(1560px, calc(100% - 64px));
  margin-inline: auto;
}

.topbar-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 14px;
  font-weight: 700;
}

.brand small {
  margin-top: 1px;
  color: var(--faint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.audit {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.audit-date {
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: var(--faint);
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(31 157 90 / 10%);
}

main {
  min-height: calc(100vh - 140px);
}

.intro {
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line);
}

.intro-inner {
  min-height: 246px;
  padding-block: 42px 38px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(460px, 0.75fr);
  align-items: end;
  gap: 64px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--signal);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 13px;
  font-size: 52px;
  line-height: 1.06;
  font-weight: 680;
}

.lede {
  max-width: 700px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  box-shadow:
    inset 0 1px 0 var(--line),
    inset 0 -1px 0 var(--line);
}

.stats div {
  padding: 17px 12px 15px 0;
  min-width: 0;
}

.stats div + div {
  padding-left: 15px;
  box-shadow: inset 1px 0 0 var(--line);
}

.stats dt {
  font-size: 30px;
  line-height: 1;
  font-weight: 520;
  font-variant-numeric: tabular-nums;
}

.stats dd {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.controls {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(245 246 244 / 88%);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(20px) saturate(170%);
}

.controls-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-wrap {
  width: min(350px, 31vw);
  height: 40px;
  padding: 0 9px 0 12px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgb(255 255 255 / 90%);
  border-radius: 7px;
  box-shadow:
    0 0 0 1px rgb(24 26 25 / 12%),
    0 1px 2px rgb(24 26 25 / 4%);
  transition:
    box-shadow 160ms var(--ease-out),
    background-color 160ms ease;
}

.search-wrap:focus-within {
  background: #fff;
  box-shadow:
    0 0 0 1px var(--accent),
    0 0 0 3px rgb(47 109 246 / 13%);
}

.search-wrap svg,
.sort-wrap svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--faint);
}

.search-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
}

.search-wrap input::placeholder {
  color: var(--faint);
}

.icon-button {
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    transform 120ms var(--ease-out);
}

.icon-button:active {
  transform: scale(0.96);
}

.icon-button svg {
  width: 15px;
  height: 15px;
}

.filters {
  min-width: 0;
  display: flex;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter {
  min-height: 36px;
  padding: 0 12px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 620;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    transform 120ms var(--ease-out);
}

.filter.is-active {
  color: #fff;
  background: var(--ink);
}

.filter:active {
  transform: scale(0.97);
}

.sort-wrap {
  height: 36px;
  margin-left: auto;
  padding: 0 9px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  background: rgb(255 255 255 / 72%);
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--line);
}

.sort-wrap select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.catalog {
  padding-block: 34px 74px;
}

.section-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 680;
}

.section-heading > p {
  margin-bottom: 1px;
  color: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.masonry {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 8px;
  column-gap: 16px;
  align-items: start;
}

.site-card {
  --category-color: var(--accent);
  position: relative;
  width: 100%;
  margin-bottom: 16px;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgb(24 26 25 / 9%),
    0 2px 3px rgb(24 26 25 / 3%),
    0 10px 24px -22px rgb(24 26 25 / 28%);
  transition:
    transform 180ms var(--ease-out),
    box-shadow 180ms ease;
}

.site-card[data-category="game"] {
  --category-color: #e5484d;
}

.site-card[data-category="experience"] {
  --category-color: #7557d9;
}

.site-card[data-category="editorial"] {
  --category-color: #168263;
}

.site-card[data-category="service"] {
  --category-color: #276ef1;
}

.site-card[data-category="archive"] {
  --category-color: #9b631f;
}

.card-cover {
  position: relative;
  overflow: hidden;
  background: #e4e7e3;
  box-shadow: inset 0 -1px 0 var(--line);
}

.card-cover[data-ratio="wide"] {
  aspect-ratio: 16 / 9;
}

.card-cover[data-ratio="square"] {
  aspect-ratio: 1 / 1;
}

.card-cover[data-ratio="portrait"] {
  aspect-ratio: 4 / 5;
}

.card-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 260ms var(--ease-out);
}

.service-cover {
  min-height: 162px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background: #222624;
}

.service-cover[data-tone="green"] {
  background: #174633;
}

.service-cover[data-tone="blue"] {
  background: #1b477a;
}

.service-cover[data-tone="red"] {
  background: #842f31;
}

.service-cover[data-tone="yellow"] {
  color: var(--ink);
  background: #f0c944;
}

.service-cover svg {
  width: 25px;
  height: 25px;
}

.service-host {
  max-width: 92%;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.cover-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.badge {
  min-height: 23px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  background: rgb(18 20 19 / 80%);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 680;
  backdrop-filter: blur(10px);
}

.badge.is-live::before,
.badge.is-auth::before,
.badge.is-offline::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge.is-live::before {
  background: #55e58f;
}

.badge.is-auth::before {
  background: #ffc64c;
}

.badge.is-offline::before {
  background: #ff705b;
}

.card-body {
  padding: 15px 16px 14px;
}

.card-meta {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 650;
}

.card-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--category-color);
}

.card-type::before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 2px;
}

.site-card h3 {
  margin-bottom: 7px;
  font-size: 20px;
  line-height: 1.24;
  font-weight: 680;
  overflow-wrap: anywhere;
}

.title-link {
  text-decoration: none;
}

.card-description {
  display: -webkit-box;
  min-height: 40px;
  margin-bottom: 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-list {
  margin: 0 0 13px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  list-style: none;
}

.tag-list li {
  padding: 4px 6px;
  color: #6f756f;
  background: #f0f2ef;
  border-radius: 4px;
  font-size: 9px;
}

.tag-list li:nth-child(n + 3) {
  display: none;
}

.card-footer {
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: inset 0 1px 0 var(--line);
}

.route {
  min-width: 0;
  overflow: hidden;
  color: var(--faint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.open-link,
.disabled-link {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 6px;
  text-decoration: none;
}

.open-link {
  color: #fff;
  background: var(--ink);
  transition:
    color 140ms ease,
    background-color 140ms ease,
    transform 120ms var(--ease-out);
}

.open-link:active {
  transform: scale(0.95);
}

.open-link svg,
.disabled-link svg {
  width: 15px;
  height: 15px;
}

.disabled-link {
  color: #8e938e;
  background: #eceeeb;
}

.empty-state {
  padding: 76px 20px;
  text-align: center;
  background: rgb(255 255 255 / 52%);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
}

.empty-state svg {
  width: 30px;
  height: 30px;
  color: var(--faint);
}

.empty-state h3 {
  margin: 12px 0 7px;
  font-size: 18px;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

footer {
  min-height: 76px;
  color: #aeb4af;
  background: #181a19;
}

.footer-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 11px;
}

.footer-inner p {
  margin-bottom: 0;
}

.footer-inner a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: none;
}

.footer-inner svg {
  width: 14px;
  height: 14px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .icon-button:hover {
    color: var(--ink);
    background: #edf0ec;
  }

  .filter:hover {
    color: var(--ink);
    background: rgb(24 26 25 / 6%);
  }

  .site-card:hover {
    transform: translateY(-3px);
    box-shadow:
      0 0 0 1px rgb(24 26 25 / 12%),
      0 6px 12px rgb(24 26 25 / 6%),
      0 22px 40px -28px rgb(24 26 25 / 34%);
  }

  .site-card:hover .card-cover img {
    transform: scale(1.025);
  }

  .title-link:hover {
    color: var(--accent);
  }

  .open-link:hover {
    background: var(--accent);
  }
}

@media (min-width: 1660px) {
  .masonry {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .intro-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .stats {
    max-width: 690px;
  }

  .masonry {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topbar-inner,
  .intro-inner,
  .controls-inner,
  .catalog,
  .footer-inner {
    width: min(100% - 36px, 1560px);
  }

  .controls-inner {
    min-height: 112px;
    padding-block: 10px;
    align-items: stretch;
    flex-wrap: wrap;
  }

  .search-wrap {
    width: calc(100% - 104px);
  }

  .sort-wrap {
    width: 90px;
    margin-left: 0;
  }

  .filters {
    width: 100%;
    order: 3;
  }

  .masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .topbar-inner,
  .intro-inner,
  .controls-inner,
  .catalog,
  .footer-inner {
    width: calc(100% - 28px);
  }

  .topbar,
  .topbar-inner {
    min-height: 58px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .audit > span:not(.status-dot) {
    display: none;
  }

  .intro-inner {
    min-height: 0;
    padding-block: 32px 30px;
  }

  h1 {
    font-size: 36px;
    line-height: 1.12;
  }

  .lede {
    font-size: 14px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats div:nth-child(3) {
    padding-left: 0;
    box-shadow:
      inset 0 1px 0 var(--line),
      none;
  }

  .stats div:nth-child(4) {
    box-shadow:
      inset 1px 0 0 var(--line),
      inset 0 1px 0 var(--line);
  }

  .controls-inner {
    min-height: 108px;
  }

  .search-wrap {
    width: calc(100% - 110px);
  }

  .sort-wrap {
    width: 96px;
  }

  .filter {
    min-height: 35px;
    padding-inline: 11px;
  }

  .catalog {
    padding-block: 28px 54px;
  }

  .masonry {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .site-card h3 {
    font-size: 22px;
  }

  .footer-inner {
    padding-block: 20px;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar,
  .controls {
    background: var(--surface);
    backdrop-filter: none;
  }
}
