/* Shared DataHub shell for the AI case library and every case detail page. */

.case-topbar {
  display: block;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #dbe3da;
  background: rgba(247, 249, 245, 0.96);
  backdrop-filter: blur(12px);
}

.case-topbar > .case-topbar-inner {
  display: flex;
  box-sizing: border-box;
  flex: 0 1 auto;
  width: min(1180px, calc(100% - 48px));
  min-height: 64px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.case-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: #17231e;
  text-decoration: none;
}

.case-brand-name {
  font-family: "Source Serif 4", "Noto Serif SC", Georgia, serif;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1;
}

.case-brand-product {
  padding-left: 10px;
  border-left: 1px solid #cdd8ce;
  color: #66756e;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.case-topbar-links {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.case-topbar-link {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  color: #5b6962;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.case-topbar-link:hover,
.case-topbar-link--active {
  color: #087d72;
}

.case-topbar-link--active {
  font-weight: 700;
}

.case-category-nav {
  display: flex;
  margin-top: 18px;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.case-category-nav::-webkit-scrollbar {
  display: none;
}

.case-category-link {
  display: inline-flex;
  min-height: 30px;
  padding: 0 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #64736c;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
}

.case-category-link:hover,
.case-category-link--active {
  border-color: rgba(8, 125, 114, 0.2);
  background: rgba(8, 125, 114, 0.08);
  color: #087d72;
}

.case-source-action {
  display: flex;
  margin-top: 18px;
  align-items: center;
  gap: 10px;
}

.case-source-action__label {
  color: #7d8983;
  font-size: 0.76rem;
  line-height: 1.4;
}

.case-source-link {
  display: inline-flex;
  min-height: 30px;
  padding: 0 10px;
  align-items: center;
  border: 1px solid rgba(8, 125, 114, 0.28);
  border-radius: 6px;
  background: rgba(8, 125, 114, 0.07);
  color: #087d72;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
}

.case-source-link:hover {
  border-color: rgba(8, 125, 114, 0.5);
  background: rgba(8, 125, 114, 0.11);
}

.datahub-case-footer {
  width: 100%;
  margin-top: 54px;
  padding: 24px 0 28px;
  border-top: 1px solid #dbe3da;
  background: #f7f9f5;
  color: #7b8882;
}

.datahub-case-footer__inner {
  display: flex;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 0.8rem;
}

.datahub-case-footer__primary {
  display: grid;
  flex: 0 0 auto;
  gap: 4px;
}

.datahub-case-footer a {
  color: #64736c;
  text-decoration: none;
}

.datahub-case-footer a:hover {
  color: #17231e;
}

.datahub-case-footer__links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 14px;
  flex-wrap: wrap;
}

.datahub-case-footer__links span {
  color: #98a29d;
}

@media (max-width: 900px) {
  .case-topbar > .case-topbar-inner {
    width: min(100% - 32px, 1180px);
    min-height: 0;
    padding: 12px 0 10px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .case-topbar-links {
    width: 100%;
    justify-content: flex-start;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .case-topbar-links::-webkit-scrollbar {
    display: none;
  }

  .datahub-case-footer__inner {
    width: min(100% - 32px, 1180px);
    align-items: flex-start;
    flex-direction: column;
  }

  .datahub-case-footer__links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .case-brand-name {
    font-size: 1.08rem;
  }

  .case-brand-product {
    font-size: 0.72rem;
  }

  .case-source-action {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .case-source-link {
    max-width: 100%;
  }
}
