/* /build-bag: the Build Bag and its library of builds. The one strong element is the 3D bench in the hero;
   everything around it stays quiet. Part colors live in build-bag.js (filament colors, specials in lime). */

/* ---------- Hero: the copy, and the bench where the build assembles ---------- */
.bb-hero { padding-block: clamp(28px, 4vw, 48px) clamp(40px, 5vw, 64px); }
.bb-hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "top bench" "end bench"; grid-template-rows: auto 1fr; column-gap: clamp(28px, 4vw, 56px); row-gap: 22px; }
.bb-copy { grid-area: top; display: grid; gap: 18px; align-content: end; }
.bb-copy-end { grid-area: end; align-content: start; }
.bb-bench { grid-area: bench; align-self: center; }
.bb-copy h1 { font-size: clamp(36px, 4vw, 56px); }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #B9B5AA; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink-2); }
.bb-proof { list-style: none; padding: 0; display: grid; gap: 8px; font-size: 15.5px; color: var(--ink-2); }
.bb-proof li { display: flex; align-items: center; gap: 10px; }
.bb-proof .ico { width: 18px; height: 18px; color: var(--lime-deep); flex: none; }
.bb-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

.bb-bench { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.bb-stage { position: relative; aspect-ratio: 4 / 3; min-height: 300px; background: var(--bone-2); touch-action: none; }
.bb-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.bb-stage canvas:active { cursor: grabbing; }
.bb-view { position: absolute; top: 12px; left: 12px; display: flex; padding: 3px; gap: 2px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); }
.bb-view button { height: 32px; padding: 0 12px; border-radius: 7px; font: 600 13.5px/1 var(--font-sans); font-stretch: var(--semi); color: var(--ink-2); }
.bb-view button[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); }
.bb-view button:focus-visible { outline: none; box-shadow: var(--focus); }

.bb-steps { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line-2); }
.bb-steps[hidden] { display: none; }
.bb-stext { min-height: 3.1em; font-size: 15.5px; line-height: 1.45; color: var(--ink); }
.bb-snum { display: block; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.bb-arrow { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r); border: 1px solid var(--line); color: var(--ink); transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.bb-arrow .ico { width: 20px; height: 20px; }
.bb-arrow:hover:not(:disabled) { background: var(--bone); border-color: #CFCBC0; }
.bb-arrow-next { background: var(--lime); border-color: rgba(20, 21, 25, .12); }
.bb-arrow-next:hover:not(:disabled) { background: var(--lime-hover); }
.bb-arrow:disabled { opacity: .35; cursor: default; }
.bb-arrow:focus-visible, .bb-tile:focus-visible { outline: none; box-shadow: var(--focus); }
.bb-under { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 0 16px 14px; }
.bb-under .btn[hidden] { display: none; }
.bb-hint { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- The library: six builds, and the card for the one on the bench ---------- */
.bb-lib { padding-block: clamp(36px, 5vw, 64px) var(--section-y); border-top: 1px solid var(--line); }
.bb-lib-head { display: grid; gap: 12px; max-width: 640px; margin-bottom: 28px; }
.bb-lib-head p:not(.eyebrow) { color: var(--ink-2); }
.bb-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.bb-tile { display: grid; gap: 6px; align-content: start; text-align: left; padding: 14px 14px 13px; min-height: 92px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s var(--ease), box-shadow .2s var(--ease); }
.bb-tile:hover { border-color: #CFCBC0; }
.bb-tile[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--lime); }
.bb-tile-name { font-stretch: var(--semi); font-weight: 700; font-size: 16px; line-height: 1.2; letter-spacing: -.01em; }
.bb-tile-meta { display: grid; gap: 2px; font-size: 13.5px; color: var(--ink-3); }
.bb-tile-meta [data-used] { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }

.bb-card { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); margin-top: 16px; padding: clamp(22px, 3vw, 32px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
.bb-card h3 { font-size: 24px; }
.bb-machine { margin-top: 6px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--lime-deep); }
.bb-card h4 { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.bb-card-col p { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.bb-card-col p + h4 { margin-top: 18px; }
.bb-parts { list-style: none; padding: 0; display: grid; gap: 0; font-size: 14.5px; }
.bb-parts li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line-2); }
.bb-parts li span:last-child { font-family: var(--font-mono); color: var(--ink-3); }
.bb-parts li.is-special span:first-child::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 2px; background: var(--lime); box-shadow: 0 0 0 1px rgba(20, 21, 25, .18) inset; vertical-align: 1px; }

/* ---------- Specials, rules, plates ---------- */
.bb-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.bb-split .section-head { margin-bottom: 0; }
.bb-specials, .bb-rules, .bb-plates { list-style: none; padding: 0; }
.bb-specials { display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.bb-specials li { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.bb-specials h3 { font-size: 17px; display: flex; align-items: center; gap: 10px; }
.bb-specials h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--lime); box-shadow: 0 0 0 1px rgba(20, 21, 25, .18) inset; flex: none; }
.bb-specials p { color: var(--ink-2); font-size: 15.5px; }

.bb-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px clamp(24px, 3vw, 44px); }
.bb-rules li { padding-top: 16px; border-top: 2px solid var(--ink); }
.bb-rules h3 { font-size: 18px; margin-bottom: 8px; }
.bb-rules p { color: var(--ink-2); font-size: 15.5px; }

.bb-plates { display: grid; border-top: 1px solid var(--line-2); }
.bb-plates li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line-2); }
.bb-plate-n { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink-3); padding-top: 2px; }
.bb-plates h3 { font-size: 17px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.bb-plates h3 span { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.bb-plates p { color: var(--ink-2); font-size: 15px; margin-top: 2px; }

.bb-files { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
.bb-files > div:first-child { display: grid; gap: 16px; max-width: 640px; }
.bb-small { font-size: 14px; color: var(--on-dark-3); }
.bb-files-cta { display: grid; gap: 14px; justify-items: start; }
.bb-status { display: inline-block; padding: 4px 10px; border-radius: var(--r-xs); background: var(--lime-tint); color: var(--lime-deep); font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Narrow screens ---------- */
@media (max-width: 1080px) {
  .bb-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bb-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .bb-hero-grid, .bb-split { grid-template-columns: minmax(0, 1fr); }
  .bb-hero-grid { grid-template-areas: "top" "bench" "end"; grid-template-rows: auto; }
  .bb-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .bb-tiles { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; scrollbar-width: none; }
  .bb-tiles::-webkit-scrollbar { display: none; }
  .bb-tile { flex: 0 0 62%; scroll-snap-align: start; min-height: 0; }
  .bb-card, .bb-rules { grid-template-columns: minmax(0, 1fr); }
  .bb-specials li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .bb-files { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .bb-hint { display: none; }
  .bb-steps { gap: 10px; padding: 12px; }
  .bb-stext { font-size: 15px; }
}
