:focus-visible{outline:2px solid #0E7C86;outline-offset:2px}
details summary::-webkit-details-marker{display:none}
.prose-lite h2{font-family:"Bricolage Grotesque",sans-serif;font-weight:700;font-size:1.875rem;line-height:1.15;margin-bottom:1rem}
.prose-lite h3{font-family:"Bricolage Grotesque",sans-serif;font-weight:700;font-size:1.25rem;margin:1.75rem 0 .5rem}
.prose-lite p{line-height:1.75;color:rgba(15,37,48,.82);margin-bottom:1rem;max-width:68ch}
.prose-lite ul{list-style:disc;padding-left:1.25rem;margin-bottom:1rem}

/* The one memorable moment: a scan line sweeping the uploaded image while it is analysed */
.scan{position:absolute;left:0;right:0;top:0;height:3px;background:#F2C94C;box-shadow:0 0 24px 8px rgba(242,201,76,.55);animation:scan 2.4s ease-in-out infinite alternate}
@keyframes scan{from{top:0}to{top:calc(100% - 3px)}}
#loadBar{transition:width .4s linear}
.post-body p{line-height:1.8;margin-bottom:1.1rem;max-width:68ch}
@media (prefers-reduced-motion:reduce){.scan{animation:none;top:50%}#loadBar{transition:none}}

/* Rich HTML content from the admin editor */
.post-body h2{font-family:"Bricolage Grotesque",sans-serif;font-weight:700;font-size:1.75rem;line-height:1.2;margin:2rem 0 .75rem}
.post-body h3{font-family:"Bricolage Grotesque",sans-serif;font-weight:700;font-size:1.3rem;margin:1.5rem 0 .5rem}
.post-body ul{list-style:disc;padding-left:1.4rem;margin-bottom:1.1rem}
.post-body ol{list-style:decimal;padding-left:1.4rem;margin-bottom:1.1rem}
.post-body li{line-height:1.75;margin-bottom:.3rem}
.post-body a{color:#0A5F67;text-decoration:underline}
.post-body img,.post-body video,.post-body iframe{max-width:100%;height:auto;border-radius:.75rem}
.post-body blockquote{border-left:4px solid #F2C94C;padding-left:1rem;margin:1.25rem 0;color:rgba(15,37,48,.8)}
.post-body pre{background:#0F2530;color:#fff;padding:1rem;border-radius:.75rem;overflow-x:auto;margin-bottom:1.1rem;font-size:.875rem}
.post-body code{font-size:.9em}
.post-body table{width:100%;border-collapse:collapse;margin-bottom:1.1rem;display:block;overflow-x:auto}
.post-body th,.post-body td{border:1px solid #D5DEDF;padding:.5rem .75rem;text-align:left}

/* Phase 4: legal pages + caption tool */
.legal-body h2{scroll-margin-top:5rem;margin-top:2rem}
.legal-body h2:first-child{margin-top:0}
.legal-body p,.legal-body li{color:rgba(15,37,48,.85)}

/* Phase 4 final: responsiveness & robustness */
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{overflow-x:hidden;overflow-wrap:break-word}
img,video,canvas,svg{max-width:100%}
input,select,textarea,button{font-size:max(16px,1em)}   /* prevents iOS Safari zooming the page when a field is focused */
@media (pointer:coarse){summary,select,header button,#promptForm button,#captionForm button{min-height:44px}}   /* comfortable touch targets on phones/tablets (admin tables unaffected) */
.prose-lite h2,.post-body h2{overflow-wrap:anywhere}
@media (max-width:640px){
  .prose-lite h2{font-size:1.5rem}
  .post-body h2{font-size:1.5rem}
  .post-body pre{font-size:.8125rem}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
