/* ============================================================
   The Wealth Mosaic, knowledge listing page
   ============================================================ */

/* Breadcrumb (shared with article) */
.crumb {
  background: #f7f8fa;
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
  font-size: 12.5px;
}
.crumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
}
.crumb li + li::before {
  content: "›";
  margin-right: 8px;
  color: #aab1ba;
}
.crumb a { color: var(--ink-soft); }
.crumb a:hover { color: var(--magenta); }
.crumb [aria-current="page"] { color: var(--ink); font-weight: 500; }

/* ===== Knowledge hero, tighter, Inter-driven to match the homepage tone ===== */
.kh-hero {
  background: linear-gradient(180deg, #fff 0%, #f7f8fa 100%);
  padding: 34px 0 26px;
  border-bottom: 1px solid var(--rule-soft);
}
.kh-hero__inner {
  max-width: var(--max);
}
.kh-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: 22px;
}
.kh-hero__eyebrow::before {
  content: "";
  width: 14px; height: 20px;
  background: url("../assets/logos/chevron-mark.svg") center/contain no-repeat;
  flex-shrink: 0;
}
.kh-hero__title {
  font-family: var(--font);
  font-size: clamp(32px, 3.2vw, 42px);
  line-height: 1.08;
  letter-spacing: -.022em;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 10px;
  text-wrap: balance;
}
.kh-hero__lede {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 18px;
  max-width: 62ch;
}
.kh-hero__search {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 5px 5px 22px;
  max-width: 520px;
  box-shadow: 0 8px 24px -14px rgba(16,21,36,.12);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.kh-hero__search:focus-within {
  border-color: var(--magenta);
  box-shadow: 0 8px 24px -10px rgba(230,23,90,.22);
}
.kh-hero__search input {
  flex: 1;
  border: 0;
  outline: none;
  font-family: inherit;
  font-size: 14.5px;
  padding: 11px 0;
  background: transparent;
  color: var(--ink);
  min-width: 0;
}
.kh-hero__search input::placeholder { color: #9ea3ad; }
.kh-hero__search button {
  width: 40px; height: 40px;
  background: var(--magenta);
  border: 0;
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s ease;
}
.kh-hero__search button:hover { background: var(--magenta-2); }

/* ===== Filter rail =====
   Wrapped pill-tab group on the left, branded selects on the right.
   Background-tinted strip so it reads as a deliberate filter zone, not
   floating buttons. */
.kh-filters {
  background: #fff;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 20;
}
.kh-filters__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.kh-filters__tabs {
  display: inline-flex;
  gap: 2px;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: 100px;
}
.kh-tab {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  border-radius: 100px;
  cursor: pointer;
  letter-spacing: -.005em;
  transition: background .15s ease, color .15s ease;
}
.kh-tab:hover { color: var(--ink); }
.kh-tab--active {
  background: var(--ink);
  color: #fff;
}
.kh-tab--active:hover {
  background: var(--ink);
  color: #fff;
}
.kh-filters__selects {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
/* Use the homepage's canonical `.filter` select style so this matches
   the Latest Content / Trending news filters across the rest of the site. */
.kh-filters__selects .filter {
  font-size: 13px;
  font-weight: 500;
}

/* ===== Featured article =====
   Big two-column hero card. Visual fills the left column; copy is centered
   vertically in the right column with a meta strip pinned to the bottom. */
.kh-featured {
  background: #fff;
  padding: 32px 0 32px;
}
.kh-feat {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: stretch;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--rule);
  color: inherit;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.kh-feat:hover {
  border-color: #c5cad3;
  box-shadow: 0 28px 60px -28px rgba(16,21,36,.28);
  transform: translateY(-2px);
}
.kh-feat__visual {
  background: var(--navy) url("https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=1100&q=80") center/cover no-repeat;
  min-height: 420px;
  position: relative;
  overflow: hidden;
}
.kh-feat__visual svg {
  width: 100%; height: 100%;
  display: none;
}
.kh-feat__copy {
  padding: 40px 42px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}
.kh-feat__tag {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--magenta);
}
.kh-feat__copy h2 {
  font-family: var(--font);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.018em;
  color: var(--ink);
  margin: 0 0 12px;
}
.kh-feat__copy p {
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}
.kh-feat__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--rule-soft);
}
.kh-feat__meta .byline {
  font-size: 13px;
  color: var(--muted);
}
.kh-feat__meta .byline .author { font-weight: 600; }
.kh-feat__cta {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--magenta);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .15s ease;
}
.kh-feat:hover .kh-feat__cta { color: var(--magenta-2); gap: 10px; }

/* ===== Main grid + sidebar ===== */
.kh-main {
  background: #fff;
  padding: 30px 0 80px;
}
.kh-main__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
}
.kh-main__col { min-width: 0; }
.kh-main .section-head { margin-bottom: 22px; }

.kh-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 22px;
}
.kh-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: inherit;
  transition: transform .15s ease;
  /* Reserve room for the byline at the bottom of the card so authorless
     cards don't visually collapse */
  min-height: 100%;
}
.kh-card:hover { transform: translateY(-2px); }
.kh-card__thumb {
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f3f6 center/cover no-repeat;
  margin-bottom: 4px;
  position: relative;
  isolation: isolate;
}
.kh-card__thumb svg { width: 100%; height: 100%; display: none; }
.kh-card:nth-child(1) .kh-card__thumb { background-image: url("https://picsum.photos/seed/twm-knowledge-01/640/400"); }
.kh-card:nth-child(2) .kh-card__thumb { background-image: url("https://picsum.photos/seed/twm-knowledge-02/640/400"); }
.kh-card:nth-child(3) .kh-card__thumb { background-image: url("https://picsum.photos/seed/twm-knowledge-03/640/400"); }
.kh-card:nth-child(4) .kh-card__thumb { background-image: url("https://picsum.photos/seed/twm-knowledge-04/640/400"); }
.kh-card:nth-child(5) .kh-card__thumb { background-image: url("https://picsum.photos/seed/twm-knowledge-05/640/400"); }
.kh-card:nth-child(6) .kh-card__thumb { background-image: url("https://picsum.photos/seed/twm-knowledge-06/640/400"); }
.kh-card:nth-child(7) .kh-card__thumb { background-image: url("https://picsum.photos/seed/twm-knowledge-07/640/400"); }
.kh-card:nth-child(8) .kh-card__thumb { background-image: url("https://picsum.photos/seed/twm-knowledge-08/640/400"); }
.kh-card:nth-child(9) .kh-card__thumb { background-image: url("https://picsum.photos/seed/twm-knowledge-09/640/400"); }
.kh-card:nth-child(10) .kh-card__thumb { background-image: url("https://picsum.photos/seed/twm-knowledge-10/640/400"); }
.kh-card:nth-child(11) .kh-card__thumb { background-image: url("https://picsum.photos/seed/twm-knowledge-11/640/400"); }
/* Hide literal text labels inside thumb SVGs (e.g. "CH US UK SG") that
   read as placeholder cartoons rather than editorial graphics. */
.kh-card__thumb svg text { display: none; }
/* Soft bottom gradient on every thumb so it feels finished even when
   the underlying SVG is a single gradient block. */
.kh-card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(16,21,36,.08) 100%);
  pointer-events: none;
}
.kh-card__cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--magenta);
}
.kh-card h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.32;
  color: var(--ink);
  margin: 0;
  transition: color .12s ease;
  letter-spacing: -.005em;
}
.kh-card:hover h3 { color: var(--magenta); }
.kh-card p {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
  /* clamp body to 3 lines so cards stay roughly aligned */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kh-card .byline {
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
  padding-top: 6px;
  line-height: 1.5;
  /* IMPORTANT: keep this as inline text flow so "By <author> · date · read"
     stays on one line. An earlier attempt at `display: inline-flex` with
     `flex-wrap: wrap` turned every text node into its own flex item and
     scattered the meta across multiple rows. */
}
.kh-card .byline .author {
  color: #2c56e0;
  font-weight: 600;
}
.kh-card .byline .author:hover {
  color: var(--magenta);
}

/* Pagination, shared with homepage */
.kh-main .pager { margin-top: 36px; }

/* ===== Sidebar ===== */
.kh-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
.kh-side__block {
  background: #fff;
}
.kh-side__block .section-head { margin-bottom: 10px; }
.kh-side__block .section-head h2 { font-size: 18px; }
.kh-side .subscribe-card,
.kh-side .ad-slot {
  margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .kh-main__grid { grid-template-columns: 1fr; }
  .kh-feat { grid-template-columns: 1fr; }
  .kh-feat__visual { min-height: 200px; aspect-ratio: 16 / 9; }
  .kh-feat__copy { padding: 24px; }
}
@media (max-width: 720px) {
  .kh-hero { padding: 28px 0 22px; }
  .kh-grid { grid-template-columns: 1fr; }
  .kh-filters__inner { gap: 12px; }
  .kh-filters__tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .kh-filters__selects .filter { font-size: 12.5px; padding: 7px 30px 7px 11px; }
}
