/* v7.01 — site-wide mobile/accessibility hardening. Visual design is intentionally preserved. */

/* Legacy content must never force the reading column wider than the viewport. */
.nd-entry-content,
.nd-v3-entry-content,
.entry-content {
  overflow-wrap: anywhere;
  word-break: normal;
}

.nd-entry-content img,
.nd-v3-entry-content img,
.entry-content img,
.nd-entry-content video,
.nd-v3-entry-content video,
.entry-content video,
.nd-entry-content embed,
.nd-v3-entry-content embed,
.entry-content embed,
.nd-entry-content object,
.nd-v3-entry-content object,
.entry-content object {
  max-width: 100% !important;
  height: auto;
}

/* Old embeds often carry fixed pixel widths in post HTML. Keep their native height/type,
   but never let them overflow on phones. */
.nd-entry-content iframe,
.nd-v3-entry-content iframe,
.entry-content iframe {
  max-width: 100% !important;
}

/* Tables remain readable instead of shrinking columns into unusable text. */
.nd-entry-content table,
.nd-v3-entry-content table,
.entry-content table {
  max-width: 100% !important;
}

@media (max-width: 768px) {
  /* Legacy inline pixel widths (old editor / imported HTML) may be wider than a phone.
     max-width only caps them; intentionally smaller elements keep their original size. */
  .nd-entry-content :is(div, p, span, figure)[style*="width:"],
  .nd-v3-entry-content :is(div, p, span, figure)[style*="width:"],
  .entry-content :is(div, p, span, figure)[style*="width:"] {
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .nd-entry-content :is(div, p, span, figure)[style*="min-width:"],
  .nd-v3-entry-content :is(div, p, span, figure)[style*="min-width:"],
  .entry-content :is(div, p, span, figure)[style*="min-width:"] {
    min-width: 0 !important;
  }

  .nd-entry-content table,
  .nd-v3-entry-content table,
  .entry-content table {
    display: block;
    width: 100% !important;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .nd-entry-content pre,
  .nd-v3-entry-content pre,
  .entry-content pre {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* External publication covers do not ship intrinsic dimensions in the legacy page HTML.
     Reserve a stable cover box to prevent visible mobile layout movement. */
  .ndym13-cover {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
  }
  .ndym13-cover img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
  }
}

/* Bir Adam Son Bahar: the pale day number was below WCAG contrast on the paper background. */
.hz-article .hz-dayno {
  color: #806d60 !important;
}

/* Two legacy literary layouts use 10px metadata with very pale inline colours. */
body.postid-5795 .nd-v3-entry-content [style*="font-size:10px"],
body.postid-2851 .nd-v3-entry-content [style*="font-size:10px"] {
  color: #6f665e !important;
}

/* Slightly strengthen small publication metadata without changing the palette. */
.ndym9-top,
.ndym9-pub,
.ndym9-author {
  text-shadow: 0 0 0 currentColor;
}
.ndym9-shell .ndym9-filters button:not(.active) em {
  color: #6f645b;
}

/* v7.02 — lightweight, privacy-friendlier placeholders for heavy media players. */
.nd-deferred-player {
  width: 100%;
  margin: 1.4rem auto;
  overflow: hidden;
  border: 1px solid rgba(82, 65, 51, .16);
  border-radius: 14px;
  background: #181715;
}
.nd-deferred-player--youtube { aspect-ratio: 16 / 9; }
.nd-deferred-player--soundcloud { min-height: 180px; background: #f2eee8; }
.nd-deferred-player__button {
  appearance: none;
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.nd-deferred-player--soundcloud .nd-deferred-player__button { color: #342f2a; }
.nd-deferred-player__play {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 20px;
}
.nd-deferred-player__button strong,
.nd-deferred-player__button small { display: block; }
.nd-deferred-player__button strong { font-size: 16px; line-height: 1.3; }
.nd-deferred-player__button small { margin-top: 5px; opacity: .78; font-size: 12px; line-height: 1.45; }
.nd-deferred-player iframe {
  display: block;
  width: 100% !important;
  height: 100%;
  min-height: 100%;
  border: 0;
}
.nd-deferred-player--soundcloud iframe { height: 300px; min-height: 300px; }

@media (max-width: 520px) {
  .nd-deferred-player__button { gap: 12px; padding: 18px; }
  .nd-deferred-player__play { flex-basis: 42px; width: 42px; height: 42px; }
}

/* v7.03 — final mobile accessibility pass: preserve the visual design while giving
   post-level controls a reliable 44px touch target. */
@media (max-width: 760px) {
  body.single-post .nd-tags a,
  body.single-post .nd-text-link,
  body.single-post .nd-article-signature__source {
    min-height: 44px !important;
    display: inline-flex;
    align-items: center;
  }
  body.single-post .nd-tags a { padding-block: 8px !important; }
}

/* The legacy Uyanınca palette sat fractionally below WCAG AA on its paper tone. */
body.nd-ugru-page { --nd-muted: #706b64; }

/* Below-the-fold sections need not be painted during the first mobile frame. */
@supports (content-visibility: auto) {
  .nd-single-footer,
  .nd-comments,
  .nd-tags-block,
  .nd-related,
  .nd-post-nav,
  .nd-site-footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 520px;
  }
}
