:root {
  --bg: #f3f6ef;
  --ink: #16241d;
  --muted: #47554e;
  --card: #fcfdf8;
  --accent: #ff7a1a;
  --accent-ink: #5f2e00;
  --line: #d5e0d2;
  --pill: #e8efe4;
  --shadow: 0 16px 36px rgba(22, 36, 29, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 122, 26, 0.2), transparent 34%),
    radial-gradient(circle at 82% 7%, rgba(95, 186, 108, 0.17), transparent 36%),
    linear-gradient(180deg, #f8fbf4 0%, #eff5ea 100%);
}

.container {
  width: min(1080px, calc(100vw - 2rem));
  margin: 2.3rem auto 3rem;
}

.hero {
  padding: 1.6rem 1.4rem;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: center;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.78rem;
  color: var(--muted);
}

h1 {
  margin: 0.3rem 0 0.45rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(252, 253, 248, 0.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.35rem 0.5rem;
  box-shadow: 0 8px 18px rgba(22, 36, 29, 0.06);
  font-size: 0.9rem;
  color: var(--muted);
}

.lang-switch select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.2rem 0.35rem;
  color: var(--ink);
  font-size: 0.9rem;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.toolbar {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.search-wrap {
  display: flex;
  align-items: center;
  background: rgba(252, 253, 248, 0.9);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.7rem 0.85rem;
  box-shadow: 0 10px 24px rgba(22, 36, 29, 0.06);
}

.search-icon {
  color: var(--muted);
  margin-right: 0.35rem;
  font-size: 1.2rem;
}

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

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tab {
  border: 1px solid var(--line);
  background: var(--pill);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 180ms ease;
}

.tab:hover {
  transform: translateY(-1px);
}

.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.group-block {
  margin: 1.5rem 0 2rem;
}

.group-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.group-title h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
}

.group-count {
  font-size: 0.87rem;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.8rem;
}

.site-card {
  display: grid;
  gap: 0.7rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.site-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(22, 36, 29, 0.16);
}

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

.site-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.site-badge {
  background: #ffe8d5;
  color: var(--accent-ink);
  border-radius: 999px;
  font-size: 0.75rem;
  padding: 0.24rem 0.55rem;
}

.site-name {
  margin: 0;
  font-size: 1.04rem;
}

.site-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  min-height: 2.6em;
}

.empty {
  margin: 2rem 0;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 640px) {
  .container {
    width: min(1080px, calc(100vw - 1.1rem));
    margin-top: 1rem;
  }

  .hero {
    padding: 1rem 0.25rem 1.1rem;
  }

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