/* Car pages (/cars/...): server-rendered pages for search engines.
   Uses the site's tokens, header, footer and buttons from styles.css. */
.page { padding-top: 16px; padding-bottom: 56px; }
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--text); font-weight: 500; }

.pg-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; align-items: start; margin-bottom: 24px; }
.pg-head-plain { grid-template-columns: 1fr; }
.pg-head h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; margin: 6px 0 12px; }
.lede { font-size: 17px; line-height: 1.55; margin: 0 0 12px; max-width: 62ch; }
.pg-photo { margin: 0; }
.pg-photo img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); display: block; }
.pg-photo figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.pg-photo figcaption a { color: var(--muted); }
.pg-verdict { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.pg-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.seo-page .pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--text); }
.seo-page .tone-great, .seo-page .tone-good { background: #dcf3e4; color: #0f5c2e; }
.seo-page .tone-neutral { background: var(--surface-2); color: var(--text); }
.seo-page .tone-fair, .seo-page .tone-warn { background: #fdf0d5; color: #8a4a06; }
.seo-page .tone-poor, .seo-page .tone-bad { background: #fde2e1; color: #9b1c1c; }

.pg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 16px; }
.pg-stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.pg-num { font: 600 26px/1.15 var(--serif); margin: 4px 0 2px; }
.pg-num small { font: 500 14px var(--sans); color: var(--muted); }
.pg-disclaimer { display: block; margin-bottom: 8px; }

.pg-section { margin-top: 36px; max-width: 820px; }
.pg-section h2 { font-size: 24px; margin: 0 0 12px; }

.pg-bars { display: grid; gap: 10px; }
.pg-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 15px; }
.pg-bar i { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pg-bar s { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

.pg-recalls { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.pg-recalls details, .pg-faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.pg-recalls summary, .pg-faq summary { cursor: pointer; }
.pg-recalls summary b { display: block; }
.pg-recalls summary span { font-size: 13px; color: var(--muted); }
.pg-recalls p, .pg-faq p { margin: 10px 0 0; font-size: 15px; }
.pg-faq { margin-bottom: 8px; }
.pg-faq summary { font-weight: 600; }

.pg-partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.pg-partner { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); text-decoration: none; color: var(--text); }
.pg-partner:hover { border-color: var(--brand); }
.pg-partner b { color: var(--brand); }
.pg-partner span { font-size: 14px; color: var(--muted); }
.disclosure { margin-top: 8px; }

.pg-scroll { overflow-x: auto; }
.pg-table, .pg-years { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.pg-table th, .pg-table td, .pg-years th, .pg-years td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.pg-table thead th, .pg-years thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
.pg-years { max-width: 420px; }
.pg-years tr[aria-current] { background: var(--brand-soft); }

.pg-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pg-list li { display: grid; gap: 6px; align-content: start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.pg-list li a { display: grid; text-decoration: none; color: var(--text); }
.pg-list li a b { color: var(--brand); }
.pg-list li a span { font-size: 13px; color: var(--muted); }
.pg-list .pill { justify-self: start; }

@media (max-width: 760px) {
  .pg-head { grid-template-columns: 1fr; gap: 16px; }
  .pg-ctas .btn { flex: 1 1 auto; }
  .seo-page .site-header nav .nav-link { display: none; }
}

/* Model pages: the answer up top, and the years to avoid / best years lists */
.pg-answer { font-size: 18px; border-left: 4px solid var(--brand); padding-left: 14px; }
.pg-years-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pg-years-list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.pg-years-list h3 { margin: 0 0 4px; font-size: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pg-years-list p { margin: 0; font-size: 15px; }
.pg-table .num { font-variant-numeric: tabular-nums; }

/* Buying guides and the dealer badge */
.g-list h3 { gap: 10px; }
.g-rank { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font: 700 14px var(--sans); }
.pg-code { width: 100%; font: 13px/1.4 ui-monospace, Menlo, monospace; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); resize: vertical; }
.pg-table th[scope="rowgroup"] { vertical-align: top; }

/* Heat shades shared by the data guides (same steps as the dealer grid):
   blue = better for the buyer, red = worse, warm gray = about average. */
.seo-page { --heat-b2: #6da7ec; --heat-b1: #b7d3f6; --heat-0: #f0efec; --heat-r1: #f4bcbb; --heat-r2: #e77574; }
.seo-page [data-shade="-2"] { background: var(--heat-b2); }
.seo-page [data-shade="-1"] { background: var(--heat-b1); }
.seo-page [data-shade="0"] { background: var(--heat-0); }
.seo-page [data-shade="1"] { background: var(--heat-r1); }
.seo-page [data-shade="2"] { background: var(--heat-r2); }
.pg-bullets { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.sn-legend { display: flex; align-items: center; gap: 3px; margin: 0 0 10px; font-size: 12px; font-weight: 600; }
.sn-legend span:first-child { margin-right: 4px; }
.sn-legend span:last-child { margin-left: 4px; }
.sn-legend i { width: 22px; height: 12px; border-radius: 3px; }
.sn-strip { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; }
.sn-strip li { display: grid; gap: 2px; padding: 10px 2px; border-radius: 6px; text-align: center; font-variant-numeric: tabular-nums; }
.sn-strip b { font-size: 13px; }
.sn-strip span { font-size: 12px; font-weight: 600; }
.sn-grid { border-collapse: separate; border-spacing: 2px; font-size: 12px; font-variant-numeric: tabular-nums; }
.sn-grid th { font-weight: 600; color: var(--muted); padding: 0 6px 0 0; text-align: right; }
.sn-grid thead th { text-align: center; padding: 0 0 4px; }
.sn-grid abbr { text-decoration: none; }
.sn-grid td { width: 34px; height: 20px; border-radius: 3px; }
.sn-grid .sn-skip td { opacity: .45; }
@media (max-width: 640px) {
  .sn-strip { grid-template-columns: repeat(6, 1fr); }
  .sn-grid td { width: 21px; height: 18px; }
}
@media (forced-colors: active) { .sn-strip li, .sn-grid td { border: 1px solid CanvasText; } }

/* State tile map (api/statemap.py): one square per state. */
.sm { margin: 0; display: grid; gap: 10px; }
.sm-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 3px; max-width: 720px; }
.sm-grid li { aspect-ratio: 1; display: grid; place-content: center; text-align: center; border-radius: 6px; background: var(--heat-0); line-height: 1.1; min-width: 0; }
.sm-grid b { font-size: 13px; }
.sm-grid span { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin: 0; font-size: 12px; font-weight: 600; }
.sm-legend > span:first-child { margin-right: 4px; }
.sm-legend > span:last-child { margin-left: 4px; }
.sm-legend i { display: inline-block; width: 22px; height: 12px; border-radius: 3px; }
.sm-legend-cat { gap: 6px 14px; }
.sm-legend-cat span { display: inline-flex; align-items: center; gap: 6px; margin: 0 !important; }
.seo-page [data-cat="a"] { background: #b7d3f6; }
.seo-page [data-cat="b"] { background: #f9d58b; }
.seo-page [data-cat="c"] { background: #c9b8f0; }
.seo-page [data-cat="d"] { background: var(--heat-0); }
.sm-table summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--brand); }
.sm-table .pg-table { margin-top: 8px; }
@media (max-width: 640px) {
  .sm-grid { gap: 2px; }
  .sm-grid li { border-radius: 4px; }
  .sm-grid b { font-size: 10px; }
  .sm-grid span { display: none; }   /* too small to read; the list below has every value */
}
@media (forced-colors: active) { .sm-grid li { border: 1px solid CanvasText; } }
/* Sequential blue for amounts with no good or bad end (lower -> higher). */
.seo-page [data-seq="1"] { background: #86b6ef; }
.seo-page [data-seq="2"] { background: #5598e7; }
.seo-page [data-seq="3"] { background: #2a78d6; color: #fff; }
.seo-page [data-seq="4"] { background: #1c5cab; color: #fff; }
.seo-page [data-seq="5"] { background: #104281; color: #fff; }

/* Loan-rate heat tables */
.ln-table th small, .ln-table td small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.ln-table td.num { text-align: right; }
.ln-table .ln-cell { text-align: right; font-weight: 600; white-space: nowrap; }
.ln-table thead .num { text-align: right; }
@media (forced-colors: active) { .ln-table .ln-cell { border: 1px solid CanvasText; } }
.ins-strip { grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); }
.pg-callout { margin: 0 0 8px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border-left: 4px solid var(--brand); }
