/* ------------------------------------------------------------------
   Self-hosted fonts
   Body serif = Source Serif Pro (the face Medium uses for article text).
   Headings/captions use the system grotesque stack Medium falls back to
   when its proprietary "sohne" face is unavailable.
------------------------------------------------------------------ */
@font-face{font-family:'Source Serif Pro';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/ssp-400.woff2') format('woff2');}
@font-face{font-family:'Source Serif Pro';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/ssp-600.woff2') format('woff2');}
@font-face{font-family:'Source Serif Pro';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/ssp-700.woff2') format('woff2');}
@font-face{font-family:'Source Serif Pro';font-style:italic;font-weight:400;font-display:swap;src:url('fonts/ssp-italic-400.woff2') format('woff2');}
@font-face{font-family:'Source Serif Pro';font-style:italic;font-weight:600;font-display:swap;src:url('fonts/ssp-italic-600.woff2') format('woff2');}

:root{
  --sans:-apple-system,BlinkMacSystemFont,"Helvetica Neue",Helvetica,Arial,sans-serif;
  --serif:"Source Serif Pro",Georgia,Cambria,"Times New Roman",Times,serif;
  --text:#242424;
  --caption:#6b6b6b;
}

*{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;}
html,body{margin:0;padding:0;}
body{
  background:#fff;
  color:var(--text);
  font-family:var(--serif);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}

/* ---------------- article column ---------------- */
.post{
  width:680px;
  max-width:100%;
  margin:0 auto;
  padding:56px 0 128px;
}

h1{
  font-family:var(--sans);
  font-weight:700;
  font-size:42px;
  line-height:52px;
  letter-spacing:-0.462px;
  color:var(--text);
  margin:0 0 32px;
}

p{
  font-size:20px;
  line-height:32px;
  letter-spacing:-0.06px;
  margin:42.8px 0 -9.2px;
  overflow-wrap:break-word;
}

h2{
  font-family:var(--sans);
  font-weight:600;
  font-size:24px;
  line-height:30px;
  letter-spacing:-0.384px;
  color:var(--text);
  margin:46.8px 0 -6.72px;
}
/* paragraph directly after a subhead sits closer, as on Medium */
h2 + p{margin-top:18.8px;}

a{color:inherit;text-decoration:underline;text-decoration-skip-ink:auto;overflow-wrap:break-word;word-break:break-word;}
strong{font-weight:700;}
em{font-style:italic;}

blockquote{
  margin:42.8px 0 -9.2px -20px;
  padding-left:23px;
  border-left:3px solid rgba(0,0,0,0.84);
  font-style:italic;
  font-size:20px;
  line-height:32px;
  letter-spacing:-0.06px;
  overflow-wrap:break-word;
}

ul{margin:0;padding:0;}
li{
  list-style:disc;
  font-size:20px;
  line-height:32px;
  letter-spacing:-0.06px;
  margin:18.8px 0 -9.2px 30px;
  overflow-wrap:break-word;
}

/* ---------------- figures / screenshots ---------------- */
figure{margin:56px 0 0;}
.fig-btn{
  display:block;
  width:100%;
  margin:0;
  padding:0;
  border:0;
  background:none;
  text-align:center;
  cursor:zoom-in;
}
.fig-btn:focus-visible{outline:2px solid #1a8917;outline-offset:4px;}
.shot{
  max-width:100%;
  height:auto;
  display:inline-block;
  vertical-align:top;
}
figcaption{
  font-family:var(--sans);
  font-size:14px;
  line-height:20px;
  color:var(--caption);
  text-align:center;
  margin-top:10px;
}
.expand-hint{white-space:nowrap;}

/* ---------------- lightbox / expand modal ---------------- */
.lightbox{
  position:fixed;
  inset:0;
  z-index:9999;
  visibility:hidden;
}
.lightbox.is-prep{visibility:visible;}
.lb-backdrop{
  position:absolute;
  inset:0;
  background:#0b0b0b;
  opacity:0;
  transition:opacity .24s ease;
}
.lightbox.is-open .lb-backdrop{opacity:.94;}
.lightbox-scroll{
  position:absolute;
  inset:0;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  /* Firefox scrollbars */
  scrollbar-width:auto;
  scrollbar-color:rgba(255,255,255,.55) rgba(255,255,255,.12);
}
/* Stage grows to the image so every edge stays scrollable, yet centers a
   small image. Avoids grid place-content:safe center, which does not make
   the overflow scrollable in Safari. */
.lb-stage{
  min-width:100%;
  min-height:100%;
  width:max-content;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  box-sizing:border-box;
}
#lightboxImg{
  display:block;
  flex:0 0 auto;
  max-width:none;      /* render at natural 1:1 pixels */
  height:auto;
  transform-origin:top left;
  will-change:transform;
  box-shadow:0 12px 48px rgba(0,0,0,.55);
  background:#fff;
  -webkit-user-select:none;
  user-select:none;
  -webkit-user-drag:none;
}
/* grab-to-pan cursor only when the image overflows the window */
.lightbox-scroll.is-pannable #lightboxImg{cursor:grab;}
.lightbox-scroll.is-pannable.is-grabbing,
.lightbox-scroll.is-pannable.is-grabbing #lightboxImg{cursor:grabbing;}

/* Always-visible scrollbars (macOS/Safari hides overlay scrollbars by default) */
.lightbox-scroll::-webkit-scrollbar{width:14px;height:14px;}
.lightbox-scroll::-webkit-scrollbar-track{background:rgba(255,255,255,.10);}
.lightbox-scroll::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.45);
  border-radius:10px;
  border:3px solid transparent;
  background-clip:content-box;
}
.lightbox-scroll::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.7);}
.lightbox-scroll::-webkit-scrollbar-corner{background:transparent;}
.lightbox-close{
  position:fixed;
  top:14px;
  right:16px;
  z-index:2;
  width:40px;
  height:40px;
  border:0;
  border-radius:50%;
  background:rgba(0,0,0,.45);
  color:#fff;
  font-family:var(--sans);
  font-size:26px;
  line-height:40px;
  text-align:center;
  cursor:pointer;
  opacity:0;
  transition:opacity .2s ease,background-color .15s ease;
}
.lightbox.is-open .lightbox-close{opacity:1;}
.lightbox-close:hover{background:rgba(0,0,0,.7);}

/* body scroll lock while modal open */
body.lb-lock{position:fixed;left:0;right:0;width:100%;overflow:hidden;}

/* ---------------- mobile ---------------- */
@media (max-width:728px){
  .post{width:100%;padding:32px 24px 88px;}
  h1{font-size:32px;line-height:38px;letter-spacing:-0.448px;margin-bottom:24px;}
  p{font-size:18px;line-height:28px;letter-spacing:-0.054px;}
  h2{font-size:20px;line-height:24px;letter-spacing:-0.32px;}
  blockquote{font-size:18px;line-height:28px;}
  li{font-size:18px;line-height:28px;}
  figure{margin-top:40px;}
  .lb-stage{padding:12px;}
}

@media (prefers-reduced-motion:reduce){
  .lb-backdrop{transition:opacity .01s;}
  #lightboxImg{will-change:auto;}
}
