/**
 * Discovery of Nature 0.2.70 — homepage mockup adaptation / PHASE 2.
 * Evcilleşmenin İzleri, Doğada Yaşayanlar, Bilimsel Keşifler and
 * Editörün Seçtikleri ONLY. The PHP order and WordPress queries stay intact.
 * Do not style the hero, discovery topics, featured section, media shelf,
 * species, community, header, documentary archive, audio pages or Core.
 */
body.dn-dark-home .home-main {
  --don-p2-surface: #142219;
  --don-p2-surface-raised: #1a2c20;
  --don-p2-line: rgba(178, 207, 167, .16);
  --don-p2-line-hover: rgba(190, 223, 171, .39);
  --don-p2-text: #f2f5ef;
  --don-p2-muted: #b9cbb8;
}

/* Match the mockup's editorial headings, without moving section blocks. */
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-science, .home-editor-picks) > .section-heading {
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--don-p2-line);
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-science, .home-editor-picks) > .section-heading h2 {
  font-size: clamp(1.28rem, 1.68vw, 1.8rem);
  line-height: 1.14;
  letter-spacing: -.025em;
}

/* Keep the existing one-lead + three-rail WordPress markup and story order. */
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(9px, 1.1vw, 15px);
  align-items: stretch;
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__grid--single {
  grid-template-columns: minmax(0, 1fr);
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__lead > .story-card {
  min-height: clamp(235px, 23vw, 290px);
  isolation: isolate;
  border: 1px solid var(--don-p2-line);
  border-radius: 10px;
  background: var(--don-p2-surface);
  box-shadow: none;
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__lead > .story-card::after {
  background: linear-gradient(0deg, rgba(3,12,7,.94), rgba(4,15,8,.49) 41%, rgba(4,14,7,.07) 82%);
  pointer-events: none;
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__lead .story-card__media img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  filter: saturate(.94) contrast(1.03);
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__lead .story-card__body {
  left: clamp(13px,1.4vw,20px);
  right: clamp(13px,1.4vw,20px);
  bottom: clamp(13px,1.4vw,20px);
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__lead .story-card__category {
  color: #c6e6ad;
  font-size: .62rem;
  font-weight: 750;
  letter-spacing: .115em;
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__lead .story-card__title {
  max-width: 29ch;
  margin-top: 5px;
  font-size: clamp(1.07rem,1.37vw,1.42rem);
  line-height: 1.13;
  letter-spacing: -.018em;
  text-wrap: balance;
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__lead .story-card__title a {
  color: var(--don-p2-text);
}

/* Compact editorial rail: photo and text share one quiet surface. */
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__rail {
  grid-template-rows: none;
  grid-auto-rows: minmax(0, 1fr);
  min-width: 0;
  gap: 7px;
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__rail .story-card--compact {
  grid-template-columns: clamp(70px, 7vw, 94px) minmax(0,1fr);
  align-items: center;
  min-height: 0;
  padding: 4px;
  gap: 9px;
  border: 1px solid var(--don-p2-line);
  border-radius: 9px;
  background: linear-gradient(110deg, #182a1e, #111e16 88%);
  box-shadow: none;
  overflow: hidden;
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__rail .story-card--compact:last-child {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--don-p2-line);
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__rail .story-card__media {
  width: 100%;
  height: 100%;
  min-height: 55px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__rail .story-card__media::after {
  box-shadow: none;
  background: linear-gradient(0deg,rgba(4,13,8,.08),transparent 72%);
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__rail .story-card__body {
  align-self: center;
  min-width: 0;
  padding: 4px 6px 4px 0;
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__rail .story-card__title {
  margin: 0;
  font-size: clamp(.79rem,.93vw,.98rem);
  line-height: 1.23;
  letter-spacing: -.014em;
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__rail .story-card__title a {
  color: #eaf0e8;
}

/* Science: clear photo / text split; no heavy four-card shadow stack. */
body.dn-dark-home .home-main .home-science__grid {
  gap: clamp(9px, 1vw, 13px);
  min-width: 0;
}
body.dn-dark-home .home-main .home-science__grid > .story-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--don-p2-line);
  border-radius: 10px;
  background: linear-gradient(180deg,#17271c,#112016);
  box-shadow: none;
}
body.dn-dark-home .home-main .home-science__grid > .story-card .story-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 9px 9px 0 0;
}
body.dn-dark-home .home-main .home-science__grid > .story-card .story-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(1.04);
}
body.dn-dark-home .home-main .home-science__grid > .story-card .story-card__media::after {
  background: linear-gradient(0deg, rgba(4,12,7,.19), transparent 62%);
  box-shadow: none;
}
body.dn-dark-home .home-main .home-science__grid > .story-card .story-card__body {
  flex: 1;
  min-width: 0;
  padding: 11px 12px 13px;
  background: transparent;
}
body.dn-dark-home .home-main .home-science__grid > .story-card .story-card__title {
  margin: 0;
  font-size: clamp(.91rem, 1.02vw, 1.03rem);
  line-height: 1.27;
  letter-spacing: -.016em;
  overflow-wrap: break-word;
}
body.dn-dark-home .home-main .home-science__grid > .story-card .story-card__title a {
  color: var(--don-p2-text);
}
body.dn-dark-home .home-main .home-science__grid > .story-card .story-card__excerpt {
  display: -webkit-box;
  margin-top: 7px;
  color: var(--don-p2-muted);
  font-size: .75rem;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
@media (hover:hover) and (pointer:fine) {
  body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__lead > .story-card:hover,
  body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__rail .story-card--compact:hover,
  body.dn-dark-home .home-main .home-science__grid > .story-card:hover {
    border-color: var(--don-p2-line-hover);
  }
}
body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .story-card:focus-within,
body.dn-dark-home .home-main .home-science__grid > .story-card:focus-within {
  outline: 2px solid #d2f1b8;
  outline-offset: 2px;
  box-shadow: none;
}
@media (min-width:768px) and (max-width:899px) {
  body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__lead > .story-card {
    min-height: 280px;
  }
  body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__rail .story-card--compact {
    grid-template-columns: 90px minmax(0,1fr);
  }
}
@media (max-width:767px) {
  body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }
  body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__lead > .story-card {
    min-height: clamp(208px, 57vw, 255px);
  }
  body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__lead .story-card__title {
    font-size: clamp(1.15rem,4.85vw,1.48rem);
    line-height: 1.13;
  }
  body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__rail {
    grid-template-rows: none;
    grid-auto-rows: auto;
    gap: 7px;
  }
  body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__rail .story-card--compact {
    grid-template-columns: 88px minmax(0,1fr);
    min-height: 75px;
    padding: 4px;
    gap: 10px;
  }
  body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__rail .story-card__media {
    min-height: 65px;
    height: 100%;
    aspect-ratio: 4/3;
  }
  body.dn-dark-home .home-main :is(.home-domestic, .home-wildlife, .home-editor-picks) .home-editorial__rail .story-card__title {
    font-size: clamp(.86rem,3.58vw,.98rem);
    line-height: 1.23;
  }
  body.dn-dark-home .home-main .home-science__grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 9px;
  }
  body.dn-dark-home .home-main .home-science__grid > .story-card .story-card__media {
    aspect-ratio: 16/10;
  }
  body.dn-dark-home .home-main .home-science__grid > .story-card .story-card__body {
    padding: 10px 10px 12px;
  }
  body.dn-dark-home .home-main .home-science__grid > .story-card .story-card__title {
    font-size: clamp(.88rem,3.4vw,.99rem);
    line-height: 1.27;
  }
  body.dn-dark-home .home-main .home-science__grid > .story-card .story-card__excerpt {
    display: none;
  }
}
@media (max-width:359px) {
  /* Narrow 320 px screens: readability takes priority over a cramped 2-up grid. */
  body.dn-dark-home .home-main .home-science__grid {
    grid-template-columns: minmax(0,1fr);
  }
  body.dn-dark-home .home-main .home-science__grid > .story-card .story-card__media {
    aspect-ratio: 16/8;
  }
  body.dn-dark-home .home-main .home-science__grid > .story-card .story-card__title {
    font-size: .99rem;
  }
  body.dn-dark-home .home-main .home-science__grid > .story-card .story-card__excerpt {
    display: -webkit-box;
  }
}
@media (prefers-reduced-motion:reduce) {
  body.dn-dark-home .home-main :is(.home-domestic,.home-wildlife,.home-editor-picks) .story-card,
  body.dn-dark-home .home-main .home-science__grid > .story-card { transition:none; }
}
