/* Evidence is primary content: visible at every width and independent of JS. */
.feature-project,
.optimization-project,
.secondary-open,
.secondary-project#detection-work .secondary-open {
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  column-gap: 6%;
  align-items: start;
}
.project-evidence-column { display: grid; gap: 32px; min-width: 0; }
.optimization-copy { position: sticky; top: calc(var(--header-height) + var(--index-height) + 25px); }
.project-proof { min-width: 0; margin: 0; }
.proof-heading { border-top: 1px solid var(--line); padding: 18px 0 20px; }
.proof-kicker { display: block; color: var(--muted); font-size: .75rem; letter-spacing: 1.1px; line-height: 1.8; }
.proof-heading :is(h3, h4) { margin: 10px 0 0; font-size: clamp(1.125rem, 1.5vw, 1.5rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
.proof-image { display: block; background: #fff; border: 1px solid var(--line); }
.proof-image img { display: block; width: 100%; height: auto; max-width: 100%; object-fit: contain; }
.proof-expand { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 11px 16px; background: #e8e8e8; color: #242424; border-top: 1px solid #d2d2d2; font-size: .875rem; line-height: 1.6; transition: background .2s; }
.proof-expand > span { font-size: 22px; line-height: 1; }
.proof-image:hover .proof-expand { background: #dadada; }
.project-proof figcaption { margin-top: 17px; font-size: .875rem; line-height: 1.9; color: var(--muted); }
.project-proof figcaption strong { display: block; font-weight: 500; color: var(--ink); }
.project-proof figcaption p { margin-top: 5px; }
.optimization-project .project-proof { --ink: #f2f2f2; --muted: #bcbcbc; --line: #555; }
.optimization-project .project-evidence-column { gap: 42px; }
.optimization-project .proof-image { border-color: #777; }
.optimization-project .proof-heading { padding-top: 0; border-top: 0; }
.benchmark-heading { padding-top: 24px; border-top: 1px solid #4b4b4b; }
.secondary-body { grid-column: 1; grid-row: 2; padding-top: 0; position: sticky; top: calc(var(--header-height) + var(--index-height) + 25px); }
.secondary-open > .project-proof { grid-column: 2; grid-row: 2; }
.secondary-open .proof-heading { padding-top: 0; border-top: 0; }
.evidence-reading-guide { list-style: none; padding: 0; margin: 30px 0 0; }
.evidence-reading-guide li { display: flex; gap: 16px; border-top: 1px solid var(--line); padding: 16px 0; }
.evidence-reading-guide li > span { color: #777; font-size: .75rem; line-height: 2.2; font-variant-numeric: tabular-nums; }
.evidence-reading-guide strong { font-size: .9375rem; font-weight: 500; line-height: 1.8; }
.evidence-reading-guide p { font-size: .8125rem; line-height: 1.9; color: var(--muted); margin-top: 3px; }
.vision-data { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.vision-data strong { display: block; font-size: clamp(2.5rem, 4.2vw, 4.3rem); font-weight: 400; line-height: 1.2; letter-spacing: -.065em; }
.vision-data span { display: block; font-size: .8125rem; line-height: 1.8; color: var(--muted); margin-top: 8px; }
.case-evidence.project-proof { margin-block: 35px; padding: 0; background: transparent; border: 0; max-width: none; }
.case-evidence .proof-heading { border: 0; padding-top: 0; }
.case-evidence .proof-image { max-width: 100%; }
.case-evidence img[src*="medical-xai"] { width: min(100%, 780px); margin-inline: auto; }
.case-evidence figcaption { font-size: .875rem; }

/* Optional detail inspection keeps the reader in the same project. */
.image-is-open { overflow: hidden; }
#evidence-dialog { position: fixed; inset: 0; width: min(96vw, 1800px); height: 94vh; height: 94dvh; max-width: none; max-height: none; margin: auto; padding: 0; border: 1px solid #636363; background: #161616; color: #f4f4f4; overscroll-behavior: contain; }
#evidence-dialog::backdrop { background: #000c; }
.image-viewer-surface { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.image-viewer-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-shrink: 0; padding: 14px 22px; border-bottom: 1px solid #4c4c4c; }
.image-viewer-toolbar h2 { margin: 0; font-size: 1rem; line-height: 1.7; font-weight: 500; overflow-wrap: anywhere; word-break: keep-all; }
.image-viewer-actions { display: flex; gap: 8px; flex-shrink: 0; }
.image-viewer-actions button { min-height: 44px; border: 1px solid #727272; padding: 9px 14px; background: transparent; color: #f4f4f4; font-size: .875rem; line-height: 1.6; }
.image-viewer-actions button:hover { background: #343434; }
#evidence-dialog :focus-visible { outline: 2px solid #f5f5f5; outline-offset: 3px; }
.image-viewport { flex: 1; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; padding: 22px; display: flex; align-items: center; justify-content: center; }
.image-viewport img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
#evidence-dialog[data-zoom="actual"] .image-viewport { display: block; }
#evidence-dialog[data-zoom="actual"] .image-viewport img { width: var(--source-width); height: auto; max-width: none; max-height: none; margin: auto; }
.image-viewer-footer { flex-shrink: 0; border-top: 1px solid #4c4c4c; padding: 14px 22px; max-height: 25%; overflow-y: auto; }
#evidence-description { color: #d0d0d0; font-size: .875rem; line-height: 1.8; }
#evidence-zoom-status { color: #a9a9a9; font-size: .8125rem; line-height: 1.8; margin-top: 5px; }

@media (max-width: 1100px) {
  .feature-project, .optimization-project, .secondary-open, .secondary-project#detection-work .secondary-open { column-gap: 4%; }
}
@media (max-width: 900px) {
  .feature-project, .optimization-project, .secondary-open, .secondary-project#detection-work .secondary-open { grid-template-columns: minmax(0, 1fr); }
  .feature-project { gap: 34px; }
  .optimization-project { row-gap: 35px; }
  .project-narrative, .optimization-copy, .secondary-body { position: static; }
  .secondary-body, #detection-work .secondary-body, .secondary-open > .project-proof { grid-column: 1; grid-row: auto; }
  .secondary-body { padding: 0 0 30px; }
  .secondary-open .proof-heading { padding-top: 18px; border-top: 1px solid var(--line); }
  .evidence-reading-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .evidence-reading-guide li { display: block; }
  .evidence-reading-guide li > span { display: block; margin-bottom: 5px; }
  .project-description { max-width: 680px; }
  .project-proof .proof-heading :is(h3, h4) { font-size: 1.25rem; }
}
@media (max-width: 540px) {
  .project-evidence-column { gap: 26px; }
  .project-proof .proof-heading :is(h3, h4) { font-size: 1.125rem; }
  .proof-expand { padding-inline: 13px; }
  .evidence-reading-guide { display: block; margin-top: 22px; }
  .evidence-reading-guide li { display: flex; gap: 16px; padding-block: 13px; }
  .evidence-reading-guide li > span { margin-bottom: 0; }
  #evidence-dialog { width: 100%; height: 100%; height: 100dvh; border: 0; }
  .image-viewer-toolbar { align-items: stretch; flex-direction: column; gap: 12px; padding: 16px; }
  .image-viewer-actions { justify-content: space-between; }
  .image-viewport { padding: 12px; }
  .image-viewer-footer { padding: 12px 16px; max-height: 27%; }
}
@media (prefers-reduced-motion: reduce) { .proof-expand { transition: none; } }
