:root {
  color-scheme: light;
}

body {
  background-color: #f3f5f9;
  background-image:
    linear-gradient(rgba(243, 245, 249, 0.34), rgba(243, 245, 249, 0.34)),
    url("background_casestudies.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }
}

.cs-page {
  background: transparent;
  min-height: 100vh;
  padding: 40px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #0f172a;
}

.cs-header {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  height: auto;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.cs-container {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.cs-header {
  background-color: #ffffff;
  border-radius: 2rem;
  padding: 2.5rem 2.5rem 1.9rem;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  box-shadow: none;
  background: transparent;
  border: 0;
}

@media (max-width: 768px) {
  .cs-header {
    padding: 1.5rem;
    border-radius: 1.5rem;
  }
}
@media (max-width: 1024px) {
  header {
    padding: 0;
  }

  .mobile-header-shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s ease, box-shadow 0.3s ease;
        background: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
  }

  header .scrolled .mobile-header-shell {
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
  }

  .logo {
    position: static;
  }

  .nav-container {
    height: auto;
    padding: 0;
    margin: 0;
    justify-content: flex-end;
  }

  main {
    margin-top: 72px;
  }

  nav ul#nav-links li.dropdown {
    width: 100%;
    position: relative;
  }

  nav ul#nav-links li.dropdown .dropdown-menu {
    position: static;
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    margin: 10px 0 0 0;
    display: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 0 0 16px;
    background: transparent;
    white-space: normal;
    align-self: stretch;
  }

  nav ul#nav-links li.dropdown.open .dropdown-menu {
    display: block;
  }

  .text {
    padding: 12px 15px;
    font-size: 14px;
    display: block;
  }

  #nav-links {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 18px;
    background: #ffffff;
    position: fixed;
    inset: 0;
    padding: 96px 28px 40px;
    display: flex;
    border-radius: 0;
    box-shadow: none;
    align-items: flex-start;
    z-index: 1001;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
      opacity 0.5s ease,
      visibility 0s linear 0.8s;
    overflow-y: auto;
    visibility: hidden;
    pointer-events: none;
  }

  #nav-links.show {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0s;
    visibility: visible;
    pointer-events: auto;
  }

  .menu-toggle {
    display: inline-flex;
    position: static;
    z-index: 1000;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: transparent;
    touch-action: manipulation;
  }

  .menu-close {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 1002;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }

  body.nav-open .menu-close {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  #nav-links a {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #0a0a23;
    padding: 4px 0;
  }

  .dropdown-menu a {
    font-size: 17px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    padding: 6px 0;
    color: #1f2937;
  }

  .line {
    display: none;
  }
}


.cs-title {
  font-size: 3.05rem;
  font-weight: 800;
  color: #020617;
  line-height: 1.08;
  margin-bottom: 0.45rem;
  word-wrap: break-word;
  max-width: 940px;
}

@media (min-width: 768px) { .cs-title { font-size: 4.15rem; } }
@media (min-width: 1024px) { .cs-title { font-size: 4.55rem; } }

.cs-category {
  font-size: 1.16rem;
  line-height: 1.4;
  color: #1f2937;
  margin-bottom: 0.2rem;
}

@media (max-width: 767px) {
  .cs-category {
    font-size: 0.92rem;
  }

  .cs-title {
    font-size: 2.35rem;
    margin-bottom: 0.6rem;
  }
}

.cs-tag-row {
  display: none;
}

.cs-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #f8fafc;
  border: 1px solid transparent;
  padding: 8px 16px;
  border-radius: 9999px;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.cs-grid {
  display: block;
}

.cs-content {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.cs-branch-layout {
  position: relative;
}

.cs-branch-top {
  position: relative;
  min-height: 360px;
  margin-bottom: 1.25rem;
}

.cs-branch-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.cs-branch-stroke {
  fill: none;
  stroke: #265469;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cs-branch-connector {
  position: absolute;
  height: 2.2px;
  background: #265469;
  border-radius: 999px;
  z-index: 1;
  display: none;
  pointer-events: none;
}

.cs-branch-card {
  position: absolute;
  width: min(44%, 28rem);
  z-index: 2;
  background: #ffffff;
  border-radius: 0.85rem;
  padding: 1rem 1rem 0.95rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  border: 1px solid #e2e8f0;
}

.cs-branch-challenge {
  left: 0;
  top: 1rem;
  border-top: 0.42rem solid #ddbf4c;
}

.cs-branch-challenge .cs-branch-card-icon img {
  filter: none;
}

.cs-branch-solution {
  right: 0;
  top: 10.45rem;
  border-top: 0.42rem solid #3d8fc6;
}

.cs-branch-solution .cs-branch-card-icon img {
  filter: none;
}

.cs-branch-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.cs-branch-card-title {
  margin: 0;
  font-size: 1.95rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.cs-branch-card-icon {
  width: 2rem;
  height: 2rem;
  color: #2f6077;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cs-branch-card-icon img {
  width: 1.7rem;
  height: 1.7rem;
  object-fit: contain;
  display: block;
}

.cs-branch-copy {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs-branch-copy-item {
  font-size: 1.15rem;
  line-height: 1.5;
  color: #111827;
}

.cs-branch-copy-item + .cs-branch-copy-item {
  margin-top: 0.7rem;
}

.cs-outcome-board {
  background: linear-gradient(160deg, #0c3f71 0%, #0d4f8a 65%, #0d5a99 100%);
  border-radius: 0.95rem;
  padding: 1.2rem 1.7rem 1.45rem;
  border: 1px solid rgba(191, 219, 254, 0.24);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.24);
}

.cs-outcome-board-title {
  margin: 0 0 0.65rem;
  text-align: center;
  color: #dbeafe;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.cs-outcome-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 2.8rem;
  row-gap: 1.3rem;
  flex-wrap: wrap;
}

.cs-outcome-metric {
  min-width: 13.2rem;
  text-align: center;
}

.cs-result-value {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.2rem;
  letter-spacing: -0.03em;
  color: #a3e635;
}

.cs-result-label {
  color: #e2e8f0;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: lowercase;
}

.cs-outcome-summary {
  margin: 1rem 0 0;
  text-align: center;
  color: #f8fafc;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cs-outcome-summary-highlight {
  color: #a3e635;
}

.cs-outcome-summary-green {
  color: #a3e635;
}

.cs-outcome-summary-green .cs-outcome-summary-highlight {
  color: #a3e635;
}

.cs-outcome-notes {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.cs-outcome-note-item {
  background: rgba(219, 234, 254, 0.12);
  border: 1px solid rgba(219, 234, 254, 0.22);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  color: #dbeafe;
  font-size: 0.72rem;
  line-height: 1.25;
}

@media (max-width: 1023px) {
  .cs-branch-top {
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .cs-branch-svg {
    display: none;
  }

  .cs-branch-connector {
    display: none !important;
  }

  .cs-branch-card {
    position: relative;
    width: 100%;
    max-width: 100%;
    left: auto;
    right: auto;
    top: auto;
  }

  .cs-branch-card-title {
    font-size: 1.45rem;
  }

  .cs-branch-copy-item {
    font-size: 1rem;
  }

  .cs-outcome-board-title {
    font-size: 1.45rem;
  }

  .cs-outcome-metrics {
    gap: 0.75rem;
  }

  .cs-result-value {
    font-size: 2.65rem;
  }

  .cs-result-label {
    font-size: 0.9rem;
  }

  .cs-outcome-summary {
    font-size: 1.2rem;
    margin-top: 0.75rem;
  }
}

.cs-card {
  background-color: white;
  border-radius: 2rem;
  padding: 2.5rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

@media (min-width: 768px) { .cs-card { padding: 3rem; } }

.cs-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.cs-bar-red { width: 0.375rem; height: 2rem; background-color: #ef4444; border-radius: 99px; }
.cs-bar-blue { width: 0.375rem; height: 2rem; background-color: #2563eb; border-radius: 99px; }
.cs-bar-green { width: 0.375rem; height: 2rem; background-color: #10b981; border-radius: 99px; }

.cs-section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
}

.cs-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 768px) {
  .cs-list { grid-template-columns: 1fr; }
}

.cs-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.cs-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  margin-top: 0.6rem;
  flex-shrink: 0;
}

.cs-dot.red { background-color: #fee2e2; }
.cs-dot.blue { background-color: #dbeafe; }
.cs-dot.green { background-color: #d1fae5; }

.cs-list-text {
  color: #475569;
  line-height: 1.6;
  font-size: 0.9rem;
}

.cs-related-header {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 2rem;
}

.cs-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .cs-related-grid { grid-template-columns: 1fr 1fr; }
}

.cs-related-link {
  display: block;
  text-decoration: none;
}

.cs-related-category {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: #64748b;
}

.cs-related-link + .cs-related-link {
  border-top: 1px solid #f1f5f9;
  padding-top: 2rem;
}

@media (min-width: 768px) {
  .cs-related-link + .cs-related-link {
    border-top: none;
    padding-top: 0;
    border-left: 1px solid #f1f5f9;
    padding-left: 2rem;
  }
}



.cs-related-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.cs-related-link:hover .cs-related-title { color: #2563eb; }

.cs-read-more {
  font-size: 0.65rem;
  font-weight: 700;
  color: #2563eb;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.2s;
}

.cs-related-link:hover .cs-read-more {
  opacity: 1;
  transform: translateX(0);
}

.cs-cta {
  margin-top: 5rem;
  text-align: center;
}

.cs-cta-title {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2rem;
  letter-spacing: -0.025em;
}

.cs-cta-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .cs-cta-buttons { flex-direction: row; }
}

.cs-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 2.5rem;
  background-color: #2563eb;
  color: white;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 9999px;
  transition: all 0.2s;
  text-decoration: none;
}

.cs-btn-primary:hover {
  box-shadow: 0 10px 15px -5px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.cs-btn-secondary {
  padding: 1.25rem 2.5rem;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
  text-decoration: none;
}

.cs-btn-secondary:hover { color: #2563eb; }

.cs-loading {
  text-align: center;
  color: #64748b;
  padding: 4rem 1rem;
}
