.case-viewer {
  z-index: 110;
  display: block;
  background: #fff;
  color: #111;
}

.case-viewer-shell {
  display: grid;
  grid-template-columns: minmax(230px, 21vw) minmax(0, 1fr);
  width: 100%;
  height: 100svh;
  overflow: hidden;
  background: #fff;
}

.case-sidebar {
  position: relative;
  z-index: 3;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 2.2vw, 34px);
  border-right: 1px solid rgba(0, 0, 0, .22);
  background: #fff;
}

.case-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 16px;
}

.case-reader-kicker,
.case-document-bar,
.case-reader-facts dt,
.case-reader-process h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.case-reader-kicker { display: none; }

.case-reader-close {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.case-reader-close:hover { background: transparent; color: #777; transform: rotate(8deg); }
.case-reader-copy { margin-block: auto; padding-block: 32px; }
.case-reader-copy h2 { margin: 0 0 18px; font-size: clamp(28px, 2.45vw, 42px); font-weight: 500; line-height: 1; letter-spacing: -.045em; overflow-wrap: anywhere; }
.case-reader-summary { margin: 0; padding-bottom: 22px; font-size: 14px; line-height: 1.4; }
.case-reader-facts { display: grid; gap: 0; margin: 0; }
.case-reader-facts div { display: block; border-top: 1px solid #d8d8d8; padding: 14px 0; }
.case-reader-facts dt { display: none; }
.case-reader-facts dd { margin: 0; font-size: 13px; line-height: 1.45; }
.case-reader-process { margin-top: 0; border-top: 1px solid #d8d8d8; padding-top: 14px; }
.case-reader-process h3 { display: none; }
.case-reader-process p { margin: 0; max-width: 36ch; font-size: 13px; line-height: 1.45; }
.case-reader-link { align-self: flex-start; border-bottom: 1px solid currentColor; font-size: 13px; line-height: 1.5; }
.case-reader-link::after { content: " ↗"; }

.case-document { display: grid; min-width: 0; min-height: 0; grid-template-rows: minmax(0, 1fr); background: #202020; }
.case-document-bar { display: none; }
.case-frame-shell { min-height: 0; overflow: auto; background: #292929; scrollbar-color: #777 #292929; }
.pdf-pages { gap: 8px; min-height: 100%; padding: 8px; background: #292929; }
.pdf-page-canvas { box-shadow: 0 12px 40px rgba(0, 0, 0, .34); }
.pdf-loading { position: fixed; left: 63%; background: #fff4e2; color: #111; }

@media (max-width: 800px) {
  .case-viewer { overflow-y: auto; background: #292929; }
  .case-viewer-shell { display: block; height: auto; min-height: 100svh; overflow: visible; }
  .case-sidebar { position: relative; min-height: 76svh; padding: 22px; border-right: 0; border-bottom: 1px solid #111; }
  .case-reader-copy h2 { font-size: clamp(34px, 11vw, 48px); }
  .case-reader-summary { max-width: 32ch; }
  .case-document { height: 100svh; }
  .case-frame-shell { overflow: auto; }
  .pdf-loading { position: absolute; left: 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .case-reader-close { transition: none; }
}
