/* Network Trends tab (redesign of Nov 12, 2026). Four views behind one switch; each view is built around its numbers.
   Colors are the shared shell's tokens. Surfaces are told apart by a step in tone, never by an outline or a shadow.
   Written-out colors, each for a reason: the two figure colors in dark mode (the brand's bright green and orange),
   the heat cells (teal on tan in both modes so the figures always read) and the cream plate under the club photos. */

:root { --tr-figure: var(--ink); --tr-figure-2: #B8480F; }
:root[data-theme="dark"] { --tr-figure: #5EF6E6; --tr-figure-2: #F2682A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --tr-figure: #5EF6E6; --tr-figure-2: #F2682A; } }

#tab-trends { font-size: 15px; line-height: 1.5; }
#tab-trends p, #tab-trends li, #tab-trends dd { text-wrap: pretty; }
#tab-trends .muted { font-size: 15px; margin: 0; }
#tab-trends h3 { font-size: 17px; margin: 0; }
#tab-trends ul { margin: 0; padding-left: 18px; }
#tab-trends li { margin: 0 0 6px; }
#tab-trends li::marker { color: var(--green); }

.tr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tr-download { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.tr-download svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tr-download span { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.tr-download strong { font-weight: 500; }
.tr-download small { font-size: 12px; color: var(--ink2); }

/* The switch between views, and the smaller switches inside Models: the schedule site's tabs. */
.tr-switch { margin: 20px 0 24px; }
.tr-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--tan); padding: 4px; border-radius: 8px; }
.tr-seg button { padding: 7px 14px; min-height: 36px; border-radius: 6px; font: inherit; font-weight: 400; font-size: 14px; color: var(--ink2); background: none; border: 0; cursor: pointer; }
.tr-seg button:hover { background: var(--hover); }
.tr-seg button[aria-pressed="true"], .tr-seg button[aria-pressed="true"]:hover { background: var(--white); color: var(--ink); font-weight: 600; }
.tr-viewhead { margin-bottom: 20px; }
.tr-viewhead h2 { font-size: 24px; margin: 0 0 4px; }
.tr-source { font-size: 13px; color: var(--ink2); margin: 28px 0 0; }

/* Bars: a thin one for trade-ins, a thick one for value. */
.tr-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink2); margin: 0 0 10px; }
.tr-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tr-key { width: 12px; height: 10px; border-radius: 2px; display: inline-block; }
.tr-key.a, .tr-fill.a { background: var(--ink3); }
.tr-key.b, .tr-fill.b { background: var(--green); }
.tr-fill.c { background: var(--orange); }
.tr-bar { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tr-track { flex: 1; display: flex; height: 8px; min-width: 0; }
.tr-fill { display: block; height: 100%; border-radius: 4px; flex: none; }
.tr-pct { min-width: 40px; font-size: 13px; font-variant-numeric: tabular-nums; }
.tr-bar.big .tr-track { height: 20px; }
.tr-bar.big .tr-pct { font-size: 16px; font-weight: 600; }

/* A line for staff to say: set apart as a quote on a tone step. */
.tr-say { margin: 16px 0 0; padding: 12px 14px; border-radius: 8px; background: var(--white); display: grid; gap: 2px; }
.tr-say strong { font-size: 13px; font-weight: 500; color: var(--ink2); }
.tr-say span { font-weight: 500; }

/* ---- Customers: two columns to compare. */
.tr-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tr-cust { background: var(--cream); border-radius: 10px; padding: 24px; }
.tr-figure { margin: 10px 0 20px; display: grid; gap: 4px; max-width: 34ch; }
.tr-figure strong { font: 600 56px/1 var(--font-head); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--tr-figure); }
.tr-cust.cl .tr-figure strong { color: var(--tr-figure-2); }
.tr-figure span { font-weight: 500; }
.tr-cust dl { margin: 0; display: grid; gap: 14px; }
.tr-cust dt { font-size: 13px; color: var(--ink2); margin-bottom: 2px; }
.tr-cust dd { margin: 0; }
.tr-cust.cl li::marker { color: var(--orange); }
.tr-matters { margin-top: 12px; padding: 18px 24px; border-radius: 10px; background: var(--tan); display: grid; grid-template-columns: 180px repeat(2, minmax(0, 1fr)); gap: 8px 24px; align-items: start; }
.tr-matters p { margin: 0; }

/* ---- Clubs: pick a club on the left, read about it on the right. */
.tr-master { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.tr-picklist { display: grid; gap: 2px; }
.tr-pick { display: grid; grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1fr); gap: 16px; align-items: center; width: 100%; min-height: 64px; padding: 8px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tr-pick:hover { background: var(--hover); }
.tr-pick[aria-pressed="true"], .tr-pick[aria-pressed="true"]:hover { background: var(--cream); }
.tr-pick-name { display: grid; gap: 1px; }
.tr-pick-name strong { font-size: 16px; }
.tr-pick-name span { font-size: 13px; color: var(--ink2); }
.tr-pick-bars { display: grid; gap: 5px; }
.tr-detail { background: var(--cream); border-radius: 10px; padding: 24px; }
#tab-trends .tr-detail h3 { font-size: 20px; }
.tr-pair { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 10px 0 18px; color: var(--ink2); }
.tr-pair strong { font: 600 32px/1 var(--font-head); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink); margin-right: 4px; }
.tr-when { margin-top: 12px; padding: 18px 24px; border-radius: 10px; background: var(--tan); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 12px 32px; align-items: center; }
.tr-when p { margin: 4px 0 0; }
.tr-when dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tr-when dt { font-size: 13px; color: var(--ink2); }
.tr-when dd { margin: 0; display: grid; gap: 2px; }
.tr-when dd strong { font-size: 17px; }
.tr-when dd span { font-size: 13px; color: var(--ink2); }

/* ---- Brands: the table and its takeaways side by side. */
.tr-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px 28px; align-items: start; }
.tr-scroll { overflow-x: auto; }
.tr-brands { border-collapse: collapse; width: 100%; min-width: 460px; }
.tr-brands thead th { text-align: left; font-weight: 400; font-size: 13px; color: var(--ink2); padding: 0 6px 8px; }
.tr-brands tbody th { text-align: left; padding: 3px 6px 3px 0; white-space: nowrap; }
.tr-brands td { padding: 3px; }
.tr-brand-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px 0 0; background: none; border: 0; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.tr-brand-btn span { display: inline-block; width: 22px; height: 22px; line-height: 21px; border-radius: 50%; background: var(--orange); color: #1E3B33; text-align: center; font-weight: 600; }
.tr-heat { display: block; text-align: center; padding: 10px 4px; border-radius: 6px; color: #1E3B33; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tr-note td { padding: 6px 12px 14px 36px; color: var(--ink2); font-size: 14px; }
.tr-note[hidden] { display: none; }
.tr-side { display: grid; gap: 24px; }
.tr-side dl { margin: 8px 0 0; display: grid; gap: 10px; }
.tr-side dt { font-weight: 600; }
.tr-side dd { margin: 0; color: var(--ink2); }

/* ---- Models: photo cards, then the takeaways. */
.tr-toolbar { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 14px; }
.tr-models { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tr-model { background: var(--cream); border-radius: 10px; overflow: hidden; }
.tr-photo { background: #FAF8F3; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; color: #3A4540; font-size: 12px; }
.tr-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tr-model-info { padding: 12px 14px 14px; display: grid; gap: 6px; }
#tab-trends .tr-model h3 { font-size: 16px; margin: 0 0 4px; }
.tr-model h3 span { display: block; font-size: 13px; font-weight: 400; color: var(--ink2); }
.tr-takeaways { margin-top: 12px; padding: 18px 24px; border-radius: 10px; background: var(--tan); }
#tab-trends .tr-takeaways ul { margin-top: 8px; columns: 2 300px; column-gap: 32px; }
.tr-takeaways li { break-inside: avoid; }

@media (max-width: 1000px) {
  .tr-master, .tr-split, .tr-when, .tr-matters { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .tr-compare { grid-template-columns: 1fr; }
  .tr-when dl { grid-template-columns: 1fr; gap: 12px; }
  .tr-pick { grid-template-columns: 1fr; gap: 6px; }
  .tr-figure strong { font-size: 44px; }
  .tr-cust, .tr-detail { padding: 18px; }
}

/* The shared shell gives every button a filled hover; these three are not filled buttons, so they keep their own text color and get the quiet hover. */
#tab-trends .tr-brand-btn:hover, #tab-trends .tr-brand-btn:focus-visible { background: var(--hover); color: var(--ink); }
#tab-trends .tr-brand-btn { border-radius: 8px; padding: 0 10px 0 4px; }
#tab-trends .tr-pick:hover, #tab-trends .tr-seg button:hover { color: var(--ink); }

/* Takeaways as tiles (one pattern in all four views): a small heading, then a row of filled tiles, each a bold lead and one line. */
.tr-group { margin-top: 28px; }
#tab-trends .tr-group > h3 { margin-bottom: 4px; }
.tr-group > .muted { max-width: 70ch; }
.tr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-top: 10px; }
.tr-tile { background: var(--cream); border-radius: 10px; padding: 14px 16px; display: grid; gap: 3px; align-content: start; }
.tr-tile small { font-size: 13px; color: var(--ink2); }
.tr-tile > strong:first-child, .tr-tile small + strong { font-size: 17px; font-family: var(--font-head); }
.tr-tile span { color: var(--ink2); }
div.tr-tile:not(:has(> span)):not(:has(> small)) { display: block; }   /* a takeaway written as one sentence with its lead in bold */
.tr-group .tr-say { background: var(--cream); max-width: 70ch; }
.tr-brands { max-width: 860px; }

/* No card left alone on a row: five models stay in one row from tablet width up; four takeaways sit two by two. */
@media (min-width: 860px) { .tr-models { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.tr-tiles:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .tr-tiles:has(> :nth-child(4):last-child) { grid-template-columns: 1fr; } }
.tr-model-info { padding: 10px 12px 12px; }

/* Bars line up across the row of model cards, whatever the length of the model's name. */
.tr-model { display: flex; flex-direction: column; }
.tr-model-info { flex: 1; display: flex; flex-direction: column; gap: 6px; }
#tab-trends .tr-model h3 { flex: 1; }

/* Cards must read as cards. The first tone (the page ground) was almost the same as the sheet they sit on: 1.05:1 in
   light, 1.03:1 in dark. They now use the tan step: 1.17:1 on the white sheet, 1.33:1 on the dark one. */
.tr-cust, .tr-detail, .tr-model, .tr-tile, .tr-group .tr-say,
.tr-pick[aria-pressed="true"], .tr-pick[aria-pressed="true"]:hover { background: var(--tan); }
.tr-detail .tr-say { background: var(--white); }

/* The whitepaper download: a plain link at the right end of the switch row, in the site's link style (teal underline). */
.tr-toprow { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin: 20px 0 24px; }
.tr-toprow .tr-switch { margin: 0; }
a.tr-download { gap: 8px; min-height: 44px; color: var(--ink); font-size: 14px; }
a.tr-download span { flex-direction: row; align-items: baseline; gap: 8px; }
a.tr-download strong { font-weight: 500; text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a.tr-download:hover strong { text-decoration-color: var(--ink); }
a.tr-download small { font-size: 13px; color: var(--ink2); }

/* Foot of every view: the source line, and the whitepaper download beside it. */
.tr-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 24px; margin-top: 28px; }
.tr-foot .tr-source { margin: 0; }
