/* Case study pages. Built on the site's own variables from styles.css. */
.cs-page { padding-top: 120px; padding-bottom: 0; }
.cs-wrap { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 var(--spacing-sm); }
.cs-wide { max-width: 1040px; }
.cs-eyebrow { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); display: block; margin-bottom: 1rem; }

.cs-hero { text-align: center; padding: 3rem 0 2.5rem; }
.cs-hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.1; margin-bottom: 1.25rem; }
.cs-hero .cs-lede { font-size: 1.2rem; color: var(--text-muted); line-height: 1.65; max-width: 700px; margin: 0 auto 1.75rem; }
.cs-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; justify-content: center; font-family: var(--font-mono); font-size: .78rem; color: var(--text-muted); margin-bottom: 2rem; }
.cs-meta b { color: var(--primary); letter-spacing: .1em; margin-right: .4rem; font-weight: 600; }

.cs-figure { margin: 2rem auto; }
.cs-figure img, .cs-figure video { width: 100%; height: auto; border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-lg); background: var(--bg-light); }
.cs-figure figcaption { text-align: center; font-size: .9rem; color: var(--text-muted); margin-top: .75rem; font-style: italic; }

.cs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin: 2.5rem auto; }
.cs-stat { background: var(--bg-light); border: 1px solid var(--border); border-radius: 4px; padding: 1.5rem 1rem; text-align: center; }
.cs-stat strong { display: block; font-size: 2.1rem; line-height: 1.1; color: var(--primary); margin-bottom: .4rem; }
.cs-stat span { color: var(--text-muted); font-size: .95rem; line-height: 1.4; display: block; }

.cs-body { padding: 1rem 0 2rem; }
.cs-body h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.2; margin: 3.5rem 0 1.1rem; }
.cs-body h3 { font-size: 1.35rem; margin: 2rem 0 .6rem; }
.cs-body p { color: var(--text-main); opacity: .9; font-size: 1.08rem; line-height: 1.75; margin-bottom: 1.1rem; }
.cs-body ul { margin: 0 0 1.25rem 0; padding: 0; list-style: none; }
.cs-body li { position: relative; padding-left: 1.5rem; margin-bottom: .75rem; line-height: 1.65; color: var(--text-main); opacity: .9; }
.cs-body li::before { content: ""; position: absolute; left: 0; top: .7em; width: .55rem; height: 1px; background: var(--primary); }
.cs-body strong { color: var(--text-main); }
.cs-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.cs-callout { border: 1px solid var(--border-strong); background: var(--bg-panel); border-radius: 10px; padding: 1.25rem 1.5rem; margin: 1.75rem 0; font-size: 1.12rem; line-height: 1.6; font-style: italic; }
.cs-callout p { margin: 0; font-size: inherit; }
.cs-quote { border: 1px solid var(--border); background: var(--bg-light); border-radius: 10px; padding: 1rem 1.25rem; margin: 1.25rem 0; font-style: italic; color: var(--text-muted); line-height: 1.65; }
.cs-code { font-family: var(--font-mono); font-size: .85rem; background: #060a14; border: 1px solid var(--border); border-radius: 4px; padding: 1rem 1.25rem; overflow-x: auto; color: var(--primary); margin: 1.25rem 0; line-height: 1.6; word-break: break-all; }

.cs-steps { counter-reset: step; margin: 1.5rem 0; }
.cs-step { position: relative; padding: 1.25rem 1.5rem 1.25rem 4rem; background: var(--bg-light); border: 1px solid var(--border); border-radius: 4px; margin-bottom: 1rem; }
.cs-step::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; left: 1.25rem; top: 1.2rem; font-family: var(--font-mono); font-size: .9rem; color: var(--primary); }
.cs-step h3 { margin: 0 0 .4rem; font-size: 1.2rem; }
.cs-step p { margin: 0; font-size: 1rem; }

.cs-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 1rem; }
.cs-table th, .cs-table td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.5; }
.cs-table th { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); font-weight: 600; }
.cs-table td:first-child { color: var(--text-main); font-weight: 600; white-space: nowrap; }
.cs-table td { color: var(--text-muted); }
.cs-table-wrap { overflow-x: auto; }

.cs-inline-cta { text-align: center; background: var(--bg-light); border: 1px solid var(--border); border-radius: 4px; padding: 2rem 1.5rem; margin: 2.5rem 0; }
.cs-inline-cta h3 { margin: 0 0 .5rem; font-size: 1.5rem; }
.cs-inline-cta p { margin-bottom: 1.25rem; color: var(--text-muted); }

.cs-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.cs-pair .cs-figure { margin: 0; }

.cs-foot { font-size: .85rem; color: var(--text-muted); font-style: italic; border-top: 1px solid var(--border); padding-top: 1.25rem; margin-top: 2.5rem; }

.cs-more { padding: 2rem 0 5rem; }
.cs-more h2 { text-align: center; font-size: 1.8rem; margin-bottom: 1.5rem; }
.cs-more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.cs-more-grid a { display: block; background: var(--bg-light); border: 1px solid var(--border); border-radius: 4px; padding: 1.5rem; transition: border-color .2s, transform .2s; }
.cs-more-grid a:hover { border-color: rgba(232,163,61,.5); transform: translateY(-3px); }
.cs-more-grid strong { display: block; font-size: 1.2rem; margin-bottom: .4rem; }
.cs-more-grid span { color: var(--text-muted); font-size: .95rem; line-height: 1.5; }

/* Case study cards on the Use Cases page */
.cs-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.cs-card { display: flex; flex-direction: column; background: var(--bg-light); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.cs-card:hover { transform: translateY(-4px); border-color: rgba(232,163,61,.5); box-shadow: 0 14px 34px -14px rgba(0,0,0,.6); }
.cs-card-media { aspect-ratio: 16 / 10; overflow: hidden; background: #060a14; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.cs-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cs-card-media .cs-code { margin: 0; border: 0; background: none; font-size: .78rem; padding: 1.25rem; }
.cs-card-body { padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.cs-card-body h3 { font-size: 1.35rem; line-height: 1.25; }
.cs-card-body p { color: var(--text-muted); line-height: 1.6; }
.cs-card-link { margin-top: auto; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }

@media (max-width: 640px) {
    .cs-step { padding-left: 3.25rem; }
    .cs-table td:first-child { white-space: normal; }
}
