body.case-study-page .case-detail-copy h1{font-size:var(--title-hero-size)!important;line-height:1.12!important;letter-spacing:-.05em!important}
.case-detail-copy h1{word-break:normal}
@media(max-width:640px){body.case-study-page .case-detail-copy h1{font-size:clamp(43px,10vw,60px)!important}}

.case-layout-glance-facts { row-gap: 15px; }
.case-layout-glance-facts strong, .case-layout-glance-facts span { display: block; }
.case-layout-glance-facts strong { color: var(--navy); }
.case-layout-challenge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.case-layout-challenge-grid .case-check-list { gap: 8px; }
@media (max-width: 760px) {
  .case-layout-challenge-grid { grid-template-columns: 1fr; }
}
.case-layout-card-icon {
  display: block;
  color: var(--navy);
}
.case-layout-challenge-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.case-layout-challenge-heading .case-layout-card-icon { width: 52px; flex: none; }
.case-layout-challenge-heading h3 { margin: 0; }
.case-layout-implementation-grid .case-layout-card-icon { width: 136px; max-width: 100%; margin-bottom: 18px; }
.case-layout-implementation-grid ul { gap: 8px; }
#implementation-title::after {
  content: "";
  display: block;
  width: 70px;
  height: 3px;
  margin-top: 12px;
  background: var(--gold);
}

.case-layout-validation {
  margin: 0;
  padding: 0 clamp(16px, 2vw, 28px);
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 12px;
  color: var(--navy);
}
.case-layout-validation > div {
  display: grid;
  grid-template-columns: minmax(240px, 40%) 1fr;
  align-items: center;
  gap: 20px;
  padding: 17px 0;
}
.case-layout-validation > div + div { border-top: 1px solid var(--line); }
.case-layout-validation dt {
  display: grid;
  grid-template-columns: 3.2em 1fr;
  align-items: baseline;
  gap: 8px;
  font: 800 clamp(17px, 1.35vw, 21px)/1.4 Manrope, Arial, sans-serif;
}
.case-layout-validation dd { margin: 0; font: 400 17px/1.6 'DM Sans', Arial, sans-serif; }
.case-layout-handoff {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  margin-top: 22px;
  padding: clamp(22px, 3vw, 36px);
  border-radius: 12px;
  background: var(--navy);
}
.case-layout-handoff svg { width: clamp(68px, 7vw, 100px); flex: none; color: var(--title-gold-on-navy); }
#results .case-layout-handoff h3 { margin: 0 0 8px; color: #fff !important; }
#results .case-layout-handoff p { margin: 0; color: #fff; }
@media (max-width: 800px) {
  .case-layout-validation > div { grid-template-columns: 1fr; gap: 5px; }
}
@media (max-width: 520px) {
  .case-layout-handoff { flex-direction: column; align-items: flex-start; }
}

/* Keep the Books column widths. Breadcrumbs occupy their own row, so a
   wrapped breadcrumb cannot move a photo independently of its category. */
.case-study-page .case-detail-hero,
.case-study-page .case-overview-spread {
  min-height: 0;
  padding: clamp(36px, 4vw, 64px) 0;
  gap: 30px 0;
  align-items: start;
  align-content: start;
}
.case-detail-hero > .case-breadcrumbs {
  grid-column: 1 / -1;
  margin: 0;
  padding-inline: clamp(24px, 5vw, 84px);
}
.case-study-page :is(.case-detail-hero, .case-overview-spread) > .hero-copy {
  align-self: start;
  padding-block: 0;
}
.case-detail-copy .case-preview-label {
  position: relative;
  display: block;
}
.case-detail-copy .case-preview-label span {
  display: block;
  line-height: 1;
  text-box-trim: trim-start;
  text-box-edge: cap alphabetic;
}
.case-detail-copy .case-domain-icon {
  position: absolute;
  top: .5cap;
  transform: translateY(-50%);
}
.case-detail-copy .case-domain-icon + span { padding-left: 44px; }
.case-detail-copy > p:last-child { margin-bottom: 0; }
.case-overview-spread .hero-copy > p { margin-top: 0; }
.case-detail-visual .hero-image {
  display: block;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
}
.case-detail-visual .hero-image > :is(img, svg) {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: left top;
  border-radius: 0;
}
/* A top-anchored crop fills the entire hero column, including its right edge. */
.case-detail-hero .case-detail-visual .hero-image {
  position: relative;
  width: 100%;
  aspect-ratio: 7 / 5;
  max-height: 450px;
  overflow: hidden;
}
.case-detail-hero .hero-image > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.case-detail-visual figcaption { padding: 0 clamp(22px, 3vw, 42px) 0 0; }
@media (max-width: 900px) {
  .case-detail-hero > .case-breadcrumbs { padding-inline: 24px; }
  .case-detail-visual figcaption { padding-inline: 24px; }
}

/* Match the section rhythm and heading hierarchy used on Books. */
.case-study-page .case-content-section {
  padding-block: 105px;
}
.case-content-section .section-kicker {
  margin: 0 0 22px;
  text-transform: uppercase;
}
.case-content-section h2.site-title-section {
  margin: 0 0 22px;
}
.case-overview-spread .hero-copy {
  padding-left: clamp(24px, 5vw, 84px);
}
@media (max-width: 1200px) {
  .case-study-page .case-content-section { padding-block: 75px; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .case-study-page .case-content-section:not(.case-overview-spread),
  .case-overview-spread .hero-copy { padding-inline: clamp(24px, 5vw, 84px); }
}
@media (max-width: 640px) {
  .case-study-page .case-content-section { padding-block: 70px; }
  .case-study-page .case-content-section:not(.case-overview-spread) { padding-inline: 22px; }
  .case-overview-spread .hero-copy { padding-inline: 22px; }
}


/* Three implementation cards lead into one full-width summary. */
.case-implementation-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.case-implementation-summary {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 60px);
  margin-top: clamp(18px, 2.5vw, 40px);
}
.case-implementation-summary .case-layout-card-icon { flex: none; width: 88px; }
.case-implementation-cards .case-layout-card-icon { height: 52px; width: auto; max-width: 100%; margin-bottom: 18px; }
.case-implementation-cards .case-check-list, .case-implementation-summary .case-check-list { gap: 8px; }

@media (max-width: 900px) {
  .case-implementation-cards { grid-template-columns: 1fr; }
  .case-implementation-summary { margin-top: 18px; }
}
@media (max-width: 520px) {
  .case-implementation-summary { flex-direction: column; align-items: flex-start; gap: 16px; }
  .case-implementation-summary .case-layout-card-icon { width: 66px; }
}

/* Featured resources and the case-study footer share the standard card grid. */
.case-featured-resource {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  align-content: space-between;
  gap: 22px;
  padding: clamp(22px, 2.3vw, 36px);
  text-decoration: none;
}
.case-featured-resource img { width: clamp(54px, 5vw, 76px); height: auto; }
#related > .site-title-section { margin-bottom: clamp(36px, 4vw, 60px); }
.case-featured-resource h3, .case-inquiry h3 { margin: 0; }
.case-study-crosslinks h3 { margin: 0 0 clamp(18px, 2vw, 32px); }
.case-featured-resource p { margin: 8px 0 0; line-height: 1.65; }
.case-resource-action { grid-column: 1 / -1; }
.case-resource-action span, .case-study-crosslinks a span { margin-inline-start: .4em; }
.case-featured-resource:hover .case-resource-action, .case-study-crosslinks a:hover {
  text-decoration: underline; text-underline-offset: .18em;
}
.case-explore-footer {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 60px); align-items: start; margin-top: clamp(28px, 4vw, 56px);
}
.case-study-crosslinks a {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--navy);
  font-weight: 700; text-decoration: none;
}
.case-study-crosslinks a:last-child { display: inline-flex; border: 0; padding-bottom: 0; }
.case-study-crosslinks a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.case-inquiry { background: var(--navy); border-radius: 12px; padding: clamp(24px, 3vw, 40px); }
#related .case-inquiry h3 { margin-bottom: 20px; color: #fff !important; }
@media (max-width: 800px) {
  .case-explore-footer { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .case-featured-resource { gap: 14px; }
}

/* Let the copy determine the photo height when the hero has two columns. */
@media (min-width: 901px) {
  .qubit-hero > .hero-copy { margin-bottom: 24px; }
  .qubit-hero > .case-detail-visual { align-self: stretch; position: relative; }
  .qubit-hero .case-detail-visual .hero-image {
    position: absolute;
    inset: 0;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
  }
}

/* Both photos fill the same column. The overview keeps its original text measure. */
@media (min-width: 901px) {
  .case-study-page :is(.qubit-hero, .qubit-overview) {
    grid-template-columns: 47.5% minmax(0, 1fr) min(52%, 552px);
  }
  .qubit-hero > .hero-copy { grid-column: 1 / 3; }
  :is(.qubit-hero, .qubit-overview) > .case-detail-visual { grid-column: 3; }
  .qubit-overview > .hero-copy { margin-bottom: 36px; }
  .qubit-overview .hero-copy > .section-kicker {
    text-box-trim: trim-start;
    text-box-edge: cap alphabetic;
  }
  .qubit-overview .qubit-fridge-photo {
    position: relative;
    align-self: stretch;
  }
  .qubit-overview .qubit-fridge-photo img {
    position: absolute;
    inset: 0 auto auto 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
  }
}
.qubit-overview .qubit-fridge-photo img { display: block; border-radius: 0; }
@media (max-width: 900px) {
  :is(.qubit-hero, .qubit-overview) > .case-detail-visual { width: min(100%, 552px); justify-self: end; }
  .qubit-overview .qubit-fridge-photo { margin: 0; }
  .qubit-overview .qubit-fridge-photo img {
    width: 100%;
    height: auto;
    margin-inline: 0 auto;
  }
}

/* Follow the About Me journey cards for lists and supporting paragraphs.
   Hero and section introductions use the shared site classes in styles.css. */
.case-content-section .case-check-list li,
.case-content-section .case-layout-validation dd {
  font: 400 15px/1.65 'DM Sans', Arial, sans-serif;
}
.case-study-page .case-content-section:not(.case-overview-spread) {
  container: case-content / inline-size;
}
.case-content-section :is(.case-layout-handoff, .case-featured-resource) p {
  font: 400 16px/1.8 'DM Sans', Arial, sans-serif;
}
@container case-content (max-width: 600px) {
  .case-content-section :is(.case-layout-handoff, .case-featured-resource) p {
    line-height: 1.75;
  }
}

/* Keep the drone, including the landing gear, inside the hero crop. */
.gpr-hero .case-detail-visual { container-type: inline-size; }
.gpr-hero .case-detail-visual .hero-image { max-height: max(450px, 44cqw); }
.gpr-hero .hero-image > img { object-position: 50% 45%; }

/* Keep the full illustration visible while the copy sets the desktop row height. */
.gpr-overview .gpr-inspection img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}
@media (min-width: 901px) {
  .case-study-page .gpr-hero,
  .case-study-page .gpr-overview {
    grid-template-columns: minmax(0, 54fr) minmax(0, 46fr);
  }
  .gpr-overview .hero-copy { margin-bottom: 8px; }
  .gpr-overview .section-kicker { text-box-trim: trim-start; text-box-edge: cap alphabetic; }
  .gpr-overview .gpr-inspection { position: relative; align-self: stretch; background: #052240; }
  .gpr-overview .gpr-inspection img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: contain;
  }
}

.case-detail-copy .case-title-term {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}
