/* Case studies: shared layout for every project page (loaded after the page's own styles, so it wins).
   Rules, applied everywhere:
   1. Grey means picture. Only images get a plate, and the image itself is the plate, so nothing is ever boxed twice.
      Captions always sit under the plate.
   2. Two widths. Text reads at 640px; images and groups use the whole column.
      Images in a pair or row share one 4:3 frame, so they line up whatever their shape.
   3. No boxes around text. Groups of points are plain columns; the chosen or main item is marked by colour.
   4. Each section reads: label, heading, the evidence, then the takeaway.
   One sans family, one accent. */

:root{--acc:#0430D8; --plate:#EEEEEA; --read:640px; --gap:20px; --block:72px}
html[data-theme=dark]{--acc:var(--blue,#8FA6FF); --plate:rgba(200,222,255,.07)}

/* ---------- page column and section openers ---------- */
.cs{max-width:1060px;margin-inline:auto} /* centred in the page, so wide screens get even space on both sides */
@media (min-width:1600px){.cs{max-width:1200px}}
.cs-sec{padding-top:0;scroll-margin-top:24px}
.cs-sec+.cs-sec{margin-top:calc(var(--cell)*3)}
/* the section label (number + name) pins as a thin bar at the top while you read that section, then hands over to the next */
.cs-sec>.sh{display:contents}
.sheet{overflow:clip} /* hidden would stop the label from sticking */
.cs-sec .sh .lbl-col{position:sticky;top:0;z-index:5;display:flex;align-items:baseline;gap:8px;margin:0 -12px;padding:14px 12px 12px;background:var(--sheet);box-shadow:0 1px 0 var(--rule)}
.sh .n{font:600 15px/1 var(--sans);color:var(--acc);font-variant-numeric:tabular-nums}
.sh .num{font:500 15px/1 var(--sans);letter-spacing:-.005em;text-transform:none;color:var(--ink-2)}
.sh h2{margin:28px 0 0;font:600 clamp(28px,3vw,40px)/1.1 var(--sans);letter-spacing:-.035em;max-width:20ch;color:var(--ink)}

/* ---------- type ---------- */
.cs-hero h1{font:600 clamp(36px,4.4vw,56px)/1.06 var(--sans);letter-spacing:-.035em;max-width:18ch}
.cs-hero h1 i{font:italic 500 1.06em/1 var(--serif);letter-spacing:-.02em} /* the page title keeps its serif italic line; everything else is sans */
.intro{font:400 18px/1.55 var(--sans);max-width:var(--read)}
.thirty h3,.story .big,.mom .mn,.quote,.nextcs b,.personas q,.roles q,.insights em{font-family:var(--sans);font-style:normal}
.sub,.dec h3,.mom h3,.thirty h3{margin-top:var(--block);font:600 21px/1.25 var(--sans);letter-spacing:-.02em;color:var(--ink)}
.mom h3{margin-top:0}
.lede,.body,.dnote,.cap,.scope p,.mom p,.mom ul,.next p,.diff p{max-width:var(--read)}
.lede{margin-top:16px;font:400 18px/1.55 var(--sans);color:var(--ink-2)}
.body{margin-top:16px;font:400 16px/1.65 var(--sans)}
.kick,.facts4 dt,.icb dt,.ba .batag,.flow .who,.tbl th,.nextcs span,.crumb{font:500 12.5px/1.3 var(--sans);letter-spacing:0;text-transform:none;color:var(--ink-3)}
.kick{display:block;margin-bottom:8px}

/* ---------- 1. images: the picture is the plate ---------- */
.shot,.cs .shot{margin:28px 0 0;padding:0;background:none;border:0;border-radius:0;box-shadow:none}
.shot img{display:block;width:100%;height:auto;box-sizing:border-box;padding:32px;background:var(--plate);border-radius:14px;box-shadow:none}
.narrow{max-width:none} /* single screenshots are always the full column, on every project */
.shot figcaption{padding:10px 0 0;font:400 13.5px/1.45 var(--sans);color:var(--ink-3);max-width:var(--read)}
/* pairs and rows: one 4:3 frame each, the picture fitted inside */
.two .shot img,.ba .shot img,.roles .shot img{aspect-ratio:4/3;object-fit:contain;padding:22px}
.two,.ba{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start;margin-top:28px}
.two .shot,.ba .shot{margin-top:0}
.ba>div{min-width:0}
.ba .arr{display:none}
.ba .batag{display:block;margin:0 0 10px}
.ba .batag.on{color:var(--acc)}
/* gallery rows: one 4:5 frame each, so every picture in the row is the same size */
.gal{gap:16px;margin-top:28px}
.gal .shot{margin-top:0}
.gal .shot img{aspect-ratio:4/5;object-fit:contain;padding:18px}
.strip{gap:10px;margin-top:20px}
.strip .shot{margin-top:0}
.strip .shot img{aspect-ratio:1;object-fit:cover;padding:0}

/* ---------- 2/3. groups of points: plain columns, no boxes ---------- */
.card,.insights div,.personas>div,.roles>div,.icb div,.flow li,.vs>div,.metrics div,.diff,.next,.scope,.tbl{padding:0;background:none;border:0;border-radius:0;box-shadow:none}
.cards,.insights,.personas,.roles,.icb,.vs,.metrics{margin-top:28px;column-gap:32px;row-gap:36px}
.cards.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.card b,.insights b,.personas b,.roles b{display:block;font:600 16px/1.3 var(--sans);letter-spacing:-.01em;color:var(--ink)}
.card p,.insights p,.personas p,.roles p{margin-top:8px;font:400 14.5px/1.55 var(--sans);color:var(--ink-2)}
.insights{grid-template-columns:repeat(2,minmax(0,1fr))}
.insights b{font-size:18px;letter-spacing:-.02em}
.insights .kick{color:var(--acc)}
.insights em{display:block;margin-top:10px;font-weight:500;font-size:14px;color:var(--ink)}
/* people: a small avatar, name, the question they ask; the main user is marked in colour */
.personas{grid-template-columns:repeat(4,minmax(0,1fr))}
.av{width:32px;height:32px;margin-bottom:12px;background:var(--plate);color:var(--ink-2);font-size:12px}
.personas .main{box-shadow:none;border:0}
.personas .main .av{background:var(--acc);color:#fff}
.personas .main small{color:var(--acc)}
.personas q,.roles q{display:block;margin-top:10px;font-weight:500;font-size:15.5px;line-height:1.4;color:var(--ink)}
.personas small,.roles small{font-size:12.5px;color:var(--ink-3)}
/* roles: the screen first, then who it is for, so the two columns line up */
.roles{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:20px} /* same gap as the other pairs, so every paired picture is the same size */
.roles>div{display:flex;flex-direction:column}
.roles .shot{order:-1;margin:0 0 18px}
.roles .av{display:none}
/* a role with two screens shows them side by side in two tall frames, taking the same space as one 4:3 frame */
.roles>div:has(.shot~.shot){display:grid;grid-template-columns:1fr 1fr;column-gap:12px;align-content:start}
.roles>div:has(.shot~.shot)>*{grid-column:1/-1}
.roles>div:has(.shot~.shot)>.shot{grid-column:auto;grid-row:1}
.roles>div{container-type:inline-size}
.roles>div:has(.shot~.shot) .shot img{aspect-ratio:auto;height:75cqw} /* 75% of the column width = the height of a 4:3 frame */
/* decisions: instead of / I chose / because, as three columns; the choice is in colour */
.icb{grid-template-columns:repeat(3,minmax(0,1fr))}
.icb div{padding-top:0}
.icb dd{margin-top:6px;font:500 15px/1.45 var(--sans);color:var(--ink-2)}
.icb div:nth-child(2){box-shadow:none;border:0}
.icb div:nth-child(2) dt{color:var(--acc)}
.icb div:nth-child(2) dd{color:var(--ink);font-weight:600}
.dec{margin-top:var(--block);padding-top:0;border-top:0}

/* the other point blocks some projects use follow the same rule: no boxes */
.quotes figure,.swatches div,.logos div,.feat div,.steps li{padding:0;background:none;border:0;border-radius:0;box-shadow:none}
.quotes,.swatches,.logos,.feat,.steps{margin-top:28px;column-gap:32px;row-gap:28px}
.steps .mn{font:600 15px/1 var(--sans);font-style:normal;letter-spacing:0;color:var(--acc)}
.quotes q{font:500 18px/1.4 var(--sans);font-style:normal;letter-spacing:-.01em;color:var(--ink)}
.swatches i{height:64px;border:0;border-radius:10px}
.logos div{padding:0}

/* ---------- 4. takeaways and callouts: bigger text, no box ---------- */
.ps,.diff,.next,.scope{margin-top:40px;padding:0;background:none;border:0;border-radius:0;max-width:var(--read)}
.ps{font:500 21px/1.45 var(--sans);letter-spacing:-.015em;color:var(--ink)}
.ps .kick,.diff .kick,.next .kick,.scope .kick{color:var(--acc)}
.diff p{font:500 19px/1.45 var(--sans);letter-spacing:-.01em}
.diff ul{margin-top:14px}
.diff li,.solves{background:var(--plate);border:0;color:var(--ink-2)}
.scope p,.next p{font-size:16px;line-height:1.6}
/* the opening moment of the story */
.story{margin-top:28px;padding:0;border:0;max-width:var(--read)}
.story .big{font-weight:600;font-size:26px;line-height:1.2;letter-spacing:-.025em;color:var(--acc)}
.story p{font-size:18px}

/* ---------- the hero summary: three steps ---------- */
.thirty{margin-top:var(--block)}
.thirty h3{margin-top:0}
.thirty .card b{font-size:13px;font-weight:600;color:var(--acc)}
.thirty .card p{font-size:16px;color:var(--ink)}

/* ---------- the journey: steps along one track ---------- */
.flow{margin-top:28px;gap:14px}
.flow li{position:relative;padding-top:22px}
.flow li::before{content:"";position:absolute;left:0;top:3px;width:9px;height:9px;border-radius:50%;background:var(--acc)}
.flow li::after{content:"";position:absolute;left:15px;right:-8px;top:7px;height:1px;background:var(--rule)}
.flow li:last-child::after{display:none}
.flow b{font-size:14.5px}
.flow .who{min-height:0}

/* ---------- product moments: a numbered timeline down the left ---------- */
.mom{position:relative;display:block;margin-top:var(--block);padding:0 0 0 56px;border-top:0}
.mom::before{content:"";position:absolute;left:15px;top:40px;bottom:-56px;width:1px;background:var(--rule)}
.mom:last-of-type::before{display:none}
.mom .mn{position:absolute;left:0;top:-4px;display:grid;place-items:center;width:31px;height:31px;border-radius:50%;background:var(--acc);color:#fff;font-weight:600;font-size:12.5px}
.mom .mimg{margin-top:4px}
.mom ul{margin-top:12px}
.mom li::before{color:var(--ink-3)}

/* ---------- numbers, type and colour ---------- */
.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.metrics b{font-size:48px}
.vs{grid-template-columns:repeat(2,minmax(0,1fr))}
.tbl{margin-top:28px}
.tbl th{background:none;padding:10px 12px 10px 0;border-bottom:1px solid var(--ink-3)}
.tbl td{padding:12px 12px 12px 0;border-bottom:1px solid var(--rule)}
.quote{margin-top:var(--block);font-weight:500;font-size:clamp(24px,2.6vw,30px);line-height:1.3;letter-spacing:-.02em;max-width:30ch}
.nextcs b{font-weight:600;font-size:24px;letter-spacing:-.02em}

@media (max-width:1000px){.cs-sec .sh .lbl-col{top:var(--topbar,69px)}} /* below the top bar the sidebar becomes on tablets and phones */
@media (max-width:900px){
  .shot img{padding:16px}
  .cards.three,.insights,.personas,.roles,.icb,.vs,.metrics,.two,.ba{grid-template-columns:1fr}
  .personas{grid-template-columns:1fr 1fr}
  .flow{grid-template-columns:1fr 1fr}
  .flow li::after{display:none}
  .mom{padding-left:44px}
}
@media (max-width:560px){.personas{grid-template-columns:1fr}}
