/* toyota-supra.info article pages; loaded after site.css (tokens, header, footer, ts- components) */

/* ---------- base for the article page ---------- */
html:has(.page-article) { background: var(--charcoal); }
body.page-article {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--f-text); font-kerning: normal;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
:where(.page-article), :where(.page-article) *, :where(.page-article) *::before, :where(.page-article) *::after { box-sizing: border-box; }
:where(.page-article) img { max-width: 100%; height: auto; display: block; }
:where(.page-article) a { color: var(--rust-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
:where(.page-article) a:hover { color: var(--ink); }
:where(.page-article) :is(h1, h2, h3, h4) { margin: 0; font-weight: 700; line-height: 1.1; }
:where(.page-article) :is(p, ul, ol, dl, dd, figure) { margin: 0; }
:where(.page-article) :is(ul, ol) { padding: 0; list-style: none; }
:where(.page-article) :focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; box-shadow: 0 0 0 2px var(--charcoal); }

/* main nav: mark the section the article belongs to */
.page-article[data-nav="gen"] .ts-nav-link[aria-controls="drop-gen"],
.page-article[data-nav="specs"] .ts-nav-link[aria-controls="drop-specs"],
.page-article[data-nav="faq"] .ts-nav-link[href="/#forum"],
.page-article[data-nav="reviews"] .ts-nav-link[href="/reviews/"],
.page-article[data-nav="gallery"] .ts-nav-link[href="/gallery/"] { color: #fff; }
.page-article[data-nav="gen"] .ts-nav-link[aria-controls="drop-gen"]::after,
.page-article[data-nav="specs"] .ts-nav-link[aria-controls="drop-specs"]::after,
.page-article[data-nav="faq"] .ts-nav-link[href="/#forum"]::after,
.page-article[data-nav="reviews"] .ts-nav-link[href="/reviews/"]::after,
.page-article[data-nav="gallery"] .ts-nav-link[href="/gallery/"]::after { transform: scaleX(1); }

/* ---------- hero ---------- */
.a-hero { background: var(--charcoal); color: var(--chalk); position: relative; overflow: hidden; }
.a-hero-inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: end; padding-block: 40px 0; }
.a-hero--text .a-hero-inner { grid-template-columns: minmax(0, 1fr); }
.a-hero-text { padding-bottom: 44px; min-width: 0; }
.a-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; font-size: 14px; color: var(--steel); }
.a-crumbs li { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.a-crumbs li + li::before { content: ""; width: 7px; height: 7px; flex: none; border-top: 1.5px solid var(--graphite-3); border-right: 1.5px solid var(--graphite-3); transform: rotate(45deg); }
.a-crumbs a { color: var(--mist); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.a-crumbs a:hover { color: #fff; text-decoration: underline; }
.a-crumbs [aria-current] { color: var(--chalk); font-weight: 600; }
.a-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 26px; }
.a-meta .ts-plate { font-size: 17px; }
.a-meta .ts-tag { font: 600 12.5px/1 var(--f-num); letter-spacing: .14em; text-transform: uppercase; color: var(--mist); }
.a-date { font: 600 13px/1 var(--f-num); color: var(--steel); letter-spacing: .04em; }
.a-title { margin-top: 18px; font: italic 800 clamp(40px, 5vw, 68px)/.94 var(--f-display); text-transform: uppercase; letter-spacing: -.004em; text-wrap: balance; overflow-wrap: break-word; }
.a-lede { margin-top: 22px; max-width: 62ch; font-size: 19px; line-height: 1.6; color: var(--chalk); }
.a-lede b, .a-lede strong { font-weight: 600; color: #fff; }
.a-lede a { color: var(--rust-lt); }
.a-lede a:hover { color: #fff; }
.a-hero-fig { align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.a-hero-ph { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--pit); clip-path: polygon(9% 0, 100% 0, 100% 100%, 0 100%); }
.a-hero-ph img { width: 100%; height: 100%; object-fit: cover; }
.a-hero-fig figcaption { padding: 10px 0 14px; font-size: 12.5px; line-height: 1.45; color: var(--steel); text-align: right; }
.a-hero-fig figcaption a { color: var(--mist); }
.a-hero-fig figcaption a:hover { color: #fff; }

/* key figures strip: one row of equal cells on desktop, any count */
.a-strip { background: var(--graphite); border-top: 1px solid var(--graphite-2); }
.a-strip-inner { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.a-strip-inner > div { padding: 20px 20px 18px; border-left: 1px solid var(--graphite-2); min-width: 0; }
.a-strip-inner > div:first-child { border-left: 0; padding-left: 0; }
.a-strip dt { font: 600 11.5px/1.2 var(--f-num); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.a-strip-v { margin-top: 8px; font: italic 700 26px/1 var(--f-num); color: var(--chalk); white-space: nowrap; }
.a-strip-v small { font: 600 13px/1 var(--f-num); font-style: normal; color: var(--mist); margin-left: 3px; }
.a-strip-v.hl { color: var(--rust-lt); }
.a-strip-note { margin-top: 6px; font-size: 12.5px; line-height: 1.4; color: var(--steel); }

/* ---------- body: contents | sections | aside ---------- */
.a-body { display: grid; grid-template-columns: 248px minmax(0, 1fr) 300px; gap: 56px; align-items: start; padding-block: 64px 104px; }
.a-body--notoc { grid-template-columns: minmax(0, 1fr) 300px; }

.a-toc { position: sticky; top: calc(var(--bar-h) + 28px); }
.a-toc-title { font: 600 12px/1 var(--f-num); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.a-toc li a { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; min-height: 44px; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; line-height: 1.3; }
.a-toc li a .ts-num { font: italic 700 13px/1 var(--f-num); color: var(--ink-3); }
.a-toc li a:hover { color: var(--ink); }
.a-toc li a.is-current { color: var(--ink); font-weight: 700; }
.a-toc li a.is-current .ts-num { color: var(--rust-ink); }
.a-toc li a.is-current::after { content: ""; position: absolute; left: -14px; top: 50%; width: 4px; height: 20px; margin-top: -10px; background: var(--rust); }

.a-prose { min-width: 0; font-size: 18px; line-height: 1.7; color: #2B2F35; }
.a-sec { scroll-margin-top: calc(var(--bar-h) + 20px); }
.a-sec + .a-sec { margin-top: 64px; }
.a-sec > * + * { margin-top: 20px; }
.a-sec > h2 { display: flex; align-items: baseline; gap: 14px; padding-top: 22px; border-top: 2px solid var(--ink); font: italic 800 36px/1 var(--f-display); text-transform: uppercase; color: var(--ink); }
.a-sec > h2 .ts-num { flex: none; font: italic 700 16px/1 var(--f-num); color: var(--rust-ink); transform: translateY(-4px); }
.a-prose strong, .a-prose b { color: var(--ink); }
.a-sec > ul:not([class]) { padding-left: 1.3em; list-style: disc; }
.a-sec > ul:not([class]) li + li { margin-top: 6px; }

/* spec table: wide tables scroll inside their own box */
.a-spec-wrap { margin-top: 26px; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line-2); background: var(--card); }
.a-spec { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
/* Two-column (label and value) tables wrap instead of scrolling on narrow screens. */
.a-spec:not(:has(tr > :nth-child(3))) { min-width: 0; }
.a-spec caption { caption-side: bottom; text-align: left; padding: 10px 16px 12px; font-size: 13px; color: var(--ink-3); border-top: 1px solid var(--line); }
.a-spec thead th { background: var(--charcoal); color: var(--chalk); text-align: left; padding: 14px 16px; font: italic 800 20px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.a-spec thead th:first-child { font: 600 11.5px/1 var(--f-num); font-style: normal; letter-spacing: .14em; color: var(--steel); width: 26%; }
.a-spec .a-tt { display: inline-block; margin-left: 8px; padding: 3px 6px; background: var(--rust-btn); color: #fff; font: 700 11px/1 var(--f-num); font-style: normal; letter-spacing: .08em; vertical-align: 3px; border-radius: 2px; }
.a-spec tbody th { text-align: left; padding: 13px 16px; font: 600 12px/1.3 var(--f-num); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); background: var(--paper-2); border-bottom: 1px solid var(--line); vertical-align: top; }
.a-spec td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.a-spec td .ts-num { font-weight: 700; font-size: 16.5px; color: var(--ink); }
.a-spec .a-alt { white-space: nowrap; color: var(--ink-3); }
.a-spec tr.diff td:last-child { background: var(--rust-tint); }
.a-spec tr.diff td:last-child .ts-num { color: var(--rust-ink); }

/* photo in a section */
.a-sec > .a-fig { margin-top: 32px; }
.a-fig-ph { display: block; overflow: hidden; background: var(--charcoal); }
.a-fig-ph img { width: 100%; }
.a-fig figcaption { display: flex; justify-content: space-between; gap: 4px 20px; flex-wrap: wrap; padding-block: 10px; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.a-fig .a-credit { font-size: 13px; }
.a-fig figcaption a { color: var(--ink-2); }
.a-fig figcaption a:hover { color: var(--rust-ink); }

/* dark figures box */
.a-sec > .a-callout { margin-top: 26px; }
.a-callout { background: var(--charcoal); color: var(--chalk); }
.a-callout dl { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.a-callout dl > div { padding: 18px 20px; border-left: 1px solid var(--graphite-2); min-width: 0; }
.a-callout dl > div:first-child { border-left: 0; }
.a-callout dt { font: 600 11.5px/1.25 var(--f-num); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.a-callout dd { margin-top: 8px; font: italic 700 30px/1 var(--f-num); }
.a-callout dd small { font: 600 14px/1 var(--f-num); font-style: normal; color: var(--mist); margin-left: 3px; }
.a-callout dd.hl { color: var(--rust-lt); }
.a-callout-note { border-top: 1px solid var(--graphite-2); font-size: 15px; line-height: 1.5; color: var(--mist); padding: 14px 20px 16px; }

/* two cards side by side (light / dark turbo) */
.a-sec > .a-vs { margin-top: 24px; }
.a-vs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.a-vs-card { border: 1px solid var(--line-2); padding: 20px 20px 18px; background: var(--card); min-width: 0; }
.a-vs-card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font: italic 800 24px/1 var(--f-display); text-transform: uppercase; }
.a-vs-card h3 .code { color: var(--ink-2); }
.a-vs-card ul li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.45; }
.a-vs-card ul li span:first-child { flex: 1 1 6em; min-width: 0; color: var(--ink-2); }
.a-vs-card ul li .ts-num { flex: 0 0 auto; max-width: 100%; font-weight: 700; color: var(--ink); text-align: right; margin-left: auto; }
.a-vs-card--turbo { background: var(--charcoal); border-color: var(--charcoal); color: var(--chalk); }
.a-vs-card--turbo ul li { border-top-color: var(--graphite-2); }
.a-vs-card--turbo ul li span:first-child { color: var(--mist); }
.a-vs-card--turbo ul li .ts-num { color: var(--chalk); }
.a-vs-card--turbo ul li .ts-num.hl { color: var(--rust-lt); }
.a-vs-card--turbo h3 .code { background: var(--rust-btn); border-color: var(--rust-btn); color: #fff; }

/* weak point / fix cards */
.a-sec > .a-weak { margin-top: 24px; }
.a-weak { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.a-weak > div { padding: 20px; border: 1px solid var(--line-2); background: var(--paper-2); min-width: 0; }
.a-weak-k { display: flex; align-items: center; gap: 10px; font: 600 12px/1 var(--f-num); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.a-weak-k .ts-i { width: 18px; height: 18px; flex: none; color: var(--rust); }
.a-weak-k--fix .ts-i { color: var(--ink); }
.a-weak h3 { margin-top: 10px; font-size: 22px; color: var(--ink); }
.a-weak p:not(.a-weak-k) { margin-top: 8px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }

/* numbered forum questions */
.a-sec > .a-fq { margin-top: 22px; }
.a-fq { border-top: 2px solid var(--ink); }
.a-fq li a { display: grid; grid-template-columns: 52px minmax(0, 1fr) 24px; gap: 10px; align-items: center; min-height: 60px; padding: 8px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; line-height: 1.35; }
.a-fq li a:hover { background: var(--paper-2); color: var(--ink); }
.a-fq .ts-num { font: italic 700 14px/1 var(--f-num); color: var(--rust-ink); }
.a-fq svg { width: 18px; height: 18px; color: var(--ink-3); transition: transform .2s var(--ease); }
.a-fq li a:hover svg { transform: translateX(3px); color: var(--rust-ink); }

.a-sources { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line-2); font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.a-sources-t { font: 600 12px/1 var(--f-num); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin-bottom: 10px; }
.a-sources ul { padding-left: 1.2em; list-style: disc; }
.a-sources ul + p { margin-top: 10px; }
.a-sources a { color: var(--ink-2); }
.a-sources a:hover { color: var(--rust-ink); }

/* ---------- aside ---------- */
.a-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--bar-h) + 28px); min-width: 0; }
.a-ask { position: relative; padding: 26px 22px 22px; background: var(--charcoal); color: var(--chalk); border-top: 3px solid var(--rust); }
.a-ask h2 { margin-top: 14px; font: italic 800 28px/1 var(--f-display); text-transform: uppercase; }
.a-ask p { margin-top: 10px; color: var(--mist); font-size: 15.5px; line-height: 1.55; }
.a-ask .ts-btn { width: calc(100% - 12px); margin: 22px 0 0 6px; }
.a-related { border: 1px solid var(--line-2); padding: 20px 20px 8px; background: var(--card); }
.a-related h2 { font: 600 12px/1 var(--f-num); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.a-related li a { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: start; min-height: 44px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.a-related li:last-child a { border-bottom: 0; }
.a-related li a:hover { color: var(--rust-ink); }
.a-related .ts-plate { justify-self: start; margin-top: 1px; font-size: 11.5px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1279px) {
  .a-body { grid-template-columns: 220px minmax(0, 1fr); }
  .a-body--notoc { grid-template-columns: minmax(0, 1fr); }
  .a-aside { grid-column: 2; position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .a-body--notoc .a-aside { grid-column: auto; }
}
@media (max-width: 1180px) {
  .a-strip-v { font-size: 22px; }
  .a-strip-inner > div { padding: 18px 14px 16px; }
}
@media (max-width: 1023px) {
  .a-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .a-hero-ph { clip-path: none; aspect-ratio: 16 / 9; }
  .a-hero-fig figcaption { text-align: left; }
  .a-hero-text { padding-bottom: 28px; }
  .a-strip-inner { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .a-strip-inner > div:nth-child(3n+1) { border-left: 0; padding-left: 0; }
  .a-strip-inner > div:nth-child(n+4) { border-top: 1px solid var(--graphite-2); }
  .a-body { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .a-toc { position: static; }
  .a-aside { grid-column: auto; }
}
@media (max-width: 820px) {
  .a-aside { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  body.page-article { font-size: 16px; }
  .a-hero-inner { padding-block: 18px 0; }
  .a-hero-text { padding-bottom: 30px; }
  .a-meta { margin-top: 18px; }
  .a-title { font-size: clamp(36px, 10.5vw, 46px); }
  .a-lede { font-size: 17.5px; }
  .a-strip-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .a-strip-inner > div { padding: 14px 12px 14px 14px; border-top: 1px solid var(--graphite-2); }
  .a-strip-inner > div:nth-child(3n+1) { border-left: 1px solid var(--graphite-2); padding-left: 14px; }
  .a-strip-inner > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .a-strip-inner > div:nth-child(-n+2) { border-top: 0; }
  .a-strip-inner > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .a-strip-v { font-size: 21px; }
  .a-body { padding-block: 40px 64px; }
  .a-prose { font-size: 17px; }
  .a-sec + .a-sec { margin-top: 52px; }
  .a-sec > h2 { font-size: 30px; }
  .a-callout dd { font-size: 24px; }
  .a-vs, .a-weak { grid-template-columns: minmax(0, 1fr); }
  .a-fq li a { grid-template-columns: 46px minmax(0, 1fr) 20px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  :where(.page-article) *, :where(.page-article) *::before, :where(.page-article) *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Catalog pages: photo grid, color swatches, wide modification tables */
.a-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 26px; }
.a-photos .a-fig { margin: 0; }
.a-swatch { display: inline-block; width: 44px; height: 18px; border: 1px solid var(--line-2); vertical-align: middle; }
.a-spec--list thead th, .a-spec--list thead th:first-child { width: auto; font: 600 11.5px/1.2 var(--f-num); font-style: normal; letter-spacing: .1em; color: var(--chalk); }
.a-spec--list { min-width: 780px; font-size: 14.5px; }
.a-spec--list tbody th { text-transform: none; letter-spacing: 0; font: 600 14px/1.3 var(--f-body, inherit); min-width: 150px; }
.a-spec--list td, .a-spec--list tbody th, .a-spec--list thead th { padding: 10px; }
.a-spec--list tbody th a { color: var(--ink); }
