/* Global image primitive (ported from Img.module.css). Kept global because the
   Img markup is emitted by the img() view helper and receives `className` from
   many different components — scoping it would break those cross-component
   class references. SSR: no shimmer/JS, images render immediately. */
.imgBox {
  width: 100%;
  position: relative;
  aspect-ratio: var(--ratio);
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: var(--paper-2);
}
.imgBox > .img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* Placeholder shown when an article has no image. */
.imgPh {
  position: relative;
  aspect-ratio: var(--ratio);
  overflow: hidden;
  background: var(--paper-2);
  border: 1.5px solid var(--line);
  background-image:
    linear-gradient(135deg, transparent 48.5%, var(--line-2) 48.5%, var(--line-2) 51.5%, transparent 51.5%),
    linear-gradient(45deg,  transparent 48.5%, var(--line-2) 48.5%, var(--line-2) 51.5%, transparent 51.5%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.imgPh::after {
  content: attr(data-label);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  padding: 4px 8px;
  border: 1.5px solid var(--line);
}

/* SSR (no-JS) nav: the hamburger overlay is gone, so keep the section nav
   visible on mobile as a horizontal scroll strip instead of hiding it. */
@media (max-width: 760px) {
  .s-masthead .nav {
    display: flex !important;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}
