/* Newsmag-style layout (owner approved 2026-11-29; tools/build-site.mjs NM). Loaded on every v2 page.
   Dense news layout: light top strip, logo + leaderboard ad, dark menu bar, "latest now" ticker, 1 + 4 image grid,
   colour-coded section blocks with a sidebar. Colours come from the site tokens so dark mode keeps working. */
body.nm { --nm-bar: #111317; --nm-gap: 24px; background: var(--paper-alt); }
:root[data-theme="dark"] body.nm { --nm-bar: #07080a; }
body.nm main { background: var(--paper); }
.nm .wrap { --wrap: 1240px; }

/* Header */
.nm .site-header { background: var(--paper); }
.nm .util-bar { background: var(--paper); color: var(--ink); box-shadow: none; border-bottom: 1px solid var(--rule); font-size: .78rem; text-transform: none; }
.nm .util-in { min-height: 34px; gap: 16px; }
.nm .util-in a, .nm .util-in .theme-btn { color: var(--ink); }
.nm .util-in .today { color: var(--muted); opacity: 1; }
.nm .util-in .nl { color: #fff; padding: 4px 12px; }
.nm .util-in .rss { color: var(--muted); }
.nm-soc { display: inline-flex; gap: 10px; align-items: center; }
.nm-soc svg { width: 15px; height: 15px; fill: currentColor; display: block; }
.nm-soc a { color: var(--ink); }
.nm-soc a:hover { color: var(--red); }
.nm-soc .off { color: var(--muted); opacity: .45; }
.nm .mast { min-height: 0; padding-block: 22px; }
.nm .brand .logo { width: 300px; }
.nm-ad { display: grid; place-items: center; align-content: center; gap: 2px; border: 1px dashed var(--rule); background: repeating-linear-gradient(135deg, var(--paper-alt) 0 10px, var(--paper) 10px 20px); color: var(--muted); text-align: center; }
.nm-ad-l { font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nm-ad-s { font-size: .8rem; font-weight: 700; }
.nm-ad-lb { width: 728px; max-width: 100%; height: 90px; flex: 0 1 728px; }
.nm-ad-mr { width: 100%; max-width: 300px; aspect-ratio: 300 / 250; margin-inline: auto; }
.nm-ad.is-house, .nm-ad.is-paid { border: 0; background: none; display: block; }
.nm-ad.is-paid { position: relative; }
.nm-ad.is-paid .nm-ad-l { position: absolute; top: 2px; inset-inline-end: 4px; background: rgba(0, 0, 0, .55); color: #fff; padding: 0 4px; }
.nm-ad.is-paid img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nm-house { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 100%; padding: 12px 22px; background: var(--navy); color: #fff; text-decoration: none; border-inline-start: 5px solid var(--sky); }
.nm-house::after { content: ""; position: absolute; inset-block: 0; inset-inline-end: -40px; width: 180px; background: url(/assets/covers/generic.svg) center / cover; opacity: .35; pointer-events: none; }
.nm-house-t { position: relative; z-index: 1; display: grid; gap: 2px; min-width: 0; }
.nm-house-t strong { font-family: var(--serif); font-size: 1.05rem; line-height: 1.35; }
.nm-house-t span { font-size: .82rem; color: rgba(255, 255, 255, .82); line-height: 1.5; }
.nm-house-b { position: relative; z-index: 1; flex: none; background: var(--red); color: #fff; font-weight: 700; font-size: .85rem; padding: 8px 16px; }
.nm-house:hover { text-decoration: none; }
.nm-house:hover .nm-house-b { background: var(--red-ink); }
.nm-ad-mr .nm-house { flex-direction: column; justify-content: center; align-items: flex-start; text-align: start; padding: 22px; border-inline-start: 0; border-top: 5px solid var(--sky); }
.nm-ad-mr .nm-house::after { inset: auto -30px -30px auto; width: 160px; height: 160px; }
.nm-ad-mr .nm-house-t strong { font-size: 1.3rem; }
.nm-ad-mb .nm-house { padding: 10px 14px; gap: 10px; }
.nm-ad-mb .nm-house-t strong { font-size: .95rem; }
.nm-ad-mb .nm-house-t span { font-size: .74rem; }
.nm-ad-mb { width: 320px; max-width: 100%; height: 100px; margin-inline: auto; }
.nm-ad-bb { width: 970px; max-width: 100%; height: 90px; margin-inline: auto; }
.nm .main-nav { background: var(--nm-bar); border: 0; }
.nm .main-nav-in { min-height: 46px; }
.nm .main-nav-in > a, .nm .cty-dd > summary { color: #fff; min-height: 46px; border-bottom: 0; margin: 0; padding-inline: 13px; font-size: .84rem; }
.nm .main-nav-in > a:hover, .nm .cty-dd > summary:hover, .nm .cty-dd[open] > summary { background: rgba(255, 255, 255, .08); color: #fff; }
.nm .main-nav-in > a[aria-current="page"], .nm .cty-dd.is-cur > summary, .nm .main-nav-in .nav-pt > summary { background: var(--red); color: #fff; }
.nm .main-nav-in .nav-home { color: #fff; }
.nm .main-nav-in .nav-search { color: #fff; }
.nm .cty-menu { border-top: 3px solid var(--red); }

/* Ticker */
.nm-tick { display: flex; align-items: center; gap: 14px; min-height: 44px; border-bottom: 1px solid var(--rule); font-size: .88rem; }
.nm-tick-k { flex: none; background: var(--sky); color: #06121c; font-weight: 700; font-size: .7rem; letter-spacing: .04em; padding: 4px 10px; border-radius: 2px; }
.nm-tick ul { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; }
.nm-tick li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm-tick li a { color: var(--ink); text-decoration: none; }
.nm-tick li a:hover { color: var(--red-ink); text-decoration: underline; }
html.js .nm-tick li:not(.on) { display: none; }
.nm-tick-nav { display: flex; gap: 4px; }
.nm-tick-nav button { width: 24px; height: 24px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer; font: 700 .9rem/1 sans-serif; }
[dir="rtl"] .nm-tick-nav button { transform: scaleX(-1); }

/* Hero: one large story + a 2 x 2 grid, titles over the photos */
.nm-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3px; margin-top: 18px; }
.nm-hero-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3px; }
.nm-ov { position: relative; overflow: hidden; background: var(--navy); min-height: 200px; }
.nm-ov-big { min-height: 406px; }
.nm-ov-a, .nm-ov-a img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.nm-ov-a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .82), rgba(0, 0, 0, .15) 55%, transparent); pointer-events: none; }
.nm-ov-a img { transition: transform .5s ease; }
.nm-ov:hover .nm-ov-a img { transform: scale(1.04); }
.nm-ov-t { position: absolute; inset-inline: 0; bottom: 0; padding: 14px 16px; pointer-events: none; }
.nm-ov-t a, .nm-ov-t .nm-chip { pointer-events: auto; }
.nm-ov h2, .nm-ov h3 { margin: 6px 0 0; font-family: var(--serif); line-height: 1.35; }
.nm-ov h2 { font-size: 1.55rem; }
.nm-ov h3 { font-size: .98rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nm-ov h2 a, .nm-ov h3 a { color: #fff; text-decoration: none; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.nm-ov h2 a:hover, .nm-ov h3 a:hover { text-decoration: underline; }
.nm-ov .nm-meta { color: rgba(255, 255, 255, .88); margin-top: 8px; }
.nm-chip { display: inline-block; color: #fff; font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 2px; background: var(--navy); }

/* Section colours (white text passes WCAG AA on each) */
.pill-projects { background: #0077C8; } .pill-regulation { background: #B3261E; } .pill-markets { background: #0F6E6E; }
.pill-real-estate { background: #8A5A00; } .pill-energy { background: #1E6B35; } .pill-startups { background: #6B3FA0; }
.pill-tracker { background: #111317; } .pill-tools { background: #00629F; } .pill-countries { background: #3D4450; }
:root[data-theme="dark"] .pill-tracker { background: #3D4450; }

.nm-ad-row { padding-block: 18px; display: none; }
.nm-ad-row-b { display: block; border-top: 1px solid var(--rule); }

/* Corporate tax strip */
.nm-strip { display: flex; align-items: center; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--rule); overflow-x: auto; }
.nm-strip ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; white-space: nowrap; font-size: .86rem; }
.nm-strip li a { color: var(--ink); text-decoration: none; }
.nm-strip b { color: var(--red-ink); }

/* Main + sidebar */
.nm-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding-block: 26px; }
.nm-col { display: grid; gap: 30px; align-content: start; min-width: 0; }
.nm-bh { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--ink); margin-bottom: 16px; }
.nm-pill { display: inline-block; color: #fff; font-family: var(--serif); font-weight: 700; font-size: .78rem; letter-spacing: .02em; padding: 5px 12px; text-decoration: none; }
.nm-pill:hover { filter: brightness(1.1); text-decoration: none; }
.nm-all { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.nm-all .ico { width: 14px; height: 14px; }
.nm-all:hover { color: var(--red-ink); }
.nm-b2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.nm-pic { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-alt); }
.nm-pic img, .nm-pic .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nm-pic .nm-chip { position: absolute; top: 8px; inset-inline-start: 8px; }
.nm-pic .cover > span { display: none; }
.nm-big h3 { font-family: var(--serif); font-size: 1.15rem; line-height: 1.4; margin: 12px 0 6px; }
.nm-big h3 a, .nm-list h4 a, .nm-proj h4 a { color: var(--ink); text-decoration: none; }
.nm-big h3 a:hover, .nm-list h4 a:hover, .nm-proj h4 a:hover { color: var(--red-ink); }
.nm-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .76rem; color: var(--muted); }
.nm-by { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); }
.nm-ov .nm-by { color: #fff; }
.nm-by img { width: 20px; height: 20px; border-radius: 50%; }
.nm-ex { margin: 8px 0 0; font-size: .9rem; color: var(--muted); line-height: 1.65; }
.nm-list, .nm-proj { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; align-content: start; }
.nm-list li, .nm-proj li { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; align-items: start; }
.nm-th { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--navy); }
.nm-th img, .nm-th .thumb-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nm-th > span { position: absolute; inset-inline: 6px; bottom: 4px; color: #fff; font-size: .68rem; font-weight: 700; }
.nm-list h4, .nm-proj h4 { margin: 0 0 4px; font-size: .9rem; line-height: 1.45; font-weight: 700; }
.nm-proj { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 22px; }
.nm-pv { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .82rem; }

.nm-side { display: grid; gap: 22px; align-content: start; }
.nm-sbox { border: 1px solid var(--rule); background: var(--paper); padding: 16px; }
.nm-sh { margin: -16px -16px 14px; padding: 9px 14px; background: var(--navy); color: #fff; font-family: var(--serif); font-size: .85rem; }
.nm-soc-big { gap: 8px; flex-wrap: wrap; }
.nm-soc-big a, .nm-soc-big .off { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 2px; background: var(--navy); color: #fff; }
.nm-soc-big .off { opacity: .35; }
.nm-soc-big svg { width: 18px; height: 18px; }
.nm-num-v { margin: 0 0 6px; font-family: var(--serif); font-size: 1.8rem; font-weight: 700; color: var(--red-ink); }
.nm-num p:last-child { margin: 0; font-size: .86rem; color: var(--muted); }
.nm-qn { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 12px; font-size: .88rem; }
.nm-qn li { padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.nm-qn a { color: var(--ink); text-decoration: none; font-weight: 600; }
.nm-picks { margin: 0; padding: 0; list-style: none; counter-reset: p; display: grid; gap: 12px; }
.nm-picks li { counter-increment: p; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; font-size: .9rem; font-weight: 600; }
.nm-picks li::before { content: counter(p); display: grid; place-items: center; height: 30px; background: var(--red); color: #fff; font-weight: 700; }
.nm-picks a { color: var(--ink); text-decoration: none; }
.nm-side .nl-box { display: block; padding: 16px; margin: 0; }

.nm-tools, .nm-cty { padding-block: 10px 26px; }
.nm-tools ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.nm-tools ul a { display: flex; align-items: center; min-height: 64px; padding: 10px 14px; background: var(--paper-alt); border-inline-start: 4px solid var(--red); color: var(--ink); font-weight: 700; font-size: .88rem; text-decoration: none; }
.nm-tools ul a:hover { background: var(--red); color: #fff; }
.nm-cty ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.nm-cty a { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy); color: #fff; text-decoration: none; }
.nm-cty img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nm-cty span { position: absolute; inset-inline: 8px; bottom: 6px; font-weight: 700; font-size: .86rem; }

@media (max-width: 1100px) {
  .nm-main { grid-template-columns: minmax(0, 1fr); }
  .nm-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nm-ad-lb { display: none; }
  .nm-tools ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nm-cty ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .nm .mast { padding-block: 8px; }
  .nm .brand .logo { width: 190px; }
  .nm-hero { grid-template-columns: minmax(0, 1fr); margin-top: 10px; }
  .nm-ov-big { min-height: 300px; }
  .nm-ov { min-height: 160px; }
  .nm-ov h2 { font-size: 1.25rem; }
  .nm-ov h3 { font-size: .82rem; -webkit-line-clamp: 4; }
  .nm-ov-t { padding: 10px; }
  .nm-ov:not(.nm-ov-big) .nm-chip { font-size: .6rem; }
  .nm-ad-row { display: block; }
  .nm-ad-row-b .nm-ad-bb { display: none; }
  .nm-b2, .nm-proj { grid-template-columns: minmax(0, 1fr); }
  .nm-side { grid-template-columns: minmax(0, 1fr); }
  .nm-tools ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nm-cty ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nm-tick { font-size: .82rem; }
}

/* Article page: sidebar with the contents, share links, latest stories and an ad (wide screens only) */
@media (min-width: 1101px) {
  .nm .v2-art-grid, .nm .v2-art-grid.no-toc { grid-template-columns: 300px minmax(0, 720px); gap: 56px; }
  .nm .nm-rail > * { position: static; }
  .nm .nm-rail .nm-rail-x { position: sticky; top: 16px; display: grid; gap: 22px; margin-top: 24px; }
}
@media (max-width: 1100px) { .nm .nm-rail-x { display: none; } }
.nm-lt { margin: 0 0 4px; font-size: .86rem; line-height: 1.45; font-weight: 700; }
.nm-lt a { color: var(--ink); text-decoration: none; }
.nm-lt a:hover { color: var(--red-ink); }
.nm-rail .nm-list li { grid-template-columns: 84px minmax(0, 1fr); gap: 10px; }
.nm-rel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.nm-rel .nm-ov { min-height: 240px; }

/* Section and listing pages: the same 1 + 4 photo grid under the page title */
.nm-sec-hero { margin: 8px 0 34px; }
.nm-hero-g { grid-auto-rows: 1fr; }
@media (max-width: 1100px) { .nm-rel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .nm-rel .nm-ov { min-height: 170px; } }
/* Photo-less stories in overlay tiles: the designed cover fills the tile, without its own country label */
.nm-ov .cover { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border: 0; padding: 0; }
.nm-ov .cover > span { display: none; }
