.case-pager { display: none; }

@media screen and (min-width: 761px), screen and (hover: hover) and (pointer: fine) {
  html.js:has(.case-route), html:has(.missing-route) {
    overflow: clip;
    overscroll-behavior: none;
    scroll-behavior: auto;
  }
  .js .case-route, .missing-route {
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: clip;
  }
  :is(.case-route,.missing-route) .header-inner { min-height: clamp(48px, 8vh, 80px); }
  :is(.case-route,.missing-route) .mobile-menu { position: absolute; inset: 100% 0 auto; background: var(--desk); padding-top: 12px; }
  .js .case-route #main {
    width: min(1200px, calc(100% - clamp(36px, 6vw, 80px)));
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "back back" "read art" "pager art";
    column-gap: clamp(24px, 5vw, 68px);
    row-gap: clamp(8px, 2.6vh, 26px);
    padding-block: clamp(8px, 3.2vh, 34px);
  }
  .js .case-detail, .js .case-detail .case-story { display: contents; }
  .js .case-detail .back-link { grid-area: back; justify-self: start; }
  .js [data-case-pane] { display: none; }
  .js [data-case-pane][data-active] { display: block; grid-area: read; align-self: center; width: 100%; margin: 0; padding: 0; }
  .js .case-detail-heading h1, .js .case-story h2, .js .case-route .section-title {
    font-size: clamp(27px, min(4vw, 7vh), 60px);
    line-height: 1.08;
    letter-spacing: -.035em;
    margin: 0;
    text-wrap: balance;
    overflow-wrap: anywhere;
  }
  .js .case-detail-heading h1 { margin-top: clamp(8px, 1.8vh, 20px); }
  .js .case-detail-heading p, .js .case-story p, .js .case-route .contact-layout > div > p {
    font-size: clamp(14px, 1.4vw, 19px);
    line-height: 1.55;
    margin-top: clamp(8px, 1.8vh, 24px);
  }
  .js .case-detail-heading .case-nda-label { font-size: 11px; }
  .js .case-detail-heading .case-format { margin-top: 10px !important; }
  .js .case-detail .case-artwork {
    grid-area: art;
    min-width: 0;
    min-height: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--paper);
    overflow: hidden;
    border-radius: 4px;
  }
  .js .case-detail .case-detail-cover { width: 100%; height: 0; flex: 1 1 0; object-fit: contain; background: transparent; }
  .js .case-detail .case-artwork figcaption { flex: none; padding: 8px 16px; }
  .js .case-pager { grid-area: pager; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #b9bdc5; padding-top: clamp(4px, 1.5vh, 16px); }
  .case-pager button { display: inline-flex; gap: .65em; align-items: center; min-height: 40px; padding: 4px 10px; font-size: 14px; border: none; background: transparent; color: var(--blue-dark); font-weight: 700; }
  .case-pager button:first-child { padding-left: 2px; }
  .case-pager button:last-child { padding-right: 2px; }
  .case-pager button:disabled { opacity: .35; }
  .case-position { margin-right: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .js .case-route .related-grid { grid-template-columns: 1fr; gap: 0; margin-top: clamp(8px, 2vh, 26px); }
  .js .case-route .case-card { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; min-height: 0; padding: 7px 0; border-radius: 0; background: transparent; color: var(--ink); border-bottom: 1px solid var(--rule); }
  .js .case-route .case-cover { position: static; width: clamp(45px, 8vh, 78px); height: clamp(37px, 6vh, 60px); border-radius: 2px; }
  .js .case-route .case-card:is(:hover,:focus-visible) h3 { color: var(--blue-dark); }
  .js .case-route .case-content { display: block; min-height: 0; padding: 0; }
  .js .case-route .case-content h3 { font-size: clamp(14px, 1.6vw, 22px); line-height: 1.25; }
  .js .case-route .case-content p, .js .case-route .case-shade, .js .case-route .case-bottom { display: none; }
  .js .case-route .contact { background: transparent; }
  .js .case-route .contact-layout { display: block; width: 100%; }
  .js .case-route .contact-number { display: inline-block; margin-top: min(3vh, 25px); font-size: clamp(21px, 2.3vw, 32px); }
  .js .case-route .contact-actions { margin-top: min(2vh, 16px); }
  .js .case-route .contact-legal { margin-top: 6px; }
  .js .case-route .contact-actions .button { min-height: 36px; padding: 6px 12px; }
  :is(.case-route,.missing-route) .footer { padding: 0; }
  :is(.case-route,.missing-route) .footer-top { display: none; }
  :is(.case-route,.missing-route) .footer-bottom { width: min(1200px, calc(100% - 40px)); flex-wrap: nowrap; padding-block: clamp(4px, 1.4vh, 15px); }
  .missing-route .not-found { min-height: 0; align-self: center; padding-block: 0; }
  .missing-route .not-found h1 { font-size: clamp(48px, 12vh, 100px); }
  .missing-route .not-found :is(h2,p,.button) { margin-top: min(2vh, 18px); }
}
@media screen and (max-height: 540px) and (min-width: 761px), screen and (max-height: 540px) and (min-width: 550px) and (hover: hover) and (pointer: fine) {
  .js .case-route #main { grid-template-columns: 1.3fr 1fr; gap: 6px 22px; padding-block: 8px; }
  .js .case-detail-heading .detail-tags { display: none; }
  .js .case-detail-heading .case-format { display: none; }
  .js .case-detail-heading .case-nda-label { margin-top: 0; }
  .js .case-detail-heading h1, .js .case-story h2, .js .case-route .section-title { font-size: clamp(23px, 6.5vh, 34px); }
}
@media print {
  .case-pager { display: none !important; }
}
@media screen and (min-width: 761px) and (max-height: 410px), screen and (min-width: 550px) and (hover: hover) and (pointer: fine) and (max-height: 500px) {
  .js .case-route .contact[data-active] { grid-area: read / read / read / art; }
  .js .case-route #main:has(.contact[data-active]) .case-artwork { display: none; }
  .js .case-route .contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 3vw, 30px); align-items: center; }
  .js .case-route .contact-number { margin-top: 0; }
  .js .case-route .contact-actions { margin-top: 6px; }
  .js .case-pager button { min-height: 32px; }
}
@media screen and (min-width: 550px) and (max-width: 800px) and (max-height: 390px) and (hover: hover) and (pointer: fine) {
  .js .case-route #main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
}
@media screen and (min-width: 761px) and (max-height: 430px), screen and (min-width: 550px) and (hover: hover) and (pointer: fine) and (max-height: 430px) {
  .js .case-route #main {
    grid-template-areas: "back pager" "read art";
    grid-template-rows: auto minmax(0, 1fr);
  }
  .js .case-detail .back-link { align-self: center; }
  .js .case-pager { border: 0; padding: 0; gap: 4px; }
  .js .case-pager button { font-size: 12px; }
  .js .case-detail-heading .case-format { display: none; }
}

@media screen and (max-width: 549px) and (hover: hover) and (pointer: fine) {
  :is(.case-route,.missing-route) .header-inner { min-height: 44px; }
  .js .case-route #main {
    width: calc(100% - 28px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "back" "read" "pager";
    gap: 5px;
    padding-block: 4px;
  }
  .js .case-route #main:has(.case-detail-heading[data-active]) {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "back" "art" "read" "pager";
  }
  .js .case-route #main:not(:has(.case-detail-heading[data-active])) .case-artwork { display: none; }
  .js .case-detail .case-artwork figcaption { padding: 2px 5px; font-size: 10px; }
  .js .case-detail-heading h1, .js .case-story h2, .js .case-route .section-title { font-size: clamp(21px, 5vh, 32px); }
  .js .case-detail-heading p, .js .case-story p, .js .case-route .contact-layout > div > p { font-size: 14px; line-height: 1.4; margin-top: 6px; }
  .js .case-detail-heading .detail-tags, .js .case-detail-heading .case-format { display: none; }
  .js .case-route .case-pager { gap: 6px; padding-top: 3px; }
  .js .case-pager button { min-height: 30px; padding: 2px 4px; font-size: 12px; }
  .js .case-pager .case-next-label { text-align: right; }
  :is(.case-route,.missing-route) .footer-bottom { padding-block: 3px; }
}
@media screen and (max-width: 549px) and (max-height: 420px) and (hover: hover) and (pointer: fine) {
  .js .case-detail-heading p, .js .case-story p, .js .case-route .contact-layout > div > p { font-size: 12px; line-height: 1.3; margin-top: 4px; }
  .js .case-route .footer { display: none; }
  .js .case-route .contact-number, .js .case-route .contact-actions { margin-top: 4px; }
}
