.gaze-page .page-heading { margin-top: 1.15rem; }
.gaze-page .page-heading h1 { max-width: 24ch; text-wrap: balance; }
.gaze-crumbs ol, .gaze-lessons ul {
  display: flex; flex-wrap: wrap; gap: .3rem .6rem; padding: 0; list-style: none;
}
.gaze-crumbs ol { color: var(--muted); font-size: .88rem; margin: 0; }
.gaze-crumbs li + li::before { content: "/"; margin-right: .55rem; color: var(--gold); }
.gaze-crumbs a, .gaze-lessons a { color: var(--paper); text-decoration: underline; text-underline-offset: .2em; }
.gaze-lessons ul { gap: .4rem .75rem; margin: 1.5rem 0 .4rem; }
.gaze-lessons a { display: inline-flex; align-items: center; min-height: 44px; padding: .28rem .7rem; border: 1px solid var(--line); border-radius: 4px; }
.gaze-lessons a[aria-current="page"] { background: var(--paper); color: var(--ink); font-weight: bold; }
.gaze-article { font-size: 1rem; min-width: 0; }
.gaze-article > :first-child { margin-top: 0; }
.gaze-article > p, .gaze-article > ol, .gaze-article > ul { max-width: 77ch; }
.gaze-article h2 { margin: 2.15rem 0 .65rem; font-size: clamp(1.55rem, 3.6vw, 2.15rem); }
.gaze-article h3 { margin: 1.3rem 0 .45rem; font-size: 1.36rem; }
.gaze-article h4 { font: 700 1rem/1.35 var(--sans); margin: 1rem 0 .25rem; }
.gaze-article [id] { scroll-margin-top: 1rem; }
.gaze-article a { text-decoration: underline; text-underline-offset: .18em; }
.gaze-article a:hover { text-decoration-thickness: .13em; }
.gaze-page :focus-visible { outline: 3px solid #55756a; outline-offset: 3px; }
.gaze-article ol { padding-left: 1.35rem; }
.gaze-article li + li { margin-top: .3rem; }
.gaze-article table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.gaze-article th, .gaze-article td { padding: .5rem; border-bottom: 1px solid #bcae92; text-align: left; vertical-align: top; }
.gaze-article th { color: #49361b; }
.gaze-article td { overflow-wrap: anywhere; }
.gaze-article .pair { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; align-items: start; }
.gaze-article .gaze-intro-art { max-width: 610px; margin: 1.2rem 0 1.45rem; }
.gaze-article .thumb { margin: 0; text-align: center; }
.gaze-article .thumb img { display: block; width: auto; height: clamp(145px, 33vw, 315px); max-width: 100%; object-fit: contain; margin: 0 auto; }
.gaze-article figcaption { font-size: .84rem; line-height: 1.45; color: #5a4b36; margin-top: .5rem; }
.gaze-article .thumb figcaption span { display: block; }
.gaze-article .proof, .gaze-article .compare-panel, .gaze-article .exercise {
  background: #f3ebd9; border: 1px solid #bbac90; border-radius: 5px; margin: 1.55rem 0;
  padding: clamp(.85rem, 2.5vw, 1.65rem); min-width: 0;
}
.gaze-article .proof > header { padding-bottom: .6rem; margin-bottom: 1rem; border-bottom: 1px solid #cabb9d; }
.gaze-article .proof h2, .gaze-article .proof h3, .gaze-article .exercise h2, .gaze-article .exercise h3 { margin-top: 0; }
.gaze-article .proof header .eyebrow, .gaze-article .proof header .subtitle { margin: 0; }
.gaze-article .proof-grid { display: grid; grid-template-columns: minmax(0,310px) minmax(0,1fr); gap: 1.5rem; }
.gaze-article .proof-figure { display: grid; grid-template-columns: 40px minmax(0,1fr); align-content: start; min-width: 0; }
.gaze-article .gaze-marker-toggle { grid-area: 1 / 1; z-index: 1; align-self: center; margin: 0 0 0 .7rem; width: 20px; height: 20px; accent-color: #5a4b36; }
.gaze-article .switch { grid-area: 1 / 1 / 2 / -1; display: flex; align-items: center; min-height: 48px; padding: .4rem .55rem .4rem 2.65rem; font-weight: bold; border: 1px solid #b5a381; border-radius: 4px; cursor: pointer; }
.gaze-article .control-help, .gaze-article .proof-figure > figure { grid-column: 1 / -1; min-width: 0; }
.gaze-article .control-help { font-size: .84rem; line-height: 1.45; margin: .45rem 0 .85rem; }
.gaze-article .proof-figure figure { margin: 0; }
.gaze-article .artwork { width: min(100%,var(--card-width)); margin: 0 auto; position: relative; }
.gaze-article .artwork img { display: block; width: 100%; height: auto; }
.gaze-article .pins { display: none; position: absolute; inset: 0; pointer-events: none; }
.gaze-article .gaze-marker-toggle:checked ~ figure .pins { display: block; }
.gaze-article .leaders { position: absolute; inset: 0; width: 100%; height: 100%; }
.gaze-article .leaders line, .gaze-article .leaders circle { stroke: #292520; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.gaze-article .leaders .leader-outline { stroke: #fffaf0; stroke-width: 3.5; }
.gaze-article .leaders circle { fill: #fffaf0; }
.gaze-article .pin { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%,-50%); display: grid; place-items: center; width: 25px; height: 25px; border: 2px solid #fffaf0; border-radius: 50%; background: #292520; color: #fffaf0; font: bold .78rem/1 var(--sans); box-shadow: 0 0 0 1px #292520; }
.gaze-article .proof-copy ol { margin-top: .3rem; }
.gaze-article .limit { padding: .6rem .8rem; background: #e9dfc9; border-left: 3px solid #8f754c; font-size: .94rem; line-height: 1.55; }
.gaze-article .proof-links { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.gaze-article .asset, .gaze-article .credit { font-size: .83rem; color: #5a4b36; overflow-wrap: anywhere; }
.gaze-article details { border-top: 1px solid #cabb9d; margin-top: .65rem; }
.gaze-article summary { cursor: pointer; padding: .68rem 0; min-height: 48px; font-weight: bold; color: #5e4520; }
.gaze-article .enlarge > p { font-size: .87rem; margin: 0 0 .6rem; }
.gaze-article .zoom-frame { overflow: auto; max-height: 70vh; max-width: 100%; border: 1px solid #b5a381; }
.gaze-article .zoom-frame img { display: block; width: clamp(540px, 72vw, 690px); max-width: none; height: auto; margin: 0 auto; }
.gaze-article .exercise .pair > div { padding: .7rem; border: 1px solid #cabb9d; }
.gaze-article .position { min-height: 1.5rem; font-weight: bold; text-align: center; }
.gaze-mobile-menu { display: none; }
@media (max-width: 900px) {
  .gaze-mobile-menu { display: block; }
  .gaze-mobile-menu summary { cursor: pointer; min-height: 44px; padding: 9px 13px; border: 1px solid var(--gold); border-radius: 4px; }
  .gaze-mobile-menu nav { display: grid; position: absolute; top: 100%; right: 4%; width: min(260px,92vw); background: var(--ink); border: 1px solid var(--line); padding: .4rem 1rem; box-shadow: 0 8px 24px #0008; }
  .gaze-mobile-menu nav a { display: flex; align-items: center; min-height: 44px; color: var(--paper); }
}
@media (max-width: 720px) {
  .gaze-article { padding: clamp(13px,4vw,22px); }
  .gaze-article .proof-grid { grid-template-columns: minmax(0,1fr); gap: .8rem; }
  .gaze-article .exercise .pair { grid-template-columns: minmax(0,1fr); }
  .gaze-article .pin { width: 24px; height: 24px; }
  .gaze-article th, .gaze-article td { padding: .4rem .25rem; font-size: .87rem; }
  .gaze-article .zoom-frame img { margin: 0; }
}
@media (max-width: 540px) {
  .gaze-page .page-heading h1 { font-size: clamp(1.9rem, 9vw, 3rem); }
  .gaze-page .header-tools { margin-left: auto; }
}

/* Fixed-position exercises retain their reading order when stacked. */
.gaze-article .gaze-triplet { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; align-items: start; margin: 1.5rem 0; }
.gaze-article .gaze-triplet .thumb img { height: clamp(170px,25vw,300px); }
.gaze-article .pair figcaption, .gaze-article .gaze-triplet figcaption { font-size: .9rem; }
.gaze-article .review-note { font-size: .9rem; border-top: 1px solid #cabb9d; padding-top: 1rem; }
.gaze-visual-note { border-left: 3px solid var(--gold); padding: .3rem 0 .3rem 1rem; margin: 1.2rem 0; }
@media(max-width: 620px) {
  .gaze-article .pair, .gaze-article .gaze-triplet { grid-template-columns: minmax(0,1fr); }
  .gaze-article .gaze-triplet .thumb img { height: 290px; max-width: 100%; }
}
