.case-page { padding: clamp(24px, 3vw, 48px) var(--gutter) clamp(72px, 7vw, 120px); }
.case-page__header { max-width: 920px; margin-bottom: clamp(32px, 4vw, 64px); }
.case-page__header h1 { margin-top: 12px; font-family: var(--serif); font-size: clamp(30px, 3.3vw, 50px); line-height: 1.3; }
.case-layout { display: grid; grid-template-columns: clamp(210px, 18vw, 270px) minmax(0, 1fr); gap: clamp(24px, 3vw, 52px); align-items: start; }
.case-sidebar { position: sticky; top: 24px; min-width: 0; max-height: calc(100dvh - 48px); padding-right: 22px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-right: 1px solid var(--line); }
.case-sidebar h2 { margin: 0 0 15px 12px; color: #5E7A50; font-size: 13px; font-weight: 700; }
.case-sidebar__toggle { display: none; }
.case-sidebar button { font: inherit; cursor: pointer; }
.case-sidebar__all, .case-sidebar__stage, .case-sidebar__module { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; border: 0; text-align: left; }
.case-sidebar__all, .case-sidebar__stage { min-height: 42px; padding: 9px 12px; border-radius: 10px; background: transparent; color: var(--ink); font-size: 15px; font-weight: 600; }
.case-sidebar__all:hover, .case-sidebar__stage:hover, .case-sidebar__module:hover { background: #EDF2E7; }
.case-sidebar__all.is-active, .case-sidebar__stage.is-active { background: var(--btn); color: #fff; }
.case-sidebar__count { flex: none; font-size: 12px; font-weight: 500; opacity: .62; }
.case-sidebar__stages { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.case-sidebar__group + .case-sidebar__group { margin-top: 3px; }
.case-sidebar__modules { margin: 4px 0 12px 15px; padding-left: 11px; border-left: 1px solid #DCE5D6; }
.case-sidebar__module { min-height: 36px; padding: 7px 10px; border-radius: 8px; background: transparent; color: #526759; font-size: 13px; }
.case-sidebar__module.is-active { background: #E5EEDC; color: var(--btn); font-weight: 700; }
.case-sidebar button:focus-visible, .case-sidebar__toggle:focus-visible, .case-tile__image:focus-visible, .case-modal__copy:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.case-results { min-width: 0; }
.case-count { margin: 0 0 16px; color: var(--text); font-size: 13px; }
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2vw, 30px); align-items: start; }
.case-tile { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.case-tile__head { padding: 18px 20px 16px; }
.case-tile__category { color: #5E7A50; font-size: 12px; font-weight: 600; }
.case-tile__title { margin-top: 6px; font-family: var(--serif); font-size: clamp(20px, 1.6vw, 26px); line-height: 1.35; font-weight: 700; }
.case-tile__image { display: block; width: 100%; aspect-ratio: 3 / 2; padding: 0; border: 0; background: var(--image-placeholder); cursor: zoom-in; }
.case-tile__image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.case-tile__image:hover img { opacity: .94; }
.case-tile--skeleton .case-tile__head span { display: block; width: 32%; height: 12px; margin-bottom: 12px; border-radius: 5px; background: var(--image-placeholder); }
.case-tile--skeleton .case-tile__head span + span { width: 62%; height: 22px; margin-bottom: 0; }
.case-tile--skeleton .case-tile__image { aspect-ratio: 3 / 2; }
.case-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(16, 45, 28, .58); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.case-modal[hidden] { display: none; }
.case-modal__panel { position: relative; width: min(920px, 100%); max-height: min(90dvh, 1000px); overflow-y: auto; overscroll-behavior: contain; border-radius: 20px; background: var(--bg); box-shadow: 0 24px 70px rgba(16, 45, 28, .3); }
.case-modal__content { padding: clamp(24px, 4vw, 48px); }
.case-modal__close { position: sticky; float: right; top: 14px; right: 14px; z-index: 1; margin: 14px 14px -50px 0; }
.case-modal__category { color: #5E7A50; font-size: 13px; font-weight: 700; }
.case-modal h2 { margin-top: 12px; padding-right: 34px; font-family: var(--serif); font-size: clamp(25px, 2.6vw, 36px); line-height: 1.3; }
.case-modal__description { margin: 16px 0 22px; color: #405248; font-size: 16px; line-height: 1.8; white-space: pre-wrap; }
.case-modal__image { width: 100%; max-height: 62dvh; object-fit: contain; border-radius: 12px; background: var(--image-placeholder); }
.case-modal__prompt { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.case-modal__prompt h3 { font-family: var(--serif); font-size: 22px; }
.case-modal__prompt p { margin-top: 14px; color: #405248; font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.case-modal__copy { margin-top: 20px; padding: 11px 20px; border: 0; border-radius: 9px; background: var(--btn); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.case-modal__copy:hover { background: #1B5136; }
@media (max-width: 1050px) {
  .case-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .case-page { padding-top: 0; }
  .case-page__header { position: sticky; top: 0; z-index: 30; max-width: none; margin: 0 calc(-1 * var(--gutter)) 20px; padding: 18px var(--gutter) 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
  .case-page__header h1 { margin-top: 8px; font-size: clamp(18px, 5.7vw, 25px); letter-spacing: -.035em; white-space: nowrap; }
  .case-layout { grid-template-columns: 1fr; gap: 22px; }
  .case-sidebar { position: static; max-height: none; padding: 0 0 14px; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .case-sidebar:not(.is-open) { display: none; }
  .case-sidebar h2 { display: none; }
  .case-sidebar__toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 52px; margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
  .case-sidebar__toggle-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .case-sidebar__toggle-label strong { margin-left: 10px; color: #5E7A50; font-size: 14px; font-weight: 600; }
  .case-sidebar__chevron { flex: none; width: 9px; height: 9px; margin: -5px 3px 0 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
  .case-sidebar__toggle[aria-expanded="true"] .case-sidebar__chevron { margin-top: 5px; transform: rotate(225deg); }
  #case-categories { padding: 10px 4px 0; }
  .case-sidebar__stages { display: grid; grid-template-columns: 1fr; }
  .case-sidebar__modules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; }
  .case-tile__head { padding: 16px; }
  .case-modal { padding: 10px; }
  .case-modal__panel { max-height: 94dvh; border-radius: 14px; }
  .case-modal__content { padding: 24px 18px; }
  .case-modal__description { font-size: 15px; }
}
