/* Catalog blocks. Versions of a year: one card with market tabs and the unit switch; in each market panel the
   lineup parts, each a table with one row group per trim (header: name and the values the trim's versions share;
   rows: the versions). A panel 700px wide or narrower shows each trim as a card instead. */

.cat-versions { margin: 22px 0 26px; border: 1px solid var(--line-2); background: var(--card); }
.cat-vh { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 12px 18px; background: var(--charcoal); color: #fff; }
.cat-versions .b-seg button { min-height: 44px; padding: 0 14px; font-size: 14px; }
.cat-units { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cat-units-t { font: 700 11px/1 var(--f-num); letter-spacing: .06em; text-transform: uppercase; color: var(--mist); }

.cat-vlegend { margin: 0; padding: 10px 18px 0; font-size: 14px; line-height: 1.45; color: var(--ink-3); }
.cat-vp { container: catv / inline-size; }
/* without the script every market panel is shown, one after another, and the tab row is hidden */
.cat-versions [hidden] { display: none !important; }
.cat-versions:not(.cat-js) .cat-vp + .cat-vp { border-top: 2px solid var(--line-2); }
/* the page's early class (an inline line in <head>, set only when scripts run, taken off again on load when a block
   was not set up) says catalog.js is coming: until it has set up the block, show the tab row and only the first market
   panel, the one selected first, so the panels do not flash one after another on load */
.cat-js .cat-versions:not(.cat-js) .cat-vh[hidden] { display: flex !important; }
.cat-js .cat-versions:not(.cat-js) .cat-vp ~ .cat-vp { display: none; }
.cat-part + .cat-part { border-top: 2px solid var(--line-2); }
.cat-part-gen { margin: 0; padding: 18px 18px 0; font: italic 800 19px/1.1 var(--f-display); text-transform: uppercase; color: var(--ink); }
.cat-part-cap { margin: 0; padding: 12px 18px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
/* "Our sources may not list every version of this catalog." */
.cat-caveat { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-3); }
.cat-part .cat-caveat { margin-top: -6px; padding: 0 18px 12px; }

.cat-tw { overflow-x: auto; }
.cat-t { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.35; }
.cat-t th, .cat-t td { padding: 9px 8px; text-align: left; vertical-align: top; font-weight: 400; }
.cat-t tr > :first-child { padding-left: 18px; }
.cat-t tr > :last-child { padding-right: 18px; }
.cat-t thead th { padding-top: 2px; padding-bottom: 8px; font: 700 11px/1.2 var(--f-num); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.cat-t .cat-c-price { text-align: right; }
.cat-th-note { display: block; margin-top: 3px; font: 500 12px/1.2 var(--f-text); letter-spacing: 0; text-transform: none; color: var(--ink-3); white-space: normal; }

/* Trim group header: the name in the version column, the shared values and the source line across the others */
.cat-t .cat-gh > * { padding-top: 12px; padding-bottom: 10px; vertical-align: baseline; background: var(--paper-2); border-top: 1px solid var(--line-2); }
.cat-gn { display: inline-block; font: italic 800 18px/1.15 var(--f-display); text-transform: uppercase; color: var(--ink); }
.cat-gn a { color: var(--ink); text-decoration: underline 2px var(--rust); text-underline-offset: 3px; }
.cat-gn a:hover { color: var(--rust-ink); }
.cat-gv { font-size: 14px; color: var(--ink-2); }
.cat-hv { display: inline-block; margin: 0 14px 2px 0; white-space: nowrap; }
.cat-k { margin-right: 3px; font: 700 10.5px/1 var(--f-num); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.cat-gs { display: inline-block; white-space: nowrap; }

/* Version rows */
.cat-t tr[data-key] > * { border-top: 1px solid var(--line); }
.cat-v { font-weight: 600; color: var(--ink); }
.cat-t .cat-v { font-weight: 600; }
.cat-v a { color: var(--ink); }
.cat-v a:hover { color: var(--rust-ink); }
/* Column name inside a cell: only for the card layout below, where the column headers are not shown */
.cat-cl { display: none; }
.cat-versions .b-u, .cat-price, .cat-num { font: 700 14.5px/1.3 var(--f-num); color: var(--ink); white-space: nowrap; }
.cat-code { font: 600 13.5px/1.3 var(--f-num); color: var(--ink); white-space: nowrap; }
.cat-sm, .cat-std, .cat-alt { font-size: 12.5px; color: var(--ink-3); }
.cat-alt { white-space: nowrap; }
.cat-na { color: var(--ink-3); cursor: help; }
.cat-fn, .cat-dis, .cat-est { margin-left: 2px; font: 600 10.5px/0 var(--f-num); color: var(--ink-3); }
.cat-fn a { color: inherit; text-decoration: none; }
.cat-fn a:hover { color: var(--rust-ink); text-decoration: underline; }
.cat-dis { color: var(--rust-ink); cursor: help; }
.cat-est { font-style: italic; cursor: help; }
.cat-est-t { font-style: italic; color: var(--ink-3); }

/* Sources of a panel */
.cat-srcs { padding: 10px 18px 14px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.cat-srcs-t { margin: 0 0 4px; font-weight: 700; color: var(--ink-2); }
.cat-srcs ol { margin: 0; padding-left: 20px; list-style: decimal; overflow-wrap: anywhere; }
.cat-srcs li:target { background: var(--rust-tint); }
.cat-legend { margin: 8px 0 0; }
.cat-legend .cat-est { margin: 0; font-size: 1em; line-height: inherit; cursor: auto; }
.cat-legend .cat-dis { margin: 0; font-size: 1em; line-height: inherit; cursor: auto; }

/* Narrow panel (phones, and the article column beside the contents and the sidebar): each trim is a card,
   each version two lines (the version, then its values). */
@container catv (max-width: 700px) {
  .cat-part-gen { padding: 16px 16px 0; }
  .cat-part-cap { padding: 12px 16px; }
  .cat-part .cat-caveat { padding: 0 16px 12px; }
  .cat-tw { overflow-x: visible; padding: 0 12px 4px; }
  .cat-t, .cat-t thead, .cat-t tbody, .cat-t tr, .cat-t th, .cat-t td { display: block; }
  .cat-t thead th { display: none; }
  .cat-t thead th.cat-c-pn { display: block; padding: 0 4px 10px; text-align: left; }
  .cat-c-pn .cat-th-l { display: none; }
  .cat-c-pn .cat-th-note { margin: 0; font-size: 13px; }
  .cat-g { margin: 0 0 12px; border: 1px solid var(--line-2); background: var(--card); }
  .cat-t tr > :first-child, .cat-t tr > :last-child { padding-left: 14px; padding-right: 14px; }
  .cat-t .cat-gh > * { border-top: 0; }
  .cat-t .cat-gh > th { padding: 12px 14px 4px; }
  .cat-t .cat-gh > td { padding: 0 14px 10px; }
  .cat-gn { display: block; font-size: 18px; }
  .cat-gn a { display: inline-block; padding: 12px 0; margin: -12px 0; }
  .cat-hv { white-space: normal; }
  .cat-t tr[data-key] { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 10px 14px 11px; border-top: 1px solid var(--line); }
  .cat-t tr[data-key] > * { padding: 0; border: 0; }
  .cat-t tr[data-key] > th { flex: 0 0 100%; margin-bottom: 2px; font-size: 15px; }
  .cat-v > a { display: inline-block; padding: 12px 0; margin: -12px 0; }
  .cat-t tr[data-key] > td:empty { display: none; }
  .cat-t .cat-c-price { text-align: left; }
  .cat-cl { display: inline; font-size: 12.5px; color: var(--ink-3); }
  .cat-srcs { padding-left: 16px; padding-right: 16px; }
}

/* Trim page (/supra/<mk>/<trim id>/). The key figures card: a dark band with the catalog (model year) buttons, the
   version list and the unit switch (shown by the script), then one card per version; the script shows the selected
   one, without it every version is listed. Then sections of cards: model codes, the change table, the full
   specifications by group, links and sources. Phones (700px and narrower): one column, the change table as cards. */
.cat-trim [hidden] { display: none !important; }
/* the early class (see the versions block): until catalog.js has set up the trim page, show the control band and only
   the default version's key figures */
.cat-js .cat-trim:not(.cat-js) .cat-sel-h[hidden] { display: flex !important; }
.cat-js .cat-trim:not(.cat-js) .cat-kf:not(.cat-kf-default) { display: none; }
.cat-trim .b-u, .cat-trim .cat-price, .cat-trim .cat-num { font: 700 14.5px/1.3 var(--f-num); color: var(--ink); white-space: nowrap; }
.cat-sep { color: var(--ink-3); }

.cat-sel { border: 1px solid var(--line-2); background: var(--card); }
.cat-sel-h { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; padding: 14px 18px; background: var(--charcoal); color: #fff; }
.cat-sel-r { display: flex; flex-direction: column; gap: 7px; min-width: 0; max-width: 100%; }
.cat-sel-k { font: 700 11px/1 var(--f-num); letter-spacing: .06em; text-transform: uppercase; color: var(--mist); }
.cat-eds { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-eds button { min-height: 44px; padding: 0 13px; border: 1px solid var(--graphite-3); border-radius: 3px; background: transparent; color: var(--mist); font: 600 14px/1 var(--f-num); cursor: pointer; }
.cat-eds button:hover { border-color: var(--mist); color: #fff; }
.cat-eds button[aria-pressed="true"] { background: var(--rust-btn); border-color: var(--rust-btn); color: #fff; }
.cat-ver { min-height: 44px; max-width: 100%; padding: 0 10px; border: 1px solid var(--graphite-3); border-radius: 3px; background: #fff; color: var(--ink); font: 500 15px/1.2 var(--f-text); }
.cat-ver:disabled { opacity: 1; background: var(--paper-2); }
.cat-sel .cat-units { margin-left: auto; }
.cat-sel .b-seg button { min-height: 44px; padding: 0 14px; font-size: 14px; }

.cat-kf { padding: 16px 18px 14px; }
.cat-js .cat-kf { scroll-margin-top: var(--cat-band, 0px); }
.cat-kf + .cat-kf { border-top: 2px solid var(--line-2); }
.cat-kf-t { margin: 0 0 12px; font-size: 15.5px; line-height: 1.4; }
.cat-kf-ed { font-weight: 700; color: var(--ink); }
.cat-kf-v { color: var(--ink-2); }
.cat-kf-g { display: grid; grid-template-columns: minmax(0, 1.25fr) repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: #fff; }
.cat-kf-g > div { min-width: 0; padding: 11px 14px 12px; border-left: 1px solid var(--line); }
.cat-kf-g > div:first-child { border-left: 0; }
.cat-kf-g dt { margin-bottom: 6px; font: 700 11px/1.2 var(--f-num); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
/* the value with its marks on the first line, the standard, size or note under it */
.cat-kf-g dd { display: flex; flex-wrap: wrap; align-items: baseline; font-size: 13.5px; line-height: 1.35; color: var(--ink-3); }
.cat-trim .cat-kf-g .b-u, .cat-trim .cat-kf-g .cat-price, .cat-trim .cat-kf-g .cat-num { font-size: 21px; line-height: 1.15; }
.cat-kf-g .cat-code { font-size: 19px; line-height: 1.15; }
.cat-kf-g dd > .cat-fn, .cat-kf-g dd > .cat-dis, .cat-kf-g dd > .cat-est { order: 1; align-self: flex-start; line-height: 1; }
.cat-kf-g dd > .cat-std, .cat-kf-g dd > .cat-sm, .cat-kf-g dd > .cat-alt { order: 2; flex-basis: 100%; margin-top: 2px; }
.cat-kf-f { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 10px 0 0; font-size: 14px; color: var(--ink-3); }

/* Sections */
.cat-sec { margin-top: 48px; }
.cat-sec-l { max-width: 74ch; margin: 0 0 16px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.cat-trim .cat-k { font-size: 11px; }

/* Is this my car? */
.cat-mc { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 14px; align-items: start; }
.cat-mc-e { min-width: 0; padding: 14px 16px 12px; border: 1px solid var(--line-2); background: var(--card); }
.cat-mc-t { margin: 0 0 6px; font: italic 800 18px/1.15 var(--f-display); text-transform: uppercase; color: var(--ink); }
.cat-mc-w { margin: 0 0 8px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.cat-mc-e .cat-caveat { margin: -2px 0 8px; }
.cat-mc-l li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.4; }
.cat-mc-v { display: inline-block; padding: 12px 0; margin: -12px 0; font-weight: 600; color: var(--ink); }
.cat-trim a.cat-mc-v { color: var(--ink); }
.cat-mc-c { white-space: nowrap; }
.cat-mc-s { margin: 4px 0 0; font-size: 13px; color: var(--ink-3); }

/* How it changed */
.cat-chg { width: 100%; border-collapse: collapse; border: 1px solid var(--line-2); background: var(--card); font-size: 14px; line-height: 1.35; }
.cat-chg th, .cat-chg td { padding: 10px 12px; text-align: left; vertical-align: top; font-weight: 400; border-top: 1px solid var(--line); }
.cat-chg thead th { padding-top: 9px; padding-bottom: 9px; border-top: 0; background: var(--paper-2); font: 700 11px/1.2 var(--f-num); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.cat-chg tbody th { font-weight: 700; color: var(--ink); white-space: nowrap; }
.cat-chg .cat-cl { display: none; }

/* Full specifications */
.cat-specs-for { margin: 0 0 14px; font-size: 15.5px; color: var(--ink-2); }
.cat-specs-v { font-weight: 600; color: var(--ink); }
.cat-sgs { column-width: 360px; column-gap: 14px; }
.cat-sg { min-width: 0; margin-bottom: 14px; padding: 12px 16px 10px; border: 1px solid var(--line-2); background: var(--card); break-inside: avoid; }
.cat-sg-t { margin: 0 0 6px; font: italic 800 17px/1.15 var(--f-display); text-transform: uppercase; color: var(--ink); }
.cat-sg-l > div { display: grid; grid-template-columns: minmax(0, 10.5em) minmax(0, 1fr); gap: 2px 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.cat-sg-l dt { font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--ink-2); }
.cat-sg-l dd { font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
.cat-sg-s { margin: 4px 0 0; font-size: 13px; color: var(--ink-3); }

/* Links and sources */
.cat-links li { padding: 12px 0; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.6; }
.cat-links li:last-child { border-bottom: 1px solid var(--line); }
.cat-links a { display: inline-block; padding: 10px 0; margin: -10px 0; }
.cat-links .cat-k { margin-right: 8px; }
.cat-yr { display: inline-block; min-width: 44px; text-align: center; font: 600 15px/1.6 var(--f-num); }
.cat-links a.cat-yr { padding: 10px 4px; }
span.cat-yr { color: var(--ink-3); }
.cat-trim .cat-srcs { padding: 0; border-top: 0; font-size: 14px; }

@media (max-width: 700px) {
  .cat-sel-h { flex-direction: column; align-items: stretch; padding: 12px 14px 14px; }
  .cat-ver { width: 100%; }
  .cat-sel .cat-units { margin-left: 0; }
  .cat-kf { padding: 14px 14px 12px; }
  .cat-kf-g { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-kf-g > div { border-left: 0; border-top: 1px solid var(--line); padding: 10px 12px 11px; }
  .cat-kf-g > .cat-kf-engine { grid-column: 1 / -1; border-top: 0; }
  .cat-kf-g > .cat-kf-torque, .cat-kf-g > .cat-kf-price { border-left: 1px solid var(--line); }
  .cat-trim .cat-kf-g .b-u, .cat-trim .cat-kf-g .cat-price, .cat-trim .cat-kf-g .cat-num { font-size: 19px; }
  .cat-chg, .cat-chg tbody, .cat-chg tr, .cat-chg th, .cat-chg td { display: block; }
  .cat-chg thead { display: none; }
  .cat-chg { border: 0; background: none; }
  .cat-chg tr { margin-bottom: 10px; padding: 10px 14px 9px; border: 1px solid var(--line-2); background: var(--card); }
  .cat-chg tbody th, .cat-chg td { padding: 3px 0; border: 0; white-space: normal; }
  .cat-chg tbody th { padding-bottom: 6px; font-size: 15px; }
  .cat-chg td { position: relative; padding-left: 116px; }
  .cat-chg .cat-cl { display: block; position: absolute; left: 0; top: 6px; width: 110px; font: 700 11px/1.2 var(--f-num); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
  .cat-sg-l > div { grid-template-columns: minmax(0, 9em) minmax(0, 1fr); }
}

/* Find your Supra field */
.cat-finder { margin: 0 0 18px; }
.cat-finder-l { display: block; margin-bottom: 6px; font-weight: 600; font-size: 15px; }
.cat-finder-r { display: flex; gap: 8px; }
.cat-finder-q { flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 3px; font: 16px/1.2 var(--f-num); background: var(--card); color: inherit; text-transform: uppercase; }
.cat-finder-q::placeholder { text-transform: none; }
.cat-finder-b { flex: 0 0 auto; min-height: 48px; min-width: 44px; padding: 0 18px; border: 0; border-radius: 3px; font-size: 15px; font-weight: 600; cursor: pointer; background: var(--ink); color: var(--card); }
.cat-finder-e { margin: 6px 0 0; font-size: 14px; color: var(--ink-3); }
.cat-finder-m p { margin: 10px 0 0; font-size: 15px; line-height: 1.5; }
.cat-finder-m ul { margin: 6px 0 0; padding: 0; list-style: none; }
.cat-finder-m li { border-top: 1px solid var(--line); }
.cat-finder-m li a { display: block; padding: 12px 0; min-height: 44px; box-sizing: border-box; font-size: 15.5px; line-height: 1.4; }

/* Year tiles of a generation (models hub, generation block): every year of the generation with the letters of the
   markets we list; a year without a page of its own is a dashed tile. Four in a row on phones, each at least 44px. */
.cat-yts { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.cat-yt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 100%; min-height: 54px; padding: 6px 4px; box-sizing: border-box;
  border: 1px solid var(--line-2); border-radius: 3px; background: var(--card); color: var(--ink); text-decoration: none; text-align: center; }
a.cat-yt { color: var(--ink); }
a.cat-yt:hover { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 -2px 0 var(--rust); }
span.cat-yt { border-style: dashed; background: transparent; color: var(--ink-3); }
.cat-yt-y { font: 700 16px/1 var(--f-num); }
.cat-yt-m { display: flex; gap: 6px; font: 700 10.5px/1 var(--f-num); letter-spacing: .06em; color: var(--ink-3); }
.cat-yt-legend { margin: 10px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-3); }

/* Trims of a generation by market: the market, then one chip per trim (a link where the trim page is published,
   dashed where it is not); the separators are there for text readers only */
.cat-trs { display: grid; gap: 8px; margin: 0; }
.cat-trs > div { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); gap: 0 10px; align-items: baseline; }
.cat-trs dt { font: 700 11px/1 var(--f-num); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.cat-trs dd { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-trs .cat-sep { display: none; }
.cat-tl { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 11px; box-sizing: border-box;
  border: 1px solid var(--line-2); border-radius: 3px; background: var(--card); font-size: 15px; font-weight: 600; line-height: 1.2; }
a.cat-tl { color: var(--ink); text-decoration: none; }
a.cat-tl:hover { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 -2px 0 var(--rust); }
span.cat-tl { border-style: dashed; background: transparent; color: var(--ink-3); font-weight: 500; }

/* Catalog block of a generation page */
.cat-gb { padding: 16px 20px 4px; border: 1px solid var(--line-2); background: var(--card); }
.cat-gb-r + .cat-gb-r { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.cat-gb .cat-gb-k { margin: 0 0 10px; font: 700 11.5px/1.2 var(--f-num); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.cat-gb .cat-finder { margin: 0 0 6px; }
.cat-gb-all a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 6px; font-weight: 600; font-size: 15.5px; }
.cat-gb-all svg, .cat-hg-g svg { width: 14px; height: 14px; flex: none; }

/* Models hub (/models/): the field, buttons to each generation, then one band per generation (name, years and chassis
   codes beside its year tiles and trims; stacked below 860px), and "How to read this catalog". */
.cat-hub-find { max-width: 760px; }
.cat-hub-ns { margin: 0 0 18px; font-size: 15px; color: var(--ink-3); }
.cat-hub .cat-hub-h { margin: 0 0 12px; font: italic 800 26px/1 var(--f-display); text-transform: uppercase; color: var(--ink); }
.cat-hub-find .cat-finder { margin: 0; }
.cat-jump { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-width: 520px; margin: 32px 0 0; }
.cat-jump a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 4px; border: 1px solid var(--ink); border-radius: 3px;
  color: var(--ink); font: 700 15px/1 var(--f-num); text-decoration: none; }
.cat-jump a:hover { background: var(--ink); color: var(--card); }
.cat-hub > .cat-yt-legend { margin-top: 14px; }
.cat-hg { display: grid; grid-template-columns: minmax(0, 270px) minmax(0, 1fr); gap: 16px 40px; margin-top: 28px; padding-top: 22px; border-top: 2px solid var(--ink); }
.cat-hg-h { min-width: 0; }
.cat-hub .cat-hg-t { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; font: italic 800 24px/1.1 var(--f-display); text-transform: uppercase; color: var(--ink); }
.cat-hg-t .ts-plate { font-size: 18px; }
.cat-hg-m { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 10px 0 0; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
.cat-hg-y { font: 600 14px/1.4 var(--f-num); color: var(--rust-ink); }
.cat-hg-g { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 4px; font-weight: 600; font-size: 15.5px; }
.cat-hg-b { display: grid; gap: 14px; min-width: 0; align-content: start; }
.cat-howto { margin-top: 48px; border: 1px solid var(--line-2); background: var(--card); }
.cat-howto > summary { display: flex; align-items: center; min-height: 52px; padding: 0 18px; cursor: pointer; font: italic 800 20px/1.1 var(--f-display); text-transform: uppercase; color: var(--ink); }
.cat-howto-b { max-width: 74ch; padding: 0 18px 6px; }
.cat-howto-b p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }

@media (max-width: 860px) {
  .cat-hg { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 560px) {
  .cat-yts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cat-trs > div { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cat-gb { padding: 14px 14px 2px; }
  .cat-howto > summary, .cat-howto-b { padding-left: 14px; padding-right: 14px; }
}

/* Year row of a year page, in the dark title band after the breadcrumbs: the nearest years with a page on either side
   and the year itself, which opens every year of the generation over the band. */
.cat-yn { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-top: 4px; font: 600 15px/1 var(--f-num); }
.cat-yn-p, .cat-yn-n { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 4px; color: var(--mist); text-decoration: none; }
.cat-yn-p:hover, .cat-yn-n:hover { color: #fff; }
.cat-yn-d > summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--graphite-3); border-radius: 3px;
  color: var(--chalk); cursor: pointer; list-style: none; }
.cat-yn-d > summary::-webkit-details-marker { display: none; }
.cat-yn-d > summary:hover, .cat-yn-d[open] > summary { border-color: var(--mist); color: #fff; }
.cat-yn .ts-caret { width: 10px; height: 10px; }
.cat-yn-d[open] .ts-caret { transform: rotate(180deg); color: var(--rust-lt); }
.cat-yn-b { position: absolute; z-index: 5; left: 0; top: calc(100% + 6px); width: min(100%, 460px); box-sizing: border-box; padding: 12px 12px 6px;
  background: var(--charcoal-2); border: 1px solid var(--graphite-2); border-top: 2px solid var(--rust); box-shadow: 0 20px 40px rgba(20,22,26,.35); }
.cat-yn-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.cat-yn-l a, .cat-yn-l span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 3px; }
.cat-yn-l a { border: 1px solid var(--graphite-3); color: var(--chalk); text-decoration: none; }
.cat-yn-l a:hover { border-color: var(--rust-lt); color: #fff; }
.cat-yn-l span { color: var(--steel); }
.cat-yn-l .cat-yn-c { background: var(--rust-btn); color: #fff; }
.cat-yn-all { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; color: var(--mist); font: 600 14.5px/1 var(--f-text); }
.cat-yn-all:hover { color: #fff; }
