/* Corporate foundations; the rules below define the case-study composition. */
@import url('/css/brand.css');

body { margin: 0; background: var(--leuko); color: var(--coolGray9c); font-family: 'Roboto', Arial, sans-serif; }
main > .container-fluid { padding: 0; }
.case-study { font-size: max(1.125rem, var(--bodyText)); line-height: 1.7; }
.case-study *, .case-study *::before, .case-study *::after { box-sizing: border-box; }
.case-study a { text-underline-offset: .2em; }
.case-study a:focus-visible { outline: 3px solid var(--corpRed); outline-offset: 5px; }
.case-study h1, .case-study h2, .case-study h3, .case-study p { margin-top: 0; }
.case-study h2 { font-size: var(--H2Header); font-weight: var(--medium); line-height: 1.15; }
.case-study h3 { font-size: var(--H5Header); line-height: 1.35; font-weight: var(--medium); }
.cs-skip { position: fixed; top: -100px; left: 1rem; z-index: 20; background: var(--leuko); padding: var(--space-3) var(--space-4); }
.cs-skip:focus { top: 1rem; }
.cs-nav { position: sticky; top: 0; z-index: 10; background: var(--leuko); border-bottom: 1px solid var(--coolGray2c_b); display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); padding: var(--space-4) max(4vw, calc((100vw - 1280px)/2)); }
.cs-brand { flex-shrink: 0; display: block; }
.cs-brand img { width: 192px; height: auto; display: block; }
.cs-nav-links { display: flex; gap: var(--space-6); align-items: center; }
.cs-nav-links a { font-size: max(1rem, var(--smallTxt)); font-weight: var(--medium); text-decoration: none; white-space: nowrap; padding: var(--space-2) 0; border-bottom: 2px solid transparent; }
.cs-nav-links a:hover, .cs-nav-links a[aria-current] { border-color: var(--corpRed); color: var(--corpRed); }
.cs-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--thaddColor); color: var(--leuko); min-height: 670px; display: flex; align-items: center; }
.cs-hero-image { position: absolute; inset: 0 0 0 auto; width: 43%; height: 100%; object-fit: cover; z-index: -2; }
.cs-hero-content { width: min(1280px, 92%); margin: auto; padding: var(--space-16) 0; }
.cs-eyebrow { font-size: max(1rem, var(--smallTxt)); letter-spacing: .16em; text-transform: uppercase; font-weight: var(--bold); line-height: 1.5; }
.cs-hero .cs-eyebrow { color: var(--leuko); margin-bottom: var(--space-8); }
.case-study h1 { max-width: 760px; width: 66%; font-size: var(--H1Header); font-weight: var(--medium); line-height: 1.08; margin-bottom: var(--space-6); }
.cs-intro { max-width: 660px; width: 58%; color: var(--leuko); font-size: var(--largeTxt); line-height: 1.6; }
.cs-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.cs-file-label { font-size: max(1rem, var(--smallTxt)); font-weight: var(--regular); opacity: .8; }
.cs-summary { max-width: 1280px; width: 92%; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.1fr 2fr; gap: var(--space-8); padding: var(--space-12) 0; border-bottom: 1px solid var(--coolGray2c_b); }
.cs-summary .cs-eyebrow { color: var(--corpRed); }
.cs-summary h2 { font-size: var(--H5Header); }
.cs-summary dl { margin: 0; font-size: max(1.125rem, var(--bodyText)); }
.cs-summary dl > div + div { margin-top: var(--space-3); }
.cs-summary dt { font-size: max(1rem, var(--smallTxt)); text-transform: uppercase; letter-spacing: .07em; color: var(--coolGray6c); margin-bottom: var(--space-1); }
.cs-summary dd { margin: 0; line-height: 1.55; }
.cs-section { max-width: 1280px; width: 92%; margin: auto; padding: var(--space-16) 0; scroll-margin-top: 110px; }
.cs-section-grid { display: grid; grid-template-columns: .8fr 1.65fr; gap: var(--space-16); }
.cs-section-heading .cs-eyebrow { color: var(--corpRed); margin-bottom: var(--space-4); }
.cs-copy p:last-child { margin-bottom: 0; }
.cs-band { background: var(--coolGray1c_b); }
.cs-challenges { list-style: none; margin: var(--space-6) 0 0; padding: 0; }
.cs-challenges li { padding: var(--space-3) 0 var(--space-3) var(--space-6); border-top: 1px solid var(--coolGray2c_b); position: relative; }
.cs-challenges li::before { content: '↗'; position: absolute; left: 0; color: var(--corpRed); }
.cs-voices { background: var(--thaddColor); color: var(--leuko); }
.cs-voices .cs-section-heading .cs-eyebrow { color: var(--leuko); }
.cs-quotes { display: grid; gap: var(--space-10); }
.cs-quote { margin: 0; }
.cs-quote blockquote { margin: 0 0 var(--space-6); padding: 0; font-size: max(1.125rem, var(--H6Header)); font-weight: var(--regular); line-height: 1.65; }
.cs-quote blockquote::before { content: '“'; color: var(--coolGray2c_b); font-size: var(--H1Header); display: block; height: 3rem; line-height: 1; }
.cs-quote figcaption { font-size: max(1rem, var(--smallTxt)); color: var(--leuko); line-height: 1.6; }
.cs-quote figcaption strong { display: block; color: var(--leuko); }
.cs-contact { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-16); align-items: center; }
.cs-contact p { color: var(--coolGray6c); max-width: 620px; }
.cs-contact-card { background: var(--coolGray1c_b); padding: var(--space-8); border-top: 3px solid var(--corpRed); }
.cs-contact-card a { overflow-wrap: anywhere; }
.cs-contact-card p { font-size: max(1rem, var(--smallTxt)); margin-bottom: var(--space-3); }
.cs-footer { border-top: 1px solid var(--coolGray2c_b); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-4); padding: var(--space-6) 4%; font-size: max(1rem, var(--smallTxt)); color: var(--coolGray6c); }
@media (min-width: 1500px) { .cs-hero-content { width: 1280px; } }
@media (max-width: 1000px) {
  .cs-nav { gap: var(--space-4); flex-direction: column; padding: var(--space-3) 4% 0; align-items: flex-start; }
  .cs-brand img { width: 165px; }
  .cs-nav-links { width: 100%; overflow-x: auto; gap: var(--space-5); padding-bottom: var(--space-2); }
  .cs-nav-links a { font-size: max(1rem, var(--smallTxt)); }
  .cs-hero { min-height: 600px; }
  .cs-hero-image { width: 50%; }
  .case-study h1 { width: 80%; }
  .cs-intro { width: 70%; }
  .cs-summary { grid-template-columns: 1fr 2fr; }
  .cs-summary-title { grid-column: 1/-1; }
  .cs-section-grid { gap: var(--space-12); grid-template-columns: 1fr 2fr; }
}
@media (max-width: 640px) {
  .case-study { font-size: max(1.125rem, var(--bodyText)); }
  .cs-nav-links { flex-wrap: wrap; overflow: visible; gap: var(--space-1) var(--space-4); }
  .cs-hero { min-height: 0; display: block; }
  .cs-hero-image { position: relative; display: block; width: 100%; height: 250px; object-position: 50% 38%; }
  .cs-hero-content { padding: var(--space-10) 0 var(--space-12); }
  .cs-hero .cs-eyebrow { margin-bottom: var(--space-5); }
  .case-study h1, .cs-intro { width: 100%; }
  .case-study h1 { font-size: var(--H1Header); }
  .cs-intro { font-size: max(1.125rem, var(--bodyText)); }
  .cs-actions { flex-direction: column; align-items: stretch; }
  .cs-summary { grid-template-columns: 1fr; gap: var(--space-6); padding: var(--space-8) 0; }
  .cs-facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
  .cs-summary .cs-facts > div + div { margin-top: 0; }
  .cs-section { padding: var(--space-12) 0; scroll-margin-top: 165px; }
  .cs-section-grid, .cs-contact { grid-template-columns: 1fr; gap: var(--space-6); }
  .cs-contact-card { padding: var(--space-6); }
  .cs-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print {
  .cs-nav, .cs-actions, .cs-skip, .cs-footer { display: none; }
  .cs-hero { min-height: 0; background: var(--leuko); color: var(--coolGray11c); }
  .cs-hero-image { display: none; }
  .cs-hero-content { padding: var(--space-8) 0; }
  .case-study h1, .cs-intro { width: 100%; color: var(--coolGray11c); }
  .cs-voices { color: var(--coolGray11c); background: var(--leuko); }
  .cs-quote figcaption, .cs-quote figcaption strong, .cs-source { color: var(--coolGray9c); }
  .cs-section { padding: var(--space-8) 0; }
  .cs-section-grid { grid-template-columns: 1fr; gap: var(--space-4); }
}

/* Corporate components retain their shared type, padding, radii and hover states. */
.cs-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-4); text-decoration: none; line-height: 1.5; }
.case-study .cs-hero h1, .cs-voices .cs-section-heading h2 { color: var(--leuko); }
.cs-nav-links a { color: var(--coolGray9c); }
.cs-contact-card { border-radius: var(--radius-md); }
@media (max-width: 768px) {
  .cs-nav { flex-direction: column; align-items: flex-start; }
  .cs-nav-links { flex-wrap: wrap; overflow: visible; }
  .case-study h1 { overflow-wrap: anywhere; }
  .cs-section { scroll-margin-top: 190px; }
}
@media (prefers-reduced-motion: reduce) { .case-study a { transition: none; } }
@media print { .case-study .cs-hero h1, .cs-voices .cs-section-heading h2 { color: var(--coolGray11c); } }

/* Case-summary panel uses the corporate red, with readable white content. */
.cs-summary-band { background: var(--corpRed); color: var(--leuko); }
.cs-summary { border: 0; }
.case-study .cs-summary h2, .case-study .cs-summary dt { color: var(--leuko); }
.cs-summary h2 { font-size: var(--H3Header); }
.cs-summary dt { font-weight: var(--bold); text-transform: none; letter-spacing: normal; }
.cs-summary dd ul { padding-left: var(--space-5); margin: 0; }
.cs-summary dd li + li { margin-top: var(--space-2); }
.cs-copy p, .cs-copy ul { margin-bottom: var(--space-6); }
.cs-copy ul { padding-left: var(--space-6); }
.cs-copy li + li { margin-top: var(--space-3); }
.case-study .cs-button { font-size: max(1rem, var(--smallTxt)); min-height: 44px; }
.cs-nav-links a { min-height: 44px; display: inline-flex; align-items: center; }
.cs-intro { font-size: max(1.125rem, var(--largeTxt)); }
.cs-file-label { opacity: 1; }
@media (max-width: 1100px) {
  .cs-nav { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .cs-nav-links { flex-wrap: wrap; gap: 0 var(--space-4); }
  .cs-section { scroll-margin-top: 190px; }
}
@media (max-width: 640px) {
  .cs-facts { grid-template-columns: 1fr; }
  .cs-button { flex-wrap: wrap; }
}

/* Keep product links visible against the corporate-red summary. */
.cs-summary a { color: var(--leuko); text-decoration: underline; text-decoration-thickness: 1px; }
.cs-summary a:hover { text-decoration-thickness: 2px; }
.cs-summary a:focus-visible { outline-color: var(--leuko); }

/* Shared column tracks align the narrative with the summary's customer facts. */
.case-study { --cs-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 2fr); }
.cs-summary, .cs-section-grid { grid-template-columns: var(--cs-columns); column-gap: var(--space-8); }
.cs-copy, .cs-quotes { grid-column: 2 / -1; min-width: 0; }
.cs-nav-links a { font-size: max(1.25rem, var(--H6Header)); }
.cs-section { scroll-margin-top: calc(var(--cs-nav-height, 170px) + var(--space-6)); }

/* Match the corporate social-share rail used by main/social_share.html. */
.cs-sharing .social-share { background-color: #F6F4F4; border-radius: 6px; position: fixed; top: 228px; right: 1.8%; padding: 5px 8px; z-index: 1000; box-shadow: 0 0 4px rgba(0,0,0,.4); }
.cs-sharing .social-share ul { list-style: none; padding: 0; margin: 0; }
.cs-sharing .social-share ul li { margin: 4px 0; font-weight: var(--medium); }
.cs-sharing .a2a_default_style:not(.a2a_flex_style) a { padding: 5px 2px !important; }
@media (max-width: 1200px) {
  .cs-nav { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .cs-nav-links { flex-wrap: wrap; gap: 0 var(--space-5); }
}
@media (max-width: 1024px) {
  .cs-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .cs-summary-title { grid-column: 1 / -1; }
  .cs-section-grid { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-6); }
  .cs-copy, .cs-quotes { grid-column: 1 / -1; }
  .cs-sharing { width: 92%; max-width: 1280px; margin: 0 auto var(--space-8); }
  .cs-sharing .social-share { position: static; display: inline-block; }
  .cs-sharing .social-share ul { display: flex; gap: var(--space-2); }
}
@media (max-width: 640px) { .cs-summary { grid-template-columns: minmax(0, 1fr); } }
@media print { .cs-sharing { display: none; } }

/* Default type matches #primaryTabs in the corporate menu_v2.css. */
.cs-nav-links a {
  font-size: clamp(var(--xsmallTxt), 0.75rem + 0.3vw, var(--bodyText));
  font-weight: var(--regular);
  color: var(--coolGray11c);
}
@media (min-width: 1200px) and (max-width: 1399px) {
  .cs-nav-links a { font-size: calc(var(--bodyText) * .8); }
}
@media (min-width: 1400px) {
  .cs-nav-links a { font-size: var(--bodyText); }
}
@media (min-width: 1400px) and (max-width: 1500px) {
  .cs-nav-links a { font-size: 16px; }
}
/* Match the existing Case Summary heading size. */
.case-study .cs-section-heading h2 { font-size: var(--H3Header); }

/* Editorial section treatments use the corporate tokens and the shared content grid. */
.cs-section-number { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); color: var(--corpRed); font-size: max(1rem, var(--smallTxt)); font-weight: var(--medium); letter-spacing: .12em; }
.cs-section-number::after { content: ''; width: var(--space-10); height: 2px; background: var(--corpRed); }
.cs-editorial-heading h2 { margin-bottom: var(--space-6); }
.cs-customer-panel { margin: var(--space-8) 0 0; background: var(--coolGray1c_b); border-radius: var(--radius-md); overflow: hidden; }
.cs-customer-panel img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.cs-customer-panel-contained img { object-fit: contain; background: var(--leuko); }
.cs-customer-panel figcaption { display: grid; gap: var(--space-2); padding: var(--space-5); border-top: 3px solid var(--corpRed); font-size: max(1rem, var(--smallTxt)); line-height: 1.5; }
.cs-customer-panel figcaption strong { color: var(--coolGray11c); font-weight: var(--medium); }
.cs-customer-panel figcaption span { color: var(--coolGray6c); }
.cs-narrative { grid-column: 2 / -1; min-width: 0; }
.cs-band { background: var(--leuko); }
.cs-band .cs-section { border-top: 1px solid var(--coolGray2c_b); border-bottom: 1px solid var(--coolGray2c_b); }
.cs-challenge-brief { background: var(--coolGray1c_b); border-left: 4px solid var(--corpRed); border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: var(--space-6) var(--space-8); margin-bottom: var(--space-8); }
.cs-challenge-brief ul { margin: 0; padding-left: var(--space-5); }
.cs-challenge-brief li { padding-left: var(--space-2); }
.cs-challenge-brief li + li { margin-top: var(--space-4); }
.cs-challenge-brief li::marker { color: var(--corpRed); }
.cs-product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: var(--space-5); list-style: none; padding: 0; margin: 0 0 var(--space-10); }
.cs-product-grid li { min-width: 0; }
.cs-product-grid a { display: flex; flex-direction: column; height: 100%; color: var(--coolGray11c); text-decoration: none; border: 1px solid var(--coolGray2c_b); border-radius: var(--radius-md); overflow: hidden; background: var(--leuko); transition: border-color .2s; }
.cs-product-grid a:hover { border-color: var(--corpRed); }
.cs-product-media { display: grid; place-items: center; padding: var(--space-4); background: var(--coolGray1c_b); }
.cs-product-media img { display: block; width: 100%; height: 170px; object-fit: contain; }
.cs-product-caption { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); padding: var(--space-5); font-size: max(1.125rem, var(--bodyText)); font-weight: var(--medium); line-height: 1.45; }
.cs-product-caption > span:last-child { color: var(--corpRed); }
.cs-product-grid-single { grid-template-columns: minmax(0, 1fr); }
.cs-product-grid-single a { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: center; }
#the-solution .cs-copy > p + p { border-top: 1px solid var(--coolGray2c_b); padding-top: var(--space-6); }
#the-solution .cs-copy li::marker { color: var(--corpRed); }
@media (max-width: 1024px) {
  .cs-narrative { grid-column: 1 / -1; }
  #the-customer .cs-editorial-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-8); align-items: start; }
  #the-customer .cs-section-number { grid-column: 1; }
  #the-customer h2 { grid-column: 1; }
  #the-customer .cs-customer-panel { grid-column: 2; grid-row: 1 / 4; margin-top: 0; }
}
@media (max-width: 640px) {
  #the-customer .cs-editorial-heading { display: block; }
  #the-customer .cs-customer-panel { margin-top: var(--space-6); }
  .cs-customer-panel img { max-height: 280px; }
  .cs-challenge-brief { padding: var(--space-5); }
  .cs-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .cs-product-media { padding: var(--space-2); }
  .cs-product-media img { height: 140px; }
  .cs-product-caption { padding: var(--space-4); overflow-wrap: anywhere; }
  .cs-product-grid-single { grid-template-columns: minmax(0, 1fr); }
  .cs-product-grid-single a { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 360px) { .cs-product-grid { grid-template-columns: minmax(0, 1fr); } }
@media print { .cs-narrative { grid-column: 1 / -1; } .cs-product-grid, .cs-customer-panel { break-inside: avoid; } }

/* Summary reference: title, inline customer facts, and inline challenge/solution. */
.case-study { --cs-columns: minmax(0, .65fr) minmax(0, 1.35fr) minmax(0, 2.1fr); }
.cs-summary { padding: var(--space-16) 0; align-items: stretch; }
.cs-summary-title { min-width: 0; }
.case-study .cs-summary h2 { font-size: var(--H3Header); margin: 0; line-height: 1.4; }
.cs-summary dl { --cs-summary-label-width: 7rem; position: relative; min-width: 0; min-height: calc(var(--space-12) * 3); }
.cs-summary dl::before { content: ''; position: absolute; left: var(--cs-summary-label-width); top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--leuko) 45%, transparent); }
.cs-summary dl > div { display: grid; grid-template-columns: var(--cs-summary-label-width) minmax(0, 1fr); align-items: baseline; }
.cs-summary dl > div + div { margin-top: var(--space-6); }
.case-study .cs-summary dt { padding-right: var(--space-5); margin: 0; text-align: right; font-size: max(1rem, var(--smallTxt)); font-weight: var(--medium); line-height: 1.55; }
.cs-summary dd { min-width: 0; padding-left: var(--space-5); overflow-wrap: anywhere; }
.cs-summary .cs-brief > div + div { margin-top: var(--space-8); }
.cs-summary dd ul { margin: 0; padding-left: var(--space-4); }
.cs-summary dd li + li { margin-top: var(--space-1); }
@media (max-width: 1024px) {
  .cs-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); row-gap: var(--space-8); }
  .cs-summary-title { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .cs-summary { grid-template-columns: minmax(0, 1fr); padding: var(--space-12) 0; }
  .cs-summary dl { --cs-summary-label-width: 6rem; min-height: 0; display: block; }
  .cs-summary .cs-facts > div + div { margin-top: var(--space-5); }
}

/* Float the identity panel beside the original customer copy. */
#the-customer .cs-editorial-heading { display: block; }
#the-customer .cs-narrative { display: flow-root; }
#the-customer .cs-customer-panel { float: right; width: clamp(200px, 27%, 260px); margin: 0 0 var(--space-5) var(--space-8); }
#the-customer .cs-customer-panel img { aspect-ratio: 16 / 10; }
#the-customer .cs-customer-panel figcaption { padding: var(--space-4); }

/* Equal-width product cards; incomplete rows stay centred at the same card width. */
.cs-product-grid { --cs-product-columns: var(--cs-product-count); --cs-product-gap: var(--space-5); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--cs-product-gap); }
.cs-product-grid > li { flex: 0 1 calc((100% - (var(--cs-product-columns) - 1) * var(--cs-product-gap)) / var(--cs-product-columns)); }
.cs-product-media { background: color-mix(in srgb, var(--leuko) 85%, var(--coolGray1c_b)); }
.cs-product-media img { height: 190px; }
@media (max-width: 800px) {
  .cs-product-grid:not(.cs-product-grid-single) { --cs-product-columns: 2; --cs-product-gap: var(--space-3); }
}
@media (max-width: 640px) {
  #the-customer .cs-narrative { display: flex; flex-direction: column; }
  #the-customer .cs-customer-panel { order: 2; float: none; width: 100%; max-width: 360px; margin: var(--space-6) auto 0; }
  #the-customer .cs-copy { order: 1; }
  .cs-product-media img { height: 150px; }
}
@media (max-width: 360px) {
  .cs-product-grid:not(.cs-product-grid-single) { --cs-product-columns: 1; }
}

/* Product links follow the complete solution narrative. */
.cs-product-grid { margin: var(--space-10) 0 0; }
