/* Technical documentation built on the portfolio's existing color and type tokens. */
.cs-main { padding-block: 56px 90px; }
.cs-main a:focus-visible { outline: 3px solid var(--purple); outline-offset: 5px; border-radius: 3px; }
.cs-card h3 a, .cs-filters a, .cs-read, .cs-breadcrumb a, .cs-sidebar a { text-decoration: none; }
.cs-heading { max-width: 900px; padding-block: 22px 48px; }
.cs-eyebrow { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.cs-eyebrow span, .cs-byline span { margin-inline: 8px; }
.cs-heading h1 { font-family: var(--display); font-size: clamp(2.5rem, 5.5vw, 4.6rem); line-height: 1.12; letter-spacing: -.045em; margin: 14px 0 24px; overflow-wrap: anywhere; }
.cs-heading h1 > span { color: var(--purple); }
.cs-heading--detail h1 { font-size: clamp(2.1rem, 4.5vw, 3.7rem); }
.cs-intro { max-width: 780px; font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--muted); line-height: 1.8; }
.cs-byline, .cs-breadcrumb { font-size: .85rem; color: var(--muted); }
.cs-breadcrumb { display: flex; flex-wrap: wrap; gap: 12px; }
.cs-breadcrumb a:hover, .cs-sidebar a:hover { color: var(--purple); }
.cs-featured { margin-bottom: 54px; }
.cs-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.cs-card__image { display: block; background: var(--surface-soft); }
.cs-card__image img { width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; display: block; }
.cs-card__body { padding: 26px; display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
.cs-card__body > p:not(.cs-eyebrow) { color: var(--muted); font-size: .93rem; }
.cs-card h3 { font-family: var(--display); font-size: 1.3rem; line-height: 1.4; margin: 10px 0; overflow-wrap: anywhere; }
.cs-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.cs-card--featured:has(.cs-card__image) { display: grid; grid-template-columns: 1.15fr 1fr; }
.cs-card--featured .cs-card__image img { height: 100%; min-height: 320px; }
.cs-card--featured .cs-card__body { padding: clamp(24px, 4vw, 48px); justify-content: center; }
.cs-card--featured h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.cs-library__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.cs-library h2, .cs-related > h2 { font-family: var(--display); font-size: 1.5rem; }
.cs-library__head p { color: var(--muted); font-size: .85rem; }
.cs-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 30px; }
.cs-filters a { padding: 9px 14px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: .8rem; }
.cs-filters a[aria-current], .cs-filters a:hover { color: var(--ink); border-color: var(--purple); background: var(--surface); }
.cs-filters a[aria-current] { box-shadow: inset 0 -2px var(--purple); }
.cs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cs-tags { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 18px 0; padding: 0; }
.cs-tags li { font-size: .75rem; padding: 4px 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); overflow-wrap: anywhere; max-width: 100%; }
.cs-read { display: inline-block; color: var(--purple); font-weight: 700; font-size: .9rem; padding-block: 8px; }
.cs-card .cs-read { margin-top: auto; }
.cs-read:hover { text-decoration: underline; text-underline-offset: 4px; }
.cs-empty { grid-column: 1 / -1; padding: 48px 28px; border-block: 1px solid var(--line); }
.cs-empty p { color: var(--muted); }
.cs-pagination { display: flex; gap: 28px; justify-content: center; align-items: center; margin-top: 40px; }
.cs-pagination a { padding: 10px; color: var(--purple); }
.cs-cover { margin: 0 0 52px; }
.cs-cover img { display: block; width: 100%; height: auto; max-height: 650px; object-fit: contain; background: var(--surface-soft); border-radius: 16px; }
.cs-document { display: grid; grid-template-columns: 230px minmax(0, 780px); gap: clamp(28px, 5vw, 80px); align-items: start; }
.cs-document:not(:has(.cs-sidebar)) { grid-template-columns: minmax(0, 780px); }
.cs-sidebar { position: sticky; top: 100px; border-top: 1px solid var(--line); padding-top: 20px; }
.cs-sidebar h2 { font-size: .85rem; }
.cs-sidebar ol { padding-left: 20px; color: var(--muted); font-size: .85rem; }
.cs-sidebar li { padding-block: 5px; }
.cs-sidebar a { display: inline-block; padding-block: 4px; }
.cs-copy { min-width: 0; max-width: 780px; overflow-wrap: anywhere; }
.cs-section { padding-bottom: 38px; margin-bottom: 32px; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
.cs-section__number { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; margin: 0 0 8px; }
.cs-section h2, .cs-project-link h2 { font-family: var(--display); font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.35; margin: 0 0 20px; }
.cs-copy p { line-height: 1.85; }
.cs-copy pre { max-width: 100%; overflow: auto; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; padding: 22px; font-size: .85rem; line-height: 1.7; }
.cs-media figure { margin: 28px 0; }
.cs-media img, .cs-media video, .cs-media iframe { width: 100%; display: block; border: 1px solid var(--line); border-radius: 10px; }
.cs-media img { height: auto; }
.cs-media video, .cs-media iframe { aspect-ratio: 16 / 9; }
.cs-media .cs-diagram { object-fit: contain; background: var(--surface); }
.cs-media figcaption { font-size: .85rem; color: var(--muted); margin-top: 12px; }
.cs-media summary { cursor: pointer; padding: 12px 0; color: var(--purple); }
.cs-project-link { padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cs-related { margin-top: 60px; padding-top: 36px; border-top: 1px solid var(--line); }
.cs-related > h2 { margin-bottom: 24px; }
.cs-project-media { max-width: 900px; margin-bottom: 40px; }
.cs-project-media .portfolio-carousel { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; }
.cs-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 1000px) {
    .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cs-document { grid-template-columns: 190px minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 760px) {
    .cs-main { padding: 28px 10px 56px; }
    .cs-heading { padding-block: 16px 30px; }
    .cs-grid, .cs-document, .cs-card--featured:has(.cs-card__image) { grid-template-columns: minmax(0, 1fr); }
    .cs-card--featured .cs-card__image img { min-height: 0; height: auto; }
    .cs-sidebar { position: static; margin-bottom: 18px; }
    .cs-sidebar ol { columns: 2; column-gap: 30px; }
    .cs-sidebar li { break-inside: avoid; }
    .cs-library__head { display: block; }
    .cs-card__body { padding: 22px; }
    .cs-cover { margin-bottom: 30px; }
    .cs-filters a { padding: 11px 12px; }
}
@media (prefers-reduced-motion: reduce) { .case-studies-page { scroll-behavior: auto; } }
