/* Chapter pages follow the reference case-study rhythm: full-bleed cover,
   an editorial introduction, an asymmetric gallery and generous text rows. */
#reader { padding: 0; }
.reading .floating-nav { display: flex; }
.reading .reading-progress { position: fixed; inset: 0 0 auto; top: 0; z-index: 70; }

.case-chapter-hero {
  height: calc(100svh - 16px);
  min-height: 630px;
  max-height: 1160px;
  margin: 8px;
  border-radius: 20px;
  background: #172023;
  color: var(--paper);
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
}
.case-hero-image, .case-hero-shade { position: absolute; inset: 0; }
.case-hero-image {
  inset: -3%;
  background: var(--chapter-image) center 50% / cover no-repeat;
  filter: saturate(.22);
  animation: case-image-drift 24s ease-in-out infinite alternate;
}
.case-hero-shade {
  background: linear-gradient(0deg, #0c1317c7, #10191c73 50%, #111a1c80), linear-gradient(90deg, #10191c55, transparent);
}
.case-hero-title-wrap { position: relative; text-align: center; padding: 100px var(--gutter); width: 100%; }
.case-hero-title-wrap > .eyebrow { font-size: 11px; letter-spacing: .045em; color: #eeeee4c4; }
#reader .case-chapter-title {
  max-width: 1140px;
  margin: 34px auto 0;
  font: 600 clamp(68px, 9.3vw, 150px) / .96 var(--display);
  letter-spacing: -.035em;
  text-wrap: balance;
  animation: case-title-in .75s cubic-bezier(.2,.65,.25,1) both;
}
#reader .case-chapter-title.medium { max-width: 1160px; font-size: clamp(62px, 7.4vw, 118px); }
#reader .case-chapter-title.long { max-width: 1180px; font-size: clamp(56px, 6.5vw, 104px); }
.case-hero-foot {
  position: absolute; bottom: 32px; left: var(--gutter); right: var(--gutter);
  display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 20px;
  font-size: 10px; color: #f5f4f0b5;
}
.case-hero-foot > span:last-child { text-align: right; }
.case-hero-foot button { display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--paper); font-size: 13px; }
.case-hero-foot button span { border: 1px solid #ffffff50; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }

.case-chapter-overview { max-width: 1740px; margin: 0 auto; padding: 118px var(--gutter) 120px; }
.case-brief { display: grid; grid-template-columns: 1fr 1fr; gap: 9%; align-items: start; margin-bottom: 88px; }
.case-brief h2, .case-sources-heading h2 { font-size: clamp(36px,3.4vw,56px); font-weight: 600; letter-spacing: -.035em; line-height: 1; }
.case-brief > p { font-size: clamp(22px,2.05vw,32px); line-height: 1.3; letter-spacing: -.025em; text-wrap: pretty; }
.case-gallery-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.case-portrait-frame {
  aspect-ratio: 4 / 5; border-radius: 14px; margin: 0;
  background: #dfe3e1; display: flex; align-items: center; justify-content: center;
}
#reader .case-portrait-frame .reader-cover {
  width: 75%; max-width: 440px; height: auto; max-height: none;
  aspect-ratio: 2 / 3; object-fit: contain; object-position: center;
  margin: 0; border-radius: 8px;
}
.case-outline { padding: 0 0 0 clamp(24px,3.6vw,64px); }
.case-outline-head { display: flex; justify-content: space-between; gap: 20px; font-size: 10px; color: var(--muted); border-bottom: 1px solid var(--line); padding: 4px 0 20px; }
.case-outline-head .eyebrow { font-size: 10px; }
.case-outline nav { max-height: 560px; overflow-y: auto; scrollbar-width: thin; }
.case-outline nav button {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 22px;
  width: 100%; padding: 18px 0; border-bottom: 1px solid var(--line);
  text-align: left; font-size: 19px; line-height: 1.25; letter-spacing: -.02em;
}
.case-outline nav button:hover { color: #826b51; }
.case-outline nav button > span:last-child { flex-shrink: 0; font-size: 17px; }
.case-gallery-detail { margin-top: 40px; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; }
.case-gallery-detail img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.3); }

#reader .reader-bar {
  position: fixed; top: auto; right: auto; left: var(--gutter); bottom: 24px;
  display: flex; width: auto; height: auto; min-height: 47px; max-width: calc(100vw - 48px);
  border: 1px solid #ffffff25; border-radius: 10px; padding: 5px 13px;
  background: #111816df; backdrop-filter: blur(20px); color: var(--paper);
  z-index: 45; gap: 18px; box-shadow: 0 6px 30px #0002;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.reading.show-reading-tools #reader .reader-bar { opacity: 1; transform: none; pointer-events: auto; }
#reader .reader-bar > button { font-size: 12px; gap: 8px; }
#reader .reader-bar > div { gap: 17px; border-left: 1px solid #ffffff26; padding-left: 17px; }
#reader .reader-bar > div > button { min-height: 34px; }
#reader .reader-bar #reader-search { font-size: 23px; }
#reader .reader-bar #font-size { font-size: 17px; }
#reader .reader-bar #copy-chapter { font-size: 20px; }
#reader-position { display: none; }

.case-chapter-body { max-width: 1740px; margin: 0 auto; }
.case-reading-section {
  display: grid; grid-template-columns: minmax(230px,.9fr) minmax(0,1.1fr);
  gap: clamp(60px,9vw,160px); margin: 0 var(--gutter); padding: 64px 0 80px;
  border-top: 1px solid var(--line); scroll-margin-top: 110px;
}
.case-section-heading { position: sticky; top: 122px; align-self: start; }
.case-section-heading > .eyebrow { display: block; font-size: 10px; color: var(--muted); margin-bottom: 24px; }
#reader .case-section-title { font-size: clamp(28px,2.55vw,42px); line-height: 1.08; letter-spacing: -.035em; font-weight: 600; margin: 0; text-wrap: pretty; }
#reader .guide-copy { font-size: 19px; line-height: 1.7; letter-spacing: 0; max-width: 760px; }
#reader .guide-copy > p { margin: 0 0 25px; }
#reader .guide-copy > p:last-child { margin-bottom: 0; }
#reader .guide-copy h3 { font-size: 25px; line-height: 1.2; letter-spacing: -.025em; font-weight: 600; margin: 38px 0 18px; }
#reader .guide-copy h3:first-child { margin-top: 0; }
#reader .guide-copy .book-item { padding-left: 18px; margin-bottom: 14px; }
#reader .guide-copy .guide-callout { font: 600 24px/1.35 var(--display); letter-spacing: -.025em; margin: 35px 0; padding: 22px 0 22px 24px; border-left: 2px solid #a9957c; }
#reader.large .guide-copy { font-size: 22px; }
#reader.large .guide-copy h3 { font-size: 28px; }
.source-anchor { display: block; height: 0; scroll-margin-top: 0; }
[data-guide-block], .case-reading-section { scroll-margin-top: 0; }
.case-chapter-highlight {
  margin: 20px 8px 70px; border-radius: 20px; overflow: hidden;
  min-height: 580px; padding: 65px var(--gutter); background: #1a2223;
  color: var(--paper); display: flex; flex-direction: column; justify-content: center; align-items: center;
  position: relative; text-align: center;
}
.case-chapter-highlight:before { content: ''; position: absolute; inset: 0; background: linear-gradient(#131c20b0,#101b1fc9),var(--highlight-image) center 54% / cover; filter: saturate(.25); }
.case-chapter-highlight > * { position: relative; }
.case-chapter-highlight > .eyebrow { font-size: 10px; color: #dbddd3b0; letter-spacing: .04em; }
.case-chapter-highlight blockquote { max-width: 1060px; font: 600 clamp(30px,3.8vw,62px)/1.1 var(--display); letter-spacing: -.035em; margin: 45px 0; text-wrap: balance; }
.case-chapter-highlight .text-link { width: 190px; font-size: 12px; color: #e8e8ddbb; }
.case-chapter-highlight .law-ref { background: none; text-decoration-color: #c6baa1; }

.case-chapter-sources { max-width: 1740px; margin: 0 auto; padding: 80px var(--gutter) 95px; }
.case-sources-heading { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 40px; margin-bottom: 45px; }
.case-sources-heading p { font-size: 16px; color: var(--muted); }
#reader #chapter-laws { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; }
#reader #chapter-laws button { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; padding: 22px 0; border-top: 1px solid var(--line); text-align: left; font-size: 19px; line-height: 1.2; letter-spacing: -.02em; }
#reader #chapter-laws button small { display: block; font-size: 10px; line-height: 1.5; letter-spacing: 0; color: var(--muted); margin-top: 9px; }
#reader #chapter-laws button:hover { color: #826b51; }
.case-chapter-switcher { margin: 0 var(--gutter) 64px; border-top: 1px solid var(--line); display: flex; overflow-x: auto; gap: 8px; padding-top: 25px; scrollbar-width: thin; }
.case-chapter-switcher button { border: 1px solid var(--line); color: var(--muted); border-radius: 7px; padding: 12px 0; min-width: 45px; text-align: center; font-size: 12px; }
.case-chapter-switcher button > span:last-child { display: none; }
.case-chapter-switcher button.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
#reader .reader-next { display: block; background: #151c1c; color: var(--paper); margin: 0 8px; padding: 40px var(--gutter) 48px; border: 0; border-radius: 20px; }
.case-next-top { display: flex; justify-content: space-between; gap: 30px; align-items: center; font-size: 10px; color: #dadbd2a6; letter-spacing: .03em; }
#reader .case-next-top button { color: var(--paper); font-size: 12px; max-width: none; text-align: right; }
#reader .case-next-main { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: none; gap: 70px; text-align: left; margin-top: 45px; }
.case-next-copy { max-width: 900px; }
.case-next-copy h2 { font: 600 clamp(36px,4.5vw,74px)/1.03 var(--display); letter-spacing: -.04em; }
#reader .case-next-main .case-next-arrow { display: grid; place-items: center; font-size: 28px; margin: 35px 0 0; border: 1px solid #ffffff45; border-radius: 50%; width: 58px; height: 58px; color: var(--paper); }
.case-next-main img { width: 23%; max-width: 260px; height: auto; aspect-ratio: 2/3; object-fit: contain; border-radius: 10px; }
.menu-chapter-picker { margin: 22px 0; }
.menu-chapter-picker label { display: block; color: #aaa; font-size: 10px; margin-bottom: 10px; }
.menu-chapter-picker select { width: 100%; padding: 12px; border: 1px solid #ffffff30; background: #222; color: var(--paper); border-radius: 7px; font-size: 13px; }
@keyframes case-title-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes case-image-drift { from { transform: scale(1); } to { transform: scale(1.04); } }

@media (min-width: 1800px) {
  .case-hero-title-wrap { padding-left: max(var(--gutter),calc((100vw - 1700px)/2)); padding-right: max(var(--gutter),calc((100vw - 1700px)/2)); }
}
@media (max-width: 1100px) {
  .case-chapter-overview { padding-top: 95px; padding-bottom: 90px; }
  .case-brief { gap: 50px; margin-bottom: 65px; }
  .case-brief > p { font-size: 23px; }
  .case-reading-section { grid-template-columns: .8fr 1.2fr; gap: 65px; }
  .case-outline { padding-left: 22px; }
  .case-outline nav button { font-size: 17px; }
  #reader .guide-copy { font-size: 18px; }
  .case-next-main { gap: 45px; }
}
@media (max-width: 760px) {
  .case-chapter-hero { min-height: 620px; height: calc(92svh - 16px); max-height: 940px; }
  .case-hero-title-wrap { padding: 100px 22px 90px; }
  .case-hero-title-wrap > .eyebrow { font-size: 9px; }
  #reader .case-chapter-title, #reader .case-chapter-title.medium, #reader .case-chapter-title.long { font-size: clamp(38px,10vw,58px); line-height: 1.01; letter-spacing: -.035em; margin-top: 27px; overflow-wrap: normal; }
  .case-hero-foot { bottom: 26px; left: 22px; right: 22px; grid-template-columns: 1fr; gap: 15px; text-align: center; }
  .case-hero-foot > span { display: none; }
  .case-hero-foot button { font-size: 12px; }
  .case-chapter-overview { padding: 72px 24px 68px; }
  .case-brief { grid-template-columns: 1fr; gap: 28px; margin-bottom: 45px; }
  .case-brief h2, .case-sources-heading h2 { font-size: 37px; }
  .case-brief > p { font-size: 21px; line-height: 1.35; }
  .case-gallery-row { grid-template-columns: 1fr; gap: 38px; }
  .case-portrait-frame { aspect-ratio: 4/5; }
  #reader .case-portrait-frame .reader-cover { width: 75%; max-width: 380px; height: auto; margin: 0; }
  .case-outline { padding: 0; }
  .case-outline-head { font-size: 9px; }
  .case-outline-head .eyebrow { font-size: 9px; }
  .case-outline nav { max-height: 480px; }
  .case-outline nav button { font-size: 17px; padding: 17px 0; }
  .case-gallery-detail { margin-top: 28px; }
  #reader .reader-bar { bottom: 14px; left: 16px; max-width: calc(100vw - 32px); min-height: 43px; padding: 4px 12px; gap: 14px; }
  #reader .reader-bar > div { gap: 17px; padding-left: 14px; }
  #reader .reader-bar > button { font-size: 11px; }
  .case-reading-section { display: block; margin: 0 24px; padding: 40px 0 48px; }
  .case-section-heading { position: static; margin-bottom: 30px; }
  .case-section-heading > .eyebrow { font-size: 9px; margin-bottom: 17px; }
  #reader .case-section-title { font-size: 29px; line-height: 1.12; }
  #reader .guide-copy { font-size: 17px; line-height: 1.7; }
  #reader .guide-copy h3 { font-size: 23px; line-height: 1.25; margin-top: 32px; }
  #reader .guide-copy .book-item { padding-left: 12px; }
  #reader .guide-copy .guide-callout { font-size: 22px; padding-left: 18px; }
  #reader.large .guide-copy { font-size: 20px; }
  #reader.large .guide-copy h3 { font-size: 26px; }
  .case-chapter-highlight { margin: 12px 8px 40px; min-height: 480px; padding: 55px 24px; }
  .case-chapter-highlight blockquote { font-size: 30px; line-height: 1.17; margin: 35px 0; }
  .case-chapter-highlight .text-link { font-size: 11px; width: 170px; }
  .case-chapter-sources { padding: 50px 24px 65px; }
  .case-sources-heading { grid-template-columns: 1fr; gap: 22px; margin-bottom: 32px; }
  .case-sources-heading p { font-size: 14px; }
  #reader #chapter-laws { grid-template-columns: 1fr; }
  #reader #chapter-laws button { font-size: 17px; padding: 20px 0; }
  #reader #chapter-laws button small { font-size: 9px; }
  .case-chapter-switcher { margin: 0 24px 45px; }
  #reader .reader-next { padding: 30px 24px; }
  .case-next-top { font-size: 9px; }
  #reader .case-next-top button { font-size: 11px; }
  #reader .case-next-main { margin-top: 35px; gap: 24px; align-items: flex-start; }
  .case-next-copy h2 { font-size: 30px; line-height: 1.08; }
  #reader .case-next-main .case-next-arrow { width: 44px; height: 44px; font-size: 23px; margin-top: 25px; }
  .case-next-main img { width: 25%; border-radius: 7px; }
}
@media (max-width: 380px) {
  #reader .case-chapter-title, #reader .case-chapter-title.medium, #reader .case-chapter-title.long { font-size: 36px; }
  .case-next-copy h2 { font-size: 26px; }
}
@media (max-width: 760px) {
  #reader .case-chapter-title.longword { font-size: clamp(28px,8.2vw,52px); }
}
@media (prefers-reduced-motion: reduce) {
  .case-chapter-title, .case-hero-image { animation: none; }
  #reader .reader-bar { transition: none; }
}
@media print {
  .case-chapter-hero, .case-chapter-overview, .case-chapter-highlight, .case-chapter-sources, .case-chapter-switcher, .reader-next, footer { display: none !important; }
  .case-reading-section { display: block; margin: 0; padding: 20px 0; break-inside: auto; }
  .case-section-heading { position: static; }
  #reader .case-section-title { font-size: 20pt; }
  #reader .guide-copy { font-size: 11pt; }
}
