.doodle-host{position:relative}
.site-doodle{width:110px;height:80px;--lamp-radius:107px;--note-size:clamp(18px,1.65vw,26px);--note-angle:-4deg;z-index:2}
.site-doodle .margin-note__drawing{width:100%;height:100%;stroke-width:1.65;opacity:.93}
.site-doodle .margin-note__word{white-space:pre-line}
.show-hidden-details .site-doodle{visibility:visible;mask-image:none}
.show-hidden-details .site-doodle path{animation:none;stroke-dashoffset:0}
/* The textual Curieux replaces the circle; the former right-side note is removed. */
.margin-note--margin-circle{height:55px;top:27%;bottom:auto;--note-size:clamp(17px,1.6vw,25px)}
.margin-note--check-box{height:110px;width:min(7vw,110px)!important;right:101%;top:61%}
.margin-note--icitte{pointer-events:none}
/* Protect clear space around the moving engravings and their captions. */
.typewriter-engraving figcaption{top:-4%;right:-9%;font-size:24px}
.typewriter-arrow{right:-2%;top:3%;width:23%;transform:rotate(-9deg)}
.page-engraving--draft{overflow:visible;aspect-ratio:480/520}
.page-engraving--draft .draft-instrument{width:88%;height:auto;overflow:visible;transform:rotate(-12deg)}
.page-engraving--draft figcaption{left:-13%;top:9%;font-size:24px}
.draft-leg{transform-origin:224px 158px;animation:draft-hinge 5s ease-in-out infinite}
.draft-arc{stroke-dasharray:1;animation:draft-line 5s ease-in-out infinite}
@keyframes draft-hinge{0%,15%,100%{transform:rotate(0)}50%,65%{transform:rotate(5deg)}}
@keyframes draft-line{0%,15%,100%{stroke-dashoffset:1;opacity:0}48%,78%{stroke-dashoffset:0;opacity:1}90%{stroke-dashoffset:0;opacity:0}}
.details-wave-ink .site-doodle{mask-image:none;visibility:visible}
@media(max-width:1050px){.site-doodle{display:none}}
@media(prefers-reduced-motion:reduce){.draft-leg,.draft-arc{animation:none}.draft-arc{stroke-dashoffset:0}.site-doodle path{animation:none}}
[data-design="vintage"] .margin-note--margin-circle{right:calc(100% + 9px);width:56px;--note-size:18px}
/* The empty caption spaces remain available for discovery rather than opening a project. */
.catalogue-grid > .project{pointer-events:none}
.catalogue-grid > .project :is(.project-img,h3,.project-open){pointer-events:auto}

/* Every marginal drawing uses the same physical pen width. Engravings retain their own hatching. */
:root{--doodle-pen-width:1.6px}
.margin-note__drawing path,.gear-notes path,.compass-arrow path,.typewriter-arrow path{stroke-width:var(--doodle-pen-width);vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}
.site-doodle .margin-note__drawing{opacity:.9}
.site-doodle[data-reveal="stylo"] path{stroke-dasharray:1;stroke-dashoffset:1}
.site-doodle[data-reveal="stylo"].is-revealed path{animation:draw-note .75s ease-out var(--stroke-delay) both}
.site-doodle.is-revealed .margin-note__word{animation:write-note .8s ease-out both}
.show-hidden-details .site-doodle path{animation:none;stroke-dashoffset:0}
[data-design="vintage"] .margin-note--margin-circle{top:auto;bottom:-5px}
.margin-note--check-box{height:135px;width:80px!important;top:67%;--drawing-size:80px}
.footer-discovery{font-size:clamp(16px,1.6vw,22px);transform:rotate(-6deg)}
@media(prefers-reduced-motion:reduce){.site-doodle.is-revealed :is(path,.margin-note__word){animation:none;stroke-dashoffset:0}}
html.show-hidden-details .site-doodle[data-reveal] path{animation:none;stroke-dashoffset:0}

/* One reveal contract: handwriting is drawn, engravings alone are masked. */
.site-doodle[data-reveal="stylo"],.margin-note[data-reveal="stylo"]{mask-image:none;overflow:visible}
.site-doodle--text{height:auto!important;min-height:46px;min-width:max-content;padding:7px 10px}
.site-doodle--text .margin-note__word{white-space:pre;max-width:none;line-height:1.35;overflow:visible}
.margin-note__word{overflow:visible}
.margin-note[data-reveal="stylo"].is-revealed .margin-note__word{animation:handwriting-reveal .95s ease-out both}
@keyframes handwriting-reveal{from{clip-path:inset(-25% 110% -25% -15%)}to{clip-path:inset(-25% -15% -25% -15%)}}
.show-hidden-details .margin-note__word{animation:none!important;clip-path:none!important}
[data-design="vintage"] .margin-note--margin-circle{bottom:9px;right:calc(100% + 22px);width:66px;--note-size:18px}
.career-bts>.site-doodle{right:-65px!important;top:28px!important}
.typewriter-engraving figcaption{top:-15%;right:0;transform:rotate(3deg);rotate:none;white-space:nowrap}
.typewriter-arrow{top:0;right:2%;width:22%;transform:rotate(-7deg)}
.footer-discovery{mask-image:none;visibility:hidden;pointer-events:none}
.footer-discovery.is-writing{visibility:visible;animation:handwriting-reveal 1.1s ease-out both}
.show-hidden-details .footer-discovery{visibility:visible;animation:none;clip-path:none}
.details-wave-ink .footer-discovery{visibility:visible;mask-image:none;animation:none}
@media(prefers-reduced-motion:reduce){.margin-note.is-revealed .margin-note__word,.footer-discovery.is-writing{animation:none;clip-path:none}}
@media(max-width:700px){.footer-discovery{display:none}}

/* Write each line in order; do not crop the completed multiline annotation. */
.margin-note[data-reveal="stylo"].is-revealed .margin-note__word:has(.handwriting-line){animation:none;clip-path:none}
.handwriting-line{display:block;white-space:pre;overflow:visible}
.margin-note.is-revealed .handwriting-line{animation:handwriting-reveal .65s ease-out var(--line-delay) both}
.show-hidden-details .handwriting-line{animation:none!important;clip-path:none!important}
@media(prefers-reduced-motion:reduce){.margin-note.is-revealed .handwriting-line{animation:none;clip-path:none}}
[data-design="vintage"] .margin-note--margin-circle{right:calc(100% + 2px)}
/* Keep the figure itself transparent and unmasked: notes can extend beyond the art bounds. */
.page-engraving{mask-image:none!important;visibility:visible!important;overflow:visible}
.page-engraving>:is(img,.engraving-map,.draft-instrument){visibility:hidden;mask-image:radial-gradient(circle at var(--art-light-x,-200px) var(--art-light-y,-200px),#000 0 var(--discovery-core),transparent var(--discovery-edge))}
.page-engraving[data-lit]>:is(img,.engraving-map,.draft-instrument){visibility:visible}
.page-engraving>:is(figcaption,.typewriter-arrow){visibility:hidden;mask-image:none;overflow:visible}
.page-engraving.caption-writing>:is(figcaption,.typewriter-arrow){visibility:visible}
.page-engraving.caption-writing>figcaption{animation:handwriting-reveal .9s ease-out both}
.typewriter-arrow path{path-length:1;stroke-dasharray:1;stroke-dashoffset:1}
.caption-writing .typewriter-arrow path{animation:draw-note .7s .2s ease-out both}
.show-hidden-details .page-engraving>:is(img,svg,figcaption),.details-wave-ink .page-engraving>:is(img,svg,figcaption){visibility:visible;mask-image:none;animation:none;clip-path:none}
.show-hidden-details .typewriter-arrow path{stroke-dashoffset:0;animation:none}
.typewriter-engraving figcaption{inset:-8% 0 auto auto;font-size:24px;line-height:1.4;transform:rotate(3deg)}
.typewriter-arrow{top:9%;right:0;width:20%}
@media(prefers-reduced-motion:reduce){.caption-writing>:is(figcaption,.typewriter-arrow),.caption-writing .typewriter-arrow path{animation:none;stroke-dashoffset:0}}
@media(max-width:800px){.page-engraving{display:none}}

/* Annotation dwell: keep the original drawing/handwriting animation running,
   then fade the annotation without affecting the engraved artwork or reveal-all. */
.gear-annotation-overlay { visibility: visible; }
body:has(dialog[open]) .gear-annotation-overlay { visibility: hidden; }
html:not(.show-hidden-details) :is(.margin-note[data-reveal="stylo"], .margin-note[data-reveal="annotation"], .footer-discovery, .gear-notes g, .career-globe-places g),
html:not(.show-hidden-details) .page-engraving > :is(figcaption,.typewriter-arrow) {
  transition: opacity .6s ease-out;
}
html:not(.show-hidden-details) :is(.margin-note[data-reveal="stylo"], .margin-note[data-reveal="annotation"], .footer-discovery, .gear-notes g, .career-globe-places g).is-note-fading,
html:not(.show-hidden-details) .page-engraving.is-note-fading > :is(figcaption,.typewriter-arrow) {
  opacity: 0;
}
/* The engraving captions retain their previous visibility in the eye mode. */
@media (prefers-reduced-motion: reduce) {
  html:not(.show-hidden-details) :is(.margin-note[data-reveal="stylo"], .margin-note[data-reveal="annotation"], .footer-discovery, .gear-notes g, .career-globe-places g),
  html:not(.show-hidden-details) .page-engraving > :is(figcaption,.typewriter-arrow) { transition: none; }
}
