/* Blog listing — page-specific styles. Does not duplicate globals.css. */

/* This page is light-themed; the whole page surface is #F6FAFE. */
body.blog-template {
  background: #f6fafe;
}

/* Solid dark header over the light page (matches brokers/broker-review). */
.tl-2026 {
  --tl-header-bg: #070d1a;
  --tl-header-bg-scrolled: #070d1a;
}

main.blog,
main.post-single {
  --blog-content: 1130px;
  --blog-hero-w: 738px;
  --blog-page-bg: #f6fafe;
  --blog-ink: #0a1424;
  --blog-strong: #0b1020;
  --blog-muted: #4a5568;
  --blog-muted-2: #767e8e;
  --blog-accent: #0078db;
  --blog-badge-bg: #e8f1fd;
  --blog-badge-text: #0078db;
  --blog-divider: #e2e9f4;

  max-width: none;
  padding-bottom: 100px;
  background: var(--blog-page-bg);
  font-family: var(--tl-font);
  font-weight: var(--tl-fw-medium);
  font-size: var(--tl-fs-body);
  line-height: 1.3;
  color: var(--blog-ink);
}
main.blog *,
main.blog *::before,
main.blog *::after {
  box-sizing: border-box;
}

/* Uniform 60px gap between rendered sections (mobile + desktop). Applies only
   between siblings that actually render, so an absent section leaves no gap. */
main.blog > section + section {
  margin-top: 60px;
}

/* --- Hero --- */
.blog-hero {
  position: relative;
  background: var(--blog-page-bg);
}
.blog-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  max-width: var(--blog-hero-w);
  margin-inline: auto;
  padding: calc(var(--tl-header-h) + 40px) 0 0;
  padding-inline: 0; /* mobile: 0 per design */
  text-align: center;
}
.blog-hero__badge {
  display: inline-flex;
  padding: 10px 22px;
  border: 1px solid var(--tl-border-strong);
  border-radius: var(--tl-radius-pill);
  background: var(--blog-badge-bg);
  color: var(--blog-badge-text);
  font-weight: var(--tl-fw-medium);
  font-size: 8px;
  letter-spacing: 1.84px;
  line-height: 1.3;
  text-transform: uppercase;
}
.blog-hero__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
}
.blog-hero__title {
  margin: 0;
  font-weight: var(--tl-fw-bold);
  font-size: 41px;
  line-height: 1;
  color: var(--blog-ink);
}
.blog-hero__title-accent {
  background: var(--tl-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.blog-hero__sub {
  margin: 0;
  max-width: 380px;
  font-weight: var(--tl-fw-medium);
  font-size: 16px;
  line-height: 1.3;
  color: var(--blog-ink);
}

/* --- Editor's pick (featured / sticky) --- */
.blog-featured__inner {
  display: flex;
  flex-direction: column;
  max-width: var(--blog-content);
  margin-inline: auto;
  padding-inline: 5px;
}
.blog-featured__media {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  height: 280px;
  padding: 20px;
  border-radius: 22px;
  background-color: #0a1424;
  background-image: linear-gradient(128.9deg, #0a1424 0%, #0e1b30 100%);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  text-decoration: none;
}
.blog-featured__pill {
  display: inline-flex;
  padding: 10px 22px;
  border: 1px solid var(--tl-border-strong);
  border-radius: var(--tl-radius-pill);
  background: var(--blog-badge-bg);
  color: var(--blog-badge-text);
  font-weight: var(--tl-fw-medium);
  font-size: 8px;
  letter-spacing: 1.84px;
  line-height: 1.3;
  text-transform: uppercase;
}
.blog-featured__ph {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='none' stroke='%2344557a' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
}
.blog-featured__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 10px 0;
}
.blog-featured__eyebrow {
  margin: 0;
  font-size: 8px;
  letter-spacing: 1.84px;
  line-height: 1.3;
  text-transform: uppercase;
}
.blog-featured__cat {
  font-weight: var(--tl-fw-bold);
  color: var(--blog-badge-text);
  text-decoration: none;
}
.blog-featured__read {
  color: #566580;
}
.blog-featured__title {
  margin: 0;
  font-weight: 800;
  font-size: 28px;
  line-height: 1.3;
  color: var(--blog-ink);
}
.blog-featured__title a {
  color: inherit;
  text-decoration: none;
}
.blog-featured__excerpt {
  margin: 0;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.3;
  color: var(--blog-ink);
}

/* Byline: avatar + name + bulleted date (shared) */
.blog-byline {
  display: flex;
  align-items: center;
}
/* Avatar + name link to the author profile; the date stays outside the link. */
.blog-byline__link {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.blog-byline__avatar--photo {
  background: none;
  object-fit: cover;
}
.blog-meta__author {
  color: inherit;
  text-decoration: none;
}
.blog-byline__avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #e8f1fd;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
}
.blog-byline__name {
  margin-left: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--blog-ink);
}
.blog-byline__date {
  position: relative;
  margin-left: 21px;
  font-weight: 400;
  font-size: 14px;
  color: #566580;
}
.blog-byline__date::before {
  content: "\2022";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
}
/* No author — date stands alone, drop the separator bullet and its inset. */
.blog-byline--noauthor .blog-byline__date {
  margin-left: 0;
}
.blog-byline--noauthor .blog-byline__date::before {
  content: none;
}

@media (hover: hover) {
  .blog-byline__link:hover .blog-byline__name,
  .blog-meta__author:hover {
    color: var(--blog-accent);
  }
}

/* --- Latest + Most read --- */
.blog-lp__inner {
  display: flex;
  flex-direction: column;
  gap: 60px;
  max-width: var(--blog-content);
  margin-inline: auto;
  padding-inline: 5px;
}
.blog-lp__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--blog-ink);
}
.blog-lp__head--popular {
  justify-content: flex-start;
  padding-bottom: 16px;
}
.blog-lp__title {
  margin: 0;
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
  color: var(--blog-ink);
}
.blog-lp__all {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.3;
  color: var(--blog-accent);
  text-decoration: none;
  white-space: nowrap;
}

/* Latest list — separate cards */
.blog-lp__rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 22px;
}
.blog-row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--blog-divider);
  border-radius: 22px;
  background: #fff;
  text-decoration: none;
}
.blog-row__thumb {
  flex: none;
  width: 90px;
  height: 90px;
  border-radius: 14px;
  background: #eef3fa center / cover no-repeat;
}
.blog-row__thumb.is-placeholder {
  background:
    #eef3fa
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23b9c6d9' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E")
    center / 28px no-repeat;
}
.blog-row__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.blog-row__cat {
  font-weight: 700;
  font-size: 8px;
  letter-spacing: 1.84px;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--blog-accent);
}
.blog-row__title {
  font-weight: 800;
  font-size: 16px;
  line-height: 1.3;
  color: var(--blog-ink);
}
.blog-row__meta {
  font-weight: 400;
  font-size: 8px;
  line-height: 1.3;
  color: #566580;
}

/* Most read — one card with internal dividers */
.blog-lp__ranks {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
  padding: 16px 16px 0;
  border: 1px solid var(--blog-divider);
  border-radius: 22px;
  background: #fff;
}
.blog-rank {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 16px;
  text-decoration: none;
}
.blog-rank:not(:last-child) {
  border-bottom: 1px solid var(--blog-divider);
}
.blog-rank__num {
  flex: none;
  font-weight: 800;
  font-size: 20px;
  line-height: 1.3;
  color: #566580;
}
.blog-rank__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.blog-rank__title {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.3;
  color: var(--blog-ink);
}
.blog-rank__meta {
  font-weight: 500;
  font-size: 8px;
  letter-spacing: 1.84px;
  line-height: 1.3;
  text-transform: uppercase;
  color: #566580;
}
.blog-rank__cat {
  font-weight: 700;
  color: var(--blog-accent);
}

/* --- Browse by topic --- */
.blog-topics__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: var(--blog-content);
  margin-inline: auto;
  padding-inline: 5px;
}
.blog-topics__head {
  width: 100%;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--blog-ink);
}
.blog-topics__title {
  margin: 0;
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
  color: var(--blog-ink);
}
.blog-topics__tabs {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin-top: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.blog-topics__tabs::-webkit-scrollbar {
  display: none;
}
.blog-tab {
  flex: none;
  padding: 12px 20px;
  border: 1px solid var(--blog-divider);
  border-radius: 40px;
  background: #fff;
  color: var(--blog-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.blog-tab.is-active {
  border-color: transparent;
  border-radius: 11px;
  background: var(--tl-grad-cta);
  color: #fff;
  box-shadow: 0 8px 22px -8px rgba(247, 140, 47, 0.6);
}
.blog-topics__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 16px 26px;
  border: 1px solid var(--blog-divider);
  border-radius: 22px;
  background: #fff;
}
.blog-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: #f8fafc center / cover no-repeat;
}
.blog-card__ph {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='none' stroke='%23b9c6d9' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
}
.blog-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
}
.blog-card__cat {
  font-weight: 700;
  font-size: 8px;
  letter-spacing: 1.84px;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--blog-accent);
  text-decoration: none;
}
.blog-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.3;
  color: var(--blog-ink);
}
.blog-card__title a {
  color: inherit;
  text-decoration: none;
}
.blog-card__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.3;
  color: var(--blog-ink);
}
.blog-card__meta {
  margin-top: auto;
  font-weight: 400;
  font-size: 8px;
  line-height: 1.3;
  color: #566580;
}
.blog-topics__more-wrap {
  margin-top: 32px;
}
/* Reuses the shared .tl-btn .tl-btn--light component; only size deltas here. */
.blog-topics__more {
  width: 270px;
  max-width: 100%;
  padding: 14px 56px;
  font-size: 14px;
}
.blog-topics__more[hidden] {
  display: none;
}
.blog-topics__more:disabled {
  opacity: 0.6;
  cursor: default;
}

/* --- Newsletter (final) --- */
.blog-news {
  max-width: var(--blog-content);
  margin-inline: auto;
  padding-inline: 5px;
}
.blog-news__card {
  overflow: hidden;
  padding: 30px 20px;
  border-radius: 16px;
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(139, 123, 255, 0.16) 0%, rgba(139, 123, 255, 0) 60%),
    #070d1a;
}
.blog-news__grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.blog-news__title {
  margin: 0;
  width: 100%;
  max-width: 336px;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.7px;
  text-align: center;
  color: #fff;
}
.blog-news__body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}
.blog-news__lead {
  margin: 0;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
  color: #b6c5da;
}
.blog-news__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.blog-news__input {
  width: 100%;
  height: 50px;
  padding: 14px 56px 14px 20px;
  border: 1px solid #e2e9f4;
  border-radius: 11px;
  background: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  color: #566580;
}
.blog-news__input::placeholder {
  color: #566580;
  font-weight: 700;
  opacity: 1;
}
/* Reuses the shared .tl-btn .tl-btn--primary component; only size deltas here. */
.blog-news__btn {
  width: 100%;
  padding: 18px 30px;
  font-size: 14px;
}
.blog-news__fine {
  margin: 0;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  color: #b6c5da;
}

/* --- Post archive (category / tag / author / date) --- */
.post-archive__inner {
  max-width: var(--blog-content);
  margin-inline: auto;
  padding-inline: 5px;
}
.post-archive__head {
  padding-top: calc(var(--tl-header-h) + 40px);
}
.post-archive__head .post-archive__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.post-archive__eyebrow {
  margin: 0;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.84px;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--blog-accent);
}
.post-archive__title {
  margin: 0;
  font-weight: 800;
  font-size: 32px;
  line-height: 1.15;
  color: var(--blog-ink);
}
.post-archive__desc {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--blog-muted);
}
.post-archive__desc p {
  margin: 0;
}
.post-archive__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.post-archive__empty {
  margin: 0;
  color: var(--blog-muted);
}
.post-archive .pagination {
  margin-top: 30px;
}
.post-archive .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.post-archive .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--blog-divider);
  border-radius: 11px;
  background: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  color: var(--blog-muted);
  text-decoration: none;
}
.post-archive .page-numbers.current {
  border-color: transparent;
  background: var(--tl-grad-cta);
  color: #fff;
}
.post-archive .page-numbers.dots {
  border-color: transparent;
  background: transparent;
}

@media (hover: hover) {
  .post-archive .page-numbers:not(.current):not(.dots):hover {
    border-color: #cfdaec;
    color: var(--blog-ink);
  }
}

@media (min-width: 1024px) {
  .blog-hero__inner {
    padding-top: calc(var(--tl-header-h) + 56px);
    padding-inline: var(--tl-gutter);
  }
  .post-archive__inner {
    padding-inline: var(--tl-gutter);
  }
  .post-archive__title {
    font-size: 40px;
  }
  .post-archive__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .blog-hero__badge {
    font-size: 11px;
  }
  .blog-hero__title {
    font-size: 64px;
  }
  .blog-hero__sub {
    max-width: 720px;
    font-size: 20px;
  }

  .blog-featured__inner {
    flex-direction: row;
    align-items: center;
    padding-inline: var(--tl-gutter);
  }
  .blog-featured__media {
    flex: 1 0 0;
    min-width: 0;
    height: 403px;
  }
  .blog-featured__pill {
    font-size: 11px;
  }
  .blog-featured__body {
    flex: 1 0 0;
    min-width: 0;
    gap: 20px;
    padding: 32px 0 38px 40px;
  }
  .blog-featured__eyebrow {
    font-size: 11px;
  }
  .blog-featured__title {
    font-size: 34px;
  }
  .blog-featured__excerpt {
    font-size: 16px;
  }
  .blog-byline__avatar {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
  .blog-byline__name {
    font-size: 16px;
  }
  .blog-byline__date {
    margin-left: 24px;
    font-size: 16px;
  }

  .blog-lp__inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 60px;
    padding-inline: var(--tl-gutter);
  }
  .blog-lp__latest {
    flex: 1 1 auto;
    min-width: 0;
  }
  .blog-lp__popular {
    flex: 0 0 347px;
    width: 347px;
  }
  .blog-lp__head {
    padding-bottom: 16px;
  }
  .blog-lp__title {
    font-size: 24px;
  }
  .blog-lp__all {
    font-size: 16px;
  }
  .blog-lp__rows {
    gap: 10px;
  }
  .blog-row {
    gap: 20px;
    padding: 16px;
  }
  .blog-row__thumb {
    width: 100px;
    height: 100px;
  }
  .blog-row__body {
    gap: 10px;
  }
  .blog-row__cat {
    font-size: 12px;
  }
  .blog-row__title {
    font-size: 20px;
  }
  .blog-row__meta {
    font-size: 12px;
  }
  .blog-rank {
    gap: 20px;
  }
  .blog-rank__title {
    font-size: 16px;
  }
  .blog-rank__meta {
    font-size: 10px;
  }

  .blog-topics__head {
    padding-bottom: 16px;
  }
  .blog-topics__title {
    font-size: 24px;
  }
  .blog-topics__tabs {
    flex-wrap: wrap;
    margin-top: 20px;
    overflow: visible;
  }
  .blog-topics__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
  }
  .blog-card {
    gap: 20px;
  }
  .blog-card__body {
    gap: 10px;
  }
  .blog-card__cat {
    font-size: 12px;
  }
  .blog-card__title {
    font-size: 20px;
  }
  .blog-card__meta {
    font-size: 12px;
  }

  .blog-news__card {
    padding: 40px;
  }
  .blog-news__grid {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
  }
  .blog-news__title {
    flex: none;
    width: 511px;
    max-width: 511px;
    text-align: left;
  }
  .blog-news__body {
    flex: none;
    width: 511px;
  }
  .blog-news__lead {
    text-align: left;
  }
  .blog-news__form {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    width: 500px;
    max-width: 100%;
  }
  .blog-news__input {
    flex: none;
    width: 360px;
  }
  .blog-news__btn {
    width: auto;
  }
  .blog-news__fine {
    text-align: left;
  }
}

/* --- Hover affordances (pointer devices only) --- */
@media (hover: hover) {
  .blog-row,
  .blog-card,
  .blog-row__thumb,
  .blog-card__media,
  .blog-featured__media,
  .blog-row__title,
  .blog-card__title a,
  .blog-rank__title,
  .blog-rank__num,
  .blog-featured__title a,
  .blog-tab {
    transition: transform 0.2s ease, border-color 0.2s ease,
      box-shadow 0.2s ease, color 0.2s ease, filter 0.2s ease;
  }

  /* Bordered cards lift with a soft shadow */
  .blog-row:hover,
  .blog-card:hover {
    transform: translateY(-3px);
    border-color: #cfdaec;
    box-shadow: 0 14px 30px -14px rgba(10, 20, 36, 0.22);
  }

  /* Titles warm to the accent on hover */
  .blog-row:hover .blog-row__title,
  .blog-card:hover .blog-card__title a,
  .blog-rank:hover .blog-rank__title,
  .blog-rank:hover .blog-rank__num,
  .blog-featured__title a:hover {
    color: var(--blog-accent);
  }

  /* Thumbnails / media brighten slightly */
  .blog-row:hover .blog-row__thumb,
  .blog-card:hover .blog-card__media,
  .blog-featured__media:hover {
    filter: brightness(1.05);
  }

  /* Inactive topic tabs */
  .blog-tab:not(.is-active):hover {
    border-color: #cfdaec;
    color: var(--blog-ink);
  }
}
