/* ══════════════════════════════════════════════════════════════════════
   AI ROBOTICS ACADEMY — the news pages
   Loads after ui.css and pages.css, scoped to `body.ui2` like both.

   news.html opens on a FRONT — one big top story with its details under
   it, then a row per kind (events, partnerships, competitions) — and ends
   on the archive: every card, grouped under the year it happened. news-detail.html is one of them — the head, the text, the
   videos, and a grid of photos that opens in a viewer. Both are built from
   the objects the rest of the site already uses: tiles, pills, the page
   head's soft light.
   ══════════════════════════════════════════════════════════════════════ */

/* The kind pill (.news-kind) lives in ui.css: the dashboard's News table
   draws it too. */

/* ══════════════════════════════════════════════════════════════════════
   1 · META
   ══════════════════════════════════════════════════════════════════════ */
body.ui2 .news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--text-muted);
  font-size: 13.5px;
}
body.ui2 .news-loc,
body.ui2 .news-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
body.ui2 .news-loc svg,
body.ui2 .news-count svg { width: 15px; height: 15px; flex-shrink: 0; }

/* The one arrow glyph, drawn pointing to the inline END. Mirrored in RTL
   so it still points to the end; the links that go BACK (to the list, to
   newer posts, to the previous photo) turn it round again. */
body.ui2 .news-arrow { width: 18px; height: 18px; flex-shrink: 0; }
html[dir="rtl"] body.ui2 .news-arrow { transform: scaleX(-1); }
body.ui2 .news-back .news-arrow,
body.ui2 .news-newer .news-arrow,
body.ui2 .news-lb-prev .news-arrow { transform: scaleX(-1); }
html[dir="rtl"] body.ui2 .news-back .news-arrow,
html[dir="rtl"] body.ui2 .news-newer .news-arrow,
html[dir="rtl"] body.ui2 .news-lb-prev .news-arrow { transform: none; }

/* ══════════════════════════════════════════════════════════════════════
   2 · THE LIST
   ══════════════════════════════════════════════════════════════════════ */
body.ui2 .news-sec { padding-top: clamp(20px, 3vw, 36px); }

body.ui2 .news-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: clamp(22px, 3vw, 34px);
}
/* The type chips are the shared .filter-chips in ui.css. */

body.ui2 .news-year select {
  min-width: 150px;
  padding: 10px 38px 10px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2344556E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
html[dir="rtl"] body.ui2 .news-year select { padding: 10px 15px 10px 38px; background-position: left 14px center; }
html[data-theme="dark"] body.ui2 .news-year select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239FB6CE' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* A year, then the cards that happened in it. */
body.ui2 .news-year-block + .news-year-block { margin-top: clamp(34px, 5vw, 56px); }
body.ui2 .news-year-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  color: var(--text);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
}
body.ui2 .news-year-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

body.ui2 .news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}
body.ui2 .news-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  body.ui2 a.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
  body.ui2 a.news-card:hover .news-cover img { transform: scale(1.03); }
}
body.ui2 a.news-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

body.ui2 .news-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-soft);
}
body.ui2 .news-cover img,
body.ui2 .news-cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-slow) var(--ease-out);
}
/* No picture: the brand-tinted block every imageless card on the site uses. */
body.ui2 .news-cover-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  background: linear-gradient(150deg, var(--surface-soft) 0%, #DCEAF9 100%);
}
html[data-theme="dark"] body.ui2 .news-cover-empty {
  background: linear-gradient(150deg, var(--surface-soft) 0%, #0A1E36 100%);
}
body.ui2 .news-cover:not(.news-cover-empty) .news-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
}
body.ui2 .news-play {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--glass-bg-solid);
  color: var(--brand);
  box-shadow: var(--shadow);
}
body.ui2 .news-play svg { width: 22px; height: 22px; margin-inline-start: 3px; }
html[dir="rtl"] body.ui2 .news-play svg { margin-inline-start: 0; margin-inline-end: 3px; }
body.ui2 .news-provider { color: var(--text-muted); font-size: 13px; font-weight: 600; }

body.ui2 .news-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 18px 22px 20px;
}
body.ui2 .news-card h3 { margin: 0; font-size: 18px; line-height: 1.5; }
body.ui2 .news-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.ui2 .news-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 13px;
}
body.ui2 .news-counts { display: inline-flex; gap: 12px; }

/* Loading: three quiet cards in the shape of the real ones. */
body.ui2 .news-skel .news-cover,
body.ui2 .news-skel i {
  background: var(--surface-soft);
  animation: newsPulse 1.4s ease-in-out infinite;
}
body.ui2 .news-skel i { display: block; height: 12px; border-radius: var(--r-pill); }
body.ui2 .news-skel i:nth-child(1) { width: 40%; }
body.ui2 .news-skel i:nth-child(2) { width: 85%; height: 16px; }
body.ui2 .news-skel i:nth-child(3) { width: 65%; }
@keyframes newsPulse { 50% { opacity: .55; } }

body.ui2 .news-empty {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: clamp(36px, 6vw, 64px) 20px;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text-muted);
  text-align: center;
}
body.ui2 .news-empty p { margin: 0; font-size: 16px; }
body.ui2 .news-more { display: flex; justify-content: center; margin-top: 30px; }

/* ══════════════════════════════════════════════════════════════════════
   2b · THE FRONT — the top story, then a row per kind
   ══════════════════════════════════════════════════════════════════════ */
/* The head is centred over the centred top story, so the page has one axis
   until the rows below open it back out. */
body.ui2 .news-front-head { text-align: center; padding-bottom: clamp(18px, 3vw, 30px); }
body.ui2 .news-front-head p { margin-inline: auto; }

body.ui2 .nf-top-sec { padding: clamp(8px, 1.5vw, 16px) 0 clamp(36px, 5vw, 64px); }

/* The picture spans the column; the details sit in a card that rises over
   its lower edge — the story reads as one object, picture first. */
body.ui2 .nf-hero { display: grid; justify-items: center; }
body.ui2 .nf-hero-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface-soft);
  box-shadow: var(--shadow-lg);
}
body.ui2 .nf-hero-media img,
body.ui2 .nf-hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-slow) var(--ease-out);
}
body.ui2 .nf-hero-media .news-play {
  position: absolute;
  inset: 42% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
}
body.ui2 .nf-hero-media .news-play svg { width: 28px; height: 28px; }
body.ui2 .nf-hero-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  background: linear-gradient(150deg, var(--surface-soft) 0%, #DCEAF9 100%);
}
html[data-theme="dark"] body.ui2 .nf-hero-empty { background: linear-gradient(150deg, var(--surface-soft) 0%, #0A1E36 100%); }
body.ui2 .nf-hero-empty .news-play { position: static; transform: none; }
@media (hover: hover) and (pointer: fine) {
  body.ui2 .nf-hero:hover .nf-hero-media img { transform: scale(1.02); }
}

body.ui2 .nf-hero-body {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(860px, calc(100% - 48px));
  margin-top: clamp(-120px, -8vw, -56px);
  padding: clamp(26px, 3.6vw, 42px) clamp(22px, 4vw, 52px);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
body.ui2 .nf-hero-flag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: var(--r-pill);
  background: var(--sand-200);
  color: var(--sand-ink);
  font-size: 13px;
  font-weight: 700;
}
body.ui2 .nf-hero-flag svg { width: 15px; height: 15px; }
html[data-theme="dark"] body.ui2 .nf-hero-flag { background: rgba(242, 196, 155, .16); color: var(--sand); }
body.ui2 .nf-hero-meta { justify-content: center; }
body.ui2 .nf-hero-title {
  margin: 2px 0 0;
  max-width: 760px;
  font-size: clamp(25px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.35;
}
body.ui2 .nf-hero-title a { color: var(--text); text-decoration: none; }
body.ui2 .nf-hero-title a:hover { color: var(--brand); }
body.ui2 .nf-hero-title a:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; border-radius: 6px; }
body.ui2 .nf-hero-lead {
  margin: 0;
  max-width: 680px;
  color: var(--text);
  font-size: clamp(16px, 1.55vw, 19px);
  line-height: 1.85;
}
body.ui2 .nf-hero-excerpt {
  margin: 0;
  max-width: 680px;
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.95;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* The rest of the story's pictures and videos, as a row of small tiles. */
body.ui2 .nf-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}
body.ui2 .nf-strip-item {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface-soft);
  cursor: pointer;
  transition: transform var(--t-press) var(--ease-out);
}
body.ui2 .nf-strip-item:active { transform: scale(.97); }
body.ui2 .nf-strip-item:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
body.ui2 .nf-strip-item img,
body.ui2 .nf-strip-item video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
body.ui2 .nf-strip-item .news-play { position: relative; width: 36px; height: 36px; }
body.ui2 .nf-strip-item .news-play svg { width: 15px; height: 15px; }
body.ui2 .nf-strip-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(11, 31, 58, .58);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  direction: ltr;
}
body.ui2 .nf-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13.5px;
}
body.ui2 .nf-hero-actions .btn { display: inline-flex; align-items: center; gap: 10px; }

/* Loading: the hero's own shape, quiet. */
body.ui2 .nf-hero-skel .nf-hero-media,
body.ui2 .nf-hero-skel i { background: var(--surface-soft); animation: newsPulse 1.4s ease-in-out infinite; box-shadow: none; }
body.ui2 .nf-hero-skel i { display: block; height: 14px; border-radius: var(--r-pill); }
body.ui2 .nf-hero-skel i:nth-child(1) { width: 30%; }
body.ui2 .nf-hero-skel i:nth-child(2) { width: 80%; height: 26px; }
body.ui2 .nf-hero-skel i:nth-child(3) { width: 60%; }

/* A row per kind. Tighter than a homepage section: these are chapters of
   one page, not separate pitches. */
body.ui2 .nf-kind-sec { padding: clamp(36px, 4.5vw, 60px) 0; }
body.ui2 .nf-partners { background: var(--surface-soft); }
body.ui2 .nf-kind-lead { margin-bottom: 0; }

body.ui2 .nf-wide-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: 20px;
}
body.ui2 .nf-wide {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t) var(--ease-out);
}
/* The picture fills its side at whatever height the text gives the card,
   instead of its own proportions setting the height. */
body.ui2 .nf-wide .news-cover { aspect-ratio: auto; height: 100%; min-height: 220px; }
body.ui2 .nf-wide .news-cover img,
body.ui2 .nf-wide .news-cover video { position: absolute; inset: 0; }
body.ui2 .news-grid.nf-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.ui2 .nf-wide-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 26px; }
body.ui2 .nf-wide h3 { margin: 0; font-size: 19px; line-height: 1.5; }
body.ui2 .nf-wide p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.ui2 .nf-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
}
html[data-theme="dark"] body.ui2 .nf-more { color: var(--sky); }
body.ui2 .nf-more .news-arrow { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) {
  body.ui2 .nf-wide:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
  body.ui2 .nf-wide:hover .news-cover img { transform: scale(1.03); }
}
body.ui2 .nf-wide:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

/* The archive's head sits closer to its filters than a section head does. */
body.ui2 .nf-archive-head { margin-bottom: 18px; }
body.ui2 #archive { scroll-margin-top: 90px; }

/* ══════════════════════════════════════════════════════════════════════
   3 · ONE POST
   ══════════════════════════════════════════════════════════════════════ */
/* The head and the article share one column, so the title, the text and
   the photos all start on the same line. */
body.ui2 .news-head .container,
body.ui2 .news-article { max-width: 920px; }
body.ui2 .news-head .news-meta { margin-top: 18px; }
body.ui2 .news-lead { max-width: 760px !important; }
body.ui2 .news-state { margin-top: 18px; font-size: 16px; }
body.ui2 .news-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
html[data-theme="dark"] body.ui2 .news-back { color: var(--sky); }
body.ui2 .news-back:hover span { text-decoration: underline; }

body.ui2 .news-article-sec { padding-top: clamp(8px, 2vw, 20px); }
body.ui2 .news-body {
  max-width: 760px;
  color: var(--text);
  font-size: 17px;
  line-height: 2;
}
body.ui2 .news-body p { margin: 0 0 1.1em; }

body.ui2 .news-media-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: clamp(30px, 4vw, 44px) 0 16px;
  font-size: 20px;
}
body.ui2 .news-media-head svg { width: 22px; height: 22px; color: var(--brand); }
html[data-theme="dark"] body.ui2 .news-media-head svg { color: var(--sky); }

body.ui2 .news-videos { display: grid; gap: 18px; }
body.ui2 .news-video {
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--navy);
  box-shadow: var(--shadow-sm);
}
body.ui2 .news-video video,
body.ui2 .news-video iframe { width: 100%; height: 100%; border: 0; display: block; }

body.ui2 .news-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
body.ui2 .news-thumb {
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface-soft);
  cursor: zoom-in;
  transition: transform var(--t-press) var(--ease-out);
}
body.ui2 .news-thumb:active { transform: scale(.98); }
body.ui2 .news-thumb:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
body.ui2 .news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-slow) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  body.ui2 .news-thumb:hover img { transform: scale(1.04); }
}

body.ui2 .news-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: clamp(40px, 5vw, 60px);
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}
body.ui2 .news-pager-link {
  display: grid;
  gap: 6px;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  text-decoration: none;
  transition: box-shadow var(--t) var(--ease-out);
}
body.ui2 .news-pager-link span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
body.ui2 .news-older { text-align: end; }
body.ui2 .news-older span { justify-content: flex-end; }
@media (hover: hover) and (pointer: fine) {
  body.ui2 .news-pager-link:hover { box-shadow: var(--shadow); }
}

/* ══════════════════════════════════════════════════════════════════════
   4 · THE PHOTO VIEWER
   ══════════════════════════════════════════════════════════════════════ */
html.news-lb-lock { overflow: hidden; }
body.ui2 .news-lb {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: rgba(6, 19, 31, .92);
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
}
body.ui2 .news-lb[hidden] { display: none; }
body.ui2 .news-lb.is-open { opacity: 1; }
body.ui2 .news-lb-fig {
  grid-column: 2;
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0;
  height: 100%;
  align-content: center;
}
body.ui2 .news-lb-fig img {
  max-width: 100%;
  max-height: calc(100vh - 110px);
  border-radius: var(--r);
  object-fit: contain;
  transform: scale(.97);
  transition: transform 220ms var(--ease-out);
}
body.ui2 .news-lb.is-open .news-lb-fig img { transform: none; }
body.ui2 .news-lb-count { color: rgba(255, 255, 255, .8); font-size: 14px; direction: ltr; }
body.ui2 .news-lb-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
  transition: background-color var(--t-fast) ease, transform var(--t-press) var(--ease-out);
}
body.ui2 .news-lb-btn:hover { background: rgba(255, 255, 255, .22); }
body.ui2 .news-lb-btn:active { transform: scale(.94); }
body.ui2 .news-lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
body.ui2 .news-lb-btn svg { width: 22px; height: 22px; }
body.ui2 .news-lb-close { position: absolute; top: 16px; inset-inline-end: 16px; }
body.ui2 .news-lb-prev { grid-column: 1; }
body.ui2 .news-lb-next { grid-column: 3; }

@media (prefers-reduced-motion: reduce) {
  body.ui2 .news-lb, body.ui2 .news-lb-fig img,
  body.ui2 .news-cover img, body.ui2 .news-thumb img { transition: none; }
  body.ui2 .news-skel .news-cover, body.ui2 .news-skel i,
  body.ui2 .nf-hero-skel .nf-hero-media, body.ui2 .nf-hero-skel i { animation: none; }
  body.ui2 .nf-hero-media img, body.ui2 .nf-strip-item { transition: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   5 · SMALL SCREENS — last, so nothing above outranks them
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  body.ui2 .nf-hero-media { aspect-ratio: 16 / 9; }
}
@media (max-width: 640px) {
  body.ui2 .news-grid { grid-template-columns: 1fr; }
  /* The card no longer fits over the picture; it follows it. */
  body.ui2 .nf-hero-media { aspect-ratio: 4 / 3; border-radius: var(--r-lg); }
  body.ui2 .nf-hero-body { width: calc(100% - 20px); margin-top: -36px; padding: 22px 18px; }
  /* The strip is a centred grid item, so it shrinks to its content — and a
     tile sized as a share of a shrunk strip is a dot. Give it the row. */
  body.ui2 .nf-strip { width: 100%; flex-wrap: nowrap; }
  body.ui2 .nf-strip-item { width: calc((100% - 30px) / 4); }
  body.ui2 .nf-hero-actions .btn { width: 100%; justify-content: center; }
  body.ui2 .nf-wide { grid-template-columns: 1fr; }
  body.ui2 .nf-wide .news-cover { aspect-ratio: 16 / 10; height: auto; min-height: 0; }
  body.ui2 .news-grid.nf-two { grid-template-columns: 1fr; }
  body.ui2 .nf-kind-sec .sec-head { gap: 14px; }
  /* A grid with a minmax(0) track, not a flex column: the chips row below
     does not wrap, and as a flex item its min-content width pushed the
     whole bar — and the page — past the edge of the screen. */
  body.ui2 .news-filters { display: grid; grid-template-columns: minmax(0, 1fr); }
  /* One row the thumb can scroll, rather than four rows of chips pushing
     the first card off the screen. */
  body.ui2 .news-year select { width: 100%; }
  body.ui2 .news-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  body.ui2 .news-pager { grid-template-columns: 1fr; }
  body.ui2 .news-body { font-size: 16px; }
  /* The picture takes the width; the arrows sit under it. */
  body.ui2 .news-lb { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; padding: 64px 12px 20px; }
  body.ui2 .news-lb-fig { grid-column: 1 / -1; grid-row: 1; }
  body.ui2 .news-lb-prev { grid-column: 1; grid-row: 2; justify-self: start; }
  body.ui2 .news-lb-next { grid-column: 2; grid-row: 2; justify-self: end; }
  body.ui2 .news-lb-fig img { max-height: calc(100vh - 170px); }
}

/* A link written into a post's text: long addresses wrap instead of
   pushing the page sideways on a phone. */
body.ui2 .news-body a { color: var(--brand); overflow-wrap: anywhere; }
