/*
 * QINFENG — case studies and application archives.
 *
 * Owned by this feature. Every class here is prefixed csx-; the shared
 * .container, .button, .button.secondary, .eyebrow, .section-head and .arrow
 * come from style.css, and the values come from assets/css/tokens.css.
 * No JavaScript is required by anything in this file.
 */

/* Image slot: the visible size tag sits in the corner of every placeholder so
   the slots can be replaced one by one. */
.csx-media {
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.csx-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.csx-media-tag {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(18, 21, 28, .84);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.4;
}

/* Page furniture shared by the archive and the term page ------------------ */

.csx-section {
  padding: 72px 0;
}

.csx-section-title {
  margin: 0 0 28px;
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--ink);
}

.csx-head {
  padding: 64px 0 40px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.csx-head-inner {
  max-width: 780px;
}

.csx-head h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.035em;
  color: var(--ink);
}

.csx-lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--slate);
}

/* Application filter strip ------------------------------------------------- */

.csx-filter {
  padding: 26px 0 30px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.csx-filter-title {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--slate);
}

.csx-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.csx-filter-list li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.csx-filter-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.csx-filter-link:hover {
  border-color: var(--brand);
  background: var(--tint);
  color: var(--action);
}/* Case study cards --------------------------------------------------------- */

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

.csx-case-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.csx-case-card:hover {
  transform: translateY(-4px);
  border-color: rgba(104, 190, 70, .8);
  box-shadow: var(--shadow-md);
}

.csx-case-media {
  display: block;
  border-bottom: 1px solid var(--border);
}

.csx-case-media .csx-media {
  border: 0;
  border-radius: 0;
  aspect-ratio: 600 / 420;
}

.csx-case-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
}

.csx-case-label {
  margin: 0;
  color: var(--action);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.csx-case-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--ink);
}

.csx-case-title a:hover {
  color: var(--action);
}

.csx-case-summary {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--slate);
}

.csx-case-meta {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}

.csx-case-meta-row {
  display: grid;
  grid-template-columns: minmax(96px, auto) 1fr;
  gap: 12px;
  align-items: baseline;
}

.csx-case-meta dt {
  margin: 0;
  color: var(--slate);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.csx-case-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

.csx-case-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.csx-case-apps li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.csx-case-apps a {
  display: inline-flex;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  background: var(--tint);
  color: var(--action);
  font-size: 11.5px;
  font-weight: 700;
}

.csx-case-apps a:hover {
  background: var(--brand);
  color: var(--ink);
}

.csx-case-more,
.csx-product-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--action);
  font-size: 13px;
  font-weight: 750;
}

.csx-case-more:hover,
.csx-product-more:hover {
  color: var(--action-hover);
}

.csx-case-more:hover .arrow,
.csx-product-more:hover .arrow {
  transform: translateX(4px);
}/* Product cards ----------------------------------------------------------- */

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

.csx-product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.csx-product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(104, 190, 70, .8);
  box-shadow: var(--shadow-sm);
}

.csx-product-media {
  display: block;
  border-bottom: 1px solid var(--border);
}

.csx-product-media .csx-media {
  border: 0;
  border-radius: 0;
  aspect-ratio: 600 / 420;
}

.csx-product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
}

.csx-product-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--ink);
}

.csx-product-title a:hover {
  color: var(--action);
}

.csx-product-desc {
  color: var(--slate);
  font-size: 13.5px;
  line-height: 1.6;
}

.csx-product-desc p {
  margin: 0 0 8px;
}

.csx-product-desc p:last-child {
  margin-bottom: 0;
}

.csx-product-specs {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}

.csx-product-spec {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.csx-product-spec dt {
  margin: 0;
  color: var(--slate);
  font-size: 12.5px;
  font-weight: 600;
}

.csx-product-spec dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

/* Honest empty states ------------------------------------------------------ */

.csx-empty {
  max-width: 680px;
  padding: 44px 40px;
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.csx-empty-title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink);
}

.csx-empty p {
  margin: 0 0 24px;
  color: var(--slate);
  font-size: 15px;
  line-height: 1.65;
}

.csx-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Pagination --------------------------------------------------------------- */

.csx-pagination {
  margin-top: 40px;
}

.csx-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.csx-pages li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.csx-pagination .page-numbers {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
}

.csx-pagination a.page-numbers:hover {
  border-color: var(--brand);
  background: var(--tint);
  color: var(--action);
}

.csx-pagination .page-numbers.current {
  border-color: var(--action);
  background: var(--action);
  color: var(--white);
}

.csx-pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
  color: var(--slate);
}/* Single case study -------------------------------------------------------- */

.csx-crumbs {
  padding: 16px 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.csx-breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--slate);
  font-size: 12.5px;
}

.csx-breadcrumb-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.csx-breadcrumb-list li + li::before {
  content: "/";
  color: var(--border);
}

.csx-breadcrumb-list a {
  color: var(--action);
  font-weight: 650;
}

.csx-breadcrumb-list a:hover {
  color: var(--action-hover);
}

.csx-hero {
  padding: 56px 0 64px;
  background: linear-gradient(180deg, var(--white) 0%, #f4f6f3 100%);
  border-bottom: 1px solid var(--border);
}

.csx-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}

.csx-hero-title {
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.035em;
  color: var(--ink);
}

.csx-hero-label {
  margin: 0 0 24px;
  color: var(--action);
  font-size: 15px;
  font-weight: 700;
}

.csx-hero-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  margin: 0 0 24px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.csx-fact dt {
  margin: 0 0 4px;
  color: var(--slate);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.csx-fact dd {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.csx-hero-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.csx-hero-apps li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.csx-app-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
}

.csx-app-chip:hover {
  border-color: var(--brand);
  background: var(--tint);
  color: var(--action);
}

.csx-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.csx-hero-media .csx-media {
  aspect-ratio: 1200 / 800;
  border-color: rgba(18, 21, 28, .08);
  box-shadow: var(--shadow-md);
}

.csx-blocks-section {
  padding: 72px 0;
}

.csx-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.csx-block {
  padding: 30px 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.csx-block-result {
  background: var(--ink);
  border-color: var(--ink);
}

.csx-block-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.015em;
  color: var(--ink);
}

.csx-block-result .csx-block-title {
  color: var(--white);
}

.csx-block-body {
  color: var(--slate);
  font-size: 14.5px;
  line-height: 1.7;
}

.csx-block-result .csx-block-body {
  color: #d7dbe2;
}

.csx-block-body p {
  margin: 0 0 12px;
}

.csx-block-body p:last-child {
  margin-bottom: 0;
}

.csx-block-body ul,
.csx-block-body ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.csx-block-body li {
  margin-bottom: 6px;
}

.csx-content-section {
  padding: 64px 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.csx-content {
  max-width: 780px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
}

.csx-content p {
  margin: 0 0 18px;
}

.csx-content h2 {
  margin: 30px 0 12px;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -.02em;
}

.csx-content h3 {
  margin: 26px 0 10px;
  font-size: 19px;
  font-weight: 800;
}

.csx-content a {
  color: var(--action);
  text-decoration: underline;
}

.csx-content ul,
.csx-content ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.csx-content li {
  margin-bottom: 8px;
}

/* Project images, files, closing call to action ---------------------------- */

.csx-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.csx-gallery-item {
  margin: 0;
  padding: 0;
  list-style: none;
}

.csx-gallery-item .csx-media {
  aspect-ratio: 800 / 600;
}

.csx-files-section {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.csx-files {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.csx-files li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.csx-file-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--action);
  font-size: 14px;
  font-weight: 650;
}

.csx-file-link::before {
  content: "↓";
  font-weight: 800;
}

.csx-file-link:hover {
  border-color: var(--brand);
  background: var(--tint);
}

.csx-cta-section {
  padding: 8px 0 80px;
}

.csx-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: center;
  padding: 52px 56px;
  border-radius: var(--radius-lg);
  background: var(--brand);
}

.csx-cta .eyebrow {
  color: var(--action);
}

.csx-cta h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.03em;
  color: var(--ink);
}

.csx-cta p {
  max-width: 620px;
  margin: 0;
  color: rgba(18, 21, 28, .78);
  font-size: 15.5px;
  line-height: 1.6;
}

.csx-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.csx-cta-actions .button {
  background: var(--ink);
  color: var(--white);
}

.csx-cta-actions .button:hover {
  background: #000000;
  color: var(--white);
}

.csx-cta-actions .button.secondary {
  border-color: transparent;
  background: var(--white);
  color: var(--ink);
}

.csx-cta-actions .button.secondary:hover {
  border-color: transparent;
  background: var(--tint);
  color: var(--action);
}

/* Password-protected case study (WordPress's own form) --------------------- */

.csx-gate-section {
  padding: 56px 0 88px;
}

.csx-gate {
  max-width: 560px;
}

.csx-gate-title {
  margin: 0 0 20px;
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--ink);
}

.csx-gate-box {
  padding: 28px 26px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.csx-gate-box p {
  margin: 0 0 16px;
  color: var(--slate);
  font-size: 14.5px;
  line-height: 1.6;
}

.csx-gate-box label {
  display: block;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.csx-gate-box input[type="password"] {
  width: 100%;
  margin: 0 0 16px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-main);
  font-size: 15px;
}

.csx-gate-box input[type="password"]:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.csx-gate-box input[type="submit"],
.csx-gate-box button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--action);
  color: var(--white);
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.csx-gate-box input[type="submit"]:hover,
.csx-gate-box button:hover {
  background: var(--action-hover);
}/* Application term archive ------------------------------------------------- */

.csx-term-banner {
  background: var(--ink);
}

.csx-term-banner .csx-media {
  aspect-ratio: 1600 / 600;
  max-height: 460px;
  border: 0;
  border-radius: 0;
}

.csx-term-head {
  padding: 44px 0 48px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.csx-term-head-inner {
  max-width: 820px;
}

.csx-term-title {
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.035em;
  color: var(--ink);
}

.csx-term-desc {
  color: var(--slate);
  font-size: 16px;
  line-height: 1.7;
}

.csx-term-desc p {
  margin: 0 0 12px;
}

.csx-term-desc p:last-child {
  margin-bottom: 0;
}

.csx-term-products {
  padding: 72px 0 0;
}

.csx-term-cases {
  padding: 64px 0 72px;
}

.csx-term-empty {
  padding: 72px 0;
}

.csx-others {
  padding: 56px 0 72px;
  background: var(--white);
  border-top: 1px solid var(--border);
}

.csx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.csx-chips li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.csx-term-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
}

.csx-term-chip:hover {
  border-color: var(--brand);
  background: var(--tint);
  color: var(--action);
}

/* Structural hooks --------------------------------------------------------
   Wrappers and the per-slot image classes the templates print each get a rule
   here, so every class this feature introduces is styled in this file. */

.csx-archive,
.csx-single,
.csx-term {
  display: block;
}

.csx-list {
  padding-top: 56px;
}

.csx-gallery-section,
.csx-related-section {
  padding: 72px 0;
}

.csx-hero-copy,
.csx-cta-copy {
  min-width: 0;
}

.csx-hero-img,
.csx-case-img,
.csx-product-img,
.csx-gallery-img,
.csx-term-img {
  background: var(--muted);
}

/* Responsive --------------------------------------------------------------- */

@media (max-width: 1024px) {
  .csx-grid,
  .csx-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .csx-hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .csx-blocks {
    grid-template-columns: 1fr;
  }

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

  .csx-cta {
    grid-template-columns: 1fr;
    padding: 42px 36px;
  }

  .csx-hero-media .csx-media {
    max-height: 420px;
  }
}

@media (max-width: 640px) {
  .csx-head,
  .csx-term-head {
    padding: 44px 0 32px;
  }

  .csx-head h1,
  .csx-term-title {
    font-size: 30px;
  }

  .csx-lead {
    font-size: 15.5px;
  }

  .csx-section,
  .csx-blocks-section,
  .csx-list,
  .csx-gallery-section,
  .csx-related-section {
    padding: 48px 0;
  }

  .csx-term-products {
    padding: 48px 0 0;
  }

  .csx-term-cases,
  .csx-term-empty,
  .csx-others {
    padding: 48px 0;
  }

  .csx-grid,
  .csx-products,
  .csx-gallery {
    grid-template-columns: 1fr;
  }

  .csx-hero {
    padding: 40px 0 48px;
  }

  .csx-hero-facts {
    grid-template-columns: 1fr;
  }

  .csx-hero-media .csx-media {
    max-height: 320px;
  }

  .csx-case-meta-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .csx-block {
    padding: 24px 20px;
  }

  .csx-empty {
    padding: 32px 22px;
  }

  .csx-cta {
    padding: 32px 22px;
  }

  .csx-cta-section {
    padding: 0 0 56px;
  }

  .csx-empty-actions .button,
  .csx-cta-actions .button {
    width: 100%;
  }

  .csx-content-section,
  .csx-gate-section {
    padding: 44px 0;
  }

  .csx-file-link {
    width: 100%;
  }

  .csx-media-tag {
    right: 8px;
    bottom: 8px;
    font-size: 10.5px;
  }
}