/* Clause 01: the contract page, microprint, the lens, the finds, the finale. */
.glass-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; grid-column: 1 / -1; }
.sheet { position: relative; border: var(--rule) solid var(--ink); background: var(--paper); touch-action: pan-y; }
.sheet__page { padding: 16px; font-size: 11px; line-height: 15px; }
.sheet__page p + p { margin-top: 10px; }
.doc-h { font-stretch: var(--w-label); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.mp {
  font-stretch: 75%; font-weight: 600; font-size: 4.5px; line-height: 1; letter-spacing: 0.02em;
  text-transform: uppercase; white-space: nowrap; transition: background-color 160ms ease;
}
.mp.is-found { background: var(--hi); }
.lens {
  position: absolute; left: 0; top: 0; width: var(--d, 200px); height: var(--d, 200px);
  pointer-events: none; z-index: 5; opacity: 0;
}
.lens.is-on { opacity: 1; }
.lens:focus-visible { outline: none; box-shadow: none; }
.lens:focus-visible .lens__ring { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 9px var(--hi); }
.lens__ring { position: absolute; inset: 0; border: var(--rule) solid var(--ink); border-radius: 50%; overflow: hidden; background: var(--paper); }
.lens__clone { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.lens__clone .mp.is-found { background: var(--hi); }
.lens__clone .sw { color: var(--ink); }
.lens__clone .sheet__page { padding: 16px; }
.lens__handle {
  position: absolute; left: calc(50% - 44px); top: calc(100% - 6px); width: 88px; height: 44px;
  background: var(--ink); color: var(--paper); border: 0; display: none; align-items: center; justify-content: center;
  pointer-events: auto; touch-action: none; cursor: grab; font: inherit; font-stretch: var(--w-label);
  font-weight: 700; font-size: 14px; letter-spacing: 0.1em;
}
@media (pointer: coarse) { .lens__handle { display: flex; } .glass-grid__page { margin-bottom: 72px; } }
.chip {
  position: absolute; left: 0; bottom: calc(100% + 8px); background: var(--hi); color: var(--ink); padding: 8px 10px;
  white-space: nowrap; font-stretch: var(--w-label); font-weight: 700; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase;
}
.chip.is-gone { display: none; }
.counter { margin-top: 0; font-size: 18px; }
.glass-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 16px; }
.glass-actions .btn { min-width: 0; }
.finds { margin-top: 24px; display: grid; gap: 8px; }
.find { border-top: 1px solid var(--ink); padding-top: 12px; }
.find__slot { display: none; }
.find__phrase { font-weight: 700; margin: 6px 0; background: var(--hi); width: fit-content; padding: 0 4px; }
.js .find:not(.is-found) { border: 1px dotted var(--ink); padding: 0; min-height: 44px; display: flex; align-items: center; }
.js .find:not(.is-found) .find__body { display: none; }
.js .find:not(.is-found) .find__slot { display: block; padding-left: 12px; font-stretch: var(--w-label); font-weight: 700; }
.js .find.is-found { animation: find-in 220ms var(--ease-out); }
.js .finale[hidden] { display: none; }
.finale { grid-column: 1 / -1; border: var(--rule) solid var(--ink); padding: 24px 16px; display: grid; gap: 16px; max-width: 760px; }
.finale.is-in { animation: reveal 400ms var(--ease-out); }
@keyframes find-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes reveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@media (min-width: 900px) {
  .glass-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); align-items: start; }
  .glass-grid__intro { grid-column: 1 / 4; }
  .glass-grid__page { grid-column: 4 / 10; }
  .glass-grid__side { grid-column: 10 / 13; }
  .finale { grid-column: 4 / 10; }
  .sheet__page { font-size: 13px; line-height: 18px; }
  .mp { font-size: 5px; }
  .lens { --d: 240px; }
  .chip { bottom: auto; top: calc(100% + 8px); }
  .glass-grid__intro .lead { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .find.is-found, .finale.is-in { animation: fade 150ms linear; }
  .mp { transition: none; }
}
@keyframes fade { from { opacity: 0; } }
.lens.is-live { will-change: transform; } /* never on the clone: it must re-raster, not stretch, so the text stays crisp */
