/* V7 case study: live-theme fixes only (the prototype CSS is pg-case-and-shared.css + home-d.css, untouched).
   The theme's Bootstrap reboot sets h1-h6/p/ul/ol/dl/dt/dd/figure/table margins and weights that differ from the browser
   defaults the prototype was built on. Restore those defaults at (0,0,2) specificity: above the reboot's element rules,
   below every prototype class/id rule, so wherever pg-case-and-shared.css sets a value it still wins. */
body :where(#p-case,#p-close-case) :is(p,ul,ol,dl){margin-block:1em}
body :where(#p-case,#p-close-case) :is(ul,ol){padding-inline-start:40px}
body :where(#p-case,#p-close-case) figure{margin:1em 40px}
body :where(#p-case,#p-close-case) h1{margin-block:.67em}
body :where(#p-case,#p-close-case) h2{margin-block:.83em}
body :where(#p-case,#p-close-case) :is(h3,h4){margin-block:1em}
body :where(#p-case,#p-close-case) :is(h1,h2,h3,h4){font-weight:bold;line-height:inherit}
body :where(#p-case) dt{font-weight:normal}
body :where(#p-case) dd{margin:0 0 0 40px}
body :where(#p-case) :is(th,td){padding:1px}
body :where(#p-case) th{text-align:center}

/* Previous / Next and the phone disclosure are <button>s styled as links: no theme button chrome */
#p-case .cs-ctl button{background:none;border:0;border-radius:0;box-shadow:none;cursor:pointer}
#p-case .cs-ctl button:hover,#p-case .cs-ctl button:focus{background:none}
#p-case .cs-ctl button:disabled{cursor:default}

/* a link never gets the theme's hover underline/colour inside a card */
#p-case a.cs-card,#p-case a.cs-card:hover{text-decoration:none}

/* ---- legacy case studies (no V7 fields): their cover photo and rich text inside the V7 layout ---- */
#p-case .cs-photo{margin:0;border-radius:12px;overflow:hidden;background:var(--paper-2,#F4F1EC);aspect-ratio:4/3}
#p-case .cs-photo img{display:block;width:100%;height:100%;object-fit:cover}
#p-case .cs-rich > :first-child{margin-top:0}
#p-case .cs-rich > :last-child{margin-bottom:0}
#p-case .cs-rich p{margin:0 0 .9em}
#p-case .cs-rich :is(ul,ol){margin:0 0 .9em;padding-inline-start:1.2em}
#p-case .cs-rich strong{font-weight:500;color:var(--ink)}
#p-case .cs-rich img{max-width:100%;height:auto}
#p-case .cs-sec .cs-rich.cs-p{max-width:46em;margin-top:clamp(20px,2.2cqi,28px)}
