/* Best credit cards (/best-credit-cards/). Built on the theme tokens. */

/* The page template is narrow; this page needs the full width. Text blocks stay readable. */
.ycc-page .page-article.wrap--narrow { max-width: var(--wrap); }
.ycc-page .page-article > .article__title { max-width: 900px; }
.ycc-intro, .ycc-after { max-width: 780px; }

.ycc { --line: #d5dbd4; font-size: 17px; }
.ycc-sub { font-size: 14.5px; color: var(--muted); font-weight: 400; }
.ycc-h { font: 600 clamp(24px, 3vw, 30px)/1.2 var(--serif); color: var(--ink); margin: 0 0 16px; }
.ycc-byline { font-size: 15.5px; color: var(--muted); margin: 0 0 12px; }
.ycc-lede { font-size: 19px; line-height: 1.55; margin: 0 0 12px; }
.ycc-disclose { font-size: 14.5px; color: var(--muted); border-left: 3px solid var(--rule); padding: 2px 0 2px 12px; margin: 0 0 32px; }

/* Card art: issuer colour, no logos. */
.ycc-art { --c: #2b3632; position: relative; flex: 0 0 auto; width: 132px; aspect-ratio: 1.586; border-radius: 9px; color: #fff; overflow: hidden;
	background: linear-gradient(135deg, var(--c) 0%, color-mix(in srgb, var(--c) 62%, #000) 100%); box-shadow: 0 1px 2px rgba(0,0,0,.18), inset 0 0 0 1px rgba(255,255,255,.08); }
.ycc-art::after { content: ""; position: absolute; inset: -40% -30% auto auto; width: 90%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.09); }
.ycc-art__issuer { position: absolute; left: 10px; top: 8px; font: 700 12px/1.1 var(--sans); letter-spacing: .02em; max-width: 80%; }
.ycc-art__chip { position: absolute; left: 10px; top: 42%; width: 20px; height: 15px; border-radius: 3px; background: linear-gradient(135deg, #e9d9a6, #b89b54); }
.ycc-art__net { position: absolute; right: 10px; bottom: 7px; font: 700 italic 11px/1 var(--sans); opacity: .92; }

/* Top picks */
.ycc-picks-sec { margin: 0 0 44px; }
.ycc-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.ycc-pick { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.ycc-picks > :first-child, .ycc-picks > .ycc-pos:first-child > .ycc-pick { border: 2px solid var(--accent); }
.ycc-picks > .ycc-pos:first-child { border: 0; }
.ycc-pick__label { align-self: flex-start; margin: 0; padding: 4px 10px; border-radius: 99px; background: var(--accent-wash); color: var(--accent-strong); font: 700 13px/1.3 var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.ycc-pick .ycc-art { width: 150px; }
.ycc-pick__name { font: 650 20px/1.3 var(--sans); color: var(--ink); margin: 4px 0 0; }
.ycc-pick__why { margin: 0; font-size: 16.5px; line-height: 1.5; }
.ycc-pick__facts { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 4px; font-size: 16px; }
.ycc-pick__facts li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted var(--rule); padding: 4px 0; }
.ycc-pick__facts span { color: var(--muted); }
.ycc-pick .yt-btn { margin-top: auto; }
.ycc-pick__more { text-align: center; font-size: 15.5px; font-weight: 600; }

/* Chips + controls */
.ycc-tool { scroll-margin-top: 80px; }
.ycc-chips, .ycc-view { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.ycc-chip { min-height: 44px; padding: 8px 16px; border: 1.5px solid #c9d1ca; border-radius: 99px; background: var(--paper); color: var(--ink); font: 600 16px/1.2 var(--sans); cursor: pointer; }
.ycc-chip:hover { border-color: var(--accent); }
.ycc-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.ycc-chip:focus-visible, .ycc-linkbtn:focus-visible, .ycc-table button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ycc-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; align-items: end; padding: 18px; background: var(--wash); border-radius: 12px; margin: 0 0 14px; }
.ycc-field { display: grid; gap: 4px; font: 600 14.5px/1.3 var(--sans); color: var(--ink); }
.ycc-field .yt-select { min-height: 48px; font-size: 16.5px; }
.ycc-spend { grid-column: 1 / -1; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; }
.ycc-spend > summary { cursor: pointer; min-height: 50px; display: flex; align-items: center; gap: 8px; font: 650 16.5px/1.3 var(--sans); color: var(--ink); }
.ycc-spend[open] > summary { border-bottom: 1px solid var(--rule); margin-bottom: 10px; }
.ycc-spend__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ycc-money { display: grid; gap: 4px; font-size: 15px; font-weight: 600; color: var(--ink); }
.ycc-money__in { position: relative; }
.ycc-money__in > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.ycc-money .yt-input { padding-left: 26px; min-height: 48px; }
.ycc-spend .yt-actions { margin: 10px 0 14px; }
.ycc-check { grid-column: 1 / 3; display: flex; align-items: center; gap: 10px; font-size: 16px; min-height: 44px; }
.ycc-check input { width: 22px; height: 22px; accent-color: var(--accent); }
.ycc-view { grid-column: 3 / -1; justify-content: flex-end; margin: 0; }
.ycc-count { font-size: 15.5px; color: var(--muted); margin: 0 0 12px; }

/* Result cards */
.ycc-list { display: grid; gap: 14px; }
.ycc-item { position: relative; padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); scroll-margin-top: 80px; }
.ycc-partner { margin: 0; align-self: flex-start; font: 600 12px/1.3 var(--sans); color: var(--muted); letter-spacing: .02em; }
.ycc-item .ycc-partner { position: absolute; right: 22px; top: 6px; }
/* Pitch preview only: outline the paid positions. */
.ycc-pos { position: relative; outline: 3px dashed #d4731c; outline-offset: 6px; border-radius: 12px; margin-top: 30px; }
.ycc-pos__tag { position: absolute; left: 0; top: -34px; margin: 0; padding: 3px 10px; border-radius: 6px; background: #d4731c; color: #fff; font: 700 13px/1.4 var(--sans); z-index: 2; }
.ycc-pos > .ycc-pick { height: 100%; }
.ycc-flag { margin: -6px 0 12px; font: 700 12.5px/1.3 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: #5a5446; }
.ycc-item__top { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: start; }
.ycc-item__name { font: 650 20px/1.3 var(--sans); color: var(--ink); margin: 0; }
.ycc-item__best { margin: 3px 0 0; color: var(--muted); font-size: 16px; }
.ycc-value { margin: 8px 0 0; display: inline-block; padding: 5px 11px; border-radius: 8px; background: var(--highlight); font-size: 15.5px; color: var(--ink); }
.ycc-item__cta { display: grid; gap: 8px; justify-items: stretch; min-width: 190px; }
.ycc-compare { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15.5px; min-height: 40px; cursor: pointer; }
.ycc-compare input { width: 20px; height: 20px; accent-color: var(--accent); }
.ycc-compare:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.ycc-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin: 16px 0 0; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.ycc-stats > div { padding: 10px 12px; border-right: 1px solid var(--rule); }
.ycc-stats > div:last-child { border-right: 0; }
.ycc-stats dt { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 2px; }
.ycc-stats dd { margin: 0; font: 650 16.5px/1.3 var(--sans); color: var(--ink); }
.ycc-offer { margin: 12px 0 0; font-size: 16px; }
.ycc-more { margin-top: 12px; }
.ycc-more > summary { cursor: pointer; font-weight: 650; color: var(--accent); min-height: 40px; display: flex; align-items: center; font-size: 16px; }
.ycc-more__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; padding-top: 6px; }
.ycc-more h4 { font: 700 15px/1.3 var(--sans); color: var(--ink); margin: 12px 0 6px; }
.ycc-earn { border-collapse: collapse; width: 100%; font-size: 16px; }
.ycc-earn th, .ycc-earn td { text-align: left; padding: 5px 0; border-bottom: 1px dotted var(--rule); font-weight: 400; }
.ycc-earn td { text-align: right; font-weight: 650; color: var(--ink); }
.ycc-list, .ycc-pc { font-size: 16px; }
ul.ycc-list, .ycc-pc { margin: 0; padding-left: 20px; display: block; }
.ycc-pc { list-style: none; padding: 0; }
.ycc-pc li { position: relative; padding-left: 24px; margin: 4px 0; }
.ycc-pro::before, .ycc-con::before { position: absolute; left: 0; font-weight: 800; }
.ycc-pro::before { content: "+"; color: #1d6b43; }
.ycc-con::before { content: "–"; color: var(--brand-strong); }
.ycc-src { margin: 14px 0 0; }

/* Table view */
.ycc-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.ycc-table { border-collapse: collapse; width: 100%; font-size: 15.5px; min-width: 860px; }
.ycc-table th, .ycc-table td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
.ycc-table thead th { background: var(--wash); vertical-align: bottom; }
.ycc-table th:first-child { text-align: left; white-space: normal; min-width: 220px; position: sticky; left: 0; background: var(--paper); }
.ycc-table thead th:first-child { background: var(--wash); }
.ycc-table tbody th { font-weight: 600; }
.ycc-table button { all: unset; cursor: pointer; font: 700 13.5px/1.25 var(--sans); color: var(--ink); white-space: normal; }
.ycc-table [aria-sort] button { color: var(--accent); }
.ycc-table tr.is-sponsored { background: #fbfaf6; }
.ycc-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: #efece3; color: #5a5446; font: 700 11px/1.5 var(--sans); text-transform: uppercase; letter-spacing: .04em; }
.ycc-empty { padding: 24px; text-align: center; background: var(--wash); border-radius: 12px; }
.ycc-linkbtn { all: unset; cursor: pointer; color: var(--accent); font-weight: 650; text-decoration: underline; }

/* Compare tray + dialog */
.ycc-tray { position: fixed; z-index: 50; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; background: var(--ink); color: #fff; border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.25); max-width: calc(100vw - 24px); }
.ycc-tray p, .ycc-tray strong { margin: 0; white-space: nowrap; color: #fff; }
.ycc-tray .yt-btn { min-height: 44px; padding: 8px 16px; }
.ycc-tray .yt-btn:disabled { opacity: .5; cursor: not-allowed; }
.ycc-tray .yt-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.ycc-dialog { width: min(1000px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.ycc-dialog::backdrop { background: rgba(21,32,28,.55); }
.ycc-dialog__head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.ycc-dialog__head h2 { font: 600 24px/1.2 var(--serif); margin: 0; }
#ycc-dialog-body { padding: 16px 20px 20px; }
.ycc-cmp-wrap { overflow-x: auto; }
.ycc-cmp { border-collapse: collapse; width: 100%; font-size: 16px; }
.ycc-cmp th, .ycc-cmp td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; text-align: left; }
.ycc-cmp thead th { font: 650 16.5px/1.3 var(--sans); color: var(--ink); min-width: 200px; }
.ycc-cmp thead .yt-btn { display: flex; margin-top: 10px; min-height: 44px; }
.ycc-cmp tbody th { font-weight: 600; color: var(--muted); width: 170px; }
.ycc-cmp ul { margin: 0; padding-left: 18px; }

/* After-tool content: how we pick, FAQ */
.ycc-after { margin-top: 56px; }
.ycc-after h2 { font: 600 clamp(24px, 3vw, 30px)/1.2 var(--serif); color: var(--ink); margin: 40px 0 12px; }
.ycc-after p, .ycc-after li { font-size: 17.5px; line-height: 1.6; }
.ycc-faq { border-bottom: 1px solid var(--rule); padding: 4px 0; }
.ycc-faq > summary { cursor: pointer; font: 650 18px/1.4 var(--sans); color: var(--ink); padding: 12px 0; }
.ycc-faq > p { margin: 0 0 14px; }

@media (max-width: 960px) {
	.ycc-bar { grid-template-columns: 1fr 1fr; }
	.ycc-check, .ycc-view { grid-column: 1 / -1; justify-content: flex-start; }
	.ycc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ycc-stats > div:nth-child(3n) { border-right: 0; }
	.ycc-stats > div:nth-child(-n+3) { border-bottom: 1px solid var(--rule); }
}
@media (max-width: 680px) {
	.ycc-bar { grid-template-columns: 1fr; padding: 14px; }
	.ycc-item { padding: 16px; }
	.ycc-item__top { grid-template-columns: auto 1fr; gap: 12px 14px; }
	.ycc-item .ycc-art { width: 84px; }
	.ycc-item .ycc-art__issuer { font-size: 9.5px; left: 7px; top: 6px; }
	.ycc-item .ycc-art__chip { left: 7px; width: 14px; height: 11px; }
	.ycc-item .ycc-art__net { font-size: 9px; right: 7px; bottom: 5px; }
	.ycc-item__cta { grid-column: 1 / -1; min-width: 0; grid-template-columns: 1fr auto; align-items: center; }
	.ycc-item__cta .yt-btn { width: 100%; }
	.ycc-item__name { font-size: 18px; }
	.ycc-stats { grid-template-columns: 1fr 1fr; }
	.ycc-stats > div { border-right: 0; border-bottom: 1px solid var(--rule); }
	.ycc-stats > div:nth-child(odd) { border-right: 1px solid var(--rule); }
	.ycc-stats > div:nth-last-child(-n+2) { border-bottom: 0; }
	.ycc-more__grid { grid-template-columns: 1fr; }
	.ycc-tray { left: 12px; right: 12px; transform: none; flex-wrap: wrap; justify-content: space-between; }
	.ycc-tray .yt-btn { width: auto; }
	.ycc-cmp tbody th { width: 96px; font-size: 14.5px; }
	.ycc-cmp thead th { min-width: 150px; font-size: 15.5px; }
	.ycc-cmp th, .ycc-cmp td { padding: 8px; font-size: 15px; }
	.ycc-dialog__head .yt-btn { width: auto; min-height: 44px; }
	.ycc-dialog__head h2 { font-size: 21px; }
}
@media print {
	.ycc-bar, .ycc-chips, .ycc-item__cta, .ycc-tray { display: none !important; }
	.ycc-more { display: block; }
}
