/* Unified page layout for both shortcodes */
.ath-page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}
.ath-section-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 2.5rem 0 1.2rem 0;
  text-align: left;
}
.ath-wrap, .ath-bonuses-wrap {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.ath-bonuses-table, .ath-matrix {
  width: 100%;
  margin: 0;
}
.ath-toolbar-row {
  max-width: 100%;
}
.ath-wrap{font:inherit;max-width:1200px}
.ath-toolbar{margin-bottom:.75rem}
.ath-partners-note{margin:.9rem 0 0;padding:.75rem 1rem;border:1px solid #d8e1ec;border-radius:10px;background:linear-gradient(180deg,#fbfdff 0%,#f4f8fc 100%);color:#526173;font-size:.93rem;line-height:1.5}
.ath-toolbar-row{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap;max-width:1200px}
.ath-toolbar .ath-filter-bank,
.ath-toolbar .ath-filter-search,
.ath-toolbar .ath-filter-reset{display:flex;align-items:center}
.ath-toolbar .ath-filter-search{flex:1 1 420px;min-width:220px;max-width:600px}
.ath-toolbar .ath-filter-search .ath-search{flex:1 1 auto;width:100%}
#ath-search{width:100%;padding:.4rem .6rem}
#ath-bank,#ath-reset{height:38px;padding:.4rem .6rem}
#ath-reset{padding:0 .9rem}
.ath-results{min-height:2rem}
.ath-table{width:100%;border-collapse:collapse}
.ath-table th,.ath-table td{padding:.5rem;border-bottom:1px solid #eee;text-align:left}
.ath-table thead th{position:sticky;top:0;background:#fafafa;z-index:1}
.ath-chip{position:relative;display:inline-flex;align-items:center;gap:.5rem;padding:.3rem .65rem;border:1px solid #e3e8f1;border-radius:999px;background:#fff;cursor:pointer;user-select:none;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}
.ath-chip input[type="checkbox"]{position:absolute;opacity:0;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);pointer-events:none}
.ath-alliances .ath-chip{display:inline-flex;align-items:center;gap:.4rem;padding:.25rem .5rem;border:1px solid #e3e8f1;border-radius:999px;background:#fff;cursor:pointer}
.ath-alliances .alli-logo{height:24px;width:auto;display:inline-block}
.ath-chip .alli-logo{height:24px;width:auto;display:inline-block;opacity:.7;filter:grayscale(.35)}
.ath-chip span{line-height:1.2;font-size:.9rem;color:#1f2937}
.ath-chip:hover{background:#f7fafc}
.ath-chip.is-active{background:#e7efff;border-color:#2563eb;box-shadow:0 0 0 1px rgba(37,99,235,.18)}
.ath-chip.is-active .alli-logo{opacity:1;filter:none}
.ath-chip.is-active span{font-weight:600}
.ath-tag{display:inline-block;padding:.15rem .4rem;margin:.1rem;border-radius:12px;background:#f3f4f6;font-size:.85em}
.ath-group{margin:1rem 0}
.ath-group-title{margin:.25rem 0 .5rem 0}
@media (max-width:768px){
  .ath-toolbar .ath-search{flex-basis:100%}
  .ath-table thead{display:none}
  .ath-table tr{display:block;border-bottom:1px solid #eee}
  .ath-table td{display:block;padding:.4rem .2rem}
  .ath-table td::before{content:attr(data-label);font-weight:600;margin-right:.35rem}
}

/* Matrix styles */
.ath-matrix{width:auto;max-width:1200px;border-collapse:collapse;font-family:inherit;table-layout:fixed;font-size:1rem}
.ath-matrix thead th{position:sticky;top:0;padding:.45rem .35rem;border:1px solid #e6e6e6;text-align:center;font-size:.95rem;font-weight:600}
.ath-matrix tbody td{padding:.4rem .3rem;border:1px solid #eee;vertical-align:top;text-align:center}
.ath-matrix tbody td:first-child{text-align:left;width:300px;max-width:300px;padding:.4rem .35rem;position:relative}
.ath-matrix thead th:first-child{width:300px;text-align:left}
.ath-matrix thead th:not(:first-child){width:140px}
.ath-matrix tbody td:not(:first-child){width:140px}
.partner-cell{display:flex;align-items:center;gap:.5rem;text-align:left;min-width:0;width:100%}
.ath-partner-cell{display:flex;align-items:center;gap:.5rem;min-width:0;width:100%}
.ath-partner-logo{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.ath-partner-text{display:flex;flex-direction:column;gap:.12rem;min-width:0;flex:1;overflow:hidden}
.ath-partner-link{display:block;flex:1 1 auto;min-width:0;width:100%;color:inherit;text-decoration:none}
.ath-partner-link:hover,
.ath-partner-link:focus{color:inherit;text-decoration:underline}
.partner-cell .partner-logo{height:28px;width:auto;flex-shrink:0;padding:2px;border-radius:4px;background:#fff;margin-right:.5rem}
.partner-cell .partner-info{display:flex;flex-direction:column;gap:.12rem;min-width:0;flex:1;overflow:hidden}
.partner-cell .partner-name{font-weight:600;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;font-size:.95rem}
.partner-cell .partner-program{font-size:.8rem;color:#6b7280;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.partner-cell--table{align-items:center}
.partner-cell--table .partner-logo{height:32px}
.ath-alliance-chip{display:inline-flex;align-items:center;margin-left:0;padding:.18rem .4rem;border-radius:999px;background:rgba(37,99,235,.08);gap:.3rem;flex-shrink:0;margin-right:.7rem}
.partner-cell .ath-alliance-chip{margin-top:0;margin-left:0;margin-right:0;order:unset}
.ath-alliance-chip .alliance-logo{height:24px;width:auto;display:block;opacity:.97;flex-shrink:0}
.ath-alliances{display:flex;flex-wrap:wrap;gap:.75rem}
.ath-matrix{margin-top:.5rem}
.ath-cell{display:flex;flex-direction:column;gap:.3rem;align-items:center;justify-content:center;min-height:55px;text-align:center}
.ath-cell-topline{display:flex;align-items:center;justify-content:center;gap:.4rem;flex-wrap:wrap}
.ath-cell-ratio{font-weight:600;font-size:1.05rem;line-height:1}
.ath-cell-bonus{display:inline-flex;align-items:center;gap:.18rem;padding:.12rem .5rem;border-radius:999px;background:#0f9d74;color:#fff;font-weight:600;font-size:.85rem;line-height:1;white-space:nowrap}
.ath-cell-time{font-size:.9rem;color:#4b5563}

.ath-bonuses-wrap{margin-top:.5rem}
.ath-bonuses-table{width:100%;max-width:1040px;border-collapse:collapse;font-size:.9rem;background:#fff;border-radius:10px;overflow:hidden;table-layout:fixed}
.ath-bonuses-table thead th{position:sticky;top:0;background:#f7f9fb;text-align:left;font-weight:600;padding:.4rem .55rem;border-bottom:1px solid #e0e6ef;z-index:1;box-shadow:0 1px 0 rgba(0,0,0,.03);letter-spacing:.01em}
.ath-bonuses-table tbody td{padding:.35rem .55rem;border-bottom:1px solid #e6ecf4;vertical-align:middle;line-height:1.25}
.ath-bonuses-table tbody tr:nth-child(odd){background:#fbfdff}
.ath-bonuses-table tbody tr:nth-child(even){background:#f3f7fc}
.ath-bonuses-table tbody tr:hover{background:#edf3ff}
.ath-bonuses-table .entity{display:inline-flex;align-items:center;gap:.4rem;min-width:0;max-width:280px}
.ath-bonuses-table .entity .logo{height:16px;width:auto;display:inline-block;max-width:90px}
.ath-bonuses-table .entity .name{line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ath-bonuses-table .entity.ath-bonus-entity{display:flex!important;align-items:center;gap:.45rem;max-width:100%;width:100%}
.ath-bonuses-table .ath-bonus-entity-link{display:inline-flex;align-items:center;gap:.45rem;min-width:0;max-width:100%;text-decoration:none}
.ath-bonuses-table .ath-bonus-entity-logo{display:inline-flex!important;flex:0 0 auto;max-width:100%!important;overflow:hidden}
.ath-bonuses-table .ath-bonus-entity-logo--bank{width:124px!important;height:30px!important;inline-size:124px!important;block-size:30px!important}
.ath-bonuses-table .ath-bonus-entity-logo--partner{width:104px!important;height:30px!important;inline-size:104px!important;block-size:30px!important}
.ath-bonuses-table .ath-bonus-entity-logo .ath-logo-image,
.ath-bonuses-table .ath-bonus-entity-logo .ath-bonus-entity-image{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:left center!important}
.ath-bonuses-table .ath-bonus-entity-name{min-width:0;font-size:.92rem;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
.ath-bonuses-table:not(.ath-bonuses-table-history) col.ath-col-transfer-from{width:39%}
.ath-bonuses-table:not(.ath-bonuses-table-history) col.ath-col-transfer-to{width:33%}
.ath-bonuses-table:not(.ath-bonuses-table-history) col.ath-col-bonus{width:14%}
.ath-bonuses-table:not(.ath-bonuses-table-history) col.ath-col-expires{width:14%}
.ath-bonuses-table td:nth-child(1){padding:.35rem .65rem}
.ath-bonuses-table td:nth-child(2){padding:.35rem .65rem}
.ath-bonuses-table td:nth-child(3),
.ath-bonuses-table td.ath-bonus-cell{text-align:right;white-space:nowrap;min-width:128px;padding:.35rem .75rem}
.ath-bonuses-table td:nth-child(4){white-space:nowrap;color:#4b5563;font-weight:500;padding:.35rem .65rem}
.ath-bonuses-table .pct{display:inline-flex;align-items:center;justify-content:flex-end;font-weight:700;font-size:1rem}
.ath-bonuses-table .ath-bonus-inline{display:inline-flex;align-items:center;justify-content:flex-end;gap:.3rem}
.ath-bonuses-table .ath-bonus-source-link{display:inline-flex;align-items:center;justify-content:center;width:1rem;height:1rem;color:#2563eb;text-decoration:none;opacity:.9;vertical-align:middle}
.ath-bonuses-table .ath-bonus-source-link--with-label{width:auto;height:auto;justify-content:flex-end;gap:.28rem;color:inherit;opacity:1}
.ath-bonuses-table .ath-bonus-source-link--with-label .ath-bonus-source-icon{width:.85rem;height:.85rem;color:#2563eb;flex:0 0 auto}
.ath-bonuses-table .ath-bonus-source-link:hover,
.ath-bonuses-table .ath-bonus-source-link:focus-visible{color:#1d4ed8;opacity:1}
.ath-bonuses-table .ath-bonus-source-link:focus-visible{outline:2px solid rgba(37,99,235,.35);outline-offset:2px;border-radius:4px}
.ath-bonuses-table .ath-bonus-source-icon{width:.9rem;height:.9rem;display:block}
.ath-bonus-history-header{margin:0 0 1.25rem}
.ath-bonus-history-title{margin:0 0 .5rem;line-height:1.2}
.ath-bonus-history-intro{display:block;width:100%;margin:.05rem 0 0;color:#334155;font-size:15px;line-height:1.58;max-width:none}
.ath-bonus-history-archive{overflow-x:auto;padding-top:.35rem}
.ath-bonus-history-controls{display:flex;flex-direction:column;gap:.95rem;margin:0 0 1.2rem}
.ath-bonus-history-archive .ath-bonus-history-form{display:grid!important;grid-template-columns:minmax(145px,1fr) minmax(300px,2.2fr) minmax(130px,.9fr) minmax(190px,1.15fr) auto;grid-template-areas:"bank search year sort actions";align-items:end;gap:.7rem .8rem;padding:.85rem .92rem;border:1px solid #d5deea;border-radius:12px;background:linear-gradient(180deg,#fcfdff 0%,#f5f8fc 100%);box-shadow:0 4px 12px rgba(15,23,42,.05)}
.ath-bonus-history-archive .ath-bonus-history-field{display:flex;flex-direction:column;gap:.26rem;min-width:0}
.ath-bonus-history-archive .ath-bonus-history-field-bank{grid-area:bank}
.ath-bonus-history-archive .ath-bonus-history-field-search{grid-area:search;min-width:0}
.ath-bonus-history-archive .ath-bonus-history-field-year{grid-area:year}
.ath-bonus-history-archive .ath-bonus-history-field-sort{grid-area:sort}
.ath-bonus-history-archive .ath-bonus-history-field label{font-size:.76rem;font-weight:700;color:#475467;letter-spacing:.01em}
.ath-bonus-history-archive .ath-bonus-history-field select,
.ath-bonus-history-archive .ath-bonus-history-field input{width:100%;min-height:39px;padding:.45rem .66rem;border:1px solid #d4dce8;border-radius:8px;background:#fff;color:#111827;font:inherit;box-shadow:inset 0 1px 2px rgba(15,23,42,.03)}
.ath-bonus-history-archive .ath-bonus-history-field select:focus,
.ath-bonus-history-archive .ath-bonus-history-field input:focus{border-color:#94a3b8;outline:2px solid rgba(148,163,184,.18);outline-offset:1px}
.ath-bonus-history-archive .ath-bonus-history-actions{grid-area:actions;display:flex;align-items:center;gap:.52rem;flex-wrap:nowrap;justify-self:end}
.ath-bonus-history-archive .ath-bonus-history-submit,
.ath-bonus-history-archive .ath-bonus-history-reset{display:inline-flex;align-items:center;justify-content:center;min-height:39px;padding:.42rem .86rem;border-radius:999px;font-weight:700;text-decoration:none;white-space:nowrap}
.ath-bonus-history-submit{border:1px solid #0f172a;background:#0f172a;color:#fff;box-shadow:0 8px 18px rgba(15,23,42,.14)}
.ath-bonus-history-submit:hover,
.ath-bonus-history-submit:focus-visible{background:#1f2937;border-color:#1f2937}
.ath-bonus-history-reset{border:1px solid #c8d4e3;background:#eef4fb;color:#15324b;box-shadow:0 1px 2px rgba(15,23,42,.05)}
.ath-bonus-history-reset:hover,
.ath-bonus-history-reset:focus-visible{border-color:#8ca3bd;background:#e7eef8;color:#0f172a}
.ath-bonus-history-meta{margin:.32rem 0 .22rem;color:#334155;font-size:.98rem;font-weight:600;line-height:1.45}
.ath-bonuses-table-history{width:100%;max-width:none;table-layout:fixed}
.ath-bonuses-table-history col.ath-col-transfer-from{width:15%}
.ath-bonuses-table-history col.ath-col-transfer-to{width:14%}
.ath-bonuses-table-history col.ath-col-bonus{width:9%}
.ath-bonuses-table-history col.ath-col-start-date{width:11%}
.ath-bonuses-table-history col.ath-col-end-date{width:11%}
.ath-bonuses-table-history col.ath-col-notes{width:32%}
.ath-bonuses-table-history col.ath-col-read-post{width:8%}
.ath-bonuses-table-history th:nth-child(3),.ath-bonuses-table-history td:nth-child(3){white-space:nowrap}
.ath-bonuses-table-history th:nth-child(4),.ath-bonuses-table-history td:nth-child(4){white-space:nowrap;color:#4b5563;font-weight:500}
.ath-bonuses-table-history th:nth-child(5),.ath-bonuses-table-history td:nth-child(5){white-space:nowrap;color:#4b5563;font-weight:500}
.ath-bonuses-table-history th:nth-child(7),.ath-bonuses-table-history td:nth-child(7){white-space:nowrap}
.ath-bonuses-table-history .entity{display:flex;align-items:center;gap:.4rem;min-width:0;max-width:100%}
.ath-bonuses-table-history .entity .ath-bank-link,
.ath-bonuses-table-history .entity .ath-partner-link{display:inline-flex;align-items:center;gap:.4rem;min-width:0;max-width:100%}
.ath-bonuses-table-history .entity .logo{flex:0 0 auto}
.ath-bonuses-table-history .entity .name{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.ath-bonuses-table-history .entity.ath-bonus-history-entity{display:flex!important;align-items:center;gap:.45rem;min-width:0;max-width:100%}
.ath-bonuses-table-history .ath-bonus-history-link{display:inline-flex;align-items:center;gap:.45rem;min-width:0;max-width:100%;text-decoration:none}
.ath-bonuses-table-history .ath-bonus-history-logo{display:inline-flex!important;flex:0 0 auto;max-width:100%!important;overflow:hidden}
.ath-bonuses-table-history .ath-bonus-history-logo--bank{width:116px!important;height:28px!important;inline-size:116px!important;block-size:28px!important}
.ath-bonuses-table-history .ath-bonus-history-logo--partner{width:96px!important;height:28px!important;inline-size:96px!important;block-size:28px!important}
.ath-bonuses-table-history .ath-bonus-history-logo .ath-logo-image,
.ath-bonuses-table-history .ath-bonus-history-logo .ath-bonus-history-image{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:left center!important}
.ath-bonuses-table-history .ath-bonus-history-name{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.25}
.ath-bonus-notes-cell{color:#374151}
.ath-bonuses-table-history .ath-bonus-notes-cell{white-space:normal;line-height:1.35;overflow-wrap:anywhere;word-break:normal}
.ath-bonus-read-post a{font-weight:600;text-decoration:none}
.ath-bonus-read-post a:hover,
.ath-bonus-read-post a:focus-visible{text-decoration:underline}
.ath-bonus-history-archive .ath-pagination{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;margin-top:1.15rem;padding-top:.15rem}
.ath-pagination-link{display:inline-flex;align-items:center;justify-content:center;min-width:2rem;padding:.35rem .65rem;border:1px solid #d4dce8;border-radius:999px;background:#fff;color:#1f2937;text-decoration:none;font-weight:600}
.ath-pagination-link:hover,
.ath-pagination-link:focus-visible{border-color:#94a3b8;color:#0f172a}
.ath-pagination-link.is-current{background:#0f172a;border-color:#0f172a;color:#fff}
.ath-section-title{margin-bottom:.5rem}
.ath-empty{margin:.75rem 0;color:#556}

/* Defensive image containment for theme CSS collisions */
.ath-logo-frame{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;max-inline-size:100%;max-block-size:100%;overflow:hidden;flex:0 0 auto;line-height:1;vertical-align:middle}
.ath-logo-image{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;min-width:0;min-height:0;object-fit:contain!important;object-position:center center!important;border:0;flex:0 0 auto}
.ath-bank-logo,.ath-partner-logo,.ath-bonus-entity-logo,.ath-alliance-badge{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;max-inline-size:100%;flex:0 0 auto;min-width:0;overflow:hidden;line-height:1}
.ath-bank-logo{inline-size:112px;block-size:28px}
.ath-partner-logo{inline-size:120px;block-size:32px}
.ath-bonus-entity-logo{inline-size:96px;block-size:18px}
.ath-alliance-badge{inline-size:24px;block-size:24px;min-inline-size:24px;min-block-size:24px;border-radius:999px}
.ath-alliance-badge--card{inline-size:18px;block-size:18px;min-inline-size:18px;min-block-size:18px}
.ath-alliances .ath-alliance-badge--filter{inline-size:24px;block-size:24px;min-inline-size:24px;min-block-size:24px}
.ath-partners .ath-bank-link,
.ath-partners .ath-partner-link,
.ath-bonuses-wrap .ath-bank-link,
.ath-bonuses-wrap .ath-partner-link{display:inline-flex;align-items:center;gap:.4rem;min-width:0;max-width:100%}
.ath-bank-logo > .ath-bank-link{inline-size:100%;block-size:100%;justify-content:center;gap:0}
.ath-partners .ath-bank-link,
.ath-partners .ath-partner-link{overflow:hidden}
.ath-partner-cell,
.ath-bonuses-table .entity,
.ath-bonuses-table .entity .ath-bank-link,
.ath-bonuses-table .entity .ath-partner-link,
.ath-card-partner .ath-card-title,
.ath-cards .ath-bank-left,
.ath-card-partner .ath-card-alliance,
.ath-alliance-chip{min-width:0}
.ath-bonuses-table .entity{display:inline-flex;align-items:center;gap:.4rem;max-width:100%}
.ath-bonuses-table .entity .name{min-width:0}
.ath-alliance-chip{max-width:100%;overflow:hidden}
.ath-alliance-chip .ath-alliance-badge{flex:0 0 24px}
.ath-matrix thead th,
.ath-matrix tbody td{overflow:hidden}

[data-bonus-notes]{cursor:help;position:relative}
.ath-bonus-tooltip{position:absolute;display:none;background:#111827;color:#f9fafb;font-size:.85rem;line-height:1.4;padding:.65rem .8rem;border-radius:.6rem;box-shadow:0 18px 35px rgba(15,23,42,.25);max-width:320px;width:max-content;pointer-events:none}
.ath-bonus-tooltip .ath-bonus-tooltip-inner{margin:0;padding:0}
.ath-bonus-tooltip p{margin:0}
.ath-bonus-tooltip ul{margin:.25rem 0 0 1rem;padding:0;list-style:disc}
.ath-bonus-tooltip li{margin:.15rem 0}

.ath-partners.ath-hide-bank .ath-filter-bank{display:none!important}
.ath-partners.ath-hide-pills .ath-filter-pills{display:none!important}
.ath-partners.ath-hide-pills .ath-toolbar-row.row-2{display:none!important}
.ath-partners.ath-hide-reset .ath-filter-reset{display:none!important}
.ath-partners.ath-hide-search .ath-filter-search{display:none!important}

@media (max-width:1100px){
  .ath-bonus-history-archive .ath-bonus-history-form{grid-template-columns:minmax(145px,1fr) minmax(250px,1.8fr) minmax(130px,1fr) minmax(170px,1.1fr);grid-template-areas:"bank search year sort" "actions actions actions actions"}
  .ath-bonus-history-archive .ath-bonus-history-actions{justify-self:end}
}

@media (max-width:768px){
  .ath-partners-note{padding:.7rem .85rem;font-size:.9rem}
  .ath-bank-logo{inline-size:96px;block-size:24px}
  .ath-partner-logo{inline-size:104px;block-size:28px}
  .ath-bonus-entity-logo{inline-size:84px;block-size:16px}
  .ath-alliance-badge,
  .ath-alliance-chip .ath-alliance-badge{inline-size:22px;block-size:22px;min-inline-size:22px;min-block-size:22px}
  .ath-matrix thead{display:none}
  .ath-matrix tbody tr{display:block;border:1px solid #e6e6e6;border-radius:8px;margin-bottom:1rem;padding:.6rem}
  .ath-matrix tbody td{display:block;border:none;padding:.25rem 0;text-align:left}
  .ath-matrix tbody td::before{content:attr(data-label);font-weight:600;display:inline-block;width:110px}
  .ath-matrix tbody td.partner-cell{display:flex;align-items:flex-start;gap:.6rem;padding:.35rem 0}
  .ath-matrix tbody td.partner-cell::before{display:none;content:none}
  .partner-cell .partner-logo{height:24px}
  .ath-cell{align-items:flex-start;text-align:left;min-height:0}
  .ath-bonuses-table{font-size:.88rem}
  .ath-bonuses-table thead th,.ath-bonuses-table tbody td{padding:.3rem .45rem}
  .ath-bonuses-table .entity .logo{height:14px}
  .ath-bonuses-table .ath-bonus-entity-logo--bank{width:112px!important;height:28px!important;inline-size:112px!important;block-size:28px!important}
  .ath-bonuses-table .ath-bonus-entity-logo--partner{width:94px!important;height:28px!important;inline-size:94px!important;block-size:28px!important}
  .ath-bonuses-table .ath-bonus-entity-name{font-size:.86rem}
  .ath-bonuses-table-history .ath-bonus-history-logo--bank{width:104px!important;height:26px!important;inline-size:104px!important;block-size:26px!important}
  .ath-bonuses-table-history .ath-bonus-history-logo--partner{width:88px!important;height:26px!important;inline-size:88px!important;block-size:26px!important}
  .ath-bonus-history-controls{gap:.78rem;margin-bottom:1rem}
  .ath-bonus-history-header{margin-bottom:1rem}
  .ath-bonus-history-intro{max-width:100%;font-size:14px;line-height:1.55}
  .ath-bonus-history-meta{margin:.25rem 0 .18rem;font-size:.95rem}
  .ath-bonus-history-archive .ath-bonus-history-form{grid-template-columns:1fr 1fr;grid-template-areas:"bank year" "search search" "sort sort" "actions actions";gap:.68rem .7rem;padding:.82rem}
  .ath-bonus-history-archive .ath-bonus-history-actions{justify-self:start}
}

@media (max-width:560px){
  .ath-bonus-history-archive .ath-bonus-history-form{grid-template-columns:1fr;grid-template-areas:"bank" "search" "year" "sort" "actions"}
  .ath-bonus-history-archive .ath-bonus-history-actions{width:100%;justify-content:flex-start}
  .ath-bonus-history-archive .ath-bonus-history-submit,
  .ath-bonus-history-archive .ath-bonus-history-reset{flex:1 1 140px}
}

/* Phone layout: turn current bonuses table into stacked cards for readability */
@media (max-width:640px){
  .ath-bonuses-wrap:not(.ath-bonus-history-archive){overflow:visible}
  .ath-bonuses-table:not(.ath-bonuses-table-history){
    display:block;
    max-width:none;
    table-layout:auto;
    background:transparent;
    border-radius:0;
  }
  .ath-bonuses-table:not(.ath-bonuses-table-history) colgroup,
  .ath-bonuses-table:not(.ath-bonuses-table-history) thead{display:none}
  .ath-bonuses-table:not(.ath-bonuses-table-history) tbody{display:block}
  .ath-bonuses-table:not(.ath-bonuses-table-history) tbody tr{
    display:block;
    border:1px solid #d9e3ef;
    border-radius:12px;
    background:#fff;
    padding:.25rem .15rem;
    margin:0 0 .6rem;
    box-shadow:0 1px 2px rgba(15,23,42,.04);
  }
  .ath-bonuses-table:not(.ath-bonuses-table-history) tbody tr:nth-child(odd),
  .ath-bonuses-table:not(.ath-bonuses-table-history) tbody tr:nth-child(even),
  .ath-bonuses-table:not(.ath-bonuses-table-history) tbody tr:hover{background:#fff}
  .ath-bonuses-table:not(.ath-bonuses-table-history) tbody td{
    display:grid;
    grid-template-columns:92px minmax(0,1fr);
    align-items:center;
    gap:.55rem;
    border-bottom:1px solid #edf2f7;
    padding:.42rem .55rem;
    white-space:normal;
  }
  .ath-bonuses-table:not(.ath-bonuses-table-history) tbody td:last-child{border-bottom:0}
  .ath-bonuses-table:not(.ath-bonuses-table-history) tbody td::before{
    display:block;
    color:#4b5563;
    font-size:.72rem;
    font-weight:700;
    letter-spacing:.04em;
    text-transform:uppercase;
    line-height:1.2;
  }
  .ath-bonuses-table:not(.ath-bonuses-table-history) tbody td:nth-child(1)::before{content:"Transfer from"}
  .ath-bonuses-table:not(.ath-bonuses-table-history) tbody td:nth-child(2)::before{content:"Transfer to"}
  .ath-bonuses-table:not(.ath-bonuses-table-history) tbody td:nth-child(3)::before{content:"Bonus"}
  .ath-bonuses-table:not(.ath-bonuses-table-history) tbody td:nth-child(4)::before{content:"Expires"}

  .ath-bonuses-table:not(.ath-bonuses-table-history) .entity,
  .ath-bonuses-table:not(.ath-bonuses-table-history) .entity.ath-bonus-entity,
  .ath-bonuses-table:not(.ath-bonuses-table-history) .ath-bonus-entity-link{max-width:none;width:100%}
  .ath-bonuses-table:not(.ath-bonuses-table-history) .ath-bonus-entity-name{font-size:.9rem}

  .ath-bonuses-table:not(.ath-bonuses-table-history) td:nth-child(3),
  .ath-bonuses-table:not(.ath-bonuses-table-history) td.ath-bonus-cell{
    text-align:left;
    min-width:0;
    padding:.42rem .55rem;
  }
  .ath-bonuses-table:not(.ath-bonuses-table-history) .ath-bonus-inline,
  .ath-bonuses-table:not(.ath-bonuses-table-history) .ath-bonus-source-link--with-label,
  .ath-bonuses-table:not(.ath-bonuses-table-history) .pct{justify-content:flex-start}
  .ath-bonuses-table:not(.ath-bonuses-table-history) td:nth-child(4){color:#334155;font-weight:600}
}

/* Additional context-sensitive spacing and layout rules (idempotent append) */
.ath-partners.ath-hide-bank .ath-filter-search { margin-left: 0; }
.ath-partners .ath-filter-bar { display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; }

/* Pills row behaves well when present */
.ath-filter-pills { display:flex; gap:.5rem; flex-wrap:wrap; }

/* Keep table header from “jumping” when filters are gone */
.ath-partners.ath-hide-bank.ath-hide-pills .ath-filter-bar { margin-bottom:.5rem; }

/* Make the RESET btn consistent across breakpoints */
.ath-filter-reset .ath-btn-reset { padding:.5rem .9rem; border-radius:.5rem; }

/* Slightly tighter cells for compact single-partner view */
.ath-partners.ath-hide-bank.ath-hide-pills .ath-table td,
.ath-partners.ath-hide-bank.ath-hide-pills .ath-table th { padding:.65rem .6rem; }

/* Prevent logo squish at narrow widths */
.ath-partners .ath-bank-logo img,
.ath-partners .ath-partner-logo img { max-height:28px; height:auto; width:auto; }
@media (max-width: 640px) {
  .ath-partners .ath-bank-logo img,
  .ath-partners .ath-partner-logo img { max-height:24px; }
}

/* Default: show matrix, hide cards */
.ath-cards { display: none; }

/* Mobile partners: card-first layout for clearer transfer mappings */
@media (max-width: 640px) {
  .ath-partners .ath-matrix { display: none !important; }
  .ath-partners .ath-cards { display: grid; gap: .72rem; }

  .ath-partners .ath-card-partner {
    display: block;
    border: 1px solid #d7e3ef;
    border-radius: 14px;
    padding: .72rem .78rem;
    margin: 0;
    background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
    box-shadow: 0 2px 6px rgba(15, 23, 42, .06);
  }

  .ath-partners .ath-card-partner .ath-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .6rem;
  }

  .ath-partners .ath-card-partner .ath-card-title {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
  }

  .ath-partners .ath-card-partner .ath-card-title .ath-partner-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .55rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
  }

  .ath-partners .ath-partner-logo--card { inline-size: 98px; block-size: 24px; }
  .ath-partners .ath-card-partner .ath-partner-name {
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.2;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .ath-partners .ath-card-partner .ath-card-alliance {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .15rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, .08);
  }

  .ath-partners .ath-card-partner .ath-program-name {
    font-size: .88rem;
    line-height: 1.3;
    color: #516074;
    margin: .22rem 0 0;
    padding-left: calc(98px + .55rem);
    overflow-wrap: anywhere;
  }

  .ath-partners .ath-card-partner .ath-card-banks {
    display: flex;
    flex-direction: column;
    margin-top: .58rem;
    border-top: 1px solid #e6eef7;
    padding-top: .2rem;
  }

  .ath-partners .ath-card-partner .ath-card-bank-row {
    display: grid;
    grid-template-columns: minmax(110px, 46%) minmax(0, 1fr);
    align-items: center;
    gap: .5rem .68rem;
    padding: .52rem 0;
  }

  .ath-partners .ath-card-partner .ath-card-bank-row + .ath-card-bank-row {
    border-top: 1px dashed #e7eef8;
  }

  .ath-partners .ath-cards .ath-bank-left {
    display: flex;
    align-items: center;
    min-width: 0;
  }

  .ath-partners .ath-bank-logo--card { inline-size: 90px; block-size: 22px; }
  .ath-partners .ath-cards .ath-bank-left .ath-bank-name {
    font-weight: 700;
    color: #1f2937;
    font-size: .9rem;
    line-height: 1.2;
  }

  .ath-partners .ath-cards .ath-bank-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: .25rem .45rem;
    min-width: 0;
    text-align: left;
    white-space: normal;
    margin-left: 0;
  }

  .ath-partners .ath-cards .ath-bonus {
    font-weight: 700;
    background: #0f9d74;
    color: #fff;
    border-radius: 999px;
    padding: .06rem .45rem;
    font-size: .8rem;
    line-height: 1.2;
  }

  .ath-partners .ath-cards .ath-rate {
    font-weight: 700;
    font-size: .92rem;
    color: #0f172a;
    line-height: 1.15;
  }

  .ath-partners .ath-cards .ath-speed {
    flex-basis: 100%;
    font-size: .8rem;
    color: #526173;
    line-height: 1.25;
  }
}

@media (max-width: 420px) {
  .ath-partners .ath-card-partner { padding: .66rem .68rem; }
  .ath-partners .ath-partner-logo--card { inline-size: 90px; block-size: 22px; }
  .ath-partners .ath-card-partner .ath-program-name { padding-left: calc(90px + .52rem); }
  .ath-partners .ath-card-partner .ath-card-bank-row {
    grid-template-columns: minmax(96px, 42%) minmax(0, 1fr);
    gap: .45rem .55rem;
  }
  .ath-partners .ath-bank-logo--card { inline-size: 82px; block-size: 20px; }
}

/* Small phones: switch to cards, hide the matrix */
@media (max-width: 480px) {
  .ath-matrix { display: none !important; }
  .ath-cards { display: block; }
  .ath-partner-logo--card{inline-size:112px;block-size:28px}
  .ath-bank-logo--card{inline-size:84px;block-size:20px}
  .ath-bonus-entity-logo{inline-size:82px;block-size:16px}
  .ath-bonuses-table .ath-bonus-entity-logo--bank{width:100px!important;height:26px!important;inline-size:100px!important;block-size:26px!important}
  .ath-bonuses-table .ath-bonus-entity-logo--partner{width:84px!important;height:26px!important;inline-size:84px!important;block-size:26px!important}
  .ath-bonuses-table .ath-bonus-entity-name{font-size:.82rem}
  .ath-bonuses-table-history .ath-bonus-history-logo--bank{width:96px!important;height:24px!important;inline-size:96px!important;block-size:24px!important}
  .ath-bonuses-table-history .ath-bonus-history-logo--partner{width:80px!important;height:24px!important;inline-size:80px!important;block-size:24px!important}
  .ath-card { display:block; border:1px solid #eee; border-radius:12px; padding:.75rem; margin:.6rem 0; background:#fff; box-shadow:0 2px 4px rgba(0,0,0,.05); }
  .ath-card-partner .ath-card-header { display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
  .ath-card-partner .ath-card-title { display:flex; align-items:center; gap:.5rem; min-width:0; }
  .ath-card-partner .ath-card-title .ath-partner-link { display:inline-flex; align-items:center; gap:.5rem; text-decoration:none; color:inherit; min-width:0; }
  .ath-card-partner .ath-partner-logo { display:flex; align-items:center; flex-shrink:0; }
  .ath-card-partner .ath-partner-logo img { max-height:28px; height:auto; width:auto; }
  .ath-card-partner .ath-partner-name { font-weight:600; font-size:1.02rem; line-height:1.05; color:#111; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .ath-card-partner .ath-card-alliance { margin-left:auto; display:flex; align-items:center; gap:.25rem; }
  .ath-card-partner .ath-card-alliance img { height:18px; width:auto; display:block; }
  .ath-card-partner .ath-program-name { font-size:.9rem; color:#5b6470; margin-top:.2rem; }
  .ath-card-partner .ath-card-banks { display:flex; flex-direction:column; }
  .ath-card-partner .ath-card-bank-row { display:flex; justify-content:space-between; align-items:center; padding:.4rem 0; }
  .ath-card-partner .ath-card-bank-row + .ath-card-bank-row { border-top:1px solid #f1f5f9; }
  .ath-cards .ath-bank-left { display:flex; align-items:center; gap:.5rem; flex-shrink:0; }
  .ath-cards .ath-bank-left .ath-bank-logo { display:inline-flex; align-items:center; }
  .ath-cards .ath-bank-left .ath-bank-logo img { height:20px; width:auto; display:block; }
  .ath-cards .ath-bank-left .ath-bank-name { font-weight:600; color:#1f2937; font-size:.92rem; }
  .ath-cards .ath-bank-meta { display:inline-flex; justify-content:flex-end; align-items:center; gap:.35rem; margin-left:auto; white-space:nowrap; text-align:right; }
  .ath-cards .ath-bonus { font-weight:700; background:#EAF7EE; color:#1B8733; border-radius:12px; padding:0 .4rem; font-size:.85rem; }
  .ath-cards .ath-rate, .ath-cards .ath-speed { font-weight:600; font-size:.9rem; }
}

/* Tablet/desktop logos slightly smaller than phones (keeps header tight) */
@media (min-width: 768px) {
  .ath-partner-logo img { max-height:22px; }
  .ath-bank-logo img { max-height:20px; }
}

/* Desktop/Tablet header logo sizing */
.ath-partners .ath-bank-logo img {
  height: auto;
  width: auto;
  max-height: 28px;
  object-fit: contain;
}

/* Slightly smaller on mid tablets */
@media (min-width: 640px) and (max-width: 1023.98px) {
  .ath-partners .ath-bank-logo img { max-height: 26px; }
}

/* Matrix header bank logo sizing (desktop/tablet only) */
.ath-partners .ath-matrix thead th > .ath-bank-logo img {
  max-height: 22px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  vertical-align: middle;
  display: inline-block;
}
/* Mid tablets a touch smaller */
@media (min-width: 640px) and (max-width: 1023.98px) {
  .ath-partners .ath-matrix thead th > .ath-bank-logo img {
    max-height: 20px !important;
  }
}

/* Citi: white chip behind the bank logo (header + cells) */
.ath-partners .bank-slug-citi .ath-bank-logo,
.ath-cards .bank-slug-citi .ath-bank-logo {
  background: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(15,23,42,.08) inset;
}
.ath-partners .ath-matrix thead .bank-slug-citi .ath-bank-logo {
  min-width: 124px;
  min-height: 34px;
  justify-content: center;
}
.ath-partners .ath-matrix thead .bank-slug-citi .ath-bank-logo .ath-bank-link {
  width: 100%;
}
.ath-partners .ath-matrix thead .bank-slug-citi .ath-bank-logo .ath-bank-logo__frame {
  width: 108px;
  height: 24px;
}
.ath-partners .ath-matrix thead .bank-slug-citi .ath-bank-logo .ath-bank-logo__image {
  object-position: center center !important;
}
/* Keep header cells compact */
.ath-partners .ath-matrix thead th {
  padding-top: 8px;
  padding-bottom: 8px;
  line-height: 1.1;
}
