/* Loaded only by the reusable case-detail page; existing page styles are untouched. */
.case-study { --cs-heading-indent: 40px; color: var(--ink); background: var(--paper); }
.case-study .container { width: min(1220px, calc(100% - 48px)); max-width: 1220px; }
.case-study h1, .case-study h2, .case-study h3 { color: var(--green-deep); }
.case-study p { color: var(--ink-2); }
.case-study a:focus-visible { outline: 2px solid var(--green); outline-offset: 5px; }
.cs-hero { padding: 132px 0 112px; background: linear-gradient(120deg, #f8f9f4 15%, #edf4ed 100%); }
.cs-breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 46px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.cs-breadcrumb a:hover { color: var(--green); }
.cs-hero-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 52px; align-items: center; }
.cs-hero-copy { min-width: 0; }
.cs-hero-eyebrow { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.cs-hero-eyebrow > .home-label { margin: 0; }
.cs-hero h1 { margin: 0 0 25px; font-size: clamp(36px, 3.7vw, 52px); font-weight: 600; line-height: 1.24; letter-spacing: -.035em; text-wrap: balance; }
.cs-hero h1 > span { display: block; }
.cs-hero-summary { max-width: 32em; margin-bottom: 28px; font-size: 17px; line-height: 1.9; }
.cs-tags { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; padding: 0; margin: 0; }
.cs-tags li { padding: 6px 11px; border: 1px solid #dbe5d8; border-radius: 7px; background: rgba(255,255,255,.65); color: var(--green); font-size: 12px; line-height: 1.5; }
.case-hero-media { min-width: 0; }
/* The same reserved geometry is used before and after a real image is provided. */
.case-media {
  --case-media-ratio: 16 / 10;
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: var(--case-media-ratio);
  overflow: hidden;
  border: 1px solid #e1e9e0;
  border-radius: 24px;
  background: #f8faf6;
  box-shadow: 0 10px 30px rgba(25,57,46,.025);
}
.case-media--hero { --case-media-ratio: 4 / 3; border-radius: 28px; }
.case-media--wide { --case-media-ratio: 20 / 9; }
.case-media__surface {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(93,135,118,.035) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(rgba(93,135,118,.035) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(ellipse at 20% 72%, rgba(207,230,211,.38), transparent 62%),
    radial-gradient(ellipse at 90% 12%, rgba(213,231,239,.38), transparent 70%),
    linear-gradient(135deg, #f7f9f3, #eef6f0 54%, #f3f7f8);
}
.case-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.case-study figcaption { margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.cs-section { padding: 112px 0; }
.cs-section--white { background: var(--white); }
.cs-section--mint { background: #edf3e9; }
.case-study .cs-reading { width: min(860px, calc(100% - var(--cs-heading-indent))); max-width: 860px; margin-left: var(--cs-heading-indent); margin-right: 0; }
.cs-section-head { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: baseline; gap: 16px; margin-bottom: 34px; }
.cs-section-number { flex: 0 0 auto; color: #78917d; font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.cs-section-head h2 { margin: 0; font-size: clamp(28px, 2.8vw, 38px); line-height: 1.35; font-weight: 600; text-wrap: balance; }
.cs-background { margin: 0; font-size: 18px; line-height: 2; }
.cs-pain-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.cs-pain { padding: 28px 23px 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.cs-pain-number { display: block; margin-bottom: 30px; color: #8b9a8e; font-size: 12px; letter-spacing: .1em; }
.cs-pain h3 { margin-bottom: 12px; font-size: 19px; line-height: 1.45; }
.cs-pain p { margin: 0; min-height: 5.55em; font-size: 15px; line-height: 1.85; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.cs-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 0; padding: 0; margin: 0; list-style: none; }
.cs-flow li { display: flex; align-items: center; }
.cs-flow li > span { display: block; padding: 13px 17px; background: rgba(255,255,255,.85); border: 1px solid #dce6d7; border-radius: 10px; font-size: 15px; color: var(--green-deep); }
.cs-flow li:first-child > span, .cs-flow li:last-child > span { background: #e4efbc; border-color: #d9e6b0; }
.cs-flow i { display: block; padding: 0 8px; color: #8ea788; font-style: normal; font-size: 15px; }
.cs-approach-note { max-width: 820px; margin: 30px 0 0; font-size: 16px; line-height: 1.95; }
.cs-module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cs-module { display: flex; align-items: flex-start; gap: 20px; padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: #fafbf8; }
.cs-module:last-child:nth-child(odd) { grid-column: 1 / -1; }
.cs-module-icon { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 11px; background: #e9f1df; color: var(--green); }
.cs-module-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cs-module h3 { margin-bottom: 10px; font-size: 21px; line-height: 1.4; }
.cs-module p { max-width: 48em; margin: 0; font-size: 16px; line-height: 1.85; }
.cs-interface-summary { margin-top: -12px; margin-bottom: 36px; font-size: 17px; line-height: 1.9; }
.cs-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 38px 24px; }
.cs-screenshot { margin: 0; min-width: 0; }
.cs-screenshot--wide { grid-column: 1 / -1; }
.case-study .cs-screenshot figcaption { display: flex; gap: 12px; align-items: baseline; margin-top: 18px; color: var(--green-deep); font-size: 16px; font-weight: 500; }
.cs-screenshot figcaption > span { color: #81958b; font-size: 12px; letter-spacing: .08em; }
.cs-comparison { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 16px; line-height: 1.85; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.cs-comparison caption { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cs-comparison th, .cs-comparison td { width: 50%; padding: 22px 26px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.cs-comparison th { color: var(--ink-2); background: #f0f2ec; font-size: 19px; font-weight: 600; }
.cs-comparison th span { display: block; color: #78877d; margin-bottom: 5px; font-size: 11px; letter-spacing: .12em; }
.cs-comparison th:last-child { color: var(--green-deep); background: #eaf2d7; }
.cs-comparison td { border-top: 1px solid var(--line); background: var(--white); color: #69786f; }
.cs-comparison td:last-child { background: #f2f7ec; color: var(--green-deep); }
.cs-boundaries { margin: 0; padding: 0; list-style: none; }
.cs-boundaries li { position: relative; padding: 18px 0 18px 23px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 16px; line-height: 1.85; }
.cs-boundaries li::before { content: ''; position: absolute; left: 0; top: 29px; width: 6px; height: 6px; border-radius: 50%; background: var(--lime-strong); }
.case-study .cs-boundary-note { margin-top: 30px; margin-bottom: 0; color: var(--green-deep); font-size: 17px; line-height: 2; }
.cs-boundary-note strong { font-weight: 600; background: linear-gradient(transparent 64%, rgba(216,240,107,.46) 64%, rgba(216,240,107,.46) 94%, transparent 94%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.cs-related-grid { max-width: 1120px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.cs-related-card { border: 1px solid var(--line); border-radius: 18px; background: var(--white); overflow: hidden; min-width: 0; box-shadow: 0 8px 22px rgba(25,57,46,.035); }
.cs-related-card > a { display: block; height: 100%; transition: background-color .2s ease; }
.cs-related-card > a:hover { background: #f8faf4; }
.cs-related-card > img, .cs-related-card > a > img { width: 100%; height: 144px; object-fit: cover; }
.cs-related-copy { padding: 18px 20px; }
.case-study .cs-related-industry { width: fit-content; color: var(--green); background: #edf4ed; border: 1px solid rgba(30,89,71,.07); padding: 4px 8px; border-radius: 6px; font-size: 10px; line-height: 1.3; margin-bottom: 12px; }
.cs-related-copy h3 { min-height: 2.8em; font-size: 18px; line-height: 1.4; margin-bottom: 10px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.case-study .cs-related-summary { min-height: 3.3em; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.cs-related-logo { display: flex; align-items: center; height: 50px; padding-top: 12px; margin-top: 16px; border-top: 1px solid rgba(30,89,71,.07); }
.cs-related-logo > img { max-width: 138px; max-height: 28px; object-fit: contain; }
.cs-related-logo .case-logo-lockup { transform: scale(.82); transform-origin: left center; }
@media (max-width: 1024px) {
  .cs-hero-grid { gap: 32px; }
  .cs-hero h1 { font-size: 38px; }
  .cs-hero-summary { font-size: 16px; }
  .cs-pain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-study .container { width: calc(100% - 36px); }
}
@media (max-width: 800px) {
  .cs-hero { padding: 112px 0 72px; }
  .cs-breadcrumb { margin-bottom: 32px; }
  .cs-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .cs-hero-copy { max-width: 620px; }
  .cs-hero h1 { max-width: 16em; }
  .case-media--hero { --case-media-ratio: 16 / 10; }
  .cs-section { padding: 72px 0; }
  .cs-module { padding: 24px; gap: 15px; }
  .cs-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
@media (max-width: 540px) {
  .case-study { --cs-heading-indent: 34px; }
  .case-study .container { width: calc(100% - 28px); }
  .cs-hero h1 { font-size: 34px; line-height: 1.3; }
  .cs-hero-summary { margin-bottom: 24px; font-size: 16px; }
  .case-media { border-radius: 20px; }
  .case-media--wide { --case-media-ratio: 16 / 10; }
  .cs-section-head { grid-template-columns: 22px minmax(0, 1fr); gap: 12px; margin-bottom: 26px; }
  .cs-section-head h2 { font-size: 27px; }
  .cs-background { font-size: 16px; line-height: 1.95; }
  .cs-pain-grid, .cs-module-grid, .cs-gallery { grid-template-columns: minmax(0, 1fr); }
  .cs-interface-summary { font-size: 16px; }
  .cs-pain { padding: 23px; }
  .cs-pain-number { margin-bottom: 18px; }
  .cs-flow { gap: 10px 0; }
  .cs-flow li > span { padding: 10px 12px; font-size: 14px; }
  .cs-flow i { padding: 0 6px; }
  .cs-module { padding: 22px; gap: 14px; }
  .cs-module h3 { font-size: 20px; }
  .cs-module p { font-size: 15px; }
  .cs-comparison th, .cs-comparison td { padding: 17px 15px; }
  .cs-comparison td { font-size: 14px; }
  .cs-related-grid { grid-template-columns: minmax(0, 1fr); }
}
