.optical-proof {
  --proof-mark: #edd3ee;
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(0, 1fr);
  grid-template-areas: "projects projects" "source reading";
  column-gap: clamp(26px, 3.7vw, 62px);
  margin: 0;
  padding: 0 0 clamp(20px, 2.25vw, 36px);
  border-block: 1px solid var(--rule);
  color: var(--ink);
}
.proof-projects {
  grid-area: projects;
  display: flex;
  gap: clamp(18px, 2vw, 34px);
  padding-bottom: clamp(14px, 1.55vw, 24px);
}
.optical-proof button {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: none;
  font: inherit;
  text-align: left;
}
.optical-proof button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.optical-proof button:hover { color: var(--ink); }
.proof-projects button {
  min-height: 48px;
  padding: 9px 0 7px;
  border-top: 3px solid transparent;
  margin-top: -1px;
  font: 500 clamp(1.05rem, 1.45vw, 1.48rem)/1.18 var(--display, "Geist", sans-serif);
  letter-spacing: -.035em;
}
.proof-projects button[aria-pressed="true"] {
  border-top-color: var(--accent);
  color: var(--ink);
  font-weight: 690;
}
.proof-source {
  grid-area: source;
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  min-width: 0;
  padding: clamp(24px, 2.2vw, 38px) 4.8% clamp(26px, 2.5vw, 42px) 16%;
  background: var(--wash);
  border-radius: 3px;
}
.proof-source::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: 54%;
  border-radius: 3px 0 0 3px;
  background: center / cover no-repeat;
}
.optical-proof[data-project="termopreses"] .proof-source::before {
  background-image: url("../media/photo-termopreses.jpg");
  background-position: 34% center;
}
.optical-proof[data-project="namdari"] .proof-source::before {
  background-image: url("../media/photo-namdari.webp");
  background-position: 22% center;
}
.proof-source-image {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 8 / 5;
  border-radius: 1px;
  outline: clamp(4px, .55vw, 8px) solid var(--panel);
  background: var(--deep);
  box-shadow: 0 3px 7px 4px rgb(38 27 41 / .12), 0 14px 24px -3px rgb(38 27 41 / .20);
}
.proof-original { display: block; width: 100%; height: auto; }
.opt-loupe {
  position: absolute;
  left: calc(var(--fx) * 100% / 1440);
  top: calc(var(--fy) * 100% / 900);
  width: calc(var(--fw) * 100% / 1440);
  height: calc(var(--fh) * 100% / 900);
  border: 1px solid var(--proof-mark);
  box-shadow: inset 0 0 0 1px var(--deep), 0 0 0 1px var(--deep), 0 0 0 130vmax rgb(38 27 41 / .20);
  pointer-events: none;
  transition: left .28s ease, top .28s ease, width .28s ease, height .28s ease;
}
.opt-loupe::after {
  position: absolute;
  content: "";
  inset: -2px;
  background:
    linear-gradient(var(--proof-mark), var(--proof-mark)) left top / 9px 3px,
    linear-gradient(var(--proof-mark), var(--proof-mark)) left top / 3px 9px,
    linear-gradient(var(--proof-mark), var(--proof-mark)) right top / 9px 3px,
    linear-gradient(var(--proof-mark), var(--proof-mark)) right top / 3px 9px,
    linear-gradient(var(--proof-mark), var(--proof-mark)) right bottom / 9px 3px,
    linear-gradient(var(--proof-mark), var(--proof-mark)) right bottom / 3px 9px,
    linear-gradient(var(--proof-mark), var(--proof-mark)) left bottom / 9px 3px,
    linear-gradient(var(--proof-mark), var(--proof-mark)) left bottom / 3px 9px;
  background-repeat: no-repeat;
}
.proof-reading {
  grid-area: reading;
  display: grid;
  grid-template-rows: auto minmax(auto, 1fr) auto;
  align-items: start;
  gap: clamp(12px, 1.7vw, 27px);
  min-width: 0;
  padding: clamp(2px, .6vw, 12px) 0 clamp(4px, 1vw, 15px);
}
.proof-topics { display: flex; flex-wrap: wrap; gap: 2px; }
.optical-proof .proof-pin {
  min-height: 36px;
  padding: 7px clamp(7px, .9vw, 14px);
  border-radius: 48px;
  font-size: clamp(.76rem, .98vw, .93rem);
  font-weight: 545;
  line-height: 1.2;
}
.optical-proof .proof-pin::after { content: none; }
.optical-proof .proof-pin:hover { background: var(--wash); }
.optical-proof .proof-pin[aria-pressed="true"] { color: var(--light); background: var(--accent); }
.optical-proof .proof-comment {
  margin: 0;
  align-self: center;
  max-width: 26ch;
  font: 540 clamp(1.5rem, 2.65vw, 2.85rem)/1.09 var(--display, "Geist", sans-serif);
  letter-spacing: -.043em;
  text-wrap: balance;
}
.proof-excerpt-mount {
  display: grid;
  align-items: center;
  width: 100%;
  aspect-ratio: 4.2;
}
.proof-excerpt {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  aspect-ratio: var(--fw) / var(--fh);
  box-shadow: 0 0 0 1px var(--rule);
  background: var(--deep);
}
.proof-detail {
  position: absolute;
  left: calc(var(--fx) * -100% / var(--fw));
  top: calc(var(--fy) * -100% / var(--fh));
  width: calc(144000% / var(--fw));
  max-width: none;
  height: auto;
  display: block;
}
@media (max-width: 900px) {
  .optical-proof { column-gap: 22px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .proof-source { padding-inline: 12% 4%; }
  .proof-reading { gap: 13px; }
}
@media (max-width: 590px) {
  .optical-proof { grid-template-columns: 1fr; grid-template-areas: "projects" "source" "reading"; }
  .proof-projects { padding-bottom: 8px; }
  .proof-projects button { min-height: 43px; }
  .proof-source { width: 100%; padding: 17px 4.4% 18px 10%; }
  .proof-source::before { width: 43%; }
  .proof-reading { gap: 11px; padding: 13px 0 0; }
  .optical-proof .proof-pin { min-height: 40px; padding-inline: 12px; }
  .optical-proof .proof-comment { max-width: 36ch; font-size: clamp(1.3rem, 4.7vw, 1.65rem); line-height: 1.15; }
  .proof-excerpt-mount { width: min(100%, 465px); }
}
@media (prefers-reduced-motion: reduce) { .opt-loupe { transition: none; } }
