/* Use the native reference trail above each article hero. Keep both destinations visible on narrow screens. */
.context-trail.nbf-article-entry { position: relative; inset: auto; width: 100%; }
.context-trail.nbf-article-entry > .shell { display: flex; align-items: center; justify-content: space-between; }
.context-trail.nbf-article-entry .context-back { flex: none; }
@media (max-width: 800px) {
  nav.context-trail a.context-back:is(
    [href="/de/analysen"], [href="/insights"], [href="/fr/analyses"],
    [href="/it/analisi"], [href="/es/analisis"], [href="/ru/analitika"]
  ) { display: inline-flex; flex: none; }
}
@media (max-width: 760px) {
  .context-trail:has(.context-crumbs):has(.context-back) .context-crumbs { display: flex; min-width: 0; align-items: baseline; }
  .context-trail:has(.context-back) .context-crumbs > span { display: inline-flex; gap: .4em; }
  .context-trail:has(.context-back) .context-crumbs > span > a { display: inline; }
  .context-trail:has(.context-back) .context-crumbs > span:last-child { min-width: 0; }
  .context-trail:has(.context-back) .context-crumbs strong { white-space: normal; overflow-wrap: anywhere; }
}
@media screen and (min-height:421px) {
  body button[data-nbf-push-bell][aria-haspopup="dialog"] {
    box-sizing: border-box; position: fixed; inset-inline-start: max(12px,env(safe-area-inset-left)); inset-inline-end: auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; min-width: 48px; max-width: 48px; height: 48px; min-height: 48px; padding: 0; gap: 0;
    border: 1px solid #ad8b67; border-radius: 50%; background: #26263a; color: white;
  }
  body button[data-nbf-push-bell][aria-haspopup="dialog"] span { display: none; }
  body button[data-nbf-push-bell][aria-haspopup="dialog"] svg { flex: none; width: 22px; height: 22px; }
  body button[data-nbf-push-bell][aria-haspopup="dialog"] i { position: absolute; top: 6px; right: 6px; }
}

/* Chapter selection is scoped to the actual reading menu, including its mobile copy. */
main nav a[data-nbf-toc-current="true"] {
  background: #e1ebf1 !important; color: #18334a !important;
  box-shadow: inset 3px 0 #52758a !important; border-inline-start-color: transparent !important;
}
main nav a[data-nbf-toc-current="false"]:not(:focus-visible) {
  background: transparent !important; box-shadow: none !important;
  border-inline-start-color: transparent !important;
}
main nav a[data-nbf-toc-current]:focus-visible { outline: 2px solid #385d76; outline-offset: -2px; }

/* The left reading menu follows the German Malta retirement article. */
@media screen {
  main [data-nbf-chapter-target] { scroll-margin-top: var(--nbf-chapter-target-margin, 0px) !important; }
  main nav[data-nbf-chapter-menu] {
    display: flex !important; flex-direction: column; flex-wrap: nowrap; gap: 0 !important;
    min-height: 0; padding: 0 !important; margin: 0; border: 0;
  }
  main nav[data-nbf-chapter-menu] > a[href^="#"],
  main nav[data-nbf-chapter-menu] > ol > li > a[href^="#"] {
    box-sizing: border-box; display: grid !important; grid-template-columns: 25px minmax(0,1fr) !important;
    align-items: baseline; gap: 7px !important; flex: none; width: 100%; min-width: 0; min-height: 0 !important;
    margin: 0 !important; padding: 9px 0 !important; border: 0 !important; border-top: 1px solid #d9d6d1 !important;
    color: #4b4c60; font-family: var(--nbf-font-text,inherit);
    font-size: 13px !important; font-weight: 400 !important; line-height: 1.35 !important;
    letter-spacing: normal !important; text-transform: none !important; text-decoration: none; overflow-wrap: anywhere;
  }
  main nav[data-nbf-chapter-menu] > a[href^="#"] > :is(i,span):first-child,
  main nav[data-nbf-chapter-menu] > ol > li > a[href^="#"] > :is(i,span):first-child {
    padding: 0 !important; font: inherit !important; font-variant-numeric: tabular-nums !important; color: #806246;
  }
  main nav[data-nbf-chapter-menu] > a[data-nbf-toc-current="true"],
  main nav[data-nbf-chapter-menu] > ol > li > a[data-nbf-toc-current="true"] {
    color: #18334a !important; border-top-color: #597c9d !important; font-weight: 700 !important;
  }
  main [data-nbf-chapter-rail] > [data-reading-progress] {
    box-sizing: border-box; display: grid !important; padding: 10px 9px !important; flex: none !important;
    grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 5px 10px !important;
    color: #23445e; background: #e7eef4; border: 1px solid #c6d5df; font-size: 11px !important;
  }
  main [data-nbf-chapter-rail] > [data-reading-progress] strong { font-size: 14px !important; font-variant-numeric: tabular-nums; }
}
@media screen and (min-width: 1100px) {
  [data-nbf-chapter-clip] { overflow-x: clip !important; overflow-y: visible !important; }
  main [data-nbf-chapter-grid][data-nbf-chapter-columns] { display: grid !important; grid-template-columns: var(--nbf-chapter-columns) !important; }
  main aside[data-nbf-chapter-rail] {
    box-sizing: border-box; position: sticky !important; align-self: start !important; inset-block-start: calc(var(--nbf-chapter-header-bottom,84px) + 18px) !important;
    display: flex !important; flex-direction: column; min-height: 0 !important; width: 190px !important; max-width: 100% !important;
    max-height: calc(100dvh - var(--nbf-chapter-header-bottom,84px) - 36px) !important; height: auto !important;
    margin-block: 0 !important; padding: 14px 0 0 !important; border: 0 !important; border-block-start: 2px solid #292a3f !important;
  }
  main aside[data-nbf-chapter-rail] > span:first-child { flex: none; margin: 0 0 8px !important; }
  main aside[data-nbf-chapter-rail] > nav[data-nbf-chapter-menu] { flex: 0 1 auto; overflow-y: auto !important; scrollbar-width: thin; }
  main aside[data-nbf-chapter-rail] > [data-reading-progress] { margin: 14px 0 0 !important; }
  main details[data-nbf-chapter-disclosure] { display: none !important; }
}
@media screen and (max-width: 1099px) {
  main [data-nbf-chapter-grid] { display: grid !important; grid-template-columns: minmax(0,1fr) !important; }
  /* The mobile article grid centers its reading column with auto margins. */
  main .malta-reader-grid > .reading { box-sizing: border-box; width: 100%; }
  main aside[data-nbf-chapter-rail] {
    display: block !important; position: static !important; width: 100% !important; max-width: none !important;
    max-height: none !important; padding: 0 !important; margin: 0 !important; border: 0 !important;
  }
  main aside[data-nbf-chapter-rail] > span:first-child,
  main aside[data-nbf-chapter-rail] > nav[data-nbf-chapter-menu="desktop"] { display: none !important; }
  main details[data-nbf-chapter-disclosure] {
    display: block !important; margin: 0 0 12px !important; padding: 0 13px !important; border: 1px solid #d9d6d1 !important;
  }
  main details[data-nbf-chapter-disclosure] > summary {
    padding: 11px 2px !important; font-size: 13px !important; line-height: 1.35 !important; font-weight: 600 !important; cursor: pointer;
  }
  main details[data-nbf-chapter-disclosure]:not([open]) > nav[data-nbf-chapter-menu] { display: none !important; }
  main aside[data-nbf-chapter-rail] > [data-reading-progress] { margin: 0 0 12px !important; }
}

/* Closed controls must have no collision box for the floating notification button. */
details[data-share-formats]:not([open]) > div,
aside[aria-hidden="true"][data-visible="false"]:is([data-scroll-cue-milestones], [data-nbf-floating-briefing]) {
  display: none;
}

/* A milestone belongs to the page, independent of its chapter navigation. */
#main > aside.nbf-briefing-strip {
  position: fixed;
  inset: auto auto max(14px, env(safe-area-inset-bottom)) 50%;
  transform: translateX(-50%);
  width: min(680px, calc(100% - 30px));
  max-width: none;
  box-sizing: border-box;
  margin: 0;
  z-index: 9;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 0;
  padding: 0;
  border: 1px solid #b6946e;
  background: #242538;
  color: white;
  box-shadow: 0 5px 22px #1e1d2e45;
}
#main > aside.nbf-briefing-strip[aria-hidden="true"] { display: none; }
#main > aside.nbf-briefing-strip a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 9px 13px;
  color: white;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-decoration: none;
}
#main > aside.nbf-briefing-strip a span {
  color: #d4b187;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
#main > aside.nbf-briefing-strip a strong { color: white; font-size: 14px; }
#main > aside.nbf-briefing-strip button {
  display: grid;
  place-items: center;
  position: static;
  min-height: 44px;
  width: 100%;
  height: 100%;
  padding: 0;
  color: white;
  background: transparent;
  border: 0;
  border-left: 1px solid #777483;
  cursor: pointer;
}
#main > aside.nbf-briefing-strip :focus-visible { outline: 2px solid #d4b187; outline-offset: -3px; }
@media(max-width: 600px){
  #main > aside.nbf-briefing-strip a { padding: 6px 9px; gap: 2px 7px; }
  #main > aside.nbf-briefing-strip a strong { font-size: 12px; }
}
@media print { #main > aside.nbf-briefing-strip { display: none; } }

/* Leave room for the notification bell in the gutter beside the Malta facts. */
@media screen and (min-width: 761px) {
  #nbf-malta-property-page .fact-bar > .shell[data-nbf-floating-obstruction] {
    max-width: calc(100% - 2 * max(68px, calc(env(safe-area-inset-left) + 56px)));
  }
}

/* Turkish dotted I and the superscript n occur in Russian-language articles. */
@font-face {
  font-family: "NBF Inter RU";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/neue-haas-grotesk/text-pro-55-roman.woff2") format("woff2");
  unicode-range: U+0130, U+207F;
}
@font-face {
  font-family: "NBF Inter RU";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("/fonts/neue-haas-grotesk/text-pro-65-medium.woff2") format("woff2");
  unicode-range: U+0130, U+207F;
}
@font-face {
  font-family: "NBF Inter RU";
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url("/fonts/neue-haas-grotesk/text-pro-75-bold.woff2") format("woff2");
  unicode-range: U+0130, U+207F;
}

/* Match the inner gutter of the Malta retirement tools and author panel. In
   Signature articles these panels are direct children of the outer shell. */
@media screen {
  #main .shell:has(> article[data-article-reading-window]) + .shell[data-article-endmatter]:has(> [data-nbf-end-tools]):has(> [data-article-author-follow]) {
    padding-inline: calc(var(--nbf-finish-gap) / 2);
  }
}

/* Each closing panel fits the inner shell of the Malta retirement reference.
   Capping the panels themselves also covers editions with no outer shell. */
@media screen {
  #main { --nbf-panel-gutter: 96px; }
  #main :is(
    [data-nbf-end-tools],
    [data-article-author-follow],
    .article-connection.finish-shell,
    .connected.editorial-measure,
    .finish-controls > .follow,
    [data-article-endmatter] > section:has(a[href*="instagram.com/alexander_erber"])
  ):not(:where([data-retirement] *)) {
    box-sizing: border-box;
    max-inline-size: min(100%, calc(min(1240px, 100vw - var(--nbf-panel-gutter)) - var(--nbf-panel-gutter))) !important;
    margin-inline: auto !important;
  }
}
@media screen and (max-width: 1099px) { #main { --nbf-panel-gutter: 66px; } }
@media screen and (max-width: 850px) { #main { --nbf-panel-gutter: 48px; } }
@media screen and (max-width: 600px) { #main { --nbf-panel-gutter: 36px; } }
@media screen and (max-width: 350px) { #main { --nbf-panel-gutter: 28px; } }

/* Malta's legacy citizenship layout centers its grid children with auto
   margins. Give the follow panel its available width before applying the
   shared max-width, so its size does not depend on translated link labels. */
@media screen {
  #nbf-malta-page.nbf-malta-citizenship #main .finish-controls > .follow {
    inline-size: 100%;
    min-inline-size: 0;
  }

  #nbf-malta-page.nbf-malta-citizenship #main .hero-copy > .hero-share {
    inline-size: 100%;
    margin: 1.25rem 0 0;
    padding-inline: 0;
  }

  #nbf-malta-page #main .share-rail > .share-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  #nbf-malta-page #main .share-actions > [data-share-channels] {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  #nbf-malta-page #main .share-actions > [data-share-channels] > a {
    min-inline-size: 0;
    inline-size: 100%;
    padding-inline: 4px;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }
}
