.tnm-sp-leaderboard,
.tnm-sp-leaderboard *,
.tnm-sp-sidebar-card,
.tnm-sp-sidebar-card *,
.tnm-sp-placeholder-wide,
.tnm-sp-placeholder-wide *,
.tnm-sp-placeholder-box,
.tnm-sp-placeholder-box *,
.tnm-sp-full-banner,
.tnm-sp-full-banner *,
.tnm-sp-grid,
.tnm-sp-grid * {
  box-sizing: border-box;
}

/* Shared Badge & Buttons */
.tnm-sp-badge {
  display: inline-block;
  background: #001334;
  color: #C89B3C;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  line-height: 1.2;
}

.tnm-sp-btn-navy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #001334 !important;
  color: #ffffff !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  text-transform: none !important;
  padding: 9px 16px !important;
  border-radius: 6px !important;
  transition: background 0.16s ease, color 0.16s ease;
  white-space: nowrap;
}
.tnm-sp-btn-navy:hover {
  background: #004CFF !important;
  color: #ffffff !important;
}

.tnm-sp-btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #C89B3C !important;
  color: #001334 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  padding: 9px 18px !important;
  border-radius: 6px !important;
}
.tnm-sp-btn-gold:hover {
  background: #DDB04C !important;
}

.tnm-sp-adv-link {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  color: #656B77 !important;
  text-decoration: underline !important;
}
.tnm-sp-adv-link:hover {
  color: #001334 !important;
}

/* =========================================================
   1. HOMEPAGE LEADERBOARD (728x90 / Responsive Strip)
   ========================================================= */
.tnm-sp-leaderboard {
  width: 100%;
  max-width: 760px;
  min-height: 106px;
  background: #ffffff;
  border: 1.5px solid #C6CEDD;
  border-top: 3px solid #001334;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 6px 20px rgba(0, 19, 52, 0.06);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tnm-sp-lb-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.tnm-sp-lb-text strong {
  display: block;
  font-size: 16px;
  color: #001334;
}
.tnm-sp-lb-text span {
  font-size: 12.5px;
  color: #656B77;
}

.tnm-sp-logo-link {
  display: inline-block;
  max-width: 100%;
}

.tnm-sp-lb-logo {
  display: block;
  max-height: 54px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.tnm-sp-lb-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.tnm-sp-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: #ECF1FF;
  border: 1px solid #C6CEDD;
  border-radius: 6px;
  padding: 4px;
}

.tnm-sp-qr-img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  display: block;
  background: #ffffff;
  border-radius: 4px;
}

.tnm-sp-qr-cap {
  font-size: 9.5px;
  font-weight: 700;
  color: #001334;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tnm-sp-lb-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

/* =========================================================
   2. SIDEBAR CARD (336x280 — Single Post & Category Archive)
   ========================================================= */
.tnm-sp-sidebar-card {
  width: 100%;
  max-width: 336px;
  min-height: 280px;
  margin: 0 auto;
  background: #ffffff;
  border: 1.5px solid #C6CEDD;
  border-top: 4px solid #001334;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 8px 24px rgba(0, 19, 52, 0.07);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tnm-sp-sb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tnm-sp-sb-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  background: #ffffff;
  border: 1px solid #ECF1FF;
  border-radius: 8px;
}

.tnm-sp-sb-logo {
  max-height: 68px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.tnm-sp-sb-text strong {
  display: block;
  font-size: 18px;
  color: #001334;
}
.tnm-sp-sb-text span {
  font-size: 12.5px;
  color: #656B77;
}

.tnm-sp-sb-bottom {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px dashed #C6CEDD;
}

.tnm-sp-sb-qr {
  flex-shrink: 0;
  background: #ECF1FF;
  border: 1px solid #C6CEDD;
  border-radius: 8px;
  padding: 5px;
}

.tnm-sp-sb-qr img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  display: block;
  background: #ffffff;
  border-radius: 4px;
}

.tnm-sp-sb-cta-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tnm-sp-sb-tag {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  color: #3C414C;
}

.tnm-sp-btn-full {
  width: 100%;
}

/* =========================================================
   3. FULL CUSTOM BANNER & GRID
   ========================================================= */
.tnm-sp-full-banner {
  position: relative;
  width: 100%;
  max-width: 760px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #C6CEDD;
  background: #ffffff;
}
.tnm-sp-full-banner img {
  display: block;
  width: 100%;
  height: auto;
}
.tnm-sp-fb-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

.tnm-sp-grid {
  display: grid;
  gap: 20px;
  width: 100%;
}
.tnm-sp-cols-1 { grid-template-columns: 1fr; }
.tnm-sp-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tnm-sp-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tnm-sp-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Fallback Placeholders */
.tnm-sp-placeholder-wide {
  width: 100%;
  max-width: 760px;
  background: linear-gradient(135deg, #001334 0%, #0A2558 100%);
  color: #ffffff;
  border-radius: 10px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.tnm-sp-placeholder-box {
  width: 100%;
  max-width: 336px;
  min-height: 280px;
  margin: 0 auto;
  background: linear-gradient(135deg, #001334 0%, #0A2558 100%);
  color: #ffffff;
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 10px;
}
.tnm-sp-ph-title {
  font-size: 17px;
  font-weight: 700;
  margin-top: 6px;
}
.tnm-sp-ph-sub {
  font-size: 12.5px;
  color: #DCE4F4;
}

/* Responsive */
@media (max-width: 1024px) {
  .tnm-sp-cols-3, .tnm-sp-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tnm-sp-leaderboard {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .tnm-sp-lb-right {
    justify-content: space-between;
    border-top: 1px dashed #C6CEDD;
    padding-top: 12px;
  }
  .tnm-sp-lb-actions {
    align-items: stretch;
    flex: 1;
  }
  .tnm-sp-sidebar-card {
    max-width: 100%;
  }
  .tnm-sp-cols-2, .tnm-sp-cols-3, .tnm-sp-cols-4 { grid-template-columns: 1fr; }
}
