/* Heart Disease Code affiliate area (web/hdc/affiliates/). Builder: aff. Uses hdc.css tokens only. */

/* Area bar + tabs */
.aff-bar { background: var(--navy); color: #D7E7F5; }
.aff-bar__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-top: 12px; padding-bottom: 12px; }
.aff-bar__title { font-family: var(--serif); font-weight: 700; font-size: 21px; color: #fff; text-decoration: none; }
.aff-bar__status { font-size: 16px; color: var(--sky-l); }
.aff-bar__status a, .aff-bar__status strong { color: var(--gold); }
.aff-tabs { background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-s); }
.aff-tabs__in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; padding-top: 8px; padding-bottom: 8px; }
.aff-tabs a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 16px; color: var(--navy); text-decoration: none; white-space: nowrap; }
.aff-tabs a:hover { background: var(--mist); color: var(--blue); }
.aff-tabs a[aria-current="page"] { background: var(--blue); color: #fff; }
.aff-head { padding: 48px 0 42px; }
.aff-head p { max-width: 820px; }

/* Overview hero */
.aff-hero { background: radial-gradient(120% 140% at 10% 0%, var(--blue) 0%, var(--navy-2) 50%, var(--navy) 100%); color: #E7F0F8; padding: 64px 0 72px; }
.aff-hero__grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.aff-hero h1 { color: #fff; font-size: clamp(34px, 4.2vw, 52px); line-height: 1.12; margin: 0 0 18px; }
.aff-hero p { font-size: 20px; color: #D7E7F5; }
.aff-hero .hdc-kicker { color: var(--gold); }
.aff-hero__pic img { width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); }
.aff-hero__btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.aff-hero .hdc-btn--ghost { color: #fff !important; border-color: rgba(255,255,255,.7); }
.aff-hero .hdc-btn--ghost:hover { background: rgba(255,255,255,.1); }
.aff-facts { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.aff-facts li { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 8px 16px; font-size: 16px; font-weight: 600; color: #fff; }

/* Generic blocks */
.aff-section { padding: 72px 0; }
.aff-section--mist { background: var(--mist); }
.aff-section h2 { margin-top: 0; }
.aff-lead { font-size: 20px; color: var(--muted); max-width: 820px; }
.aff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.aff-grid--2 { grid-template-columns: repeat(2, 1fr); }
.aff-grid--4 { grid-template-columns: repeat(4, 1fr); }
.aff-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-s); padding: 28px; }
.aff-card h3 { margin: 0 0 10px; font-size: 22px; }
.aff-card p:last-child { margin-bottom: 0; }
a.aff-tool { display: block; text-decoration: none; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
a.aff-tool:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.aff-tool .hdc-ic { color: var(--blue); width: 30px; height: 30px; margin-bottom: 10px; }
.aff-tool h3 { color: var(--navy); }
.aff-tool p { color: var(--muted); font-size: 17px; }
.aff-steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 0; padding: 0; list-style: none; }
.aff-steps > li { counter-increment: s; position: relative; padding-top: 62px; }
.aff-steps > li::before { content: counter(s); position: absolute; top: 24px; left: 28px; width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800; display: grid; place-items: center; font-size: 20px; }
.aff-steps > li.aff-card { padding-top: 80px; }
.aff-product { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.aff-product img { width: 100%; height: auto; }
.aff-price { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--navy); }
.aff-price s { color: var(--muted); font-size: 22px; font-weight: 600; margin-left: 8px; }
.aff-bundle { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
.aff-bundle figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; }
.aff-bundle img { width: 100%; height: 190px; object-fit: contain; }
.aff-bundle figcaption { font-weight: 600; font-size: 16px; color: var(--navy); margin-top: 10px; line-height: 1.35; }
.aff-note { background: var(--gold-l); border-radius: 14px; padding: 18px 22px; }
.aff-note p:last-child { margin-bottom: 0; }

/* Buttons used across the area */
.aff-copy { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--blue); color: #fff; font: 700 16px var(--sans); cursor: pointer; }
.aff-copy:hover { background: var(--blue-d); }
.aff-copy.is-done { background: var(--green); }
.aff-copy--ghost { background: #fff; color: var(--blue); border: 2px solid var(--blue); }
.aff-copy--ghost:hover { background: var(--mist); }
.aff-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.aff-dl { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 20px; border-radius: 999px; background: var(--navy); color: #fff !important; text-decoration: none; font-weight: 700; font-size: 16px; }
.aff-dl:hover { background: var(--blue-d); }
.aff-dl .hdc-ic { width: 20px; height: 20px; flex: none; }
.aff-dl small { font-weight: 500; opacity: .8; font-size: 16px; }
.aff-dls { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 0; }
.aff-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.aff-filters button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); background: #fff; color: var(--navy); font: 600 16px var(--sans); cursor: pointer; }
.aff-filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Swipe cards (emails, social) */
.aff-swipes { display: grid; gap: 28px; }
.aff-swipes--2 { grid-template-columns: repeat(2, 1fr); align-items: start; }
.aff-swipe { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-s); padding: 28px; min-width: 0; }
.aff-swipe__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; }
.aff-tag { display: inline-block; background: var(--mist); color: var(--blue-d); border-radius: 999px; padding: 4px 12px; font-size: 16px; font-weight: 700; }
.aff-tag--gold { background: var(--gold-l); color: var(--navy); }
.aff-swipe h3 { margin: 0; font-size: 22px; flex: 1 1 260px; }
.aff-subjects { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.aff-subjects li { display: flex; align-items: center; gap: 12px; justify-content: space-between; background: var(--mist-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 16px; }
.aff-subjects span { font-weight: 600; color: var(--navy); min-width: 0; overflow-wrap: anywhere; }
.aff-subjects .aff-copy { flex: none; min-height: 44px; padding: 0 14px; }
.aff-label { font-size: 16px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; }
.aff-text { white-space: pre-wrap; overflow-wrap: anywhere; font: 17px/1.65 var(--sans); color: var(--ink); background: var(--mist-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 0; max-height: 460px; overflow-y: auto; }
.aff-pre { display: block; width: 100%; font: 16px/1.5 Consolas, Menlo, monospace; color: var(--ink); background: var(--mist-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; resize: vertical; }

/* Link builder */
.aff-form { display: grid; gap: 18px; }
.aff-form label { font-weight: 700; color: var(--navy); display: block; margin-bottom: 6px; }
.aff-form input[type=text] { width: 100%; min-height: 52px; padding: 10px 16px; border: 2px solid var(--line); border-radius: 12px; font: 18px var(--sans); color: var(--ink); }
.aff-form input[type=text]:focus { outline: 0; border-color: var(--sky); box-shadow: 0 0 0 4px var(--sky-l); }
.aff-form small { display: block; color: var(--muted); font-size: 16px; margin-top: 6px; }
.aff-out { display: flex; gap: 10px; align-items: stretch; }
.aff-out input { flex: 1; min-width: 0; min-height: 50px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--mist-2); font: 16px Consolas, Menlo, monospace; color: var(--ink); }

/* Banners and images */
.aff-banner { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-s); min-width: 0; }
.aff-banner__img { background: var(--mist); border-radius: 12px; padding: 16px; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.aff-banner__img img { max-width: 100%; height: auto; display: block; }
.aff-banner h3 { margin: 16px 0 4px; font-size: 21px; }
.aff-banner p { margin: 0 0 12px; color: var(--muted); font-size: 16px; }
.aff-banner textarea { height: 104px; }
.aff-sizes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; align-items: start; }
.aff-sizes .aff-banner--wide { grid-column: 1 / -1; }
.aff-img { display: flex; flex-direction: column; }
.aff-img .aff-banner__img { height: 300px; }
.aff-img .aff-banner__img img { max-height: 268px; width: auto; }

/* Articles, review, keywords */
.aff-article { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 28px; }
.aff-article:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.aff-article details { margin-top: 14px; }
.aff-article summary { cursor: pointer; font-weight: 700; color: var(--blue); min-height: 44px; display: flex; align-items: center; }
.aff-read { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px 28px; margin-top: 12px; }
.aff-read h2 { font-size: 26px; } .aff-read h3 { font-size: 22px; }
.aff-read .disclosure { color: var(--muted); font-size: 16px; }
.aff-kw { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.aff-kw ul { columns: 2; column-gap: 24px; margin: 0; padding-left: 20px; font-size: 17px; }
.aff-kw li { break-inside: avoid; margin-bottom: 4px; }

/* Presell */
.aff-presell { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.aff-shots { display: grid; grid-template-columns: 1fr 140px; gap: 14px; align-items: start; margin: 16px 0; }
.aff-shots img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-s); display: block; }

/* Rules, FAQ */
.aff-rules h3 { margin-top: 0; }
.aff-yes li::marker { color: var(--green); }
.aff-no li::marker { color: var(--heart); }
.aff-faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px 24px; margin-bottom: 12px; }
.aff-faq summary { cursor: pointer; font-weight: 700; color: var(--navy); min-height: 56px; display: flex; align-items: center; font-size: 19px; }
.aff-faq details[open] summary { margin-bottom: 4px; }

/* Help band + toast */
.aff-help { background: var(--cream); border-top: 1px solid var(--line); padding: 36px 0; }
.aff-help__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.aff-help p { margin: 0; font-size: 18px; max-width: 760px; }
.aff-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 14px 22px; border-radius: 14px; font-weight: 600; font-size: 16px; box-shadow: var(--shadow); z-index: 50; max-width: calc(100% - 32px); text-align: center; }
.aff-toast[hidden] { display: none; }

@media (max-width: 1000px) {
  .aff-grid, .aff-grid--4, .aff-bundle { grid-template-columns: repeat(2, 1fr); }
  .aff-steps { grid-template-columns: 1fr; }
  .aff-swipes--2, .aff-presell, .aff-kw { grid-template-columns: 1fr; }
  .aff-hero__grid { grid-template-columns: 1fr; }
  .aff-hero__pic { max-width: 420px; }
  .aff-product { grid-template-columns: 220px 1fr; }
}
@media (max-width: 640px) {
  body.aff-page { font-size: 17px; }
  .aff-section { padding: 48px 0; }
  .aff-hero { padding: 40px 0 48px; }
  .aff-grid, .aff-grid--2, .aff-grid--4, .aff-sizes { grid-template-columns: 1fr; }
  .aff-bundle { grid-template-columns: 1fr 1fr; gap: 12px; }
  .aff-bundle img { height: 140px; }
  .aff-product { grid-template-columns: 1fr; }
  .aff-product img { max-width: 260px; }
  .aff-swipe, .aff-card, .aff-banner { padding: 20px; }
  .aff-text { padding: 14px; }
  .aff-kw ul { columns: 1; }
  .aff-out { flex-direction: column; }
  .aff-shots { grid-template-columns: 1fr 100px; }
  .aff-read { padding: 18px; }
  .aff-hero__btns .hdc-btn { width: 100%; }
  .aff-help .hdc-btn { width: 100%; }
}

/* 2026-11-08 job 42: show every tab on wide screens (no clipped tabs at 1440) */
@media (min-width: 1000px) { .aff-tabs__in { flex-wrap: wrap; justify-content: center; overflow-x: visible; gap: 4px 2px; } .aff-tabs a { padding: 0 12px; } }
/* job 42: hero facts as a tidy 2x2 grid; phone tab strip shows it scrolls */
.aff-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 620px; }
.aff-facts li { border-radius: 12px; line-height: 1.3; display: flex; align-items: center; }
@media (max-width: 999px) { .aff-tabs__in { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 40px; } }
@media (max-width: 520px) { .aff-facts { gap: 8px; } .aff-facts li { padding: 8px 12px; } }
.aff-card a[href^="mailto"], .aff-note a[href^="mailto"], .aff-help a[href^="mailto"] { overflow-wrap: anywhere; word-break: break-word; }
