/* 11-10 tabbed car pages (tabbed.py): centered hero, sticky tab bar, Years / Engines toggle, engine chart. Uses site.css tokens. */
.tbl { max-width: 1040px; margin: 0 auto; }
/* hero: one centered column, the car (or year slider) first and large */
.tbl .tb-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: clamp(18px, 3vw, 36px); max-width: 860px; margin: 0 auto; grid-template-columns: none; }
.tbl .tb-hero .ph-e { order: 0; font-size: 14px; color: var(--mute); margin: 0 0 6px; }
.tbl .tb-hero .tb-img { width: 100%; display: flex; justify-content: center; margin: 0 0 6px; }
.tbl .tb-hero .tb-img .yph { margin: 0 auto; width: min(100%, 720px); display: flex; justify-content: center; position: relative; }
.tbl .tb-hero .tb-img .yph img { width: min(100%, 720px); height: auto; filter: drop-shadow(0 22px 22px rgba(0,0,0,.14)); }
.tbl .tb-hero .tb-img .ysl { width: 100%; max-width: 760px; margin: 0 auto; }
.tbl .tb-hero h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.04; letter-spacing: -.03em; margin: 10px 0 8px; text-wrap: balance; }
.tbl .tb-hero .tb-ans { font-size: clamp(17px, 1.7vw, 20px); color: var(--ink2); max-width: 36em; margin: 0 auto; text-wrap: balance; }
.tbl .tb-hero .yhero { margin: 18px auto 0; justify-content: center; }
.tbl .tb-hero .yswitch, .tbl .tb-hero .modes { margin-top: 16px; justify-content: center; }
.tbl .tb-hero > p:last-child { margin-top: 10px; }
/* tab bar */
.tbx { margin-top: clamp(24px, 4vw, 40px); }
.tb-bar { position: sticky; top: var(--gh-h, 52px); z-index: 40; display: flex; gap: 4px; justify-content: center; padding: 8px 6px; margin: 0 auto 22px;
  background: rgba(255,255,255,.92); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; }
.tb-bar::-webkit-scrollbar { display: none; }
.tb-t { flex: 0 0 auto; font: 600 15px/1 var(--sys, inherit); color: var(--ink2); background: none; border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer; white-space: nowrap; }
.tb-t:hover { background: var(--soft); color: var(--ink); }
.tb-t[aria-selected="true"] { background: var(--ink); color: #fff; }
.tb-t:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tb-p { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 44px); outline: none; }
.tb-p > * { margin: 0; min-width: 0; }
.tbjs .tb-p:not(.on) { display: none; }
/* the tab panels' own sections sit in one column, not the old 2-column grid */
.tbl .tb-p .yc, .tbl .tb-p .ysev, .tbl .tb-p .ybuy, .tbl .tb-p .yyears { max-width: 860px; width: 100%; margin-left: auto; margin-right: auto; }
.tbl .tb-p .yts { max-width: 860px; margin: 0 auto; }
/* Years / Engines toggle */
.tg-b { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--soft); margin: 4px 0 18px; }
.tg-o { font: 600 14px/1 var(--sys, inherit); border: 0; background: none; color: var(--ink2); padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.tg-o[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tg-o:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tbjs .tg-v:not(.on) { display: none; }
/* engine chart: image on the left spanning its years, one row per year on the right */
.engc { display: grid; gap: 14px; }
.engc-h { display: grid; grid-template-columns: minmax(150px, 220px) 52px minmax(0, 1fr) 96px; gap: 12px; font-size: 12px; color: var(--mute); font-weight: 600; padding: 0 4px; }
.engc-h em { font-style: normal; font-weight: 400; }
.engc-h span:nth-child(3), .engc-h span:nth-child(4) { text-align: left; }
.eg { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 4px; border-top: 1px solid var(--line); }
.eg-im { grid-row: 1 / span 2; position: relative; display: block; }
.eg-im img { width: 100%; height: auto; display: block; }
.eg-im .ii { right: 2px; bottom: 2px; }
.eg-n { grid-column: 1; display: flex; flex-direction: column; gap: 2px; }
.eg-n b { font-size: 16px; } .eg-n small { color: var(--mute); font-size: 12.5px; }
.eg-r { grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 4px; }
.er { display: grid; grid-template-columns: 52px minmax(0, 1fr) 44px 52px; gap: 10px; align-items: center; padding: 4px 6px; border-radius: 8px; color: inherit; text-decoration: none; font-variant-numeric: tabular-nums; }
a.er:hover { background: var(--soft); }
.er.cur { background: var(--lemon-soft); }
.er-y { font-weight: 700; }
.er-bt { position: relative; height: 14px; background: var(--soft); border-radius: 6px; overflow: hidden; }
.er-bt i { position: absolute; inset: 0 auto 0 0; background: var(--ink); border-radius: 6px; }
.er-bt em { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--lemon); }
.er-bt.na { background: transparent; }
.er.bad .er-bt i { background: var(--red); } .er.good .er-bt i { background: var(--ink); }
.er b { text-align: right; font-weight: 800; } .er.bad b:not(.er-rk) { color: var(--red); }
.er-rk { color: var(--ink); } .er .mute { color: var(--mute); font-weight: 600; }
@media (max-width: 640px) {
  .tb-bar { justify-content: flex-start; top: 0; margin-left: -16px; margin-right: -16px; padding-left: 12px; }
  .tb-t { font-size: 14px; padding: 9px 13px; }
  .engc-h { display: none; }
  .eg { grid-template-columns: 1fr; }
  .eg-im { grid-row: auto; max-width: 260px; margin: 0 auto; }
  .eg-n { grid-column: 1; text-align: center; align-items: center; }
  .eg-r { grid-column: 1; grid-row: auto; }
  .er { grid-template-columns: 46px minmax(0, 1fr) 40px 44px; gap: 8px; }
}
/* 11-10 spacing fixes: the page root's own flex gap and the old sections' top margins left big empty bands around the tab bar */
.tbl { gap: 0 !important; row-gap: 0 !important; }
.tbl > .tbx { margin-top: clamp(20px, 3vw, 32px) !important; }
.tbl .tb-p > * { margin-top: 0 !important; }
.tbl .tb-p > :first-child { padding-top: 0 !important; }
/* the year page's car sits on the page, not in a white card */
.tbl .tb-hero .yph, .tbl .tb-hero .yph img { background: transparent !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; }
.tbl .tb-hero .yph img { filter: none; }
.tbl .tb-hero .yph .ii { right: 8px; bottom: 8px; }
.tbl .tb-p { padding-top: 0 !important; }
@media (max-width: 640px) {
  .tbl .tb-hero { padding-top: 12px !important; }
  .tbl .tb-hero .yhero { flex-direction: column; align-items: center; text-align: center; }
  .tbl .tb-hero .yhero > * { margin-left: auto; margin-right: auto; }
}
/* 11-10 compact controls (Elijah: "can we make this part better?"): 4 stacked rows -> 2.
   Row A: the year switcher + small All years / Compare / Share icon buttons. Row B: the tab bar with Normal / Advanced at its end. */
.tbl .tb-hero .tb-ctl { display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 10px; margin: 18px auto 0; padding: 0; border: 0; max-width: 100%; }
.tbl .tb-hero .tb-ctl .yseg { flex: 0 1 auto; min-width: 0; padding: 3px; gap: 2px; box-shadow: none; background: var(--soft); }
.tbl .tb-hero .tb-ctl .yseg a, .tbl .tb-hero .tb-ctl .yseg span { padding: 8px 14px; font-size: 15px; min-height: 40px; display: inline-flex; align-items: center; }
.tbl .tb-hero .tb-ctl .yseg span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tb-acts { display: flex; gap: 6px; flex: 0 0 auto; }
.tb-ic { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: 600 14px/1 var(--sys, inherit); text-decoration: none; cursor: pointer; white-space: nowrap; }
.tb-ic:hover { background: var(--soft); }
.tb-ic:focus-visible, .tbl .tb-ctl .yseg a:focus-visible, .tb-modes a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tb-ic-i { display: inline-flex; }
/* the tab row: tabs scroll, the mode switch stays at the end; the row (not the bar) is the sticky element now */
.tb-row { position: sticky; top: var(--gh-h, 52px); z-index: 40; display: flex; align-items: center; gap: 8px; margin: 0 auto 22px; padding: 8px 6px;
  background: rgba(255,255,255,.92); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.tb-row .tb-bar { position: static; flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; border: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; justify-content: flex-start; }
.tb-modes { flex: 0 0 auto; margin: 0 !important; padding: 3px; gap: 2px; }
.tb-modes a { padding: 0 12px; font-size: 13px; min-height: 40px; display: inline-flex; align-items: center; }
@media (min-width: 900px) { .tb-row .tb-bar { justify-content: center; } }
@media (max-width: 640px) {
  .tbl .tb-hero .tb-ctl { justify-content: space-between; gap: 6px; width: 100%; }
  .tbl .tb-hero .tb-ctl .yseg { flex: 1 1 auto; justify-content: space-between; overflow: visible; }
  .tbl .tb-hero .tb-ctl .yseg a, .tbl .tb-hero .tb-ctl .yseg span { padding: 8px 10px; font-size: 14px; }
  .tb-ic { padding: 0; width: 40px; }
  .tb-ic-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tb-row { top: 0; margin-left: -16px; margin-right: -16px; padding: 6px 8px 6px 12px; gap: 6px; }
  .tb-modes a { padding: 0 9px; font-size: 12.5px; min-height: 40px; }
}
/* the old site.css phone rule stacks .yswitch into a column: keep the compact controls on one row */
.tbl .tb-hero .tb-ctl { flex-direction: row !important; align-items: center !important; }
.tbl > .tbx { margin-top: 14px !important; }
@media (max-width: 640px) {
  .tbl .tb-hero .tb-ctl { margin-top: 14px; }
  /* on phones the mode switch shrinks to one small link to the other mode */
  .tb-modes { background: none !important; padding: 0 !important; }
  .tb-modes a[aria-current] { display: none; }
  .tb-modes a { border: 1px solid var(--line); border-radius: 999px; color: var(--ink2); background: #fff; }
}

/* ---- 11-12 customer tests (Jess, Marcus, Tyler): phone tabs + year-page answers */
/* tabs: 44 px tap targets */
.tb-t { min-height: 44px; display: inline-flex; align-items: center; }
/* the Normal / Advanced switch: its own small row above the tabs, never on the sticky row (it clipped "Recalls & safety") */
.tb-mrow { display: flex; justify-content: flex-end; margin: 0 auto 6px; }
.tb-mrow .tb-modes a { min-height: 44px; }
/* phones: the sticky tab row sits under the sticky header while the header shows, and moves up when the header tucks away */
@media (max-width: 767px) {
  .tb-row { top: 48px; transition: top .3s cubic-bezier(.4, 0, .2, 1); }
  html:has(.gh.tuck) .tb-row { top: 0; }
  .tb-row { padding: 0 8px 0 12px; }
  .tb-t { padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) { .tb-row { transition: none; } }
/* year controls: the icon buttons keep their text labels on phones; the buttons wrap under the year switcher */
@media (max-width: 640px) {
  .tbl .tb-hero .tb-ctl { flex-wrap: wrap !important; justify-content: center; row-gap: 10px; }
  .tbl .tb-hero .tb-ctl .yseg { flex: 1 1 100%; }
  .tb-acts { flex: 1 1 100%; justify-content: center; flex-wrap: wrap; }
  .tb-ic { width: auto; padding: 0 12px; height: 44px; }
  .tb-ic-l { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
.tb-ic { min-height: 44px; }
/* buy verdict in the hero */
.yverd .yvd span { color: var(--ink2, #3a3a3e); }
.yverd.mid .yvd b { color: #a15c00; }
/* Overview: when problems show up + questions to ask the seller */
.ovk { display: grid; gap: clamp(20px, 3vw, 28px); margin-top: clamp(20px, 3vw, 28px); }
.ovk .yc { max-width: 860px; width: 100%; margin: 0 auto; }
.ymg-l, .yask-l { margin: 10px 0 8px; padding: 0; display: grid; gap: 8px; }
.ymg-l { list-style: none; }
.ymg-l li { display: grid; gap: 2px; padding: 10px 14px; border-radius: 14px; background: #f5f5f7; }
.ymg-l li b { font-variant-numeric: tabular-nums; }
.yask-l { padding-left: 1.4em; }
.yask-l li { padding-left: 4px; line-height: 1.45; }
/* "How serious": the average car with the same number of complaints, under each count */
.sv .sv-b { display: block; font-size: 12px; color: var(--mute, #6e6e73); }
/* short screens (Dan at 1366x768, Linda): a smaller car so the answer sits above the fold */
@media (max-height: 820px) { .tbl .tb-hero .tb-img .yph img { max-height: 34vh; width: auto; max-width: 100%; } .tbl .tb-hero h1 { margin-top: 4px; } }
/* 11-12 round 2 (Ryan, Jake): a heading the sticky header + tab row would cover lands below them when a link or tab jumps to it */
.tbl section[id], .tbl [id].yc, .tbl .tb-p, .tbl h2[id] { scroll-margin-top: calc(var(--gh-h, 52px) + 72px); }
@media (max-width: 767px) { .tbl section[id], .tbl [id].yc, .tbl .tb-p, .tbl h2[id] { scroll-margin-top: 112px; } }
/* 11-12 round 2: km next to miles (Liam), top 3 failures (Jake, Ryan), fix or sell (Ryan), newest recall, Canada note */
.km { color: var(--mute, #6e6e73); font-weight: 400; white-space: nowrap; }
.tf-l { margin: 10px 0 8px; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: tf; }
.tf-l li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 14px; border-radius: 14px; background: #f5f5f7; counter-increment: tf; }
.tf-l li::before { content: counter(tf) "."; font-weight: 700; color: var(--mute, #6e6e73); }
.tf-l .tf-t { flex: 1 1 calc(100% - 2em); }
.tf-l li > span { font-size: 14px; color: var(--ink2, #3a3a3e); }
.tf-l .tf-n { font-variant-numeric: tabular-nums; }
.tf-l small { color: var(--mute, #6e6e73); }
.yfs table { margin: 10px 0; }
.yfs-b { margin: 6px 0 10px; padding-left: 1.2em; display: grid; gap: 4px; }
.yfs-b small { color: var(--mute, #6e6e73); }
.rtag.rnew { background: #fff1e6; color: #a14a00; }
.ca-note { margin-top: 10px; }
/* gas or hybrid card on the model page (Carlos) */
.ghc table { margin: 10px 0; }
.ghc-n { margin: 10px 0 4px; font-size: 15px; line-height: 1.45; }
.ghc-c { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; padding: 10px 14px; border-radius: 14px; background: #f5f5f7; }
.ghc-c input { width: 4.5em; min-height: 40px; padding: 4px 8px; font: inherit; border: 1px solid #d2d2d7; border-radius: 10px; text-align: right; }
.ghc-c output { font-weight: 700; }
