/* Shared A8 cards. Ad codes are managed in a SWELL blog part, never in this file. */
.sg-ad-disclosure{display:flex;align-items:center;gap:8px;margin:16px 0 0;color:#52647b;font-size:12px;line-height:1.6}
.sg-ad-disclosure>span{padding:2px 7px;border:1px solid #b8c6d7;border-radius:4px;font-size:11px;font-weight:700}
.sg-shared-after-article{margin-top:48px;clear:both}
.sg-shared-after-article .widget{margin:0}
body .sg-affiliates{padding:24px;border:1px solid #dbe5f2;border-top:3px solid #0066ff;border-radius:16px;background:#f5f8fd;color:#183249;container-type:inline-size}
body .sg-affiliates p{margin:0;letter-spacing:normal}
.sg-aff-header{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
body .sg-affiliates .sg-aff-label{padding:2px 9px;border-radius:4px;background:#f0242c;color:#fff;font-size:11px;font-weight:800;line-height:1.6}
body .sg-affiliates .sg-aff-heading{font-size:20px;font-weight:800;line-height:1.5}
body .sg-affiliates .sg-aff-intro{margin-bottom:20px;color:#52647b;font-size:13px;line-height:1.8}
.sg-aff-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.sg-aff-card{display:flex;flex-direction:column;min-width:0;padding:14px;background:#fff;border:1px solid #dce6f2;border-radius:12px}
body .sg-affiliates .sg-aff-purpose{align-self:flex-start;margin-bottom:12px;padding-bottom:4px;border-bottom:2px solid #f0242c;color:#184575;font-size:12px;font-weight:700;line-height:1.6}
.sg-aff-banner{position:relative;align-self:center;width:100%;max-width:var(--sg-banner-width,300px);margin-bottom:14px;line-height:0}
.sg-aff-banner>a{display:block}
body .sg-affiliates .sg-aff-banner>a>img{display:block;width:100%;height:auto;aspect-ratio:var(--sg-banner-ratio,6/5);object-fit:contain;margin:0}
body .sg-affiliates .sg-aff-banner>img[width="1"]{position:absolute;width:1px;height:1px;max-width:1px;margin:0}
body .sg-affiliates .sg-aff-name{margin-bottom:8px;font-size:16px;line-height:1.6;overflow-wrap:anywhere}
body .sg-affiliates .sg-aff-description{margin-bottom:18px;font-size:13px;line-height:1.8}
/* Keep CTA contrast above the native article link rule without changing ordinary links. */
body .sg-affiliates .sg-aff-grid .sg-aff-card a.sg-aff-button{display:flex;align-items:center;justify-content:center;gap:4px;min-height:44px;margin-top:auto;padding:10px 8px;border:2px solid #0056d6;border-radius:8px;background:#0056d6;color:#fff;text-align:center;text-decoration:none;font-size:12px;font-weight:700;line-height:1.5;transition:background .15s,border-color .15s}
body .sg-affiliates .sg-aff-grid .sg-aff-card a.sg-aff-button:visited{color:#fff}
body .sg-affiliates .sg-aff-grid .sg-aff-card a.sg-aff-button:is(:hover,:focus-visible,:active){background:#004acc;border-color:#004acc;border-bottom-color:#f0242c;color:#fff}
.sg-affiliates a:focus-visible{outline:3px solid #f0242c;outline-offset:4px}
@container(max-width:640px){.sg-aff-grid{grid-template-columns:1fr}.sg-aff-card{padding:18px}}
@media(max-width:700px){body .sg-affiliates{padding:18px 14px;border-radius:12px}.sg-aff-grid{grid-template-columns:1fr;gap:18px}body .sg-affiliates .sg-aff-heading{font-size:18px}}
@media(prefers-reduced-motion:reduce){body .sg-affiliates .sg-aff-grid .sg-aff-card a.sg-aff-button{transition:none}}

.sg-ad-slot{margin:40px 0;clear:both}.sg-ad-slot:last-child{margin-bottom:48px}
.sg-aff-count-2 .sg-aff-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.sg-aff-count-1 .sg-aff-grid{grid-template-columns:minmax(0,1fr);max-width:380px}
.sg-aff-count-1 .sg-aff-card{max-width:380px}
body .sg-affiliates .sg-aff-grid{margin:0;padding:0}
body .sg-affiliates .sg-aff-card{margin:0}
body .sg-affiliates strong{font-weight:800}
@container(max-width:640px){.sg-aff-count-2 .sg-aff-grid{grid-template-columns:1fr}}
@media(max-width:700px){.sg-aff-count-2 .sg-aff-grid{grid-template-columns:1fr}.sg-ad-slot{margin:28px 0}}
@media print{.sg-ad-slot,.sg-affiliates,.sg-ad-disclosure{display:none!important}}
