.selected-work { border-top: 1px solid #ccc; margin: 1rem 0 3rem; padding: 2rem 0; }
.selected-work h2 { font-size: clamp(1.65rem,2.6vw,2.5rem); letter-spacing: -.035em; line-height: 1.2; }
.work-intro { color: #555; line-height: 1.8; max-width: 65ch; margin: 1rem 0 1.75rem; }
.selected-work-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.25rem; }
.work-card { border-top: 3px solid #235f89; padding: 1.25rem 0; display: flex; flex-direction: column; align-items: flex-start; }
.work-context { color: #235f89; font-size: .7rem; font-weight: 700; line-height: 1.7; letter-spacing: .04em; }
.work-card h3 { font-size: 1.2rem; line-height: 1.35; margin: 1rem 0; letter-spacing: -.02em; }
.work-card h3 a { text-decoration: none; color: #111; }
.product-screen { margin: 2.5rem 0; }
.product-screen img { display: block; width: 100%; height: auto; border: 1px solid #ddd; }
.product-screen figcaption { font-size: .75rem; line-height: 1.8; color: #666; margin-top: .75rem; max-width: 80ch; }
.work-card > p:not(.work-context) { font-size: .9rem; line-height: 1.8; color: #555; flex-grow: 1; }
.work-card-link, .work-hub-link { display: inline-block; margin-top: 1.25rem; color: #235f89; font-size: .8rem; font-weight: 700; text-underline-offset: 5px; }
.home-selected-work { margin: 1rem 2rem 3rem; }
.notes-heading { font-size: 1.5rem; margin: 0 0 1.5rem; letter-spacing: -.02em; }
.selected-work :is(a,button):focus-visible { outline: 2px solid #235f89; outline-offset: 5px; }

/* New long-form cases use the document as their sole scrolling surface. */
html.case-study-root, .case-study-root body { height: auto !important; min-height: 100vh; overflow: visible !important; }
.case-study-page .top-nav { left: 0; width: 100%; height: 72px; border-bottom: 1px solid #e7e7e7; }
.case-study-page .top-nav .nav-inner { max-width: 1180px; margin: auto; padding: 0 2rem; }
.case-study-page .top-nav .nav-brand { display: inline-flex; margin: 0; }
.case-study-page .top-nav .nav-brand img { height: 44px; width: auto; padding: 5px 10px; }
.case-main { max-width: 1000px; padding: 110px 3rem 4rem; margin: 0 auto; }
.case-study-breadcrumbs { display: flex; flex-wrap: wrap; gap: .6rem; font-size: .75rem; line-height: 1.8; margin-bottom: 2.5rem; color: #666; }
.case-study-breadcrumbs a { color: #235f89; text-underline-offset: 4px; }
.case-study-hero h1 { font-size: clamp(2.25rem,4.6vw,4rem); font-weight: 900; line-height: 1.08; letter-spacing: -.04em; max-width: 23ch; margin: 1rem 0 2rem; }
.case-deck { max-width: 70ch; font-size: 1.08rem; line-height: 1.85; color: #444; }
.case-deck p + p { margin-top: 1.25rem; }
.case-deck p:last-child { font-size: .85rem; color: #333; border-left: 3px solid #4997d0; padding: .6rem 0 .6rem 1rem; margin: 1.75rem 0 2rem; }
.case-study-context { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; padding: 1.5rem 0; margin: 2rem 0; }
.case-study-context > div:last-child { grid-column: 1/-1; }
.case-study-context dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #666; margin-bottom: .5rem; }
.case-study-context dd { font-size: .9rem; line-height: 1.8; color: #333; }
.workflow-figure { background: #f4f7f9; border: 1px solid #dce4e9; padding: 1.75rem; margin: 2.5rem 0 3rem; }
.workflow-figure ol { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; list-style: none; padding: 0; counter-reset: workflow; }
.workflow-figure li { counter-increment: workflow; border-top: 2px solid #4997d0; padding-top: .75rem; }
.workflow-figure li::before { content: '0' counter(workflow); color: #235f89; font-size: .7rem; display: block; margin-bottom: .75rem; }
.workflow-figure strong { display: block; font-size: .9rem; line-height: 1.4; }
.workflow-figure li span { display: block; font-size: .75rem; line-height: 1.7; margin-top: .5rem; color: #555; }
.workflow-figure figcaption { font-size: .72rem; color: #555; line-height: 1.8; margin-top: 1.5rem; max-width: 80ch; }
.case-study-body { max-width: 70ch; margin: auto; color: #333; font-size: 1.05rem; line-height: 1.9; }
.case-study-body p { margin: 1.25rem 0; }
.case-study-body h2 { font-size: 1.6rem; line-height: 1.3; letter-spacing: -.025em; color: #111; margin: 2.75rem 0 1rem; }
.case-study-body a, .case-contact a { color: #235f89; text-underline-offset: 4px; }
.case-contact { margin: 3rem 0 0; }
.case-contact p { color: #555; line-height: 1.8; margin-top: 1rem; max-width: 70ch; }
.case-contact p:last-child { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; font-size: .85rem; }
.related-work { border-top: 1px solid #ddd; margin-top: 3rem; padding-top: 2rem; }
.related-work h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.related-work a { display: block; width: fit-content; font-size: .9rem; line-height: 1.6; color: #235f89; margin: 1rem 0; text-underline-offset: 4px; }
.case-study-page :is(a,button):focus-visible { outline: 2px solid #235f89; outline-offset: 5px; }
@media (max-width: 1100px) {
  .selected-work-grid { grid-template-columns: 1fr; gap: .75rem; }
  .work-card > p:not(.work-context) { max-width: 65ch; }
}
@media (max-width: 780px) {
  .home-selected-work { margin-left: 0; margin-right: 0; }
  .case-study-page .top-nav { height: 56px; }
  .case-study-page .top-nav .nav-inner { padding: 0 .75rem; }
  .case-study-page .top-nav .nav-brand img { height: 32px; }
  .case-main { padding: 85px 1.25rem 2.5rem; }
  .case-study-breadcrumbs { margin-bottom: 2rem; }
  .case-study-hero h1 { font-size: clamp(2rem,7vw,3rem); }
  .case-deck, .case-study-body { font-size: 1rem; }
  .case-study-context { grid-template-columns: 1fr; }
  .workflow-figure { padding: 1.25rem; }
  .workflow-figure ol { grid-template-columns: 1fr; gap: 1.5rem; }
  .case-study-body h2 { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .case-study-root, .case-study-page *, .selected-work * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
