/* Didban Ruz 2.7.0 — homepage newsroom redesign + image/render performance. */

/* Browser may skip layout/paint for sections that are far below the fold. */
.didban-front-page .home-section-v27,
.didban-front-page .editors-picks,
.didban-front-page .ad-slot {
  content-visibility: auto;
  contain-intrinsic-size: auto 760px;
}
.didban-front-page .didban-fast-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  content-visibility: auto;
}
.didban-front-page .card-image { background: color-mix(in srgb, var(--surface) 88%, #dfe8eb); }

/* New section language: editorial, compact and intentionally less image-heavy. */
.didban-front-page .home-section-v27 {
  position: relative;
  margin: 0 0 34px !important;
  padding: 0 !important;
  border: 0;
  border-radius: 0 !important;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  overflow: visible;
  --section-line: color-mix(in srgb, var(--section-color) 22%, var(--line));
}
.didban-front-page .home-section-v27::after { display: none !important; }
.didban-front-page .home-section-v27 .section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 16px !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid var(--line);
}
.didban-front-page .home-section-v27 .section-heading::after {
  width: 58px;
  height: 3px;
  background: var(--section-color);
}
.didban-front-page .home-section-v27 .section-heading-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.didban-front-page .home-section-v27 .section-symbol {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  color: var(--section-color);
  background: color-mix(in srgb, var(--section-color) 9%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--section-color) 18%, var(--line));
}
.didban-front-page .home-section-v27 .section-symbol .icon { width: 19px; height: 19px; }
.didban-front-page .home-section-v27 .section-copy { min-width: 0; }
.didban-front-page .home-section-v27 .eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}
.didban-front-page .home-section-v27 .section-heading h2 {
  margin: 0;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.45;
  font-weight: 900;
}
.didban-front-page .home-section-v27 .text-link {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  font-size: 10px;
}
.didban-front-page .home-section-v27 .text-link:hover {
  border-color: var(--section-color);
  color: var(--section-color);
}
.didban-front-page .home-section-v27 .section-description {
  max-width: 900px;
  margin: -5px 0 14px !important;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.didban-front-page .home-section-v27 .section-composition { min-width: 0; }

/* Card reset inside redesigned sections. */
.didban-front-page .home-section-v27 .news-card {
  min-width: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
}
.didban-front-page .home-section-v27 .card-standard,
.didban-front-page .home-section-v27 .card-lead,
.didban-front-page .home-section-v27 .card-compact,
.didban-front-page .home-section-v27 .card-headline {
  padding: 0 !important;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.didban-front-page .home-section-v27 .card-content { padding: 0 !important; }
.didban-front-page .home-section-v27 .card-image {
  border-radius: 11px;
  box-shadow: none;
}
.didban-front-page .home-section-v27 .card-image img { transition-duration: .28s; }
.didban-front-page .home-section-v27 .category-label {
  margin: 0 0 5px;
  color: var(--section-color);
  font-size: 9px;
}
.didban-front-page .home-section-v27 .card-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  font-weight: 820;
}
.didban-front-page .home-section-v27 .card-excerpt {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.95;
}
.didban-front-page .home-section-v27 .card-meta {
  min-height: 22px;
  margin-top: 7px;
  font-size: 9px;
}
.didban-front-page .home-section-v27 .bookmark { width: 24px; height: 24px; padding: 4px; }
.didban-front-page .home-section-v27 .card-headline {
  display: block !important;
  padding: 10px 0 11px !important;
  border-bottom: 1px solid var(--line);
}
.didban-front-page .home-section-v27 .card-headline:last-child { border-bottom: 0; }
.didban-front-page .home-section-v27 .card-headline .card-title { font-size: 13px; line-height: 1.9; }
.didban-front-page .home-section-v27 .card-headline .card-meta { margin-top: 4px; }
.didban-front-page .home-section-v27 .card-headline .bookmark { display: none; }
.didban-front-page .home-section-v27 .card-headline .category-label { margin-bottom: 3px; }

/* 1) Spotlight: one strong visual + a concise newsroom stack. */
.didban-front-page .home-section-v27 .section-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .82fr);
  gap: 22px;
  align-items: start;
}
.didban-front-page .home-section-v27 .section-feature .card-lead .card-image { aspect-ratio: 16 / 8.9; }
.didban-front-page .home-section-v27 .section-feature .card-lead .card-content { padding-top: 12px !important; }
.didban-front-page .home-section-v27 .section-feature .card-lead .card-title {
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.72;
}
.didban-front-page .home-section-v27 .section-story-stack {
  border-top: 2px solid var(--ink);
}
.didban-front-page .home-section-v27 .section-story-stack .card-compact {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0 !important;
  border-bottom: 1px solid var(--line);
}
.didban-front-page .home-section-v27 .section-story-stack .card-compact .card-image {
  width: 118px;
  aspect-ratio: 1.35;
}

/* 2) Card deck: magazine-like but without oversized tiles. */
.didban-front-page .home-section-v27 .section-card-deck {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.didban-front-page .home-section-v27 .section-card-deck > .news-card:first-child { grid-column: span 2; }
.didban-front-page .home-section-v27 .section-card-deck .card-image { aspect-ratio: 16 / 10; }
.didban-front-page .home-section-v27 .section-card-deck > .news-card:first-child .card-image { aspect-ratio: 16 / 8.15; }
.didban-front-page .home-section-v27 .section-card-deck .card-content { padding-top: 10px !important; }
.didban-front-page .home-section-v27 .section-card-deck > .news-card:first-child .card-title { font-size: 20px; }

/* 3) Briefing: a feature story + mostly text headlines = much less image transfer. */
.didban-front-page .home-section-v27 .section-briefing {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(340px, .78fr);
  gap: 24px;
  align-items: start;
}
.didban-front-page .home-section-v27 .briefing-feature .card-image { aspect-ratio: 16 / 9; }
.didban-front-page .home-section-v27 .briefing-feature .card-content { padding-top: 12px !important; }
.didban-front-page .home-section-v27 .briefing-feature .card-title { font-size: 23px; }
.didban-front-page .home-section-v27 .briefing-headlines {
  padding-inline-start: 18px;
  border-inline-start: 1px solid var(--line);
}
.didban-front-page .home-section-v27 .briefing-headlines .card-compact {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 0 0 12px !important;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
.didban-front-page .home-section-v27 .briefing-headlines .card-compact .card-image {
  width: 112px;
  aspect-ratio: 1.3;
}

/* 4) Mosaic: asymmetrical editorial rhythm. */
.didban-front-page .home-section-v27 .section-mosaic-v27 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px 18px;
  align-items: start;
}
.didban-front-page .home-section-v27 .section-mosaic-v27 > .news-card:nth-child(1) { grid-column: span 7; grid-row: span 2; }
.didban-front-page .home-section-v27 .section-mosaic-v27 > .news-card:nth-child(2),
.didban-front-page .home-section-v27 .section-mosaic-v27 > .news-card:nth-child(3) { grid-column: span 5; }
.didban-front-page .home-section-v27 .section-mosaic-v27 > .news-card:nth-child(n+4) { grid-column: span 5; }
.didban-front-page .home-section-v27 .section-mosaic-v27 > .news-card:nth-child(1) .card-image { aspect-ratio: 16 / 10; }
.didban-front-page .home-section-v27 .section-mosaic-v27 > .news-card:nth-child(2) .card-image,
.didban-front-page .home-section-v27 .section-mosaic-v27 > .news-card:nth-child(3) .card-image { aspect-ratio: 16 / 9; }
.didban-front-page .home-section-v27 .section-mosaic-v27 .card-content { padding-top: 9px !important; }
.didban-front-page .home-section-v27 .section-mosaic-v27 > .news-card:nth-child(1) .card-title { font-size: 23px; }

/* 5) Night desk: only the intentionally dark section stays dark. */
.didban-front-page .home-section-v27.pattern-night {
  padding: 22px !important;
  border-radius: 16px !important;
  background: #09242f;
  color: #f5f8f9;
  --ink: #f5f8f9;
  --muted: #a9bcc3;
  --line: rgba(255,255,255,.13);
}
.didban-front-page .home-section-v27.pattern-night .section-heading { border-color: rgba(255,255,255,.14); }
.didban-front-page .home-section-v27.pattern-night .section-symbol {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.11);
}
.didban-front-page .home-section-v27.pattern-night .text-link {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.13);
  color: #fff;
}
.didban-front-page .home-section-v27 .section-night {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr);
  gap: 24px;
}
.didban-front-page .home-section-v27 .night-feature .card-image { aspect-ratio: 16 / 8.7; }
.didban-front-page .home-section-v27 .night-feature .card-content { padding-top: 12px !important; }
.didban-front-page .home-section-v27 .night-feature .card-title { font-size: 24px; }
.didban-front-page .home-section-v27 .night-stream { border-top: 2px solid rgba(255,255,255,.72); }
.didban-front-page .home-section-v27 .night-stream .card-compact {
  display: grid;
  grid-template-columns: 108px minmax(0,1fr);
  gap: 12px;
  padding: 12px 0 !important;
  border-bottom: 1px solid rgba(255,255,255,.13);
}
.didban-front-page .home-section-v27 .night-stream .card-compact .card-image { width: 108px; aspect-ratio: 1.3; }

/* 6) Headline stream: deliberately lightweight. */
.didban-front-page .home-section-v27 .section-headlines {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 25px;
  align-items: start;
}
.didban-front-page .home-section-v27 .headlines-feature .card-image { aspect-ratio: 16 / 9; }
.didban-front-page .home-section-v27 .headlines-feature .card-content { padding-top: 10px !important; }
.didban-front-page .home-section-v27 .headlines-feature .card-title { font-size: 21px; }
.didban-front-page .home-section-v27 .headlines-list { border-top: 2px solid var(--ink); }
.didban-front-page .home-section-v27 .headlines-list .card-headline { padding-block: 12px !important; }

/* Dark mode stays coherent. */
html[data-theme=dark] .didban-front-page .home-section-v27 .text-link,
html[data-theme=dark] .didban-front-page .home-section-v27 .section-symbol { background: var(--paper); }
html[data-theme=dark] .didban-front-page .home-section-v27.pattern-night { background: #061a22; }

@media (max-width: 1100px) {
  .didban-front-page .home-section-v27 .section-spotlight,
  .didban-front-page .home-section-v27 .section-briefing,
  .didban-front-page .home-section-v27 .section-night { grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 18px; }
  .didban-front-page .home-section-v27 .section-card-deck { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .didban-front-page .home-section-v27 .section-card-deck > .news-card:first-child { grid-column: span 2; }
}

@media (max-width: 900px) {
  .didban-front-page .home-section-v27 { contain-intrinsic-size: auto 980px; margin-bottom: 28px !important; }
  .didban-front-page .home-section-v27 .section-spotlight,
  .didban-front-page .home-section-v27 .section-briefing,
  .didban-front-page .home-section-v27 .section-night,
  .didban-front-page .home-section-v27 .section-headlines { grid-template-columns: 1fr; gap: 16px; }
  .didban-front-page .home-section-v27 .briefing-headlines { padding-inline-start: 0; border-inline-start: 0; border-top: 2px solid var(--ink); padding-top: 4px; }
  .didban-front-page .home-section-v27 .section-card-deck { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .didban-front-page .home-section-v27 .section-card-deck > .news-card:first-child { grid-column: 1 / -1; }
  .didban-front-page .home-section-v27 .section-mosaic-v27 > .news-card:nth-child(1) { grid-column: span 12; }
  .didban-front-page .home-section-v27 .section-mosaic-v27 > .news-card:nth-child(n+2) { grid-column: span 6; }
}

@media (max-width: 620px) {
  .didban-front-page .home-section-v27 { margin-bottom: 24px !important; }
  .didban-front-page .home-section-v27 .section-heading { align-items: center; margin-bottom: 12px !important; }
  .didban-front-page .home-section-v27 .section-symbol { width: 34px; height: 34px; flex-basis: 34px; }
  .didban-front-page .home-section-v27 .section-heading h2 { font-size: 20px; }
  .didban-front-page .home-section-v27 .text-link { padding: 6px 8px; font-size: 9px; }
  .didban-front-page .home-section-v27 .text-link .icon { display: none; }
  .didban-front-page .home-section-v27 .section-feature .card-lead .card-title,
  .didban-front-page .home-section-v27 .briefing-feature .card-title,
  .didban-front-page .home-section-v27 .night-feature .card-title,
  .didban-front-page .home-section-v27 .headlines-feature .card-title,
  .didban-front-page .home-section-v27 .section-mosaic-v27 > .news-card:nth-child(1) .card-title { font-size: 19px; }
  .didban-front-page .home-section-v27 .section-card-deck { grid-template-columns: 1fr 1fr; gap: 16px 10px; }
  .didban-front-page .home-section-v27 .section-card-deck > .news-card:first-child { grid-column: 1 / -1; }
  .didban-front-page .home-section-v27 .section-card-deck .card-title { font-size: 12px; }
  .didban-front-page .home-section-v27 .section-story-stack .card-compact,
  .didban-front-page .home-section-v27 .briefing-headlines .card-compact,
  .didban-front-page .home-section-v27 .night-stream .card-compact {
    grid-template-columns: 92px minmax(0,1fr);
    gap: 10px;
  }
  .didban-front-page .home-section-v27 .section-story-stack .card-compact .card-image,
  .didban-front-page .home-section-v27 .briefing-headlines .card-compact .card-image,
  .didban-front-page .home-section-v27 .night-stream .card-compact .card-image { width: 92px; }
  .didban-front-page .home-section-v27 .section-mosaic-v27 { gap: 16px 10px; }
  .didban-front-page .home-section-v27 .section-mosaic-v27 > .news-card:nth-child(1) { grid-column: span 12; }
  .didban-front-page .home-section-v27 .section-mosaic-v27 > .news-card:nth-child(2),
  .didban-front-page .home-section-v27 .section-mosaic-v27 > .news-card:nth-child(3) { grid-column: span 6; }
  .didban-front-page .home-section-v27 .section-mosaic-v27 > .news-card:nth-child(n+4) { grid-column: span 12; }
  .didban-front-page .home-section-v27.pattern-night { padding: 16px !important; border-radius: 13px !important; }
}
