[hidden] { display: none !important; }
nav { display:flex; gap:12px; align-items:center; font-size:14px; white-space:nowrap; }
nav a { text-decoration:none; }
.best-main { max-width:1180px; }
.best-hero { min-height:330px; }
.best-hero h1 { margin:12px 0 15px; }
.best-hero-note { display:grid; min-width:220px; gap:8px; align-content:center; justify-items:start; padding:30px; border-radius:24px; color:var(--theme-muted); background:var(--theme-surface); }
.best-hero-note strong { color:var(--theme-primary); font-size:92px; line-height:1; letter-spacing:-5px; }
.best-section-line { display:flex; justify-content:space-between; gap:16px; padding:14px 0; border-top:1px solid var(--theme-line); border-bottom:1px solid var(--theme-line); color:var(--theme-muted); font-size:11px; letter-spacing:.12em; }
.best-controls { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:end; gap:24px; margin:24px 0; padding:25px; border-radius:24px; background:var(--theme-surface); }
.best-results h2 { margin:5px 0 8px; font-size:24px; }
.best-summary { color:var(--theme-muted); font-size:13px; }
.best-form { min-width:0; }
.best-form label,.best-method-controls label { display:block; margin-bottom:7px; color:var(--theme-muted); font-size:13px; }
.best-form-row { display:grid; grid-template-columns:minmax(0,1fr) 140px; gap:12px; }
.best-form-row .compare-button { grid-column:auto; }
#vue-app #spend { width:100%; min-height:44px; padding:10px 14px; border:0; border-radius:14px; color:var(--theme-ink); background:var(--theme-canvas); box-shadow:inset 0 0 0 1px var(--theme-line); }
.best-results { min-height:220px; }
.best-results-heading { display:flex; align-items:end; justify-content:space-between; gap:24px; margin:25px 0 20px; }
.best-method-controls { min-width:0; width:100%; }
.best-method-controls select { width:100%; }
.best-filter-row { grid-column:1 / -1; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; align-items:end; gap:24px; padding-top:22px; border-top:1px solid var(--theme-line); }
.best-date-filter > span { display:block; margin-bottom:8px; color:var(--theme-muted); font-size:13px; }
.best-date-options { display:flex; gap:6px; flex-wrap:wrap; }
.best-date-options button { min-height:44px; padding:8px 16px; border:1px solid var(--theme-line); border-radius:10px; background:var(--theme-canvas); color:var(--theme-ink); cursor:pointer; }
.best-date-options button[aria-pressed="true"] { background:var(--theme-primary); color:var(--theme-on-primary); border-color:var(--theme-primary); }
.best-category-toggle { display:flex; align-items:center; gap:10px; min-height:44px; font-size:14px; cursor:pointer; position:relative; }
#vue-app .best-category-toggle input { position:absolute; inset:0; width:100%; height:100%; min-height:0; margin:0; padding:0; border:0; opacity:0; cursor:pointer; }
.best-switch { width:44px; height:26px; border-radius:20px; background:var(--theme-muted); position:relative; flex-shrink:0; }
.best-switch::after { content:""; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:var(--theme-canvas); transition:transform .15s; }
.best-category-toggle input:checked + .best-switch { background:var(--theme-primary); }
.best-category-toggle input:checked + .best-switch::after { transform:translateX(18px); }
.best-category-toggle input:focus-visible + .best-switch { outline:2px solid var(--theme-ink); outline-offset:3px; }
.best-saving-types { min-width:0; margin:0; padding:0; border:0; }
.best-saving-options { display:flex; flex-wrap:wrap; gap:8px; }
.best-saving-types legend { padding:0; margin-bottom:8px; color:var(--theme-muted); font-size:13px; }
.best-saving-types label { display:flex; align-items:center; gap:8px; min-height:44px; padding:8px 12px; border:1px solid var(--theme-line); border-radius:10px; background:var(--theme-canvas); font-size:14px; white-space:nowrap; cursor:pointer; }
.best-saving-types label:has(input:checked) { border-color:var(--theme-primary); }
#vue-app .best-saving-types input { flex:0 0 18px; width:18px; height:18px; min-height:0; margin:0; padding:0; border:0; border-radius:0; box-shadow:none; accent-color:var(--theme-primary); }
.best-saving-types label:has(input:focus-visible),.best-date-options button:focus-visible { outline:2px solid var(--theme-ink); outline-offset:3px; }
.best-list { display:grid; gap:10px; }
.best-pagination { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; margin:28px 0; }
.best-pagination button { min-width:40px; min-height:44px; padding:8px 12px; border:1px solid var(--theme-line); border-radius:12px; background:var(--theme-surface); color:var(--theme-ink); cursor:pointer; }
.best-pagination button[aria-current="page"] { background:var(--theme-primary); color:var(--theme-on-primary); }
.best-pagination button:disabled { opacity:.4; cursor:default; }
.best-card { display:grid; grid-template-columns:32px minmax(0,1fr) auto; grid-template-areas:"rank meta saving" "content content content" "details details details"; gap:7px 10px; padding:12px 16px; border-radius:16px; background:var(--theme-surface); box-shadow:0 6px 22px rgba(0,0,0,.06); }
.best-rank { grid-area:rank; display:grid; width:32px; height:32px; place-items:center; border-radius:50%; color:var(--theme-on-primary); background:var(--theme-primary); font-weight:750; font-size:13px; }
.best-saving { grid-area:saving; align-self:center; justify-self:end; color:var(--theme-accent); font-size:22px; font-weight:700; white-space:nowrap; text-align:right; }
.best-content { grid-area:content; min-width:0; }
.best-meta { grid-area:meta; align-self:center; margin:0; color:var(--theme-muted); font-size:15px; font-weight:500; line-height:1.4; overflow-wrap:anywhere; }
.best-offers { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; }
.best-offer { min-width:0; padding:8px 10px; border-radius:10px; background:var(--theme-canvas); }
.best-offer-body { display:flex; align-items:flex-start; gap:12px; }
.best-offer-copy { flex:1; min-width:0; }
.best-offer-body .credit-card-thumb { display:block; flex:0 0 96px; width:96px; height:72px; object-fit:contain; }
.best-offer small { display:block; margin-bottom:2px; color:var(--theme-muted); font-size:11px; }
.best-offer-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:3px; }
.best-offer .best-contribution { color:var(--theme-accent); font-size:14px; white-space:nowrap; }
.best-offer strong { display:block; overflow-wrap:anywhere; font-size:14px; line-height:1.4; }
.best-split { margin:4px 0 0; color:var(--theme-muted); font-size:12px; }
.best-badges { display:flex; flex-wrap:wrap; gap:6px; margin-top:9px; }
.best-badge { padding:3px 7px; border-radius:7px; color:var(--theme-label-condition-ink); background:var(--theme-label-condition-bg); font-size:11px; }
.best-details { grid-area:details; min-width:0; border-top:1px solid var(--theme-line); padding-top:5px; }
.best-details summary { color:var(--theme-muted); font-size:12px; cursor:pointer; }
.best-detail-columns { display:grid; grid-template-columns:1fr 1fr; gap:18px; padding-top:10px; }
.best-detail-columns p { margin:5px 0; color:var(--theme-muted); font-size:12px; overflow-wrap:anywhere; }
.best-detail-columns a { color:var(--theme-accent); text-underline-offset:3px; }
.best-empty { padding:54px 20px; text-align:center; border-radius:22px; background:var(--theme-surface); }
.best-empty p { color:var(--theme-muted); }
@media(max-width:1100px) {
  .best-filter-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .best-category-toggle { grid-column:1 / -1; justify-self:start; }
}
@media(max-width:600px) {
  .best-controls { padding:20px; gap:20px; }
  .best-filter-row { grid-template-columns:1fr; gap:20px; }
}
@media(max-width:760px) {
  nav { gap:8px; font-size:12px; }
  .best-hero { min-height:260px; }
  .best-hero-note { min-width:150px; padding:19px; }
  .best-hero-note strong { font-size:68px; }
  .best-results-heading { align-items:stretch; flex-direction:column; }
  .best-controls { grid-template-columns:1fr; }
  .best-method-controls { width:100%; }
  .best-card { padding:12px; gap:7px 8px; }
  .best-saving { font-size:20px; }
  .best-rank { width:32px; height:32px; }
  .best-offers { grid-template-columns:1fr; }
  .best-detail-columns { grid-template-columns:1fr; }
  .best-section-line { font-size:9px; }
}
@media(max-width:460px) {
  nav { flex-wrap:wrap; justify-content:flex-end; white-space:normal; }
  nav .language-switch { width:100px; }
  .best-hero { display:block; padding-top:10px; }
  .best-hero-note { display:flex; align-items:center; justify-content:space-between; margin-top:20px; }
  .best-hero-note strong { font-size:50px; }
  .best-form-row { grid-template-columns:1fr; }
}

/* Each card is a separate, expandable column in the comparison row. */
#vue-app .best-offers { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); grid-template-columns:none; gap:12px; align-items:start; }
#vue-app .best-card-choice { min-width:0; padding:20px; border:1px solid var(--theme-line); border-radius:12px; background:var(--theme-surface); }
#vue-app .best-card-choice .card-meta { justify-content:center; margin-bottom:6px; }
#vue-app .best-card-name { margin:0 0 8px; font-size:20px; line-height:1.3; overflow-wrap:anywhere; }
#vue-app .best-choice-rank { color:var(--theme-accent); }
#vue-app .best-card-choice .eligibility-label { border-radius:2px; font-size:12px; }
#vue-app .best-card-choice .saving-rate { display:block; margin:0; color:var(--theme-accent); font-size:36px; line-height:1.15; font-weight:700; }
#vue-app .best-card-choice .saving-amount { display:block; margin-top:6px; color:var(--theme-muted); font-size:14px; line-height:1.4; font-weight:400; }
#vue-app .best-card-choice .applied-offers { display:grid; gap:10px; margin:0; padding:0; background:transparent; }
#vue-app .best-card-choice .offer-row-summary { display:grid; }
#vue-app .best-card-choice .offer-title-link { display:block; font-size:14px; line-height:1.4; }
#vue-app .best-card-choice .offer-period { margin:0 10px; font-size:12px; color:var(--theme-muted); }
#vue-app .best-card-choice .unified-value { color:var(--theme-accent); font-size:16px; white-space:nowrap; }
#vue-app .best-card-choice .offer-cap-caption { display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px; color:var(--theme-muted); font-size:12px; }
#vue-app .best-card-choice progress { display:block; width:100%; height:3px; margin-top:7px; border:0; background:var(--theme-line); accent-color:var(--theme-accent); }
#vue-app .best-card-choice progress::-webkit-progress-bar { background:var(--theme-line); }
#vue-app .best-card-choice progress::-webkit-progress-value { background:var(--theme-accent); }
#vue-app .best-choice-terms { margin:0; padding:10px 12px; border:1px solid var(--theme-line); border-radius:3px; }
#vue-app .best-choice-terms summary { cursor:pointer; font-size:12px; font-weight:600; }
    #vue-app .best-card-choice .applied-offer.applied-offer { --offer-mesh-bg:color-mix(in srgb,var(--offer-category-color,var(--theme-accent)) 10%,var(--theme-surface)); padding:0; background:transparent; border-radius:12px; }
    #vue-app .best-card-choice .applied-offer.applied-offer > .offer-row-summary.offer-row-summary { grid-template-columns:auto minmax(0,1fr) auto; gap:0; padding:0; }
    #vue-app .best-card-choice .applied-offer .offer-category-badge { grid-column:1; align-self:center; margin:8px 12px 8px 0; padding:6px 10px; border-radius:8px; color:var(--theme-on-primary); background:var(--offer-category-color,var(--theme-accent)); line-height:1.4; max-width:8em; min-width:0; white-space:normal; text-align:center; overflow-wrap:anywhere; }
    #vue-app .best-card-choice .applied-offer .offer-mesh-title { position:relative; align-self:stretch; grid-column:2; padding:10px 0 10px 12px; background:var(--offer-mesh-bg); border-radius:16px 0 0 0; min-width:0; }
    #vue-app .best-card-choice .applied-offer .offer-mesh-title::before { content:""; position:absolute; left:-16px; bottom:0; width:16px; height:16px; pointer-events:none; background:radial-gradient(circle at 0 0,transparent 15.5px,var(--offer-mesh-bg) 16px); }
    #vue-app .best-card-choice .applied-offer .offer-label { margin:0; align-items:flex-start; gap:8px; }
    #vue-app .best-card-choice .applied-offer .offer-title-link { padding:7px 10px; border:0; border-radius:8px; background:transparent; }
    #vue-app .best-card-choice .applied-offer .offer-value { grid-column:3; align-self:stretch; display:flex; flex-direction:column; align-items:flex-end; justify-content:flex-start; gap:2px; padding:12px; background:var(--offer-mesh-bg); border-radius:0 12px 0 0; }
    #vue-app .best-card-choice .applied-offer .offer-value .offer-rate { order:1; text-align:right; }
    #vue-app .best-card-choice .applied-offer .offer-value .unified-value { order:0; }
    #vue-app .best-card-choice .applied-offer .offer-badges { grid-column:1 / -1; margin:0; padding:10px 12px; background:var(--offer-mesh-bg); border-radius:12px 0 12px 12px; }
    #vue-app .best-card-choice .applied-offer:has(> .offer-cap) .offer-badges,#vue-app .best-card-choice .applied-offer:has(.offer-merchants) .offer-badges { border-bottom-left-radius:0; border-bottom-right-radius:0; }
    #vue-app .best-card-choice .applied-offer .offer-merchants { margin:0; padding:0 12px 10px; background:var(--offer-mesh-bg); border-radius:0 0 12px 12px; }
    #vue-app .best-card-choice .applied-offer > .offer-cap,#vue-app .best-card-choice .applied-offer > .inactive-offer-content { margin:0; padding:8px 12px 12px; background:var(--offer-mesh-bg); border-radius:0 0 12px 12px; }
    /* Expanded offer details fit the narrower card columns at every width. */
      #vue-app .best-card-choice .applied-offer .offer-category-badge { max-width:8em; margin-right:8px; }
      #vue-app .best-card-choice .applied-offer .offer-mesh-title { grid-column:2 / -1; padding-right:12px; border-top-right-radius:12px; }
      #vue-app .best-card-choice .applied-offer .offer-value { grid-column:1 / -1; justify-content:flex-end; border-radius:12px 0 0 0; }
      #vue-app .best-card-choice .applied-offer .offer-badges { border-top-left-radius:0; }

#vue-app .best-card-choice .card-identity { display:block; min-width:0; }
#vue-app .best-card-choice .applied-offer { display:block; }

/* Promotion identity follows the credit card heading layout. */
#vue-app .best-item-header { grid-area:header; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:16px; padding:20px; border:1px solid var(--theme-line); border-radius:12px; }
#vue-app .best-promotion-identity { min-width:0; }
#vue-app .best-item-header .card-meta { margin-bottom:6px; font-size:13px; }
#vue-app .best-item-header .best-card-name { margin:0; font-size:22px; }
#vue-app .best-item-header .saving-amount { font-size:20px; line-height:1.15; }
#vue-app .best-item-header .saving-rate { display:block; margin-top:4px; }
@media(max-width:520px) { #vue-app .best-item-header { grid-template-columns:minmax(0,1fr); gap:10px; } #vue-app .best-item-header .best-choice-saving { text-align:left; } #vue-app .best-item-header .best-card-name { font-size:18px; } #vue-app .best-item-header .saving-amount { font-size:18px; } }

/* Native disclosure keeps the entire column keyboard-accessible. */
#vue-app details.best-card-choice { display:block; margin:0; }
#vue-app .best-card-toggle { display:flex; flex-direction:column; align-items:center; gap:16px; cursor:pointer; list-style:none; text-align:center; }
#vue-app .best-card-toggle::-webkit-details-marker { display:none; }
#vue-app .best-card-toggle:focus-visible { outline:2px solid var(--theme-accent); outline-offset:6px; border-radius:6px; }
#vue-app .best-card-toggle > .credit-card-image { width:160px; max-width:100%; margin:0; }
#vue-app .best-card-toggle .best-choice-saving { text-align:center; }
#vue-app .best-card-toggle .best-card-name::after { content:' +'; color:var(--theme-muted); font-weight:400; }
#vue-app .best-card-choice[open] > .best-card-toggle .best-card-name::after { content:' −'; }
#vue-app .best-card-choice > .applied-offers,#vue-app .best-card-choice > .best-choice-terms { margin:20px 0 0; text-align:left; overflow-wrap:anywhere; }
#vue-app .best-combine-symbol { display:grid; place-items:center; height:40px; color:var(--theme-accent); font-size:28px; line-height:1; font-weight:500; }
#vue-app .best-offers > .best-split { grid-column:1 / -1; }
@media(max-width:760px) {
  /* Keep alternatives in a row on phones; scroll this row, never the page. */
  #vue-app .best-offers { grid-auto-columns:minmax(230px,1fr); overflow-x:auto; padding:6px 2px 12px; scroll-snap-type:x proximity; }
  #vue-app .best-card-choice { padding:16px; scroll-snap-align:start; }
  #vue-app .best-card-name { font-size:18px; }
  #vue-app .best-card-choice .saving-rate { font-size:32px; }
}

/* The promotion rank spans the category and title rows. */
#vue-app .best-promotion-identity-row { display:grid; grid-template-columns:40px minmax(0,1fr); gap:16px; align-items:center; min-width:0; }
#vue-app .best-promotion-identity-row > .best-rank { grid-area:auto; width:32px; height:32px; border-radius:50%; }
@media(max-width:520px) { #vue-app .best-item-header > .best-choice-saving { padding-left:56px; } }
