/* =====================================================================
   NEXUS — KNOWLEDGE SECTION REDESIGN (page layer)
   Requires: homepage-redesign.css, homepage-refresh.css, nexus-inner.css
   "Investor library" palette. Namespaced .nxk-*.
   ===================================================================== */

.nxk-page {
  --nxk-paper: #f3f7fa;
  --nxk-aif: #1d4f72;
  --nxk-sme: #2b6c93;
  --nxk-journal: #2b6c93;
}
.nxk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nxk-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-size: 15px; font-weight: 700;
  color: var(--nxa-blue);
  transition: gap .35s var(--nxa-ease), color .3s;
}
.nxk-link:hover { gap: 16px; color: var(--nxa-ink); }
.nxk-tag { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--nxa-blue); }
.is-filtered-out { display: none !important; }

/* ---------------------------------------------------------------------
   1. HERO — search
   --------------------------------------------------------------------- */
.nxk-hero {
  position: relative;
  padding: clamp(120px, 11vw, 170px) 0 clamp(80px, 8vw, 120px);
  background:
    radial-gradient(50% 60% at 15% 20%, rgba(88,199,246,.14), transparent 70%),
    radial-gradient(50% 60% at 85% 80%, rgba(54,130,174,.12), transparent 70%),
    var(--nxk-paper);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.nxk-hero-inner { position: relative; max-width: 920px; }
.nxk-crumbs { display: inline-flex; gap: 10px; margin: 0 0 30px; padding: 0; list-style: none; font-size: 13px; font-weight: 600; color: #7d8ea0; }
.nxk-crumbs li + li::before { content: "/"; margin-right: 10px; color: #b5c4d1; }
.nxk-crumbs a { color: var(--nxa-blue); }
.nxk-hero .nx-eyebrow { display: block; }
.nxk-hero-title { margin: 6px 0 24px; font-size: clamp(2.6rem, 5.4vw, 5rem); font-weight: 800; line-height: 1.04; letter-spacing: -.04em; color: var(--nxa-ink); }
.nxk-hero-title em { font-family: var(--nx-font-serif); font-style: italic; font-weight: 600; letter-spacing: -.01em; color: var(--nxa-blue); }
.nxk-hero-lead { max-width: 680px; margin: 0 auto 40px !important; font-size: clamp(1rem, 1.2vw, 1.12rem) !important; line-height: 1.8 !important; color: var(--nxa-body) !important; text-align: center !important; }

.nxk-search {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 10px 8px 24px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d8e5ee;
  box-shadow: 0 24px 60px rgba(10,19,34,.1);
  transition: box-shadow .4s, border-color .4s;
}
.nxk-search:focus-within { border-color: var(--nxa-blue); box-shadow: 0 24px 60px rgba(54,130,174,.2), 0 0 0 5px rgba(54,130,174,.12); }
.nxk-search > i { color: var(--nxa-blue); font-size: 18px; }
.nxk-search input {
  flex: 1; min-width: 0;
  height: 52px;
  border: 0; outline: 0; background: transparent;
  font-family: var(--nx-font-sans);
  font-size: 16px; font-weight: 600;
  color: var(--nxa-ink);
}
.nxk-search input::placeholder { color: #93a3b3; font-weight: 500; }
.nxk-search kbd { display: grid; place-items: center; width: 34px; height: 34px; margin-right: 6px; border-radius: 10px; background: #f0f5f9; border: 1px solid #dce7ef; font-family: inherit; font-size: 14px; font-weight: 800; color: #7d8ea0; }
.nxk-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.nxk-chips button {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid #d3e1eb;
  background: rgba(255,255,255,.7);
  font-size: 13.5px; font-weight: 700;
  color: #4d6074;
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s, transform .3s var(--nxa-ease);
}
.nxk-chips button:hover { transform: translateY(-2px); border-color: var(--nxa-blue); }
.nxk-chips button.is-on { background: var(--nxa-ink); border-color: var(--nxa-ink); color: #fff; }
.nxk-chips button:focus-visible { outline: 3px solid #62b6e4; outline-offset: 2px; }
.nxk-results { min-height: 22px; margin: 18px 0 0 !important; font-size: 13.5px !important; font-weight: 600; color: var(--nxa-blue) !important; text-align: center !important; }

/* floating index cards */
.nxk-cards-float { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.nxk-fcard {
  position: absolute;
  padding: 14px 20px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e0eaf1;
  box-shadow: 0 16px 40px rgba(10,19,34,.08);
  font-family: var(--nx-font-serif);
  font-style: italic;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--nxa-ink);
  opacity: 0;
  transition: opacity 1s ease, translate 1.4s var(--nxa-ease);
  animation: nxkBob 7s ease-in-out infinite;
}
.nxa-ready .nxk-fcard { opacity: .9; }
.nxk-fc1 { left: 6%; top: 24%; rotate: -8deg; transition-delay: .9s; }
.nxk-fc2 { left: 12%; top: 62%; rotate: 6deg; animation-delay: -2s; transition-delay: 1.05s; color: var(--nxa-blue); }
.nxk-fc3 { right: 7%; top: 20%; rotate: 7deg; animation-delay: -4s; transition-delay: 1.2s; }
.nxk-fc4 { right: 12%; top: 58%; rotate: -5deg; animation-delay: -1s; transition-delay: 1.35s; color: #3682ae; }
.nxk-fc5 { left: 20%; top: 86%; rotate: 3deg; animation-delay: -3s; transition-delay: 1.5s; }
.nxk-fc6 { right: 20%; top: 84%; rotate: -4deg; animation-delay: -5s; transition-delay: 1.65s; }
@keyframes nxkBob { 50% { transform: translateY(-12px); } }

/* ---------------------------------------------------------------------
   2. READING PATH
   --------------------------------------------------------------------- */
.nxk-path { background: #fff; }
.nxk-path-head { margin-bottom: clamp(40px, 5vw, 64px); }
.nxk-route-wrap { position: relative; }
.nxk-route-line { position: absolute; left: 0; right: 0; top: 18px; width: 100%; height: 40px; overflow: visible; pointer-events: none; }
.nxk-route-line path { fill: none; stroke: var(--nxa-blue); stroke-width: 2; stroke-dasharray: 1200; stroke-dashoffset: 1200; vector-effect: non-scaling-stroke; transition: stroke-dashoffset 1.8s var(--nxa-ease) .2s; }
.nxk-route-wrap.is-in .nxk-route-line path { stroke-dashoffset: 0; }
.nxk-route { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 40px); margin: 0; padding: 0; list-style: none; }
.nxk-stop { position: relative; }
.nxk-stop:not(:last-child)::before {
  content: "";
  position: absolute; top: 37px; left: 76px;
  width: calc(100% + clamp(18px, 3vw, 40px) - 76px);
  height: 2px;
  background: linear-gradient(90deg, var(--nxa-blue), #9cc3dc);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1s var(--nxa-ease);
  transition-delay: calc(.8s + var(--i) * .25s);
}
.nxk-route-wrap.is-in .nxk-stop::before { transform: scaleX(1); }
.nxk-stop { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .9s var(--nxa-ease); transition-delay: calc(.4s + var(--i) * .25s); }
.nxk-route-wrap.is-in .nxk-stop { opacity: 1; transform: none; }
.nxk-stop a {
  display: flex; flex-direction: column;
  height: 100%;
  color: var(--nxa-ink);
}
.nxk-stop-num {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 76px; height: 76px;
  margin: 0 0 26px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--nxa-blue);
  font-family: var(--nx-font-serif); font-style: italic; font-size: 2rem; font-weight: 600;
  color: var(--nxa-blue);
  transition: background .4s, color .4s, transform .5s var(--nxa-ease);
}
.nxk-stop a:hover .nxk-stop-num, .nxk-stop a:focus-visible .nxk-stop-num { background: var(--nxa-blue); color: #fff; transform: scale(1.08); }
.nxk-stop-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #3682ae; }
.nxk-stop strong { display: block; margin: 8px 0 10px; font-size: clamp(1.3rem, 1.8vw, 1.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.nxk-stop-desc { font-size: 15px; line-height: 1.7; color: #5b6b7d; }
.nxk-stop-go { display: inline-flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 20px; font-size: 14.5px; font-weight: 800; color: var(--nxa-blue); transition: gap .35s var(--nxa-ease); }
.nxk-stop a:hover .nxk-stop-go { gap: 16px; }

/* ---------------------------------------------------------------------
   3. SHELF — book spines
   --------------------------------------------------------------------- */
.nxk-shelf { background: radial-gradient(80% 100% at 50% 0%, #13294a 0%, #0b1a2e 50%, #060c16 100%); color: #fff; overflow: hidden; }
.nxk-shelf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-bottom: clamp(40px, 5vw, 64px); }
.nxk-shelf-key { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; font-weight: 600; color: #b9c8d6; }
.nxk-shelf-key li { display: inline-flex; align-items: center; gap: 8px; }
.nxk-shelf-key i { width: 12px; height: 22px; border-radius: 3px; }
.nxk-key-aif { background: #2f7fae; } .nxk-key-sme { background: #3682ae; } .nxk-key-journal { background: #2b6c93; }

.nxk-books { display: flex; align-items: flex-end; gap: 10px; height: 430px; }
.nxk-book {
  position: relative;
  flex: 0 0 74px;
  height: 100%;
  border-radius: 8px 8px 4px 4px;
  overflow: hidden;
  color: #fff;
  transform: translateY(40px);
  opacity: 0;
  transition: flex-basis .8s var(--nxa-ease), transform .9s var(--nxa-ease), opacity .6s ease, box-shadow .5s;
  transition-delay: 0s, calc(var(--i) * .07s), calc(var(--i) * .07s), 0s;
}
.nxk-books.is-in .nxk-book { transform: none; opacity: 1; }
.nxk-book:nth-child(3n+1) { height: 100%; }
.nxk-book:nth-child(3n+2) { height: 92%; }
.nxk-book:nth-child(3n) { height: 96%; }
.nxk-c-aif { background: linear-gradient(90deg, #163f5d, #2f7fae 45%, #1d4f72); }
.nxk-c-sme { background: linear-gradient(90deg, #205373, #3682ae 45%, #2b6c93); }
.nxk-c-journal { background: linear-gradient(90deg, #163f5d, #2f7fae 45%, #1d4f72); }
.nxk-book::before, .nxk-book::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: rgba(255,255,255,.25); }
.nxk-book::before { top: 24px; } .nxk-book::after { bottom: 24px; }
.nxk-spine {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 40px 0;
  transition: opacity .3s ease;
}
.nxk-spine b { font-family: var(--nx-font-serif); font-style: italic; font-size: 1.15rem; font-weight: 600; color: rgba(255,255,255,.75); }
.nxk-spine span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 15px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.nxk-cover {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 34px 30px 42px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .35s ease, transform .5s var(--nxa-ease);
  pointer-events: none;
  background: radial-gradient(80% 50% at 80% 10%, rgba(255,255,255,.18), transparent 70%);
}
.nxk-cover-kicker { margin-bottom: auto; font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.nxk-cover strong { display: block; margin-bottom: 12px; font-size: clamp(1.45rem, 2vw, 1.85rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.nxk-cover > span:not(.nxk-cover-kicker) { font-size: 14.5px; line-height: 1.65; color: rgba(255,255,255,.82); }
.nxk-cover em { font-family: var(--nx-font-sans); display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; font-style: normal; font-size: 14px; font-weight: 800; }
.nxk-book.is-open { flex-basis: 380px; box-shadow: 0 30px 70px rgba(0,0,0,.45); }
.nxk-book.is-open .nxk-spine { opacity: 0; }
.nxk-book.is-open .nxk-cover { opacity: 1; transform: none; transition-delay: .25s; pointer-events: auto; }
.nxk-book:focus-visible { outline: 3px solid #62b6e4; outline-offset: 3px; }
.nxk-shelf-board { height: 18px; margin-top: 0; border-radius: 0 0 8px 8px; background: linear-gradient(180deg, #2a3d55, #18263a); box-shadow: 0 20px 40px rgba(0,0,0,.4); }
.nxk-empty { margin: 30px 0 0 !important; font-size: 15px !important; color: #b9c8d6 !important; text-align: center !important; }
.nxk-empty a { color: var(--nxa-sky); }

/* ---------------------------------------------------------------------
   4. GLOSSARY
   --------------------------------------------------------------------- */
.nxk-gloss { background: var(--nxk-paper); }
.nxk-gloss-grid { display: grid; grid-template-columns: minmax(260px, .55fr) minmax(0, 1.45fr); gap: clamp(30px, 6vw, 90px); }
.nxk-gloss-sticky { position: sticky; top: 130px; }
.nxk-gloss-sticky > p { margin: 18px 0 26px; font-size: 15.5px !important; line-height: 1.75 !important; color: var(--nxa-body) !important; }
.nxk-az { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.nxk-az a, .nxk-az span {
  display: grid; place-items: center;
  aspect-ratio: 1;
  border-radius: 10px;
  font-family: var(--nx-font-serif); font-style: italic; font-size: 1.2rem; font-weight: 600;
}
.nxk-az a { background: #fff; border: 1px solid #dbe6ef; color: var(--nxa-ink); transition: background .3s, color .3s, transform .3s var(--nxa-ease); }
.nxk-az a:hover, .nxk-az a.is-on { background: var(--nxa-ink); color: #fff; transform: translateY(-2px); }
.nxk-az span { color: #c3cfd9; }

.nxk-terms { margin: 0; columns: 2; column-gap: 20px; }
.nxk-term {
  break-inside: avoid;
  margin: 0 0 20px;
  padding: 24px 26px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e0eaf1;
  scroll-margin-top: 150px;
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s ease, transform .8s var(--nxa-ease), box-shadow .4s, border-color .4s;
}
.nxk-term.is-in { opacity: 1; transform: none; }
.nxk-term:hover { border-color: #b9d3e5; box-shadow: 0 18px 40px rgba(10,19,34,.07); }
.nxk-term.is-flash { border-color: var(--nxa-blue); box-shadow: 0 0 0 5px rgba(54,130,174,.15); }
.nxk-term dt { position: relative; margin-bottom: 8px; padding-left: 40px; font-size: 17px; font-weight: 800; color: var(--nxa-ink); }
.nxk-term dt::before {
  content: attr(data-l);
  position: absolute; left: 0; top: -4px;
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: #e8f2f8;
  font-family: var(--nx-font-serif); font-style: italic; font-size: 1.05rem; font-weight: 600;
  color: var(--nxa-blue);
}
.nxk-term dd { margin: 0; font-size: 14.5px; line-height: 1.7; color: #5b6b7d; }
.nxk-term mark { padding: 0 2px; border-radius: 3px; background: rgba(54,130,174,.4); color: inherit; }

/* ---------------------------------------------------------------------
   5. MAGAZINE
   --------------------------------------------------------------------- */
.nxk-mag { background: #fff; }
.nxk-mag-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: clamp(36px, 4vw, 56px); }
.nxk-mag-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(20px, 3vw, 40px); }
.nxk-feature { position: relative; display: block; min-height: 480px; border-radius: 28px; overflow: hidden; color: #fff; isolation: isolate; }
.nxk-feature-img { position: absolute; inset: 0; z-index: -1; }
.nxk-feature-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.4s var(--nxa-ease); }
.nxk-feature:hover .nxk-feature-img img { transform: scale(1.14); }
.nxk-feature::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6,12,22,.05) 10%, rgba(6,12,22,.88) 62%, rgba(6,12,22,.96)); }
.nxk-feature-body { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; padding: clamp(26px, 3vw, 44px); }
.nxk-feature .nxk-tag { color: var(--nxa-sky); }
.nxk-feature strong { display: block; max-width: 600px; margin-bottom: 14px; font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.nxk-feature-body > span:not(.nxk-tag) { max-width: 560px; font-size: 15.5px; line-height: 1.7; color: #c9d6e2; }
.nxk-feature em { font-family: var(--nx-font-sans); display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; font-style: normal; font-size: 14.5px; font-weight: 800; transition: gap .35s var(--nxa-ease); }
.nxk-feature:hover em { gap: 16px; }

.nxk-mag-list { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.nxk-mag-list li:not(.nxk-mag-ask) a { display: grid; grid-template-columns: 40px minmax(0, 1fr) 110px; align-items: center; gap: 18px; padding: 20px; border-radius: 20px; border: 1px solid #e0eaf1; color: var(--nxa-ink); transition: border-color .4s, box-shadow .4s, transform .5s var(--nxa-ease); }
.nxk-mag-list li:not(.nxk-mag-ask) a:hover { border-color: #b9d3e5; box-shadow: 0 18px 40px rgba(10,19,34,.08); transform: translateX(6px); }
.nxk-mag-num { font-family: var(--nx-font-serif); font-style: italic; font-size: 1.5rem; font-weight: 600; color: var(--nxa-blue); }
.nxk-mag-list strong { display: block; font-size: 16px; font-weight: 800; line-height: 1.35; }
.nxk-mag-list img { width: 110px; height: 84px; border-radius: 12px; object-fit: cover; }
.nxk-mag-ask { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 26px; border-radius: 20px; background: linear-gradient(150deg, #f2f8fc, #ffffff); border: 1px dashed #c9d9e5; }
.nxk-mag-ask strong { font-size: 18px; font-weight: 800; color: var(--nxa-ink); }
.nxk-mag-ask span { margin: 6px 0 18px; font-size: 14.5px; line-height: 1.6; color: #5b6b7d; }
.nxk-mag-ask .nxk-link { align-self: flex-start; }
.nxk-note { max-width: 860px; margin: 50px auto 0 !important; font-size: 12px !important; line-height: 1.7 !important; color: #8a99a9 !important; text-align: center !important; }

/* ---------------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .nxk-book { flex-basis: 56px; }
  .nxk-book.is-open { flex-basis: 320px; }
  .nxk-fcard { display: none; }
}

@media (max-width: 991px) {
  .nxk-route { grid-template-columns: 1fr; gap: 30px; }
  .nxk-stop::before { display: none; }
  .nxk-stop a { display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 20px; }
  .nxk-stop-num { grid-row: 1 / 6; margin: 0; }
  .nxk-gloss-grid, .nxk-mag-grid { grid-template-columns: 1fr; }
  .nxk-gloss-sticky { position: static; }
  .nxk-az { grid-template-columns: repeat(13, 1fr); }
  .nxk-books { flex-direction: column; height: auto; gap: 10px; }
  .nxk-book, .nxk-book:nth-child(n) { flex: none; width: 100%; height: auto; min-height: 0; border-radius: 16px; }
  .nxk-book::before, .nxk-book::after { display: none; }
  .nxk-spine { display: none; }
  .nxk-cover { position: relative; opacity: 1; transform: none; padding: 24px; pointer-events: auto; }
  .nxk-cover-kicker { margin-bottom: 12px; }
  .nxk-book.is-open { box-shadow: none; }
  .nxk-shelf-board { display: none; }
}

@media (max-width: 767px) {
  .nxk-terms { columns: 1; }
  .nxk-az { grid-template-columns: repeat(7, 1fr); }
  .nxk-search { padding-left: 18px; }
  .nxk-search kbd { display: none; }
  .nxk-mag-list li:not(.nxk-mag-ask) a { grid-template-columns: 30px minmax(0, 1fr); }
  .nxk-mag-list img { display: none; }
  .nxk-feature { min-height: 400px; }
  .nxk-mag-head { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .nxk-stop, .nxk-book, .nxk-term { opacity: 1 !important; transform: none !important; }
  .nxk-route-line path { stroke-dashoffset: 0 !important; }
  .nxk-fcard { animation: none !important; }
}

/* "Ask the team…" line on one line on desktop */
@media (min-width: 1200px) {
  .nxk-mag-ask { padding-left: 18px; padding-right: 18px; }
  .nxk-mag-ask span { white-space: nowrap; }
}
