/* Buying-guide widgets of the gear section (pages with `guideWidgets: true` in their front matter),
   loaded after gear.css, whose tokens and rules they follow: copper is the decision, verdigris the
   measure, no dots, pills, shadows or frames, corners 0 to 2 px, nothing under 12 px.
   A guide shows before it explains: every product has its picture next to its buy button, every
   comparison is a row of bars, and the long reading (testers' detail, full table, sources) waits
   behind a "+" line (.gx-more). */

/* Picks: one card per product. The cut-out stands on a slate plate (the same tones as the hero
   picture, scripts/gear-lineup-image.py --plate slate): dark enough to belong to the page, light
   enough for a black mouse, and it carries a white one. */
.gx-picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 20px; margin: 36px 0 0; padding: 0; list-style: none; }
.gx-picks.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 900px; }
.gx-pick { display: flex; flex-direction: column; align-items: flex-start; }
.gx-shot-plate { position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 2px; background: linear-gradient(#566175, #353f50); }
.gx-shot-plate img { position: absolute; inset: 9%; width: 82%; height: 82%; object-fit: contain; }
.gx-pick.is-pick .gx-shot-plate { border-top: 3px solid var(--gx-acc); }
.gx-pick-role { margin-top: 16px; color: var(--gx-muted); font-size: 12px; font-weight: 700; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; }
.gx-pick-role b { color: var(--gx-acc); font-weight: 800; }
.pd .gx-pick-name { margin-top: 6px; font-size: 22px; }
.gx-facts { display: flex; gap: 24px; margin: 14px 0 0; }
.gx-facts > div { display: flex; flex-direction: column-reverse; gap: 3px; }
.gx-facts dd { margin: 0; color: var(--gx-mes); font-size: 22px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gx-facts dt { color: var(--gx-muted); font-size: 12px; line-height: 1.3; }
.gx-pick .pd-price { margin-top: auto; padding-top: 18px; }
.gx-pick .pd-price.is-none { color: var(--gx-muted); }
.gx-pick .pd-buy, .gx-pick .pd-ghost { margin-top: 12px; }

/* Spec bars: one small chart per measure, the products as rows (name, figure, bar under them). */
.gx-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 48px; margin-top: 36px; }
.gx-specs.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; }
.gx-spec { margin: 0; }
.pd .gx-spec h3 { font-size: 19px; }
.gx-spec > p { margin-top: 4px; color: var(--gx-muted); font-size: 13.5px; line-height: 1.45; }
.gx-spec ol { display: grid; gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; }
.gx-spec li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 7px 12px; font-size: 14.5px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.gx-spec li span { font-weight: 600; }
.gx-spec li b { color: var(--gx-mes); font-weight: 700; }
.gx-spec li i { grid-column: 1 / -1; height: 10px; border-radius: 1px; background: linear-gradient(to right, var(--gx-mes) calc(var(--p) * 100%), var(--gx-tone-2) 0); }
.gx-spec li.is-none b { color: var(--gx-muted); font-weight: 600; }
.gx-spec li.is-none i { display: none; }

/* The travel diagram keeps a reading width in a guide. */
.pd-travel { max-width: 900px; }

/* Match: a game on the left of its mouse. The pick is a decision, so it takes the copper. */
.gx-match { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 36px; margin: 36px 0 0; padding: 0; list-style: none; }
.gx-match > li { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 20px; align-items: start; padding-top: 18px; border-top: .75px solid var(--gx-bar); }
.gx-match .gx-shot-plate { grid-row: 1 / span 5; aspect-ratio: 3 / 4; }
.gx-match-kind { color: var(--gx-muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pd .gx-match h3 { margin-top: 4px; font-size: 20px; }
.gx-match-pick { margin-top: 10px; color: var(--gx-acc); font-size: 16px; font-weight: 700; }
.gx-match p:not(.gx-match-kind, .gx-match-pick) { margin-top: 6px; color: var(--gx-muted); font-size: 14.5px; line-height: 1.5; }
.gx-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--gx-ink); font-size: 14.5px; font-weight: 700; }
.gx-link:hover { color: var(--gx-acc); }

/* Three short answers side by side (one per shape, one per step). */
.gx-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 36px; margin: 32px 0 0; }
.gx-trio dt { font-size: 18px; font-weight: 700; line-height: 1.25; letter-spacing: -.014em; }
.gx-trio dt small { display: block; margin-top: 3px; color: var(--gx-muted); font-size: 12.5px; font-weight: 600; letter-spacing: 0; }
.gx-trio dd { margin: 8px 0 0; font-size: 15px; line-height: 1.5; }
.gx-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 36px; margin: 40px 0 0; padding: 0; list-style: none; counter-reset: gx-step; }
.gx-steps li { counter-increment: gx-step; color: var(--gx-muted); font-size: 14.5px; line-height: 1.5; }
.gx-steps li::before { content: counter(gx-step); display: block; margin-bottom: 6px; color: var(--gx-acc); font-size: 26px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.gx-steps b { display: block; color: var(--gx-ink); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }

/* Skates: the underside of a mouse, drawn, with what you stick on it in the measure colour. */
.gx-skates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; margin-top: 36px; }
.gx-skate { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 24px; align-items: start; padding-top: 18px; border-top: .75px solid var(--gx-bar); }
.gx-skate svg { display: block; width: 100%; height: auto; grid-row: 1 / span 5; }
.gx-skate-body { fill: var(--gx-tone-2); stroke: var(--gx-bar); stroke-width: 1.5; }
.gx-skate-eye { fill: var(--gx-bg); }
.gx-skate-pad { fill: var(--gx-mes); }
.gx-skate-kind { color: var(--gx-muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.gx-skate-kind b { color: var(--gx-acc); font-weight: 800; }
.pd .gx-skate h3 { margin-top: 4px; font-size: 20px; }
.gx-skate p:not(.gx-skate-kind, .pd-price) { margin-top: 6px; color: var(--gx-muted); font-size: 14.5px; line-height: 1.5; }
.gx-skate .pd-price { margin-top: 12px; font-size: 20px; }
.gx-skate .pd-buy { margin-top: 10px; justify-self: start; }

/* The long reading, folded: testers' detail, the full table, the sources. */
.gx-more { max-width: 900px; margin-top: 32px; border-top: .75px solid var(--gx-rule); }
.gx-more.is-wide { max-width: none; }
.gx-more summary { position: relative; padding: 16px 40px 16px 0; font-size: 15.5px; font-weight: 700; letter-spacing: -.006em; cursor: pointer; list-style: none; }
.gx-more summary::-webkit-details-marker { display: none; }
.gx-more summary::after { content: "+"; position: absolute; right: 4px; top: 9px; color: var(--gx-acc); font-size: 24px; font-weight: 500; transition: rotate .2s ease; }
.gx-more[open] summary::after { rotate: 45deg; }
.gx-more > p { max-width: 72ch; margin: 0 0 14px; color: var(--gx-muted); font-size: 15px; line-height: 1.6; }
.gx-more > p b { color: var(--gx-ink); font-weight: 700; }
.gx-more .pd-table-wrap { margin-top: 4px; }
.gx-more .pd-table-wrap + p { margin-top: 20px; }
.pd .pd-sources .gx-more ul { margin-top: 0; }
.pd-table .gx-link { margin-top: 0; }

@media (max-width: 1000px) {
  .gx-picks, .gx-picks.is-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gx-specs, .gx-specs.is-two, .gx-match, .gx-skates { grid-template-columns: 1fr; }
  .gx-spec { max-width: 560px; }
}
@media (max-width: 760px) {
  .gx-trio, .gx-steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  /* On a phone a card lies down: the picture on the left, the figures and the button beside it. */
  .gx-picks, .gx-picks.is-three { grid-template-columns: 1fr; gap: 28px; }
  .gx-pick { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 18px; align-items: start; }
  .gx-pick .gx-shot-plate { grid-row: 1 / span 6; aspect-ratio: 3 / 5; }
  .gx-pick > :not(.gx-shot-plate) { grid-column: 2; justify-self: start; }
  .gx-pick-role { margin-top: 0; }
  .gx-pick .pd-price { padding-top: 14px; }
  .gx-skate { grid-template-columns: 84px minmax(0, 1fr); column-gap: 18px; }
  .gx-match > li { grid-template-columns: 84px minmax(0, 1fr); column-gap: 18px; }
}
