﻿.case-study-template-page #case-study-root .cs-hero-visual {
  width: 100%;
  max-width: none;
}
.case-study-template-page #case-study-root .cs-hero-visual .cs-visual-surface.is-image {
  height: auto;
  aspect-ratio: auto;
}
.case-study-template-page #case-study-root .cs-hero-visual .cs-visual-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  transform: none;
}
.cs-visual.cs-image-crop .cs-visual-surface.is-image { aspect-ratio: 16 / 9; }
.cs-visual.cs-image-crop:not(.cs-hero-visual) .cs-visual-surface.is-image { overflow: hidden; }
.cs-visual.cs-image-crop:not(.cs-hero-visual) .cs-visual-image {
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transform: scale(1.15);
}
.cs-comparison-title {
  margin: 0 0 20px;
  color: var(--cs-canvas);
  font-family: "SF Pro Display", system-ui, -apple-system, sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}
.cs-comparison-slides { max-width: 780px; }
.cs-comparison-slide {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 210px;
}
.cs-comparison-slide[hidden] { display: none; }
.cs-comparison-slide > strong { color: var(--cs-canvas); font-size: 21px; font-weight: 600; }
.cs-flow-panel-content { display: grid; gap: 20px; }
.cs-comparison-slide .cs-flow-diagram {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cs-flow-diagram::before {
  position: absolute;
  top: 13px;
  right: calc(33.3333% - 13.5px);
  left: 13.5px;
  height: 1px;
  background: rgba(255, 255, 255, .32);
  content: "";
}
.is-chosen .cs-flow-diagram::before { background: rgba(67, 154, 255, .66); }
.cs-flow-node {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 14px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.cs-flow-node > span:last-child {
  color: var(--cs-canvas);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}
.cs-flow-node-index {
  position: relative;
  z-index: 1;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .44);
  border-radius: 50%;
  background: #292929;
  color: var(--cs-blue-on-dark);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.is-chosen .cs-flow-node-index { border-color: var(--cs-blue-on-dark); }
.cs-flow-rationale { display: grid; gap: 8px; margin: 0; color: var(--cs-dark-copy); font-size: 17px; line-height: 1.5; }
.cs-flow-rationale strong { color: var(--cs-canvas); font-size: 14px; font-weight: 600; }
.cs-flow-rationale span { color: var(--cs-dark-copy); }
.cs-flow-tabs {
  display: flex;
  gap: 28px;
  margin: 0 0 28px;
  width: fit-content;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.cs-flow-tab {
  position: relative;
  min-height: 42px;
  padding: 0 0 12px;
  border: 0;
  background: transparent;
  color: var(--cs-dark-copy);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.cs-flow-tab[aria-selected="true"] {
  color: var(--cs-canvas);
}
.cs-flow-tab[aria-selected="true"]::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--cs-blue-on-dark);
  content: "";
}
.cs-flow-tab:hover { color: var(--cs-canvas); }
.cs-flow-tab:focus-visible,
.cs-comparison-slide:focus-visible { outline: 2px solid var(--cs-blue-on-dark); outline-offset: 3px; }
.cs-comparison-slide { padding-top: 2px; }

/* Match the portfolio's documented type scale on this page only. */
.case-study-template-page .cs-meta-item dt,
.case-study-template-page .cs-phase-label,
.case-study-template-page .cs-option-status { font-size: 14px; }
.case-study-template-page .cs-meta-item dd { font-size: 17px; }
.case-study-template-page .cs-section h2 { font-size: 21px; }
.case-study-template-page .cs-section-body,
.case-study-template-page .cs-visual-item > span:last-child,
.case-study-template-page .cs-flow-step > span:last-child { font-size: 17px; }
.case-study-template-page .cs-section-body { line-height: 1.47; }
.case-study-template-page .cs-callout { font-size: 24px; }
.case-study-template-page .cs-flow-rationale { font-size: 17px; }
.case-study-template-page .cs-next-link { font-size: 14px; }
.case-study-template-page .cs-header { width: 100%; max-width: none; margin: 48px 0; text-align: left; }
.case-study-template-page .cs-header .cs-eyebrow { margin-bottom: 24px; }
.case-study-template-page .cs-header h1 { font-size: 56px; }
.case-study-template-page .cs-header .cs-summary {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--cs-ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -.374px;
}
.case-study-template-page .cs-nda-note { margin-top: 12px; }
.case-study-template-page .cs-discovery-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 48px;
}
.case-study-template-page .cs-discovery-copy { display: block; }
.case-study-template-page .cs-discovery-copy .cs-section-body { margin-top: 24px; }
.case-study-template-page .cs-discovery-layout > .cs-visual { margin-top: 48px; }
.case-study-template-page .cs-nda-note { margin-bottom: 24px; }
.case-study-template-page .cs-chapter--overview { padding-top: 80px; }
.case-study-template-page .cs-chapter--constraints { --cs-chapter-surface: var(--cs-canvas); }
.case-study-template-page .cs-chapter--contribution { padding-bottom: 32px; }
.case-study-template-page .cs-chapter--constraints { padding-top: 48px; }
.case-study-template-page .cs-discovery-layout > .cs-visual .cs-visual-surface {
  min-height: 0;
  padding: 0;
  background: transparent;
}
.cs-discovery-layout .cs-flow.is-vertical { grid-template-columns: 1fr; gap: 24px; }
.cs-discovery-layout .cs-flow.is-vertical .cs-flow-step {
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: 24px;
  row-gap: 8px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--cs-hairline);
}
.cs-discovery-layout .cs-flow.is-vertical .cs-flow-number {
  grid-column: 1;
  grid-row: 1 / span 2;
  font-size: 14px;
}
.cs-discovery-layout .cs-flow.is-vertical .cs-flow-step strong { grid-column: 2; }
.cs-discovery-layout .cs-flow.is-vertical .cs-flow-step > span:last-child { grid-column: 2; }
.cs-discovery-layout .cs-flow.is-vertical .cs-flow-step:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.cs-constraint-cards .cs-visual-item {
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--cs-hairline);
  border-radius: 18px;
  background: var(--cs-canvas);
  box-shadow: 0 2px 12px rgba(29, 29, 31, 0.08);
}
.cs-constraint-cards .cs-visual-label {
  color: var(--cs-muted-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.29;
}

.case-study-template-page .cs-chapter--decision .cs-chapter-inner {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 48px;
}
.case-study-template-page .cs-chapter--decision .cs-section { display: block; }
.case-study-template-page .cs-chapter--decision .cs-section-body { margin-top: 24px; }
.case-study-template-page .cs-chapter--decision .cs-comparison { width: 100%; max-width: none; margin: 0; }
.case-study-template-page .cs-chapter--outcome .cs-section h2 { color: var(--cs-canvas); }

.case-study-template-page .cs-process-workflow {
  width: 100%;
  margin: 48px 0 0;
}
.cs-process-workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cs-process-workflow-steps li {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: stretch;
  gap: 20px;
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--cs-hairline);
  border-radius: 18px;
  background: var(--cs-canvas);
  box-shadow: 0 2px 12px rgba(29, 29, 31, .08);
}
.cs-process-card-meta {
  display: flex;
  width: fit-content;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid #004c99;
  border-radius: 999px;
  background: var(--cs-canvas);
}
.cs-process-step-number {
  display: inline-flex;
  min-width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  color: var(--cs-action-blue);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cs-process-tool {
  color: var(--cs-action-blue);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}
.cs-process-card-copy {
  display: grid;
  align-content: start;
  gap: 10px;
}
.cs-process-workflow-steps strong {
  color: var(--cs-ink);
  font-size: 20px;
  font-weight: 600;
}
.cs-process-step-detail {
  color: var(--cs-supporting-ink);
  font-size: 15px;
  line-height: 1.5;
}
.cs-process-workflow figcaption {
  margin-top: 28px;
  color: var(--cs-muted-ink);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .case-study-template-page .cs-discovery-layout { gap: 32px; }
}
@media (max-width: 900px) {
  .cs-process-workflow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .case-study-template-page .cs-chapter--decision .cs-chapter-inner { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .case-study-template-page .cs-discovery-layout { grid-template-columns: 1fr; gap: 32px; }
  .case-study-template-page .cs-discovery-layout > .cs-visual { margin-top: 0; }
  .case-study-template-page .cs-chapter--overview { padding-top: 48px; }
  .case-study-template-page .cs-nda-note { margin-bottom: 0; }
  .case-study-template-page .cs-section h2 { font-size: 21px; }
  .case-study-template-page .cs-section-body { font-size: 17px; }
  .case-study-template-page .cs-callout { font-size: 24px; }
  .case-study-template-page .cs-header { margin: 32px 0; }
  .case-study-template-page .cs-header h1 { font-size: 34px; }
  .cs-comparison-slide { min-height: 0; }
  .cs-comparison-slide .cs-flow-diagram { grid-template-columns: 1fr; gap: 16px; }
  .cs-flow-diagram::before,
  .is-chosen .cs-flow-diagram::before { top: 13px; right: auto; bottom: 13px; left: 13px; width: 1px; height: auto; }
  .cs-flow-node { grid-template-columns: 27px minmax(0, 1fr); align-items: center; gap: 14px; }
  .cs-flow-node > span:last-child { grid-column: 2; }
  .case-study-template-page .cs-process-workflow { margin-top: 32px; }
  .cs-process-workflow-steps { grid-template-columns: 1fr; gap: 12px; }
  .cs-process-workflow-steps li { min-height: 0; }
  .cs-process-workflow figcaption { margin-top: 24px; }
}
@media (max-width: 419px) {
  .case-study-template-page .cs-header h1 { font-size: 28px; }
}
