/* Work shares the home page's featured case, closing composer, and global layout. */
.work-archive { --page-gap: 64px; }
.work-case { --page-gap: 96px; }
.work-archive main, .work-case main { display: grid; gap: var(--page-gap); padding-top: 12px; }
.work-shell { width: min(calc(100% - 2 * var(--gutter)), 1520px); margin-inline: auto; min-width: 0; }
.work-archive .closing, .work-case .closing { padding-block: 0; margin-bottom: 20px; }
.work-archive .v3-footer, .work-case .v3-footer { padding-bottom: 0; }
.work-archive .v3-nav a[href="/work/"] { font-weight: 700; color: #236796; }

.archive-mast, .cover-scene { position: relative; isolation: isolate; overflow: clip; border-radius: 30px; background: #4a4466; }
.archive-mast { height: clamp(480px, 44.444vw, 720px); margin-inline: 12px; }
.archive-mast::after, .cover-scene::after { content: ''; position: absolute; inset: 0; z-index: -1; }
.archive-mast::after { background: linear-gradient(#18122c1a, #18122c6b); }
.archive-mast .scene-art, .cover-scene .scene-art { z-index: -2; }
.archive-marquee { position: absolute; top: 46.875%; left: -2.8%; color: white; }
.archive-marquee > div { display: flex; width: max-content; align-items: center; font: 700 clamp(130px, 15.972vw, 260px)/.957 var(--display); letter-spacing: -.055em; white-space: nowrap; }
.archive-marquee > div > span { margin-right: .261em; }
.archive-marquee .brand-mark { width: .826em; height: .54em; }
@media (prefers-reduced-motion: no-preference) {
  .archive-marquee > div { animation: work-marquee 40s linear infinite; }
  @keyframes work-marquee { to { transform: translateX(-25%); } }
}
.archive-intro { display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.archive-intro h2 { max-width: 760px; font-size: clamp(48px, 4.445vw, 68px); line-height: 1.03125; letter-spacing: -.045em; }
.archive-intro h2 span { color: var(--subheading); }
.archive-intro p { width: min(34%,400px); flex: none; color: var(--muted); font-size: 18px; line-height: 28px; padding-bottom: 6px; }
.archive-list { display: grid; gap: 24px; }
.archive-filters { padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.filter-strip { display: flex; gap: 8px; min-width: 0; overflow: auto; scrollbar-width: none; }
.filter-strip::-webkit-scrollbar { display: none; }
.filter-strip button { display: flex; align-items: center; gap: 8px; flex: none; border-radius: 999px; padding: 10px 16px; background: white; box-shadow: inset 0 0 0 1px #e8e6e5; font: 500 15px/20px var(--body); white-space: nowrap; }
.filter-strip button span { color: var(--stone); }
.filter-strip button[aria-pressed="true"] { background: var(--charcoal); color: var(--paper); box-shadow: none; }
.filter-strip button[aria-pressed="true"] span { color: #fafaf9a8; }
.filter-strip button:focus-visible { outline-offset: -3px; }
.archive-filters p { font-size: 14px; line-height: 18px; color: var(--stone); }
.archive-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; align-items: start; }

.work-tile.archive-tile { display: flex; gap: 16px; padding: 10px 10px 16px; min-width: 0; background: white; border-radius: 30px; box-shadow: inset 0 0 0 1px #eceae7, 0 24px 50px -30px #1c163059; }
.archive-tile .tile-picture { height: auto; aspect-ratio: 409/262; border-radius: 21px; }
.archive-grid .archive-tile .tile-picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.archive-grid .archive-tile[data-cta="work-workhorse-roofing"] .tile-picture img { width: 127.14%; height: auto; }
.archive-grid .archive-tile[data-cta="work-flow-source"] .tile-picture img { width: 112.47%; height: auto; }
.archive-tile .tile-picture .badge { display: block; top: 12px; left: 12px; font: 400 11px/13px var(--font-mono); text-transform: uppercase; padding: 6px 10px; }
.client-mark { position: absolute; bottom: 12px; left: 12px; max-width: calc(100% - 24px); border-radius: 999px; padding: 8px 14px; background: #fafaf9f0; font: 600 16px/20px var(--display); letter-spacing: -.02em; }
.archive-tile .tile-heading { min-height: 0; padding: 0 8px; }
.archive-tile .tile-heading p { color: var(--stone); font: 500 13px/16px var(--body); }
.archive-tile .tile-heading h3 { margin-top: 6px; min-height: 56px; font: 500 23px/28px var(--display); letter-spacing: -.025em; }
.archive-tile .facts { display: grid; gap: 6px; padding: 0; margin: 0; }
.archive-tile .facts > div { padding: 12px; gap: 4px; min-height: 0; background: #f7f6f5; border-radius: 16px; }
.archive-tile .facts dt { display: block; font: 400 11px/13px var(--body); color: var(--stone); }
.archive-tile .facts dd { font: 500 14px/18px var(--body); color: var(--text); }
.read-case { display: flex; align-items: center; justify-content: space-between; padding-inline: 8px; font: 500 14px/18px var(--body); }
.read-case .icon { width: 14px; height: 14px; }
.read-case > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--charcoal); color: white; }

/* Case cover and the operating facts. */
.case-cover { position: relative; margin-inline: 12px; }
.cover-scene { height: clamp(580px,54.167vw,900px); }
.cover-scene::after { background: linear-gradient(#18122c00 50%, #18122c59); }
.cover-title { position: absolute; bottom: 0; left: 0; width: min(60.735%, 990px); background: var(--paper); border-top-right-radius: 34px; padding: 34px 44px 36px; display: grid; gap: 16px; }
.cover-title > p:first-child { font: 500 14px/18px var(--body); color: var(--stone); }
.cover-title a:hover, .cover-meta a:hover { text-decoration: underline; }
.cover-title h1 { font-size: clamp(60px,6.39vw,100px); line-height: 1; letter-spacing: -.05em; }
.case-tree-care-invoicing h1 { font-size: clamp(54px,5.556vw,88px); line-height: 1.025; }
.case-pharmacy-ordering h1 { font-size: clamp(44px,4.445vw,72px); line-height: 1.03125; }
.cover-summary { max-width: 640px; color: var(--muted); font: 400 18px/28px var(--body); }
.cover-meta { position: absolute; bottom: 24px; right: 24px; display: grid; gap: 14px; width: min(31%,420px); border-radius: 26px; padding: 26px 28px; background: #1c1917e0; backdrop-filter: blur(16px); color: var(--paper); }
.cover-meta > div { display: grid; grid-template-columns: 32.42% minmax(0,1fr); align-items: start; gap: 16px; }
.cover-meta dt { border-radius: 6px; padding: 5px 8px; background: #fafaf914; color: #fafaf9ad; font: 400 11px/13px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.cover-meta dd { font: 500 14px/20px var(--body); overflow-wrap: anywhere; }
.case-kicker, .map-row h3, .case-ownership h2 { font: 400 13px/16px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--stone); }
.case-facts > h2 { max-width: 1100px; margin-top: 18px; font-size: clamp(54px,5.28vw,82px); line-height: 1.0263; letter-spacing: -.045em; }
.operating-facts { margin-top: 48px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.operating-facts > div { min-height: 190px; padding: 24px; border-radius: 24px; background: var(--tray); display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.operating-facts dt { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: var(--muted); font: 500 13px/16px var(--body); }
.operating-facts i { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: white; font: 400 13px/1 var(--body); color: black; }
.operating-facts dd { font: 500 26px/30px var(--display); letter-spacing: -.025em; }
.operating-facts > div:last-child { background: var(--charcoal); color: var(--paper); }
.operating-facts > div:last-child dt { color: #fafaf9b3; }
.operating-facts > div:last-child i { width: 10px; height: 10px; background: var(--cyan); }

.case-columns { display: grid; grid-template-columns: 28.79% 1fr; column-gap: clamp(24px,2.78vw,40px); align-items: start; }
.case-label { justify-self: start; border-radius: 999px; padding: 7px 12px; background: var(--tray); color: var(--charcoal); font: 500 13px/16px var(--body); }
.challenge { border-top: 1px solid #e8e6e5; padding-top: 32px; }
.challenge .case-label { margin-top: 4px; }
.challenge-lead { max-width: 760px; font: 500 34px/40px var(--display); letter-spacing: -.03em; }
.challenge-lead + p { max-width: 680px; margin-top: 20px; color: var(--muted); font: 400 17px/27px var(--body); }
.process-map, .evidence-gallery { position: relative; overflow: clip; isolation: isolate; border-radius: 34px; background-color: #2a2440; color: white; }
.process-map > picture, .evidence-gallery > picture { position: absolute; inset: 0; z-index: -2; }
.process-map::before, .evidence-gallery::before { content: ''; position: absolute; inset: 0; z-index: -1; background: #1610288c; }
.process-map { padding: 48px 48px 52px; display: grid; gap: 28px; }
.process-map .scene-art { z-index: -2; width: 106.06%; height: auto; min-height: 100%; left: -3.03%; top: -60px; filter: blur(6px); }
.process-map header, .related header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.process-map header h2 { font: 500 40px/44px var(--display); letter-spacing: -.03em; }
.process-map header p { color: #ffffffb3; font: 400 15px/20px var(--body); }
.map-row { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; }
.map-row h3 { color: #ffffffad; font-size: 12px; line-height: 14px; letter-spacing: .1em; }
.map-row.after h3 { color: #7cc4f7; }
.map-row ol { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 48px; align-items: center; }
.map-row li { position: relative; display: flex; align-items: center; gap: 12px; padding: 22px; background: #ffffff1f; border-radius: 20px; font: 500 17px/22px var(--body); color: #ffffffd1; }
.map-row li + li::before { content: '→' / ''; position: absolute; width: 48px; text-align: center; right: 100%; color: #ffffffad; font: 400 20px/24px var(--body); }
.map-row.after li { padding: 20px; background: #fafaf9f0; color: var(--text); }
.step-number { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 600 12px/16px var(--body); background: var(--cyan); }
.built { display: grid; gap: 36px; }
.built .case-label { margin-top: 6px; }
.built .case-columns > p { max-width: 760px; font: 500 26px/35px var(--display); letter-spacing: -.02em; }
.evidence-gallery { container-type: inline-size; aspect-ratio: 1320/680; }
.evidence-gallery::before { background: #1610282e; }
.evidence-gallery .scene-art { z-index: -2; width: 130.3%; height: 169.7%; left: -15.15%; top: -17.65%; }
.evidence-gallery figure { position: absolute; display: grid; gap: 12px; }
.evidence-gallery .screen-1 { left: 5.303%; top: 8.824%; width: calc(var(--first, 376) * 100% / 1320); }
.evidence-gallery .screen-2 { right: 5.303%; top: calc(var(--second-top, 150) * 100% / 680); width: calc(var(--second, 716) * 100% / 1320); }
.evidence-gallery figure picture { display: block; padding: min(.606cqw,10px); border-radius: 1.667cqw; background: #fafaf9db; backdrop-filter: blur(16px); box-shadow: 0 30px 60px -24px #0e0a1e99; }
.evidence-gallery figure img { width: 100%; height: auto; border-radius: 1.136cqw; }
.evidence-gallery figcaption { font: 500 14px/18px var(--body); text-shadow: 0 1px 4px #161028; }
.case-boc-bdr { --first: 616; --second: 616; --second-top: 380; }
.case-boc-reporting { --first: 656; --second: 436; --second-top: 130; }
.case-pharmacy-ordering { --first: 616; --second: 616; }
.case-tree-care-invoicing { --first: 636; --second: 576; }
/* Keep the complete captions inside these two low-set frames as their text wraps. */
:is(.case-pharmacy-ordering,.case-tree-care-invoicing) .screen-2 { top: auto; bottom: max(12px,1.22cqw); }
.case-static-smart-home { --first: 416; --second: 676; --second-top: 380; }
.case-workhorse-roofing { --first: 368; --second: 716; --second-top: 420; }
.case-flow-source { --first: 468; --second: 656; --second-top: 330; }
.case-ownership { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.case-ownership section { padding: 36px 36px 40px; border-radius: 30px; background: var(--tray); }
.case-ownership h2 { font-size: 12px; line-height: 14px; letter-spacing: .1em; color: var(--muted); }
.case-ownership p { margin-top: 18px; font: 500 23px/31px var(--display); letter-spacing: -.02em; }
.case-ownership section + section, .describe-card { background: var(--charcoal); color: var(--paper); }
.case-ownership section + section h2 { color: #7cc4f7; }
.related { display: grid; gap: 28px; }
.related h2 { font: 500 clamp(56px,5.56vw,86px)/1 var(--display); letter-spacing: -.045em; }
.related h2 span { color: var(--cyan); }
.describe-card { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; padding: 34px 32px; border-radius: 30px; }
.describe-card h3 { font: 500 34px/38px var(--display); letter-spacing: -.03em; }
.describe-card p { color: #fafaf9b8; font: 400 15px/22px var(--body); margin-bottom: 14px; }
.describe-card .button { width: 100%; min-height: 54px; font-size: 16px; }

@media (max-width: 1199.98px) {
  .archive-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .archive-filters { flex-wrap: wrap; }
  .archive-grid .describe-card { grid-column: 1/-1; }
  .map-row { grid-template-columns: 66px 1fr; }
  .map-row ol { gap: 30px; }
  .map-row li { padding: 16px; }
  .map-row li + li::before { width: 30px; }
  .cover-meta { width: 35%; padding: 22px; right: 16px; }
}
@media (max-width: 760px) {
  .work-case, .work-archive { --page-gap: 8px; }
  .work-case main, .work-archive main { padding-top: 8px; }
  .work-archive .closing, .work-case .closing { padding-inline: 8px; margin-bottom: 8px; }
  .work-archive .v3-footer, .work-case .v3-footer { padding-bottom: 8px; }
  .archive-mast, .case-cover { margin-inline: 8px; }
  .archive-mast, .cover-scene { height: 560px; border-radius: 26px; }
  .archive-mast::after { background: linear-gradient(#18122c1a, #18122c2e 45%, #18122c8c); }
  .archive-marquee { left: 12px; top: 440px; }
  .archive-marquee > div { font-size: 88px; line-height: 86px; animation-duration: 15s; }
  .archive-marquee > div > span { margin-right: 20px; }
  .archive-marquee .brand-mark { width: 74px; height: 48px; }
  .archive-intro { display: grid; gap: 16px; padding-block: 36px 12px; }
  .archive-intro h2 { font-size: 40px; line-height: 42px; }
  .archive-intro p { padding: 0; width: auto; font-size: 16px; line-height: 24px; }
  .work-archive .featured { margin-block: 12px 4px; }
  .archive-list { gap: 24px; padding-top: 24px; padding-bottom: 48px; }
  .archive-filters { display: grid; gap: 12px; padding: 0; }
  .filter-strip { margin-right: -20px; padding: 2px 20px 2px 0; }
  .filter-strip button { min-height: 44px; }
  .archive-filters p { font-size: 13px; }
  .archive-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .archive-tile .tile-picture { height: auto; aspect-ratio: 330/206; }
  .archive-tile .tile-heading h3 { min-height: 0; }
  .archive-grid .archive-tile[data-cta="work-workhorse-roofing"] .tile-picture img { width: 157.58%; }
  .archive-grid .archive-tile[data-cta="work-flow-source"] .tile-picture img { width: 139.4%; }
  .archive-tile .facts > div:not(:last-child) { display: flex; }
  .archive-tile .facts dt { display: block; }
  .archive-tile .facts > div { padding: 12px; background: #f7f6f5; }
  .archive-tile.in-view .tile-picture img { filter: none; }
  .case-cover { display: grid; gap: 8px; }
  .cover-scene::after { background: linear-gradient(#18122c00 45%, #18122c59); }
  .cover-title { width: 87.166%; padding: 22px 22px 20px 20px; gap: 10px; border-top-right-radius: 28px; }
  .cover-title > p:first-child { font-size: 13px; line-height: 16px; }
  .cover-title h1 { font-size: 50px; line-height: 48px; }
  .case-pharmacy-ordering h1 { font-size: 40px; line-height: 41px; }
  .cover-details { display: grid; gap: 22px; padding: 14px 12px 8px; }
  .cover-summary { font-size: 17px; line-height: 26px; }
  .cover-meta { position: static; width: 100%; gap: 12px; padding: 22px 20px; border-radius: 24px; background: var(--charcoal); }
  .cover-meta > div { grid-template-columns: 92px minmax(0,1fr); gap: 14px; }
  .cover-meta dt { font-size: 10px; }
  .case-facts { padding-block: 48px 8px; }
  .case-kicker { font-size: 11px; line-height: 15px; }
  .case-facts > h2 { margin-top: 14px; font-size: 38px; line-height: 40px; }
  .operating-facts { margin-top: 26px; gap: 8px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .operating-facts > div { border-radius: 22px; min-height: 150px; padding: 16px 14px 16px 15px; }
  .operating-facts dt { font-size: 12px; line-height: 15px; }
  .operating-facts i { width: 26px; height: 26px; }
  .operating-facts dd { font-size: 20px; line-height: 24px; }
  .case-columns { display: grid; grid-template-columns: 1fr; gap: 18px; }
  .challenge { margin-top: 40px; padding-top: 24px; margin-bottom: 44px; }
  .challenge .case-label, .built .case-label { margin-top: 0; }
  .challenge-lead { font-size: 27px; line-height: 32px; }
  .challenge-lead + p { margin-top: 18px; font-size: 16px; line-height: 25px; }
  .process-map, .evidence-gallery { width: calc(100% - 16px); border-radius: 26px; }
  .process-map { gap: 12px; padding: 30px 18px; }
  .process-map .scene-art { width: 278.07%; height: 900px; left: -88.23%; top: -60px; object-fit: fill; }
  .process-map header { display: grid; gap: 6px; margin-bottom: 8px; }
  .process-map header h2 { font-size: 32px; line-height: 36px; }
  .process-map header p { font-size: 14px; }
  .map-row, .map-row ol { grid-template-columns: 1fr; align-items: stretch; }
  .map-row { gap: 12px; }
  .map-row h3 { font-size: 11px; }
  .map-row ol { gap: 26px; }
  .map-row li { padding: 16px 18px; font-size: 16px; line-height: 21px; border-radius: 18px; }
  .map-row li + li::before { content: '↓' / ''; top: -22px; left: 22px; right: auto; width: auto; font: 400 15px/18px var(--body); }
  .map-row.after { margin-top: 10px; }
  .map-row.after li { padding: 15px 16px; }
  .built { width: 100%; gap: 24px; padding-top: 48px; }
  .built .case-columns { margin-inline: 20px; }
  .built .case-columns > p { font-size: 21px; line-height: 29px; }
  .evidence-gallery { margin-inline: auto; aspect-ratio: auto; min-height: 690px; display: flex; flex-direction: column; justify-content: space-between; padding: 24px 18px 51px; gap: 36px; }
  .work-case:not(.case-apex) .evidence-gallery { min-height: clamp(440px,122vw,690px); }
  .evidence-gallery .scene-art { width: 315.51%; height: 114.49%; left: -117.65%; top: -5.8%; }
  .evidence-gallery figure { position: static; gap: 10px; }
  .evidence-gallery .screen-1 { width: min(90%,314px); }
  .case-apex .evidence-gallery .screen-1 { width: min(80%,244px); }
  .evidence-gallery .screen-2 { width: min(94%,314px); align-self: end; }
  .evidence-gallery figure picture { padding: 7px; border-radius: 20px; }
  .evidence-gallery figure img { border-radius: 14px; }
  .evidence-gallery figcaption { font-size: 13px; line-height: 17px; }
  .case-ownership { padding-block: 32px 8px; grid-template-columns: 1fr; gap: 8px; }
  .case-ownership section { padding: 28px 24px 30px; border-radius: 26px; }
  .case-ownership h2 { font-size: 11px; }
  .case-ownership p { margin-top: 16px; font-size: 20px; line-height: 28px; }
  .related { gap: 22px; padding-block: 56px 40px; }
  .related h2 { font-size: clamp(40px,12.82vw,50px); }
  .related .outline-link { padding: 9px 14px; font-size: 14px; }
  .describe-card { padding: 30px 24px 26px; gap: 22px; border-radius: 28px; }
  .describe-card h3 { font-size: 30px; line-height: 34px; }
}
@media (hover: none) {
  .archive-tile.in-view .tile-picture img { filter: none; }
}

/* Diagram tiles (SVG process maps) must show whole, never cover-cropped. */
.tile-picture img[src$=".svg"] { object-fit: contain !important; box-sizing: border-box; padding: 6%; background: #f4f2ef; }
