/* Insights (controllers/insights.rs): the overview /insights/ and the posts. Loaded only on those pages
   (layouts/app.html). Built from the site's own design language, as on /blog/ and the blog articles: square corners,
   Netto Bold upper-case headlines, the date on a yellow label, text links with a thick underline (.nev-button), grey
   (#f4f4f4) and yellow (#ffe501) blocks, no borders or shadows. */
.nvx-insights, .nvx-insight-head, .nvx-insight { --nvx-ink: #030303; --nvx-y: #ffe501; --nvx-g1: #f4f4f4; --nvx-g3: #6b6b6b;
  --nvx-pad: clamp(20px, 4vw, 56px); color: var(--nvx-ink); }
.nvx-insights *, .nvx-insight-head *, .nvx-insight * { box-sizing: border-box; border-radius: 0; }
.nvx-insights h1, .nvx-insights h2, .nvx-insight-head h1, .nvx-insight h2 { font-family: "Netto W04 Bold", sans-serif; font-weight: 400; }

/* Shared: the date label, the type, the underlined text link */
.nvx-date { display: inline-block; background: var(--nvx-y); padding: 2px 8px; font-size: 17px; line-height: 1.4; }
.nvx-type { display: inline-block; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin-left: 10px; }
.nvx-link { display: inline-block; font-size: 18px; padding-bottom: 2px; border-bottom: 3px solid var(--nvx-ink); }

/* Overview: hero, a grey band with the title on a white label as on /blog/ */
.nvx-insights__hero { background: var(--nvx-g1); padding: clamp(48px, 7vw, 96px) var(--nvx-pad) clamp(40px, 5vw, 72px); }
.nvx-insights__hero-inner { max-width: 1280px; margin: 0 auto; }
.nvx-insights__title { display: inline-block; background: #fff; padding: clamp(16px, 2vw, 34px); margin: 0 0 clamp(20px, 3vw, 32px);
  font-size: clamp(32px, 4vw, 60px); line-height: 1.05; text-transform: uppercase; }
.nvx-insights__title span { display: block; font-family: "Netto W04 Regular", sans-serif; font-size: .55em; line-height: 1.2; margin-top: 6px; }
.nvx-insights__intro { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; max-width: 760px; margin: 0; }
/* With a photo (as on /blog/): the photo fills the band, the title and the intro sit on it as two white boxes with a
   gap between them. The photo is an <img class="attachment-hero-landscape"> in the first .module, so the site's own
   check (resources/js/app.js, brightness) turns the menu white when the photo behind it is dark. */
.nvx-insights__hero--photo { position: relative; overflow: hidden; display: flex; align-items: flex-end; min-height: min(80vh, 780px);
  padding-top: 140px; padding-bottom: clamp(32px, 5vw, 64px); margin: 0; background: #1a1a1a; }
.nvx-insights__hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.nvx-insights__hero--photo .nvx-insights__hero-inner { position: relative; z-index: 1; width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.nvx-insights__hero--photo .nvx-insights__title { margin: 0; }
.nvx-insights__hero--photo .nvx-insights__intro { background: #fff; padding: clamp(16px, 2vw, 28px) clamp(16px, 2vw, 34px); max-width: 640px; font-size: clamp(17px, 1.3vw, 20px); }

/* Overview: filter as on /blog/: plain words, the chosen one underlined in yellow */
.nvx-insights__filter, .nvx-insights__grid, .nvx-insights__empty, .nvx-insights__follow { max-width: calc(1280px + 2 * var(--nvx-pad));
  margin-left: auto; margin-right: auto; padding-left: var(--nvx-pad); padding-right: var(--nvx-pad); }
.nvx-insights__filter { display: flex; flex-wrap: wrap; gap: 6px 28px; list-style: none; margin-top: clamp(32px, 4vw, 56px); margin-bottom: 0; }
.nvx-insights__filter a { display: inline-block; border-bottom: 3px solid transparent; padding: 0 0 2px; text-decoration: none;
  font-size: clamp(18px, 1.5vw, 22px); color: var(--nvx-ink); }
.nvx-insights__filter a[aria-current="page"] { border-bottom-color: var(--nvx-y); }
.nvx-insights__filter a:not([aria-current]):hover { border-bottom-color: var(--nvx-ink); }
.nvx-insights__filter a:focus-visible { outline: 2px solid var(--nvx-ink); outline-offset: 4px; }

/* Overview: the posts */
.nvx-insights__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: clamp(40px, 4vw, 56px) clamp(20px, 2.5vw, 40px);
  align-items: start; padding-top: clamp(28px, 3vw, 40px); padding-bottom: clamp(48px, 6vw, 96px); }
.nvx-insights__empty { padding-top: 48px; padding-bottom: 48px; color: var(--nvx-g3); }
.nvx-card { display: block; color: inherit; text-decoration: none; }
.nvx-card[hidden] { display: none; }
.nvx-card:focus-visible { outline: 2px solid var(--nvx-ink); outline-offset: 4px; }
.nvx-card__media { display: block; overflow: hidden; background: var(--nvx-g1); }
.nvx-card__media { position: relative; }
.nvx-card__image { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .4s ease; }
.nvx-card__count { position: absolute; right: 0; bottom: 0; background: var(--nvx-ink); color: #fff; padding: 4px 10px; font-size: 15px; }
.nvx-card__play { position: absolute; left: 0; bottom: 0; background: var(--nvx-y); color: var(--nvx-ink); padding: 4px 10px; font-size: 15px; }
.nvx-card:hover .nvx-card__image { transform: scale(1.03); }
.nvx-card__body { padding-top: 16px; }
.nvx-card__title { font-family: "Netto W04 Bold", sans-serif; font-weight: 400; font-size: clamp(20px, 1.6vw, 24px); line-height: 1.2;
  text-transform: uppercase; margin: 14px 0 10px; }
.nvx-card__text { font-size: 18px; line-height: 1.45; margin: 0 0 16px; }
.nvx-card:hover .nvx-link { border-bottom-color: var(--nvx-y); }
.nvx-card__li { display: block; margin-top: 12px; font-size: 14px; color: var(--nvx-g3); }
.nvx-card__draft { display: inline-block; margin: 0 0 10px; padding: 2px 8px; background: var(--nvx-ink); color: #fff; font-size: 13px;
  text-transform: uppercase; letter-spacing: .06em; }
/* A question: a yellow block, as the author box in the articles */
.nvx-card--question { background: var(--nvx-y); padding: clamp(24px, 2.5vw, 34px); }
.nvx-card--question .nvx-card__body { padding-top: 0; }
.nvx-card--question .nvx-date { background: #fff; }
.nvx-card--question .nvx-card__title { font-size: clamp(22px, 1.9vw, 28px); }
.nvx-card--question .nvx-card__li { color: var(--nvx-ink); }
.nvx-card--question:hover .nvx-link { border-bottom-color: #fff; }

/* Overview: "show more" under the grid, centred: the count, then the yellow button */
.nvx-insights__more { max-width: calc(1280px + 2 * var(--nvx-pad)); margin: 0 auto clamp(48px, 6vw, 96px); padding: 0 var(--nvx-pad);
  display: flex; flex-direction: column; align-items: center; gap: 16px; }
.nvx-insights__count { margin: 0; font-size: 18px; color: var(--nvx-g3); }
.nvx-insights__more-link { display: inline-block; background: var(--nvx-y); color: var(--nvx-ink); text-decoration: none; padding: 14px 28px;
  font-family: "Netto W04 Bold", sans-serif; font-size: 18px; text-transform: uppercase; letter-spacing: .04em; }
.nvx-insights__more-link:hover { background: var(--nvx-ink); color: #fff; }
.nvx-insights__more-link:focus-visible { outline: 2px solid var(--nvx-ink); outline-offset: 4px; }
.nvx-insights__more-link[aria-busy="true"] { opacity: .6; cursor: progress; }
.nvx-insights__grid { padding-bottom: clamp(32px, 4vw, 48px); }
.nvx-card:focus { outline: none; }
.nvx-card:focus-visible { outline: 2px solid var(--nvx-ink); outline-offset: 4px; }

/* Overview: the intro as the grid's first tile, a grey block next to the newest posts */
.nvx-insights__about { background: var(--nvx-g1); padding: clamp(24px, 2.5vw, 40px); align-self: stretch; display: flex; flex-direction: column; gap: 16px; }
.nvx-insights__about h2 { font-family: "Netto W04 Bold", sans-serif; font-weight: 400; font-size: clamp(24px, 2.2vw, 34px); line-height: 1.1; text-transform: uppercase; margin: 0; }
.nvx-insights__about p { font-size: clamp(18px, 1.4vw, 21px); line-height: 1.45; margin: 0; }
.nvx-insights__about .nvx-link { align-self: flex-start; margin-top: auto; color: inherit; text-decoration: none; }
.nvx-insights__about .nvx-link:hover { border-bottom-color: var(--nvx-y); }

/* Overview: follow along, a grey block */
.nvx-insights__follow { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 48px;
  background: var(--nvx-g1); padding-top: clamp(32px, 4vw, 56px); padding-bottom: clamp(32px, 4vw, 56px); margin-bottom: clamp(48px, 6vw, 96px);
  max-width: 1280px; }
.nvx-insights__follow h2 { font-size: clamp(26px, 2.6vw, 40px); margin: 0 0 8px; }
.nvx-insights__follow p { font-size: clamp(18px, 1.5vw, 22px); margin: 0; }
.nvx-insights__follow .nvx-link { white-space: nowrap; color: inherit; text-decoration: none; font-size: clamp(18px, 1.5vw, 22px); }
.nvx-insights__follow .nvx-link:hover { border-bottom-color: var(--nvx-y); }

/* A post: the head is a grey band with the text on the left and the main photo on the right, the photo reaching
   below the band into the page. Without a photo the text takes the whole width. */
.nvx-insight-head { background: var(--nvx-g1); padding: clamp(40px, 5vw, 64px) var(--nvx-pad) clamp(40px, 5vw, 64px); }
.nvx-insight-head__inner { max-width: 1280px; margin: 0 auto; }
.nvx-insight-head--photo .nvx-insight-head__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 4vw, 72px); align-items: start; }
.nvx-insight-head--photo { padding-bottom: 0; margin-bottom: clamp(40px, 6vw, 96px); }
.nvx-insight-head__crumbs { font-size: 18px; margin: 0 0 24px; }
.nvx-insight-head__crumbs a { color: inherit; text-decoration: none; border-bottom: 3px solid var(--nvx-y); }
.nvx-insight-head__title { font-size: clamp(28px, 3vw, 46px); line-height: 1.1; text-transform: uppercase; margin: 18px 0 0; max-width: 980px; overflow-wrap: break-word; hyphens: auto; }
.nvx-insight-head__lead { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.45; margin: clamp(20px, 2.5vw, 32px) 0 0; max-width: 760px; }
.nvx-insight-head--photo .nvx-insight-head__text { padding-bottom: clamp(40px, 5vw, 64px); }
.nvx-insight-head__photo { position: relative; margin: 0 0 calc(-1 * clamp(40px, 6vw, 96px)); background: #fff; cursor: zoom-in; }
.nvx-insight-head__photo img { display: block; width: 100%; height: auto; max-height: min(78vh, 760px); object-fit: contain; background: #fff; }
.nvx-insight-head__video { position: absolute; left: 0; bottom: 0; background: var(--nvx-y); color: var(--nvx-ink); text-decoration: none;
  padding: 10px 16px 10px 14px; font-size: 18px; }
.nvx-insight-head__video::before { content: "▶"; margin-right: 10px; font-size: .8em; }
.nvx-insight-head__more { position: absolute; right: 0; bottom: 0; background: var(--nvx-ink); color: #fff; padding: 8px 14px; font-size: 16px; pointer-events: none; }

.nvx-insight { max-width: calc(1280px + 2 * var(--nvx-pad)); margin: 0 auto; padding: clamp(28px, 3vw, 48px) var(--nvx-pad) clamp(48px, 6vw, 96px);
  display: grid; grid-template-columns: minmax(0, 760px) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); }
.nvx-insight-head--photo + * .nvx-insight, .nvx-insight-head--photo ~ .nvx-insight { padding-top: 0; }
.nvx-insight__body { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; }
.nvx-insight__body p { margin: 0 0 1em; }
.nvx-insight__body a { color: inherit; text-decoration: none; border-bottom: 2px solid var(--nvx-ink); }
.nvx-insight__figure { margin: 1.4em 0; }
.nvx-insight__figure img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.nvx-insight__figure figcaption { font-size: 16px; color: var(--nvx-g3); margin-top: 10px; }

/* The gallery inside the text: square tiles, two, three or four in a row (two by two on a phone) */
.nvx-gallery { display: grid; gap: 4px; margin: 1.6em 0 1.8em; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nvx-gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nvx-gallery--1 { grid-template-columns: minmax(0, 1fr); }
.nvx-gallery figure { margin: 0; overflow: hidden; background: var(--nvx-g1); cursor: zoom-in; }
.nvx-gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .4s ease; }
.nvx-gallery--1 img { aspect-ratio: auto; max-height: 70vh; object-fit: contain; }
.nvx-gallery figure:hover img { transform: scale(1.04); }

.nvx-insight__aside { display: grid; gap: 4px; align-content: start; }
.nvx-insight__box { background: var(--nvx-g1); padding: clamp(20px, 2vw, 32px); }
.nvx-insight__box h2 { font-size: clamp(20px, 1.6vw, 24px); margin: 0 0 14px; }
.nvx-insight__box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.nvx-insight__box li a, .nvx-insight__box > a { color: inherit; text-decoration: none; font-size: 18px; border-bottom: 3px solid transparent; }
.nvx-insight__box li a::after, .nvx-insight__box > a::after { content: " →"; }
.nvx-insight__box li a:hover, .nvx-insight__box > a:hover { border-bottom-color: var(--nvx-y); }
.nvx-insight__box--li { background: var(--nvx-y); }
.nvx-insight__box--li > a:hover { border-bottom-color: var(--nvx-ink); }

/* Full-size photos (public/assets/insights.js): black, the photo whole, arrows, counter, close */
.nvx-viewer { position: fixed; inset: 0; z-index: 10000; background: #030303; display: grid; grid-template-rows: auto 1fr auto;
  color: #fff; font-family: "Netto W04 Regular", sans-serif; }
.nvx-viewer[hidden] { display: none; }
.nvx-viewer__bar { display: flex; justify-content: space-between; align-items: center; padding: 16px clamp(16px, 3vw, 32px); font-size: 18px; }
.nvx-viewer__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 clamp(8px, 6vw, 96px); }
.nvx-viewer__stage img { max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; display: block; }
.nvx-viewer button { background: none; border: 0; color: #fff; font: inherit; cursor: pointer; }
.nvx-viewer__close { font-size: 18px; border-bottom: 3px solid var(--nvx-y, #ffe501) !important; padding: 0 0 2px; }
.nvx-viewer__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; display: grid; place-items: center;
  background: #ffe501 !important; color: #030303 !important; font-size: 26px; line-height: 1; }
.nvx-viewer__nav--prev { left: clamp(8px, 2vw, 24px); }
.nvx-viewer__nav--next { right: clamp(8px, 2vw, 24px); }
.nvx-viewer__nav[hidden] { display: none; }
.nvx-viewer__dots { display: flex; justify-content: center; gap: 8px; padding: 18px; }
.nvx-viewer__dots span { width: 28px; height: 3px; background: #555; }
.nvx-viewer__dots span.is-on { background: #ffe501; }
.nvx-viewer button:focus-visible { outline: 2px solid #ffe501; outline-offset: 4px; }

@media (min-width: 1280px) {
  .nvx-insights__hero { padding-top: 170px; }
  .nvx-insights__hero--photo { padding-top: 200px; }
  .nvx-insight-head { padding-top: 190px; }
}
@media (max-width: 900px) {
  .nvx-insight { grid-template-columns: minmax(0, 1fr); }
  .nvx-insight-head--photo .nvx-insight-head__inner { grid-template-columns: minmax(0, 1fr); }
  .nvx-insight-head--photo .nvx-insight-head__text { padding-bottom: 0; }
  .nvx-insight-head__photo { margin-left: calc(-1 * var(--nvx-pad)); margin-right: calc(-1 * var(--nvx-pad)); }
  .nvx-gallery--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nvx-gallery--3 figure:first-child { grid-column: 1 / -1; }
  .nvx-gallery--3 figure:first-child img { aspect-ratio: 4 / 3; }
}
