/* Articles: listing (articole*.tpl) and article page (articol*.tpl). Loaded before css/pageband.css (band, breadcrumbs, the shared page container and reading width: no max-width/margin/gutters here).
   Tokens from DESIGN.md. Selectors carry div#contentWrapper because the legacy sheets (style.css, revamp.css) style
   div#contentWrapper h1-h5 / p / a with ID specificity; the article body styles are scoped to .rt-art__body so the
   CMS HTML (entity-decoded, free-form) cannot leak into the rest of the page.
   Markup:
     listing  <div id="contentWrapper"><div class="rt-arts"> .rt-arts__grid > article.ar-card(.ar-card--lead) ... nav.rt-pager
     article  band.rt-band--article (breadcrumbs, h1, .rt-art__meta) + <article class="rt-art"><div class="rt-art__body">
              + section.rt-more (recent articles, same cards) */

.rt-arts, .rt-art, .rt-more {
  --ar-navy: #0B1A33;
  --ar-navy-2: #0F2547;
  --ar-on-navy: #F4F7FC;
  --ar-on-navy-soft: #B4C2D9;
  --ar-link-on-navy: #9CC1FF;
  --ar-ink: #101828;
  --ar-ink-2: #475467;
  --ar-ink-3: #5D6B82;
  --ar-line: #E4E7EC;
  --ar-line-2: #CBD5E1;
  --ar-soft: #F5F7FB;
  --ar-blue-50: #F1F5FF;
  --ar-blue-100: #DDE8FF;
  --ar-link: #1F5FBF;
  --ar-accent: #2D6FE3;
  --ar-action: #2E7D32;
  --ar-action-hover: #246428;
  --ar-ease: cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  color: var(--ar-ink);
  font-size: 16px;
  line-height: 1.65;
}
.rt-arts *, .rt-arts *::before, .rt-arts *::after,
.rt-art *, .rt-art *::before, .rt-art *::after,
.rt-more *, .rt-more *::before, .rt-more *::after { box-sizing: border-box; }
.rt-arts ::selection, .rt-art ::selection, .rt-more ::selection { background: var(--ar-blue-100); color: var(--ar-ink); }

.rt-arts { padding-top: clamp(32px, 4.5vw, 56px); padding-bottom: clamp(56px, 7vw, 96px); }

/* ---------- cards ---------- */
.rt-arts__grid, .rt-more__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
@media (max-width: 1023px) { .rt-arts__grid, .rt-more__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .rt-arts__grid, .rt-more__grid { grid-template-columns: minmax(0, 1fr); } }

div#contentWrapper .ar-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(20px, 2.2vw, 28px);
  background: #fff;
  border: 1px solid var(--ar-line);
  border-radius: 16px;
  transition: border-color 0.2s var(--ar-ease), background-color 0.2s var(--ar-ease);
}
div#contentWrapper .ar-card:hover { border-color: var(--ar-line-2); background: var(--ar-soft); }
div#contentWrapper .ar-card__meta {
  display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0 0 12px;
  color: var(--ar-ink-3); font-size: 14px; font-weight: 500; line-height: 1.4; font-variant-numeric: tabular-nums;
}
div#contentWrapper .ar-card__meta > * + *::before { content: "\00B7"; margin: 0 8px; }
div#contentWrapper .ar-card .ar-card__title {
  margin: 0 0 10px; padding: 0; color: var(--ar-ink); font-size: 20px; font-weight: 750; line-height: 1.3; letter-spacing: -0.01em;
  text-align: left; text-wrap: balance; overflow-wrap: anywhere;
}
div#contentWrapper .ar-card .ar-card__title a { color: var(--ar-ink) !important; text-decoration: none; }
/* the whole card is the click target */
div#contentWrapper .ar-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
div#contentWrapper .ar-card__title a:focus-visible { outline: none; }
div#contentWrapper .ar-card__title a:focus-visible::after { outline: 2px solid var(--ar-accent); outline-offset: 3px; border-radius: 18px; }
div#contentWrapper .ar-card:hover .ar-card__title a { color: var(--ar-link) !important; }
div#contentWrapper .ar-card p.ar-card__excerpt {
  margin: 0 0 20px; color: var(--ar-ink-2); font-size: 15.5px; line-height: 1.6; text-align: left;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden;
}
div#contentWrapper .ar-card__more {
  display: inline-flex; align-items: center; gap: 8px; margin-top: auto;
  color: var(--ar-link); font-size: 15px; font-weight: 700; line-height: 1.2;
}
.ar-card__arrow { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s var(--ar-ease); }
div#contentWrapper .ar-card:hover .ar-card__arrow { transform: translateX(3px); }

/* latest article: full width, larger type, navy like the hero */
div#contentWrapper .ar-card--lead {
  grid-column: 1 / -1;
  padding: clamp(28px, 4.5vw, 56px);
  border: 0;
  border-radius: 20px;
  background:
    radial-gradient(55% 130% at 100% 0%, rgba(61, 123, 235, 0.30), transparent 70%),
    var(--ar-navy);
  color: var(--ar-on-navy);
}
div#contentWrapper .ar-card--lead:hover { background:
    radial-gradient(55% 130% at 100% 0%, rgba(61, 123, 235, 0.38), transparent 70%),
    var(--ar-navy-2); }
div#contentWrapper .ar-card--lead .ar-card__meta { color: var(--ar-on-navy-soft); font-size: 15px; margin-bottom: 16px; }
div#contentWrapper .ar-card--lead .ar-card__title {
  max-width: 24ch; margin-bottom: 16px; color: #fff; font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em;
}
div#contentWrapper .ar-card--lead .ar-card__title a, div#contentWrapper .ar-card--lead:hover .ar-card__title a { color: #fff !important; }
div#contentWrapper .ar-card--lead p.ar-card__excerpt {
  max-width: 62ch; margin-bottom: 28px; color: var(--ar-on-navy-soft); font-size: clamp(16px, 1.4vw, 18px); line-height: 1.6;
  -webkit-line-clamp: 3; line-clamp: 3;
}
div#contentWrapper .ar-card--lead .ar-card__more {
  align-self: flex-start; min-height: 46px; margin-top: 0; padding: 0 24px; border-radius: 999px;
  background: var(--ar-action); color: #fff; font-size: 15px;
}
div#contentWrapper .ar-card--lead:hover .ar-card__more { background: var(--ar-action-hover); }
div#contentWrapper .ar-card--lead .ar-card__title a:focus-visible::after { outline-color: var(--ar-link-on-navy); }

/* ---------- pager (links come from includes/pagination.class*.php, wrapped in nav.rt-pager) ---------- */
div#contentWrapper nav.rt-pager {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: clamp(32px, 4vw, 48px) 0 0;
}
div#contentWrapper nav.rt-pager a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--ar-line-2); border-radius: 12px; background: #fff;
  color: var(--ar-ink) !important; font-size: 15px; font-weight: 700; line-height: 1; text-decoration: none; white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s var(--ar-ease), border-color 0.2s var(--ar-ease);
}
div#contentWrapper nav.rt-pager a[href]:hover { background: var(--ar-blue-50); border-color: var(--ar-accent); color: var(--ar-link) !important; }
div#contentWrapper nav.rt-pager a:focus-visible { outline: 2px solid var(--ar-accent); outline-offset: 2px; }
div#contentWrapper nav.rt-pager a.selected { background: var(--ar-navy); border-color: var(--ar-navy); color: #fff !important; cursor: default; }

/* ---------- empty state ---------- */
div#contentWrapper .rt-arts__empty {
  max-width: 520px; margin: clamp(8px, 3vw, 32px) auto 0; padding: clamp(28px, 5vw, 48px); text-align: center;
  background: var(--ar-soft); border: 1px solid var(--ar-line); border-radius: 16px;
}
div#contentWrapper .rt-arts__empty h2 { margin: 0 0 8px; color: var(--ar-ink); font-size: 22px; font-weight: 750; text-align: center; }
div#contentWrapper .rt-arts__empty p { margin: 0 0 24px; color: var(--ar-ink-2); text-align: center; }

/* shared secondary button (back to the listing, empty state) */
div#contentWrapper a.rt-arts__btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px;
  border: 1px solid var(--ar-line-2); border-radius: 999px; background: #fff;
  color: var(--ar-ink); font-size: 15px; font-weight: 700; text-decoration: none;
  transition: background-color 0.2s var(--ar-ease), border-color 0.2s var(--ar-ease);
}
div#contentWrapper a.rt-arts__btn:hover { background: var(--ar-blue-50); border-color: var(--ar-accent); color: var(--ar-link); }
div#contentWrapper a.rt-arts__btn:focus-visible { outline: 2px solid var(--ar-accent); outline-offset: 2px; }

/* ---------- article band (same container and left edge as every band, css/pageband.css) ---------- */
div#pageHeaderWrapper.rt-band--article .rt-page-title {
  max-width: 22em; font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; line-height: 1.12; letter-spacing: -0.03em;
  text-wrap: balance; overflow-wrap: anywhere;
}
div#pageHeaderWrapper.rt-band--article .rt-bc li:has(> a) { flex: none; }
div#pageHeaderWrapper.rt-band--article .rt-bc [aria-current="page"] { overflow-wrap: anywhere; }
.rt-art__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; margin: 20px 0 0;
  color: var(--ar-ink-2, #475467); font-size: 15px; font-weight: 500; letter-spacing: 0; line-height: 1.4; text-align: left;
  font-variant-numeric: tabular-nums;
}
.rt-art__meta img { width: 32px; height: 32px; margin-right: 10px; border-radius: 50%; object-fit: cover; background: #E4E7EC; }
.rt-art__meta > span, .rt-art__meta > time { display: inline-flex; align-items: center; }
.rt-art__meta > span.rt-art__by ~ time::before, .rt-art__meta > time ~ span:not(.rt-art__br)::before { content: "\00B7"; margin: 0 9px; color: #5D6B82; }
.rt-art__by { color: #101828; font-weight: 700; }
div#pageHeaderWrapper .rt-art__lang {
  display: inline-flex; align-items: center; min-height: 36px; margin-left: 16px; padding: 0 16px;
  border: 1px solid #CBD5E1; border-radius: 999px; background: #fff;
  color: #1F5FBF; font-size: 14px; font-weight: 700; text-decoration: none;
  transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
div#pageHeaderWrapper .rt-art__lang:hover { background: #F1F5FF; border-color: #2D6FE3; }
div#pageHeaderWrapper .rt-art__lang:focus-visible { outline: 2px solid #2D6FE3; outline-offset: 2px; }
.rt-art__meta > .rt-art__br { display: none; }
@media (max-width: 560px) {
  .rt-art__meta > .rt-art__br { display: block; flex: 0 0 100%; height: 0; }
  .rt-art__by { flex: 1 1 calc(100% - 46px); }
  .rt-art__meta > span.rt-art__by ~ time::before { content: none; }
  div#pageHeaderWrapper .rt-art__lang { margin-left: 0; }
}

/* ---------- article body ---------- */
.rt-art { padding-top: clamp(32px, 4.5vw, 56px); padding-bottom: clamp(24px, 3vw, 40px); }
.rt-art__body { font-size: clamp(17px, 1.3vw, 18px); line-height: 1.75; color: #1D2939; overflow-wrap: break-word; }
.rt-art__body, .rt-art__body * { font-family: inherit; }
div#contentWrapper .rt-art .rt-art__body > :first-child { margin-top: 0; }
div#contentWrapper .rt-art .rt-art__body p { margin: 0 0 1.15em; color: #1D2939; font-size: inherit; line-height: inherit; text-align: left; text-wrap: pretty; }
div#contentWrapper .rt-art .rt-art__body span { font-size: inherit !important; color: inherit !important; background: none !important; }
div#contentWrapper .rt-art .rt-art__body strong, div#contentWrapper .rt-art .rt-art__body b { color: var(--ar-ink); font-weight: 700; }
div#contentWrapper .rt-art .rt-art__body h1,
div#contentWrapper .rt-art .rt-art__body h2 {
  margin: 2.1em 0 0.6em; color: var(--ar-ink); font-size: clamp(23px, 2.4vw, 28px); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; text-align: left; text-wrap: balance;
}
div#contentWrapper .rt-art .rt-art__body h3,
div#contentWrapper .rt-art .rt-art__body h4,
div#contentWrapper .rt-art .rt-art__body h5 {
  margin: 1.8em 0 0.5em; color: var(--ar-ink); font-size: clamp(19px, 1.7vw, 21px); font-weight: 750; line-height: 1.3; letter-spacing: -0.01em; text-align: left; text-wrap: balance;
}
/* CMS sub-headings are a bold run in a sized span inside a paragraph of its own: read them as h3 */
div#contentWrapper .rt-art .rt-art__body p:has(> span:only-child > strong:only-child) {
  margin: 1.9em 0 0.5em; font-size: clamp(19px, 1.7vw, 21px); font-weight: 750; line-height: 1.3; letter-spacing: -0.01em;
}
div#contentWrapper .rt-art .rt-art__body p:has(> strong:only-child) { margin-top: 1.6em; margin-bottom: 0.5em; font-size: clamp(19px, 1.7vw, 21px); line-height: 1.3; }
div#contentWrapper .rt-art .rt-art__body a { color: var(--ar-link) !important; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
div#contentWrapper .rt-art .rt-art__body a:hover { text-decoration-thickness: 2px; }
div#contentWrapper .rt-art .rt-art__body a:focus-visible { outline: 2px solid var(--ar-accent); outline-offset: 2px; border-radius: 3px; }
div#contentWrapper .rt-art .rt-art__body ul,
div#contentWrapper .rt-art .rt-art__body ol { margin: 0 0 1.3em; padding-left: 1.5em; }
div#contentWrapper .rt-art .rt-art__body li { margin: 0 0 0.5em; padding-left: 0.2em; color: #1D2939; font-size: inherit; line-height: inherit; }
div#contentWrapper .rt-art .rt-art__body li > ul, div#contentWrapper .rt-art .rt-art__body li > ol { margin: 0.5em 0 0.2em; }
div#contentWrapper .rt-art .rt-art__body li::marker { color: var(--ar-ink-3); font-weight: 700; }
div#contentWrapper .rt-art .rt-art__body img { display: inline-block; max-width: 100%; height: auto !important; margin: 0.4em 0; border-radius: 12px; vertical-align: middle; }
div#contentWrapper .rt-art .rt-art__body iframe, div#contentWrapper .rt-art .rt-art__body video { max-width: 100%; border: 0; border-radius: 12px; }
div#contentWrapper .rt-art .rt-art__body hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--ar-line); }
div#contentWrapper .rt-art .rt-art__body blockquote {
  margin: 1.6em 0; padding: 18px 22px; border: 1px solid var(--ar-line); border-radius: 12px; background: var(--ar-soft); color: var(--ar-ink-2); font-size: 1em;
}
div#contentWrapper .rt-art .rt-art__body blockquote > :last-child { margin-bottom: 0; }
div#contentWrapper .rt-art .rt-art__body blockquote p { color: inherit; }
div#contentWrapper .rt-art .rt-art__body code, div#contentWrapper .rt-art .rt-art__body pre, div#contentWrapper .rt-art .rt-art__body kbd {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
}
div#contentWrapper .rt-art .rt-art__body code, div#contentWrapper .rt-art .rt-art__body kbd {
  padding: 2px 6px; border: 1px solid var(--ar-line); border-radius: 6px; background: var(--ar-soft); color: var(--ar-ink); font-size: 0.88em;
}
div#contentWrapper .rt-art .rt-art__body pre {
  margin: 1.5em 0; padding: 16px 20px; overflow-x: auto; border: 1px solid var(--ar-line); border-radius: 12px; background: var(--ar-soft); color: var(--ar-ink);
  font-size: 15px; line-height: 1.55; tab-size: 4;
}
div#contentWrapper .rt-art .rt-art__body pre code { padding: 0; border: 0; background: none; font-size: inherit; }
div#contentWrapper .rt-art .rt-art__body table {
  display: block; width: max-content; max-width: 100%; margin: 1.6em 0; overflow-x: auto; border-collapse: collapse; border-spacing: 0; font-size: 0.94em; line-height: 1.5;
  background: none; border-radius: 0; box-shadow: none;
}
div#contentWrapper .rt-art .rt-art__body th, div#contentWrapper .rt-art .rt-art__body td { padding: 10px 14px; border: 1px solid var(--ar-line); text-align: left; vertical-align: top; color: var(--ar-ink); }
div#contentWrapper .rt-art .rt-art__body th { background: var(--ar-soft); font-weight: 700; }
div#contentWrapper .rt-art .rt-art__body > :last-child { margin-bottom: 0; }

/* tags + back link under the text */
div#contentWrapper .rt-art__foot { margin-top: clamp(32px, 4vw, 48px); padding-top: 24px; border-top: 1px solid var(--ar-line); }
div#contentWrapper .rt-art__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
div#contentWrapper .rt-art__tags li {
  margin: 0; padding: 4px 12px; border-radius: 999px; background: var(--ar-blue-50); color: var(--ar-ink-2); font-size: 14px; font-weight: 600; line-height: 1.4;
}

/* ---------- recent articles ---------- */
.rt-more { padding-top: clamp(24px, 3vw, 40px); padding-bottom: clamp(56px, 7vw, 96px); }
div#contentWrapper .rt-more h2 { margin: 0 0 24px; padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--ar-line); color: var(--ar-ink); font-size: clamp(24px, 2.6vw, 30px); font-weight: 800; letter-spacing: -0.02em; text-align: left; }
div#contentWrapper .rt-more__all { margin: 28px 0 0; }

@media (max-width: 479px) {
  div#contentWrapper .ar-card--lead .ar-card__more { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  div#contentWrapper .ar-card, .ar-card__arrow, div#contentWrapper nav.rt-pager a, div#contentWrapper a.rt-arts__btn, div#pageHeaderWrapper .rt-art__lang { transition: none; }
  div#contentWrapper .ar-card:hover .ar-card__arrow { transform: none; }
}
