@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/bricolage-400.woff2") format("woff2");
}

@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/bricolage-700.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/dm-sans-400.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/dm-sans-500.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/dm-sans-600.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/dm-sans-700.woff2") format("woff2");
}

:root {
  --bg: #0b0d11;
  --surface: #12151b;
  --ink: #f2f4f7;
  --mute: #9aa3b2;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --star: #ffc000;
  --star-empty: #3a4050;
  --accent: #f2f4f7;
  --accent-text: #0b0d11;
  --danger: #ff8b7e;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shell: 980px;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 320px at 50% -140px, rgba(255, 255, 255, 0.05), transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.shell {
  width: min(100%, var(--shell));
  margin: 0 auto;
  min-height: 100vh;
  padding: 1.25rem 1.25rem 2.5rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.75rem;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  animation: rise 220ms var(--ease) both;
}

.brand-link {
  font-family: "Bricolage", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--ink);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin-right: auto;
}

.nav-link {
  text-decoration: none;
  color: var(--mute);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  transition: color 140ms ease, background 140ms ease;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.is-active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.lang-switch {
  display: inline-flex;
  gap: 0.15rem;
}

.lang-btn {
  min-width: 2rem;
  padding: 0.35rem 0.45rem;
  text-decoration: none;
  color: var(--mute);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lang-btn.is-active {
  color: var(--ink);
}

.content {
  min-width: 0;
}

.hero {
  padding: 0.35rem 0.15rem 0.25rem;
  animation: rise 280ms var(--ease) both;
}

.hero.compact {
  padding-bottom: 0;
}

.brand-hero {
  margin: 0;
  font-family: "Bricolage", sans-serif;
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.02;
  color: var(--ink);
}

.brand-hero.small {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}

.headline {
  margin: 0.85rem 0 0;
  font-family: "Bricolage", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0.45rem 0 0;
  max-width: 36rem;
  color: var(--mute);
  font-size: 1rem;
  line-height: 1.5;
}

.hero-meta {
  margin: 0.85rem 0 0;
  color: var(--mute);
  font-size: 0.82rem;
  font-weight: 600;
}

.banner-error {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 139, 126, 0.35);
  background: rgba(255, 139, 126, 0.08);
  color: var(--danger);
  font-size: 0.92rem;
}

.empty {
  margin: 1rem 0 0;
  color: var(--mute);
}

.board {
  margin-top: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  animation: rise 320ms var(--ease) both;
}

.site-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: 0.9rem 1.1rem;
  align-items: center;
  padding: 1.15rem 1.15rem;
  border-bottom: 1px solid var(--line);
  animation: rise 360ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 30ms);
}

.site-row:last-child {
  border-bottom: 0;
}

.site-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.site-rank {
  font-family: "Bricolage", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--mute);
  text-align: center;
}

.site-row:nth-child(-n + 3) .site-rank {
  color: var(--ink);
}

.site-main {
  min-width: 0;
}

.site-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
}

.site-name {
  margin: 0;
  font-family: "Bricolage", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.site-cat {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

.site-summary {
  margin: 0.3rem 0 0;
  color: var(--mute);
  font-size: 0.92rem;
  line-height: 1.45;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.rating-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  min-width: 1.8rem;
}

.stars {
  display: inline-flex;
  align-items: center;
  gap: 0.08rem;
}

.star {
  display: inline-flex;
  width: 16px;
  height: 16px;
}

.star svg {
  width: 16px;
  height: 16px;
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 9rem;
  height: 40px;
  padding: 0 1rem;
  border: 0;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms var(--ease);
}

.btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.25rem;
  color: var(--mute);
  font-size: 0.86rem;
}

.foot-brand {
  font-family: "Bricolage", sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.foot-links {
  margin: 0;
  display: inline-flex;
  gap: 1rem;
}

.foot-links a {
  color: var(--mute);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--ink);
}

.legal-body {
  margin: 0.35rem 0 0;
  max-width: 40rem;
  color: var(--mute);
  font-size: 0.98rem;
  line-height: 1.65;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.1rem 1.15rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar,
  .hero,
  .board,
  .site-row,
  .btn {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 1rem 0.9rem 2rem;
    gap: 1.25rem;
  }

  .topbar {
    padding: 0.75rem 0.8rem;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-right: 0;
  }

  .site-row {
    grid-template-columns: 2.2rem minmax(0, 1fr);
  }

  .btn.visit {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }
}
