:root {
  --ink: #1d2430;
  --muted: #647184;
  --soft: #f4f6f5;
  --panel: #ffffff;
  --line: #dce3df;
  --green: #176b56;
  --blue: #2e638f;
  --gold: #a87424;
  --rose: #9b4c5c;
  --shadow: 0 18px 55px rgba(31, 44, 38, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-shell {
  min-height: 100vh;
}

.hero {
  background:
    linear-gradient(120deg, rgba(23, 107, 86, 0.92), rgba(46, 99, 143, 0.86)),
    url("https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
  color: #fff;
  padding: 38px 28px 88px;
}

.hero__inner,
.toolbar,
.cases-section,
.footer {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.brand {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 58px;
}

.brand__name {
  font-size: 18px;
  font-weight: 760;
}

.brand__note {
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.hero h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero__lead {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr minmax(230px, 320px);
  gap: 16px;
  align-items: center;
  margin-top: -28px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-button {
  height: 38px;
  padding: 0 14px;
  color: var(--muted);
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.tag-button.is-active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.search-box input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #fbfcfb;
  font: inherit;
}

.cases-section {
  padding: 38px 0 54px;
}

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

.section-head h2 {
  margin: 0;
  font-size: 26px;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.count-label {
  color: var(--green);
  font-weight: 700;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.case-card,
.empty-state {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.case-card {
  min-height: 372px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.case-card__topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}

.case-card__label {
  color: var(--blue);
  font-weight: 760;
}

.case-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.case-card__profile {
  margin: 14px 0 0;
  color: var(--muted);
}

.case-card__question {
  margin: 16px 0 0;
  font-weight: 650;
}

.case-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.case-card__tags span {
  padding: 5px 9px;
  color: var(--gold);
  background: #fff7e9;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
}

.case-card__link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 44px;
  margin-top: auto;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 740;
}

.case-card__link:hover {
  background: var(--green);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.footer {
  padding: 0 0 42px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .toolbar,
  .cases-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 28px 18px 46px;
  }

  .hero__inner,
  .toolbar,
  .cases-section,
  .footer {
    width: min(100% - 28px, 1180px);
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 44px;
  }

  .hero__lead {
    font-size: 16px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
