/* Page components in a news post or a project (5 Nov 2026; user's OK, Wordpress Dev/docs/components-articles-plan.md, option C):
   the story template (POLA.cerita); kabar.html and proyek.html load it through their recipes (config/halaman.js) after the story
   sheets and the component sheets. Previews: archive/komponen-artikel/. Docs: docs/components/komponen-artikel.md.
   Every rule is scoped to the article body (.nk-artikel__isi) and to component classes, so a post without components is
   unchanged; the article's own rules skip component markup (:where(:not(…)) in core/dasar.css and article-page.css).
   (1) In the reading column (680 or 810): the article's rhythm wins around a component, the component's own inside it.
   (2) Narrow variants where a component doesn't fit the column.
   (3) A full-width band for the wide list (Numbers, Gallery, Map, Video): the component's root with .alignfull, which a
       block's "Full width" alignment prints; its band colour .nk-pita--putih | --hijau | --gelap (none = the page's paper). */

/* ---------- (1) the rhythm: a block component is spaced like a photo (figure): 2em before and after it; a badge row,
   buttons and the arrow link like a paragraph (1.1em, the article's own). Numbers keep the spacing projects already give
   them (project/project-stats.css, .nk-cerita .nk-angka: 1em above), so a project's "Hasil sejauh ini" is unchanged ---------- */
.nk-artikel__isi > :is(.nk-ubin,.nk-sekilas,.nk-sekilas__daftar,.nk-tabel,.nk-galeri,.nh-artikel,.nk-kartu-info__item,.nk-grid-kolom,.nk-modul__daftar,.nh-peta,.nk-video,.nm-daftar){margin-top:2em;margin-bottom:0}
.nk-artikel__isi > :is(.nk-ubin,.nk-sekilas,.nk-sekilas__daftar,.nk-tabel,.nk-galeri,.nh-artikel,.nk-kartu-info__item,.nk-grid-kolom,.nk-modul__daftar,.nh-peta,.nk-video,.nm-daftar) + *{margin-top:2em}
/* a component that opens the text starts at the text's top, as a paragraph does */
.nk-artikel__isi > :is(.nk-ubin,.nk-sekilas,.nk-sekilas__daftar,.nk-tabel,.nk-galeri,.nh-artikel,.nk-kartu-info__item,.nk-grid-kolom,.nk-modul__daftar,.nh-peta,.nk-video,.nm-daftar):first-child{margin-top:0}
/* the arrow link on its own line, at the column's left edge (the column is centred in the body) */
.nk-artikel__isi > .nh-semua{display:flex;width:fit-content;margin-left:max(0px,calc((100% - var(--nk-lebar-teks,680px)) / 2));margin-right:0}
/* a table in the column: the article's text size, the component's look */
.nk-artikel__isi > .nk-tabel{width:100%}
/* local partners in the column (17 Nov 2026): spaced and placed as the other components (above); the logo box on the page's
   paper, since the article is white (on a page the box is white on the paper band) */
.nk-artikel__isi .nm-kartu__blok .mt-kartu{background:var(--nk-paper)}
/* a map in the column: the column gives its width */
.nk-artikel__isi > .nh-peta:not(.alignfull){padding:0}
/* the video's caption centred, as the article's photo captions */
.nk-artikel__isi .nk-video figcaption{text-align:center}

/* ---------- (2) narrow variants in the reading column ---------- */
.nk-artikel__isi .nk-ubin--lima{grid-template-columns:repeat(3,minmax(0,1fr))}                                   /* five tiles: 3 + 2 */
.nk-artikel__isi > .nk-angka:is([data-jumlah="2"],[data-jumlah="4"]){grid-template-columns:repeat(2,minmax(0,1fr))}  /* four numbers: 2 + 2 */
.nk-artikel__isi .nh-artikel .nk-grid{grid-template-columns:repeat(2,minmax(0,1fr))}                               /* article cards: two across */
.nk-artikel__isi > .nk-grid-kolom--3{grid-template-columns:minmax(0,1fr)}                                         /* three cards: one under another */
.nk-artikel__isi > .nm-daftar{grid-template-columns:repeat(2,minmax(0,1fr))}                                     /* local partners: two across */
@media (max-width:599px){
  .nk-artikel__isi .nk-ubin--lima{grid-template-columns:repeat(2,minmax(0,1fr))}
  .nk-artikel__isi > .nk-angka:is([data-jumlah="2"],[data-jumlah="4"]),.nk-artikel__isi .nh-artikel .nk-grid{grid-template-columns:minmax(0,1fr)}
}

/* ---------- (3) the full-width band: out of the reading column to the screen's edges, its content on the 1300 container
   (a video on 960). The article becomes a container (container-type) only when it holds a band, so 100cqw is its width
   without the scrollbar ---------- */
.nk-cerita:has(.nk-artikel__isi > .alignfull:is(.nk-angka,.nk-galeri,.nh-peta,.nk-video)){container-type:inline-size}
.nk-artikel__isi > .alignfull:is(.nk-angka,.nk-galeri,.nh-peta,.nk-video){box-sizing:border-box;width:auto;max-width:none;
  margin-left:calc(50% - 50cqw);margin-right:calc(50% - 50cqw);padding:48px max(var(--nk-tepi),calc((100cqw - var(--nk-wadah)) / 2));background:var(--nk-paper)}
.nk-artikel__isi > .alignfull:is(.nk-angka,.nk-galeri,.nh-peta,.nk-video){margin-top:2em;margin-bottom:0}   /* spaced like a photo, as the components in the column */
.nk-artikel__isi > .alignfull:is(.nk-angka,.nk-galeri,.nh-peta,.nk-video) + *{margin-top:2em}
.nk-artikel__isi > .nk-video.alignfull{padding-left:max(var(--nk-tepi),calc((100cqw - 960px) / 2));padding-right:max(var(--nk-tepi),calc((100cqw - 960px) / 2))}
.nk-artikel__isi > .nk-angka.alignfull[data-jumlah="4"]{grid-template-columns:repeat(4,minmax(0,1fr))}
.nk-artikel__isi > .nk-angka.alignfull[data-jumlah="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.nk-artikel__isi > .nk-galeri--mosaik.alignfull{grid-template-columns:repeat(4,minmax(0,1fr))}
.nk-artikel__isi > .alignfull.nk-pita--putih{background:#fff}
.nk-artikel__isi > .alignfull.nk-pita--hijau{background:var(--leaf-wash)}
.nk-artikel__isi > .alignfull.nk-pita--gelap{background:var(--nk-forest-deep);color:var(--nk-paper)}
.nk-artikel__isi > .alignfull.nk-pita--putih .nk-angka__item{background:var(--nk-paper)}
.nk-artikel__isi > .alignfull.nk-pita--gelap .nk-angka__item{background:rgba(247,250,241,.06);border-top-color:var(--leaf-light)}
.nk-artikel__isi > .alignfull.nk-pita--gelap .nk-angka__nilai{color:var(--nk-paper)}
.nk-artikel__isi > .alignfull.nk-pita--gelap :is(.nk-angka__label,figcaption){color:var(--ink-muted-dark)}
.nk-artikel__isi > .alignfull.nk-pita--gelap :is(.nk-video__layar,.nk-galeri__foto):focus-visible{outline-color:var(--nk-ochre)}
@media (max-width:899px){
  .nk-artikel__isi > .nk-angka.alignfull[data-jumlah="4"],.nk-artikel__isi > .nk-galeri--mosaik.alignfull{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:760px){.nk-artikel__isi > .alignfull:is(.nk-angka,.nk-galeri,.nh-peta,.nk-video){padding-top:32px;padding-bottom:32px}}
@media (max-width:599px){.nk-artikel__isi > .nk-angka.alignfull[data-jumlah]{grid-template-columns:minmax(0,1fr)}}

/* ---------- a Spacer in the article body (WordPress's core Spacer; 18 Nov 2026): its height is the whole gap, as on a
   module page (komponen.css): no space around it, none above the part after it, none below the part before it ---------- */
.nk-artikel__isi > .wp-block-spacer.wp-block-spacer,
.nk-artikel__isi > .wp-block-spacer.wp-block-spacer + *{margin-top:0}
.nk-artikel__isi > .wp-block-spacer.wp-block-spacer,
.nk-artikel__isi > :has(+ .wp-block-spacer.wp-block-spacer){margin-bottom:0}
