/* ---------- Apartments.com case study, 2026 layout (Figma 4830:7635) ----------
   An 858px column: small mono labels, 22px leads, grey 16px body, quotes in the light serif.
   Loaded after case-study.css and case-study-2026.css; the side index and footer stay shared. */
:is(.case-study-page--apartments, .case-study-page--microsoft) { --cs-body-width: 858px; }
:is(.case-study-page--apartments, .case-study-page--microsoft) .cs-main { gap: 120px; }

/* Header: the title in the body font, then Role / Team / Timeline / Tools */
:is(.case-study-page--apartments, .case-study-page--microsoft) .cs-intro { gap: 24px; }
:is(.case-study-page--apartments, .case-study-page--microsoft) .cs-header { gap: 32px; }
:is(.case-study-page--apartments, .case-study-page--microsoft) .cs-title { font: 400 32px/normal "Libre Baskerville", Georgia, serif; letter-spacing: 0; text-transform: capitalize; color: #000; }
:is(.case-study-page--apartments, .case-study-page--microsoft) .cs-facts { display: flex; flex-wrap: wrap; gap: 16px 120px; }
:is(.case-study-page--apartments, .case-study-page--microsoft) .cs-facts > div { display: flex; flex-direction: column; gap: 8px; }
:is(.case-study-page--apartments, .case-study-page--microsoft) .cs-facts dt { font: 300 12px/normal var(--font-mono); text-transform: uppercase; color: #2a2a2a; }
:is(.case-study-page--apartments, .case-study-page--microsoft) .cs-facts dd { font: 400 16px/normal var(--font-body); text-transform: capitalize; color: #000; }
:is(.case-study-page--apartments, .case-study-page--microsoft) .cs-hero-ax { border-radius: 2px; overflow: hidden; }

/* Sections */
.apt { gap: 148px; }
.apt p, .apt figure, .apt blockquote, .apt h2, .apt h3, .apt ol { margin: 0; }
.apt-sec { --sec-gap: 16px; width: 100%; display: flex; flex-direction: column; gap: var(--sec-gap); scroll-margin-top: 88px; }
.apt [id] { scroll-margin-top: 88px; } /* index jumps land with room above */
.apt-sec--12 { --sec-gap: 12px; } .apt-sec--24 { --sec-gap: 24px; } .apt-sec--32 { --sec-gap: 32px; } .apt-sec--48 { --sec-gap: 48px; }
.apt-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.apt-stack--12 { gap: 12px; } .apt-stack--8 { gap: 8px; } .apt-stack--32 { gap: 32px; }

.apt-label { font: 300 12px/normal var(--font-mono); text-transform: uppercase; color: #2a2a2a; }
.apt-lead { font: 400 22px/1.2 var(--font-body); color: #000; }
.apt-body { font: 400 16px/1.2 var(--font-body); color: #676565; }
.apt-ink { font: 400 16px/1.2 var(--font-body); color: #000; }
.apt-kicker { font: 400 16px/1.2 var(--font-body); text-transform: uppercase; color: #676565; }
div.apt-body, div.apt-ink { display: flex; flex-direction: column; gap: 19px; } /* a blank line between paragraphs */
.apt-body ol { padding-left: 24px; }
.apt-quote { font: 400 24px/1.25 "Accent Serif", Georgia, serif; color: #000; }
.apt-em { font-weight: 400; }
.apt-quote em { font-style: italic; }
.apt-quote--stack { display: flex; flex-direction: column; gap: 30px; }

/* Two side by side */
.apt-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.apt-pair--tight { gap: 12px; }
.apt-fig { display: flex; flex-direction: column; gap: 16px; }
.apt-fig figcaption { font: 400 16px/1.2 var(--font-body); color: #676565; }
.apt-fig--12 { gap: 12px; }
.apt-fig--12 figcaption { color: #000; }
.apt img { display: block; max-width: 100%; height: auto; }
.apt-sq { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; }

/* Sneak peek: the three phones, cropped to the band they sit in */
.apt-peek { display: flex; flex-direction: column; gap: 32px; }
.apt-nav-crop { position: relative; aspect-ratio: 858 / 672; overflow: hidden; border-radius: 2px; }
.apt .apt-nav-crop img { position: absolute; left: 0; top: -14.29%; width: 100%; height: 127.68%; max-width: none; }

/* Why it mattered: renters and the business */
.apt-why { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.apt-why-col { display: flex; flex-direction: column; gap: 16px; }
.apt-why-art { aspect-ratio: 421 / 227; overflow: hidden; border-radius: 2px; }
.apt-why-art--pins { background: #f8f8f8; }
.apt .apt-why-art img { width: 100%; height: 100%; object-fit: cover; }

/* User test */
.apt-test { display: flex; gap: 16px; align-items: flex-start; }
.apt .apt-test-shot { flex: none; width: 450px; max-width: 52%; aspect-ratio: 450 / 563; object-fit: cover; border-radius: 2px; }
.apt-test .apt-body { flex: 1 1 0; }
.apt-chart, .apt-wide { width: 100%; }
.apt-chart { border-radius: 2px; }

/* Survey quotes */
.apt-quotes { display: flex; flex-direction: column; gap: 24px; }
.apt-quotes blockquote { display: flex; flex-direction: column; gap: 10px; } /* full width, no indent */

/* A/B */
.apt .apt-ab { width: 100%; border-radius: 2px; }

/* Takeaways: a narrower note centred under the section */
.apt-note { align-self: center; width: min(458px, 100%); display: flex; flex-direction: column; gap: 8px; }
.apt-note--16 { gap: 16px; }
.apt-sec > .apt-note:not(:first-child) { margin-top: calc(96px - var(--sec-gap)); } /* every Key Takeaway sits 96px below the content above it */

/* Toasts: the shot on the left, the note beside it; images beside text take half the row */
.apt-side { display: flex; gap: 12px; align-items: flex-start; }
.apt .apt-side img { flex: 1 1 0; min-width: 0; width: 100%; border-radius: 2px; }
.apt-side > :not(img) { flex: 1 1 0; min-width: 0; }

/* Final solutions */
.apt-frame { display: flex; justify-content: center; padding: 24px; background: #fff; border: 1px solid #d9d9d9; border-radius: 2px; }
.apt-frame--lists { padding: 64px 24px; }
.apt-crop { width: min(375px, 100%); overflow: hidden; border-radius: 2px; }
.apt-frame--toast .apt-crop { aspect-ratio: 375 / 120; }
.apt-frame--lists .apt-crop { aspect-ratio: 375 / 200; box-shadow: 0 4px 20px rgb(0 0 0 / .25); }
.apt .apt-crop img { width: 100%; }
/* The phone in the middle of each 16:9 recording */
.apt-phone { position: relative; width: min(429px, 100%); overflow: hidden; border-radius: 2px; }
.apt .apt-phone img { position: absolute; top: 0; height: 100%; max-width: none; }
.apt-phone--global { aspect-ratio: 429 / 567; }
.apt .apt-phone--global img { left: -68.5%; width: 234.79%; }
.apt-phone--notes { aspect-ratio: 429 / 522; }
.apt .apt-phone--notes img { left: -53.9%; width: 216.09%; }
.apt-phone--share { width: min(433px, 100%); aspect-ratio: 433 / 609; }
.apt .apt-phone--share img { left: -75.62%; width: 250.88%; }

/* Outcome and reflection */
.apt .apt-team { width: 100%; aspect-ratio: 340 / 234; object-fit: cover; object-position: bottom; border-radius: 2px; scale: -1 1; } /* mirrored, as in the Figma */
.apt-learn { display: flex; flex-wrap: wrap; gap: 24px 72px; }
.apt-learn > * { flex: 1 1 0; min-width: min(332px, 100%); }

/* Survey: the key-insight toast above the first quote */
.apt .apt-insight { width: 100%; border-radius: 2px; }

/* Lists: iterations on grey cards */
.apt-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.apt-card { display: flex; flex-direction: column; gap: 16px; padding: 16px 24px; background: #eff0f5; border-radius: 2px; }
.apt-card--tight { flex: 1 1 0; min-width: 0; gap: 10px; padding: 16px; }
.apt-cap { font: 300 12px/normal var(--font-mono); color: #000; }
.apt .apt-card img { width: 100%; }
.apt-beside { display: flex; gap: 48px; align-items: flex-start; }
.apt-beside > p { flex: 1 1 0; }
.apt .apt-blue { width: min(404px, 100%); border-radius: 2px; }
.apt .apt-edge { width: min(332px, 100%); border-radius: 2px; }

/* Final solutions */
.apt-savetoast { position: relative; width: min(380px, 100%); aspect-ratio: 301 / 310; overflow: hidden; border-radius: 2px; } /* the recording is only 455px wide, so keep it near that to stay sharp */
.apt .apt-savetoast img { position: absolute; left: 0; top: -62.14%; width: 100%; height: 162.26%; max-width: none; }
.apt .apt-createlist { width: min(420px, 100%); border-radius: 2px; } /* the recording is 682px wide; smaller keeps it sharp */
.apt .apt-flow { width: min(438px, 100%); aspect-ratio: 438 / 554; object-fit: cover; border-radius: 2px; }

/* Recordings that fill the column edge to edge (Final solutions, the blue lists shot, the full flow).
   The green phones are re-cut from the 1920px originals as 1080px squares, so they're shown smaller than
   their real size at every width and stay sharp. Recordings that are smaller than the column sit at their own size
   on a full-width panel in their own background colour, so the panel fills the column and nothing is stretched. */
.apt .apt-full { width: 100%; height: auto; border-radius: 2px; }
.apt-fill { position: relative; width: 100%; display: flex; justify-content: center; overflow: hidden; border-radius: 2px; }
.apt-fill--toast { background: rgb(241 243 239); }
.apt-fill--list { background: rgb(241 242 240); }
.apt .apt-fill .apt-savetoast, .apt .apt-fill .apt-createlist { border-radius: 0; }

/* Phones */
@media (max-width: 760px) {
  :is(.case-study-page--apartments, .case-study-page--microsoft) .cs-main { gap: 64px; }
  :is(.case-study-page--apartments, .case-study-page--microsoft) .cs-facts { gap: 16px 48px; }
  :is(.case-study-page--apartments, .case-study-page--microsoft) .cs-title { font-size: 26px; }
  .apt { gap: 88px; }
  .apt-lead { font-size: 20px; }
  .apt-pair, .apt-why, .apt-cards { grid-template-columns: 1fr; }
  .apt-beside { flex-direction: column; gap: 16px; }
  .apt-test, .apt-side { flex-direction: column; }
  .apt .apt-test-shot, .apt .apt-side img { width: 100%; max-width: none; }
  .apt-quote { font-size: 20px; }
}

/* ---------- Microsoft Fabric (Figma 5023:19283): same layout as Apartments.com ---------- */
.ms-hero { display: flex; justify-content: center; background: #232322; border-radius: 2px; overflow: hidden; }
.ms-hero img { display: block; width: min(671px, 100%); height: auto; aspect-ratio: 671 / 375; object-fit: cover; }
.apt-sec.ms-nda { align-items: center; gap: 24px; }
.ms-nda .apt-note { align-self: auto; }
.ms-copy { padding: 4px 8px; background: #d9f785; border-radius: 2px; font: 400 16px/normal var(--font-body); color: #000; transition: background-color .2s ease; }
.ms-copy:hover { background: #cdf06a; text-decoration: none; }
/* inside their panels the two small recordings show at their own full size */
.apt .apt-fill .apt-savetoast { width: min(455px, 100%); }
.apt .apt-fill .apt-createlist { width: min(682px, 100%); }

/* Microsoft: the information architecture, zoomable inside its own box (ia-viewer.js) */
.ia-view { position: relative; width: 100%; aspect-ratio: 858 / 387; overflow: hidden; background: #fff; border: 1px solid #e6e6e6; border-radius: 2px; cursor: grab; touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; }
.ia-view.is-dragging { cursor: grabbing; }
.ia-view.is-zoomed { touch-action: none; } /* on a phone a swipe scrolls the page until you zoom in; then it moves the diagram */
.ia-view:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.ia-img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.ia-ctrl { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 4px; }
.ia-ctrl button { min-width: 32px; height: 32px; padding: 0 10px; border: 1px solid #e0e0e0; border-radius: 2px; background: rgb(255 255 255 / .92); font: 400 16px/1 var(--font-body); color: #000; cursor: pointer; transition: background-color .2s ease; }
.ia-ctrl button:hover { background: #e4f946; }
.ia-ctrl button[data-z="fit"] { font-size: 12px; }
.ia-hint { position: absolute; left: 12px; bottom: 12px; margin: 0; padding: 4px 8px; border-radius: 2px; background: rgb(255 255 255 / .92); font: 300 12px/normal var(--font-mono); color: #2a2a2a; transition: opacity .3s ease; pointer-events: none; }
.ia-view.is-zoomed .ia-hint { opacity: 0; }
@media (max-width: 760px) { .ia-view { aspect-ratio: 3225 / 1587; } .ia-hint { display: none; } } /* phones: the diagram's own shape, no empty bands */
