/* Design guides hub (guides.html, laid out by scripts/guides-hub-layout.js). Builds on css/trade.css; gm- prefix. */


/* Top */
.gm-top { padding-block: clamp(48px, 7vw, 96px) clamp(40px, 5vw, 72px); }
.gm-top-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px clamp(32px, 6vw, 96px); align-items: end; }
.gm-top h1 { margin: 0 0 24px; color: #fff; font-size: clamp(3rem, 8.4vw, 7.6rem); line-height: .88; }
.gm-top h1 span { display: block; color: transparent; -webkit-text-stroke: 2px var(--orange); }
.gm-top .lede { margin: 0; max-width: 46ch; font-size: 1.15rem; color: #c9c5bc; }
.gm-contents { border-top: 3px solid var(--orange); }
.tr-dark .gm-contents a { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: baseline; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.14); text-decoration: none; color: #fff; font: 700 1.15rem/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase; transition: padding .2s ease; }
.gm-contents a strong { font-size: 2.2rem; color: var(--orange); letter-spacing: 0; }
.gm-contents a::after { content: "\2193"; color: var(--orange); }
.tr-dark .gm-contents a:hover { padding-left: 12px; color: var(--orange); }

/* Figures strip */
.gm-plate ul { grid-template-columns: repeat(5, 1fr); }
.gm-plate li { padding: 0; }
.gm-plate a { display: block; height: 100%; padding: 26px 20px 24px; color: #a9a59c; text-decoration: none; transition: background .2s; }
.gm-plate li:first-child a { padding-left: 0; }
.gm-plate a:hover { background: rgba(255,255,255,.05); color: #fff; }
.gm-plate strong { font-size: clamp(1.8rem, 3vw, 2.8rem); }

/* Start here: data sheet */
.gm-start { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.gm-start-copy .tr-lead { margin-bottom: 28px; color: var(--text); }
.tr-sec a.gm-sheet { display: block; background: #fff; border: 2px solid var(--ink); text-decoration: none; color: var(--text); box-shadow: 14px 14px 0 var(--orange); transition: translate .25s ease, box-shadow .25s ease; }
.tr-sec a.gm-sheet:hover { translate: -4px -4px; box-shadow: 18px 18px 0 var(--orange); color: var(--text); }
.gm-sheet-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 18px; background: var(--ink); color: #fff; font: 700 .9rem/1.2 var(--font-head); letter-spacing: .14em; text-transform: uppercase; }
.gm-sheet-head span:last-child { color: var(--orange); }
.gm-sheet-fig { position: relative; display: block; border-bottom: 2px solid var(--ink); background: var(--concrete); }
.gm-sheet-fig img { display: block; width: 100%; height: 300px; object-fit: contain; padding: 24px 60px; }
.gm-dim { position: absolute; padding: 4px 9px; background: var(--ink); color: #fff; font: 700 .82rem/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; }
.gm-dim-w { left: 50%; bottom: 12px; translate: -50% 0; }
.gm-dim-h { left: 12px; top: 50%; translate: 0 -50%; }
.gm-dim-d { right: 12px; top: 14px; background: var(--orange); color: #1a0d06; }
.gm-sheet ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; grid-template-columns: 1fr 1fr; }
.gm-sheet li { counter-increment: s; padding: 12px 18px; border-top: 1px solid var(--stone); font-size: .95rem; }
.gm-sheet li:nth-child(odd) { border-right: 1px solid var(--stone); }
.gm-sheet li:nth-child(-n+2) { border-top: 0; }
.gm-sheet li::before { content: "\00A7" counter(s); margin-right: 10px; font: 700 .85rem/1 var(--font-head); color: var(--orange); }

/* All guides: sticky photo + grouped list */
.gm-index { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.gm-peek { position: sticky; top: calc(var(--header-h) + 28px); }
.gm-peek img { display: block; width: 100%; height: min(42vh, 360px); object-fit: cover; background: var(--charcoal); transition: opacity .14s ease, scale .5s ease; }
.gm-peek img.is-out { opacity: 0; scale: 1.03; }
.gm-peek-type { margin: 16px 0 6px; font: 700 .85rem/1 var(--font-head); letter-spacing: .22em; text-transform: uppercase; color: var(--orange); }
.gm-peek-title { margin: 0; font: 800 clamp(1.8rem, 3vw, 2.6rem)/1 var(--font-head); text-transform: uppercase; color: #fff; }
.gm-peek-desc { margin: 10px 0 0; color: #a9a59c; line-height: 1.5; min-height: 4.5em; }
.gm-groups { columns: 2; column-gap: clamp(28px, 4vw, 56px); }
.gm-group { break-inside: avoid; margin-bottom: 30px; }
.gm-group h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0; padding-bottom: 12px; border-bottom: 3px solid var(--orange); font-size: 1rem; letter-spacing: .2em; color: var(--orange); }
.gm-group h3 span { color: #a9a59c; }
.tr-sec a.gm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: center; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.12); text-decoration: none; color: #a9a59c; transition: padding .2s ease, box-shadow .2s ease; }
.gm-row > img { display: none; }
.gm-row-main strong { display: block; font: 700 clamp(1.15rem, 1.6vw, 1.4rem)/1.1 var(--font-head); letter-spacing: .02em; text-transform: uppercase; color: #fff; transition: color .15s; }
.gm-row-main span { display: block; margin-top: 6px; font-size: .95rem; line-height: 1.45; max-width: 60ch; }
.gm-row-read { font: 700 .85rem/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.gm-row-read::after { content: "\2192"; margin-left: 12px; color: var(--orange); }
.tr-sec a.gm-row:hover, .tr-sec a.gm-row:focus-visible { padding-left: 16px; box-shadow: inset 4px 0 0 var(--orange); color: #c9c5bc; }
.gm-row:hover strong, .gm-row:focus-visible strong { color: var(--orange); }

/* Downloads */
.tr-sec a.gm-manual { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: center; margin-top: 48px; text-decoration: none; color: var(--text); }
.tr-sec a.gm-manual:hover { color: var(--text); }
.gm-manual-cover { position: relative; display: block; margin: 0 22px 22px 0; }
.gm-manual-cover::before { content: ""; position: absolute; inset: 22px -22px -22px 22px; background: var(--ink); }
.gm-manual-cover img { position: relative; display: block; width: 100%; border: 2px solid var(--ink); transition: translate .25s ease; }
.gm-manual:hover .gm-manual-cover img { translate: -6px -6px; }
.gm-manual-body > span { display: block; }
.gm-manual-title { margin: 6px 0 10px; font: 800 clamp(2rem, 4vw, 3.4rem)/.98 var(--font-head); text-transform: uppercase; color: var(--ink); }
.gm-manual-meta { margin-bottom: 20px; font: 700 .9rem/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--orange); }
.gm-inside { margin-bottom: 26px; border-top: 3px solid var(--ink); }
.gm-inside span { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 4px 20px; padding: 11px 0; border-bottom: 1px solid var(--stone); }
.gm-inside strong { font: 700 1.05rem/1.2 var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.gm-manual-body .btn { display: inline-block; }
.gm-sub { display: flex; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; margin: clamp(48px, 6vw, 80px) 0 0; padding-bottom: 12px; border-bottom: 3px solid var(--ink); font-size: clamp(1.5rem, 2.6vw, 2rem); }
.gm-sub span { font: 400 1rem/1.4 var(--font-body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.gm-docs { display: grid; grid-template-columns: repeat(5, 1fr); }
.tr-sec .gm-docs a { display: block; padding: 22px 20px 22px 0; border-right: 1px solid var(--stone); text-decoration: none; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.tr-sec .gm-docs a + a { padding-left: 20px; }
.gm-docs a:last-child { border-right: 0; }
.gm-docs img { display: block; width: 100%; height: 190px; object-fit: cover; object-position: top; margin-bottom: 14px; border: 1px solid var(--ink); transition: translate .25s ease; }
.gm-docs a:hover img { translate: 0 -6px; }
.gm-docs strong { display: block; margin-bottom: 4px; font: 700 1.2rem/1.1 var(--font-head); text-transform: uppercase; color: var(--ink); transition: color .15s; }
.gm-docs a:hover strong { color: var(--orange); }
.gm-docs small { display: block; margin-top: 8px; font: 700 .78rem/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.gm-sheets { display: grid; grid-template-columns: repeat(8, 1fr); border-left: 1px solid var(--ink); }
.gm-thumb { display: block; aspect-ratio: 360 / 466; margin-bottom: 10px; overflow: hidden; background: #fff; border: 1px solid var(--stone); }
.gm-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale .3s ease; }
.gm-sheets a:hover .gm-thumb img { scale: 1.06; }
.tr-sec .gm-sheets a { display: block; padding: 12px 12px 14px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); text-decoration: none; color: var(--muted); transition: background .15s, color .15s; }
.gm-code { display: block; margin-bottom: 4px; font: 800 1.35rem/1 var(--font-head); color: transparent; -webkit-text-stroke: 1.2px var(--ink); transition: color .15s; }
.gm-sheets strong { display: block; font: 700 .92rem/1.15 var(--font-head); text-transform: uppercase; color: var(--ink); }
.gm-sheets small { display: block; margin-top: 4px; font-size: .82rem; line-height: 1.35; }
.tr-sec .gm-sheets a:hover { background: var(--ink); color: #c9c5bc; }
.gm-sheets a:hover strong { color: #fff; }
.gm-sheets a:hover .gm-code { color: var(--orange); -webkit-text-stroke: 0; }

/* Software + answers: open-and-close rows */
.gm-acc { border-top: 3px solid var(--orange); }
.gm-acc details { border-bottom: 1px solid rgba(255,255,255,.14); }
.gm-acc summary { position: relative; display: block; padding: 22px 48px 22px 0; cursor: pointer; list-style: none; }
.gm-acc summary::-webkit-details-marker { display: none; }
.gm-acc summary::after { content: "+"; position: absolute; right: 4px; top: 20px; font: 700 2rem/1 var(--font-head); color: var(--orange); transition: rotate .2s ease; }
.gm-acc details[open] summary::after { rotate: 45deg; }
.gm-acc-by { display: block; margin-bottom: 6px; font: 700 .8rem/1 var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: var(--orange); }
.gm-acc summary strong { display: block; font: 700 clamp(1.4rem, 2.4vw, 2rem)/1.08 var(--font-head); text-transform: uppercase; color: #fff; }
.gm-acc-line { display: block; margin-top: 6px; color: #a9a59c; }
.gm-acc-body { padding: 0 48px 24px 0; color: #c9c5bc; }
.gm-acc-body p, .gm-acc-body ol { margin: 0 0 12px; }
.gm-acc-body ol { padding-left: 20px; }
.gm-acc-body .sw-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.gm-acc-light { border-top-color: var(--ink); }
.gm-acc-light details { border-bottom-color: var(--stone); }
.gm-acc-light summary strong { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: clamp(1.3rem, 2vw, 1.7rem); }
.gm-acc-light .gm-acc-body { color: var(--text); }

@media (max-width: 1023px) {
  .gm-top-grid, .gm-start, .gm-index, .tr-sec a.gm-manual { grid-template-columns: minmax(0, 1fr); }
  .gm-peek { display: none; }
  .gm-groups { columns: 1; }
  .tr-sec a.gm-row { grid-template-columns: 84px minmax(0, 1fr); align-items: start; }
  .gm-row > img { display: block; width: 84px; height: 64px; object-fit: cover; }
  .gm-row-read { grid-column: 2; }
  .gm-plate ul { grid-template-columns: repeat(2, 1fr); }
  .gm-plate a, .gm-plate li:first-child a { padding: 18px 12px 16px 0; }
  .gm-docs { grid-template-columns: repeat(2, 1fr); }
  .tr-sec .gm-docs a, .tr-sec .gm-docs a + a { padding: 18px 12px 18px 0; border-right: 0; border-bottom: 1px solid var(--stone); }
  .gm-sheets { grid-template-columns: repeat(4, 1fr); }
  .gm-manual-cover { max-width: 300px; }
}
@media (max-width: 560px) {
  .gm-sheets { grid-template-columns: repeat(3, 1fr); }
  .tr-sec a.gm-row { grid-template-columns: 64px minmax(0, 1fr); padding: 10px 0; }
  .gm-row > img { width: 64px; height: 48px; }
  .gm-sheet ol { grid-template-columns: 1fr; }
  .gm-sheet li:nth-child(odd) { border-right: 0; }
  .gm-sheet li:nth-child(2) { border-top: 1px solid var(--stone); }
  .gm-sheet-fig img { height: 220px; padding: 20px 40px; }
  .gm-inside span { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .gm-top h1 span { -webkit-text-stroke-width: 1.5px; }
}

/* Search box beside the type tabs */
.gm-tools { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; }
.gm-search input { width: 220px; max-width: 100%; padding: 10px 14px; background: transparent; border: 1px solid rgba(255,255,255,.3); border-radius: 0; color: #fff; font: 400 1rem/1.2 var(--font-body); }
.gm-search input::placeholder { color: #8d897f; }
.gm-search input:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: var(--orange); }
.gm-empty { margin: 0; padding: 18px 0; color: #a9a59c; }
.tr-sec a.gm-row[hidden] { display: none; }
