/* Models: a model's page (/models/<slug>), the catalog (/models), the model card, the full-size
   viewer, and the account Downloads library. Builds on base.css; tokens only (see _brand/DESIGN-SYSTEM.md).
   The one strong element here is the product image (one themed scene with its copy laid over it)
   plus the slicer-style print readout under it. */

/* ============ Model page: top ============ */
.model { padding-top: clamp(18px, 3vw, 30px); }

.crumbs ol, .toc ol, .license-col ul { list-style: none; padding: 0; }
.crumbs ol { 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); }

/* the photos and, beside them, the purchase panel, the two the same height on desktop (stretch) */
.model-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 36px); align-items: stretch; margin-top: 18px; }

/* the product image: one themed scene, with its copy as real text over it. Sizes are in cqw (1% of
   the image's width) so the copy scales with the picture, with floors that keep it readable on phones. */
.hero-stage {
  position: relative; margin: 0; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--r-xl);
  background: var(--graphite); box-shadow: 0 0 0 1px rgba(20, 21, 25, .1), var(--shadow); container-type: inline-size;
}
.hero-stage > img { width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, rgba(10, 11, 13, .7) 0%, rgba(10, 11, 13, .38) 30%, rgba(10, 11, 13, 0) 52%); }
.hero-copy { position: absolute; left: 4.5%; top: 7%; display: grid; gap: 1.4cqw; }
.hero-eb { display: flex; align-items: center; gap: .9cqw; font: 500 max(9.5px, 1.55cqw)/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--lime); }
.hero-eb .led { width: max(6px, .75cqw); height: max(6px, .75cqw); }
.hero-title { font-size: calc(var(--size, 5.25) * 1cqw); font-stretch: var(--wide); font-weight: 800; line-height: .98; letter-spacing: -.035em; color: var(--on-dark); text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.hero-tag {
  --c: max(8px, 1.1cqw);
  position: absolute; width: max-content; padding: max(5px, .9cqw) max(7px, 1.15cqw); border-radius: max(6px, .75cqw);
  background: var(--lime); color: var(--ink); white-space: nowrap; box-shadow: 0 .75cqw 2cqw rgba(0, 0, 0, .4);
  font: 600 max(10px, 1.85cqw)/1.15 var(--font-mono); letter-spacing: .07em; text-transform: uppercase;
}
.hero-tag::after { content: ""; position: absolute; width: var(--c); height: var(--c); border-radius: 2px; background: var(--lime); transform: rotate(45deg); }
.hero-tag.is-up { transform: translate(-50%, var(--c)); }
.hero-tag.is-up::after { left: calc(50% - var(--c) / 2); top: calc(var(--c) / -2 + 1px); }
.hero-tag.is-down { transform: translate(-50%, calc(-100% - var(--c))); }
.hero-tag.is-down::after { left: calc(50% - var(--c) / 2); bottom: calc(var(--c) / -2 + 1px); }
.hero-tag.is-right { transform: translate(calc(-100% - var(--c)), -50%); }
.hero-tag.is-right::after { right: calc(var(--c) / -2 + 1px); top: calc(50% - var(--c) / 2); }
.hero-tag.is-left { transform: translate(var(--c), -50%); }
.hero-tag.is-left::after { left: calc(var(--c) / -2 + 1px); top: calc(50% - var(--c) / 2); }
.hero-wm { position: absolute; left: 4.5%; bottom: 5.5%; display: inline-flex; align-items: center; gap: .6cqw; color: var(--on-dark); opacity: .9; font-size: max(12px, 2cqw); font-stretch: var(--wide); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.hero-wm span { padding: .3cqw .35cqw .25cqw .5cqw; border: 1.5px solid currentColor; border-radius: 4px; font: 600 max(6px, .8cqw)/1 var(--font-mono); letter-spacing: .2em; }
/* small images: long tags wrap onto two lines instead of running off the picture */
@container (max-width: 480px) {
  .hero-tag { white-space: normal; max-width: 36cqw; text-align: center; }
}

/* the gallery (a model with 'gallery', e.g. a panel pack's four scenes): the product image, then
   one photo per scene in a track that snaps photo by photo and swipes on touch, with a row of
   thumbnails under it that picks one (model.js). The track takes over the image's frame. */
.media { min-width: 0; }
.gal-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-xl); background: var(--graphite);
  box-shadow: 0 0 0 1px rgba(20, 21, 25, .1), var(--shadow);
}
.gal-track::-webkit-scrollbar { display: none; }
.gal-track:focus-visible { outline: none; box-shadow: var(--focus); }
.gal-track > figure { scroll-snap-align: start; scroll-snap-stop: always; }
.gal-track > .hero-stage { border-radius: 0; box-shadow: none; }
.gal-slide { position: relative; margin: 0; overflow: hidden; aspect-ratio: 4 / 3; background: var(--graphite); container-type: inline-size; }
.gal-slide > img { width: 100%; height: 100%; object-fit: cover; }
.gal-slide > video { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--graphite); }
.gal-thumb.is-video { position: relative; }
.gal-thumb.is-video::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 30%; max-width: 34px; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgba(10, 11, 13, .62) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='%23fff'/%3E%3C/svg%3E") center / 62% no-repeat;
}
.gal-cap {
  position: absolute; left: 3.5%; bottom: 4.5%; display: inline-flex; align-items: center; gap: max(8px, 1.3cqw);
  padding: max(7px, 1.05cqw) max(10px, 1.5cqw); border-radius: max(8px, 1cqw);
  background: rgba(10, 11, 13, .66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--on-dark); font: 650 max(13px, 2.1cqw)/1.1 var(--font-sans); letter-spacing: -.01em;
}
.gal-cap-n { font: 500 max(9.5px, 1.45cqw)/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--lime); }
.gal-thumbs { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.gal-thumb {
  display: block; padding: 0; border: 0; border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; cursor: pointer;
  background: var(--graphite); box-shadow: 0 0 0 1px var(--line); opacity: .72;
  transition: opacity .15s var(--ease), box-shadow .15s var(--ease);
}
.gal-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gal-thumb:hover { opacity: 1; }
.gal-thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--ink); }
.gal-thumb:focus-visible { outline: none; opacity: 1; box-shadow: var(--focus); }
@media (prefers-reduced-motion: reduce) { .gal-thumb { transition: none; } }

/* the purchase panel: the name and a short line, the price, the choices and buttons, the file details.
   Phones: the name sits on the page and the card holds the rest. Desktop (the min-width: 901px block
   below): the whole panel is one card, as tall as the photos beside it, with the file details at its foot. */
.buy { display: grid; gap: 14px; align-content: start; min-width: 0; }
.buy-head { display: grid; gap: 12px; }
.model-title { font-size: clamp(34px, 3.7vw, 52px); line-height: 1.02; text-wrap: balance; }
.model-lead { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.5; color: var(--ink-2); max-width: 38ch; text-wrap: pretty; }
.model-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ms .model-tags { margin-top: 20px; }
.model-tags li {
  padding: 6px 8px; border-radius: 6px; background: var(--paper); box-shadow: 0 0 0 1px var(--line) inset;
  font: 500 11px/1 var(--font-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2);
}
.buy-card { display: grid; gap: 14px; margin-top: 6px; padding: 20px; border-radius: var(--r-lg); background: var(--paper); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.buy-perks { display: none; }   /* phones: the About section lists the highlights */
@media (min-width: 901px) {
  .buy { display: flex; flex-direction: column; padding: 18px 22px 16px; border-radius: var(--r-xl); background: var(--paper); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
  .buy-head { gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
  .model-title { font-size: clamp(24px, 2.2vw, 28px); line-height: 1.08; }
  .model-lead { max-width: none; font-size: 15px; line-height: 1.45; }
  .buy-card { flex: 1; display: flex; flex-direction: column; gap: 8px; margin-top: 0; padding: 10px 0 0; border-radius: 0; background: none; box-shadow: none; }
  .buy-card > .buy-meta { margin-top: auto; }
  .buy .dl-btn { --btn-h: 52px; }
  .buy .buy-actions { gap: 8px; }
  .buy .buy-actions .btn { --btn-h: 52px; }
  .buy .buy-opt { padding: 6px 12px; }
  .buy .buy-meta div { padding: 7px 0; }
  /* where the panel runs taller than the photos (narrower windows), the photos stay in view beside it */
  .media { position: sticky; top: calc(var(--header-h) + 18px); align-self: start; }
  /* the highlights take the room left between the buttons and the file details, adding no height of
     their own (height 0, then grow): a line that doesn't fit wraps into a second column, out of sight.
     The empty ::before lets even the first line wrap away when there's no room at all. */
  .buy-perks { display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; flex: 1 0 0; height: 0; min-height: 0; overflow: hidden; gap: 9px 80px; margin: -8px 0 0; padding: 0; list-style: none; }
  .buy-perks::before { content: ""; width: 100%; height: 0; }
  .buy-perks li { display: flex; gap: 9px; width: 100%; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
  .buy-perks .ico { flex: none; width: 17px; height: 17px; margin-top: 1px; padding: 3px; border-radius: 5px; background: var(--lime); color: var(--ink); stroke-width: 2.6; }
}
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.price-amt { font-size: 34px; font-stretch: var(--wide); font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.price-note { font-size: 14.5px; color: var(--ink-3); }
.price-note a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--lime-deep); text-underline-offset: 3px; }
.price-note a:hover { color: var(--ink); }
.dl-btn { --btn-h: 56px; justify-content: flex-start; gap: 10px; padding: 0 20px; font-size: 16.5px; }
.dl-btn .ico { width: 20px; height: 20px; }
.dl-btn .dl-size { margin-left: auto; font: 500 12.5px/1 var(--font-mono); letter-spacing: .04em; color: rgba(20, 21, 25, .62); }
.dl-btn.is-busy { cursor: progress; }
.dl-btn.is-busy .ico { animation: dl-nudge .9s var(--ease) infinite; }
@keyframes dl-nudge { 50% { translate: 0 3px; } }
@media (prefers-reduced-motion: reduce) { .dl-btn.is-busy .ico { animation: none; } }
/* the team's test download (shown to a team account only): quiet, dashed, plainly not a buyer's button */
.admin-dl {
  --btn-h: 42px; justify-content: flex-start; gap: 10px; padding: 0 14px 0 10px; border: 1.5px dashed #C9C5BA;
  background: transparent; color: var(--ink-2); font-size: 14.5px; font-weight: 600;
}
.admin-dl:hover { border-color: var(--ink-3); background: var(--bone); color: var(--ink); }
.admin-dl .ico { width: 17px; height: 17px; }
.admin-dl .admin-tag { padding: 4px 6px 3px; border-radius: 5px; background: var(--graphite); color: var(--lime); font: 600 10px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.admin-dl .dl-size { margin-left: auto; font: 500 12px/1 var(--font-mono); letter-spacing: .04em; color: var(--ink-3); }
.admin-dl.is-busy { cursor: progress; }

.dl-msg { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.dl-msg:empty { display: none; }
.dl-msg.is-ok { color: var(--lime-deep); font-weight: 500; }
.dl-msg.is-err { color: #B42318; font-weight: 500; }
.dl-msg a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #B9B5AA; }

.buy-meta { display: grid; border-top: 1px solid var(--line-2); }
.buy-meta div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; line-height: 1.45; }
.buy-meta div:last-child { border-bottom: 0; padding-bottom: 0; }
.buy-meta dt { font: 500 10.5px/2 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.buy-meta dd { color: var(--ink-2); }
.buy-meta .buy-meta-split { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; }
.buy-meta-split span + span { color: var(--ink-3); }
.buy-meta a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #B9B5AA; }

/* the print readout: a slicer's summary panel */
.readout {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px 28px;
  margin-top: clamp(28px, 4vw, 44px); padding: 18px 22px; border-radius: var(--r-lg);
  background: var(--graphite); color: var(--on-dark); box-shadow: var(--shadow);
}
.readout::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(243, 242, 237, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(243, 242, 237, .035) 1px, transparent 1px);
  background-size: 22px 22px;
}
.readout-k { position: relative; display: flex; align-items: center; gap: 10px; white-space: nowrap; font: 500 11.5px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-2); }
.led { width: 8px; height: 8px; border-radius: 2px; background: var(--lime); box-shadow: 0 0 10px var(--lime-glow); }
.readout-grid { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.readout-grid div { min-width: 0; padding: 2px 16px; border-left: 1px solid var(--line-dark); }
.readout-grid dt { font: 500 10.5px/1.5 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-3); white-space: nowrap; }
.readout-grid dd { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-stretch: var(--semi); font-weight: 700; letter-spacing: -.01em; }

/* ============ Model page: body ============ */
.model-body { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-block: clamp(48px, 6vw, 80px) clamp(64px, 8vw, 104px); }
.toc { position: sticky; top: calc(var(--header-h) + 28px); }
.toc-k { margin-bottom: 12px; font: 500 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.toc ol { display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: flex; gap: 10px; margin-left: -1px; padding: 7px 12px; border-left: 2px solid transparent; font-size: 14.5px; color: var(--ink-2); text-decoration: none; transition: color .15s var(--ease), border-color .15s var(--ease); }
.toc a:hover { color: var(--ink); border-left-color: #B9B5AA; }
.toc a.is-active { color: var(--ink); font-weight: 600; border-left-color: var(--ink); }
.toc-n { font: 500 11.5px/1.75 var(--font-mono); color: var(--ink-3); }

.model-sections { max-width: 780px; min-width: 0; }
.ms { padding-block: clamp(32px, 4vw, 44px); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 16px); }
.ms:first-child { padding-top: 0; border-top: 0; }
.ms h2 { display: flex; align-items: baseline; gap: 14px; font-size: clamp(24px, 2.4vw, 30px); }
.ms-n { font: 500 13px/1 var(--font-mono); font-stretch: 100%; letter-spacing: .06em; color: var(--ink-3); }
.ms-intro, .ms-prose p { max-width: 64ch; margin-top: 14px; color: var(--ink-2); text-wrap: pretty; }
.ms-prose p + p { margin-top: 12px; }
.ms-note { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--bone-2); font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.ms-sub { margin-top: 26px; font: 500 11.5px/1 var(--font-mono); font-stretch: 100%; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; margin-top: 22px; }
.checks li { display: flex; gap: 10px; font-size: 15.5px; line-height: 1.45; }
.checks .ico { width: 20px; height: 20px; margin-top: 1px; padding: 3px; border-radius: 6px; background: var(--lime); color: var(--ink); stroke-width: 2.6; }

/* print settings */
.spec { display: grid; margin-top: 18px; overflow: hidden; border-radius: var(--r); background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.spec div { display: grid; grid-template-columns: minmax(120px, 32%) minmax(0, 1fr); gap: 16px; padding: 11px 16px; border-top: 1px solid var(--line-2); font-size: 15px; line-height: 1.45; }
.spec div:first-child { border-top: 0; }
.spec dt { font: 500 11px/2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
/* the filaments to load: the color first, what it's for under it, its swatch beside both */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.swatches li {
  display: grid; grid-template-columns: 30px auto; grid-template-areas: "sw v" "sw k"; align-items: center; gap: 4px 12px;
  padding: 10px 18px 10px 10px; border-radius: 10px; background: var(--paper); box-shadow: 0 0 0 1px var(--line);
}
.swatches .sw { grid-area: sw; width: 30px; height: 30px; }
.swatches .sw-v { grid-area: v; align-self: end; font-size: 15px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.swatches .sw-k { grid-area: k; align-self: start; }
.sw { flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--c); box-shadow: 0 0 0 1px rgba(20, 21, 25, .18) inset, 0 1px 0 rgba(255, 255, 255, .35) inset; }
.sw-sm { display: inline-block; width: 14px; height: 14px; margin-right: 8px; border-radius: 4px; vertical-align: -2px; }
.sw-k { font: 500 10.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

/* parts list */
.table-wrap { margin-top: 18px; overflow-x: auto; border-radius: var(--r); background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.parts { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.parts th { padding: 12px 16px; background: var(--bone); border-bottom: 1px solid var(--line); text-align: left; font: 500 10.5px/1 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.parts td { padding: 10px 16px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.parts tbody tr:first-child td { border-top: 0; }
.part-name { display: block; font-weight: 600; color: var(--ink); }
.part-file { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.parts .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.parts td:last-child { white-space: nowrap; }
.parts tr.opt td { background: #FCFBF8; color: var(--ink-2); }

/* how to print: the settings sit behind a toggle for anyone not using the 3MF project */
.steps .swatches { margin-top: 10px; }
.more-settings { margin-top: 16px; border-radius: var(--r); background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.more-settings > summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 600; color: var(--ink); }
.more-settings > summary::-webkit-details-marker { display: none; }
.more-settings > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin: -3px 2px 0 auto; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s var(--ease); }
.more-settings[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.more-settings > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: var(--r); }
.more-settings > .ms-intro { margin: 0 18px; }
.more-settings > .spec { margin: 14px 18px 18px; }
.opt-tag { margin-left: 8px; padding: 2px 6px; border-radius: 5px; background: var(--bone-2); font: 500 10px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }

/* assembly */
.steps { display: grid; gap: 12px; margin-top: 20px; }
/* the steps themselves only (> li): the filament swatches inside a step are list items too */
.steps > li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 16px 18px; border-radius: var(--r); background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.step-n { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--graphite); color: var(--lime); font: 600 15px/1 var(--font-mono); }
.steps h3 { font-size: 17px; font-stretch: var(--semi); }
.steps p { margin-top: 4px; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }

/* license */
.license { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.license-col { padding: 18px; border-radius: var(--r); background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.license-col h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-stretch: var(--semi); }
.license-col h3::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--lime); box-shadow: 0 0 0 1px rgba(75, 102, 0, .25); }
.license-col.is-no h3::before { background: var(--ink-3); box-shadow: none; }
.license-col ul { display: grid; gap: 8px; margin-top: 10px; }
.license-col li { position: relative; padding-left: 16px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.license-col li::before { content: ""; position: absolute; left: 1px; top: .72em; width: 7px; height: 1.5px; background: var(--ink-3); }
.license-col a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #B9B5AA; }

/* more from the collection */
.more { padding-block: clamp(56px, 7vw, 88px); }
.more-head { display: grid; gap: 12px; margin-bottom: 28px; }
.more-head h2 { font-size: clamp(26px, 3vw, 38px); }
.more-head .textlink { justify-self: start; }

/* ============ Model card (catalog + more) ============ */
.model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.model-card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--paper); color: inherit; text-decoration: none;
  box-shadow: 0 0 0 1px var(--line); transition: translate .25s var(--ease), box-shadow .25s var(--ease);
}
.model-card:hover { translate: 0 -3px; box-shadow: 0 0 0 1px #D2CEC3, var(--shadow); }
.model-card:focus-visible { outline: none; box-shadow: var(--focus); }
.mc-art { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--graphite); }
.mc-art img { width: 100%; height: 100%; object-fit: cover; transition: scale .5s var(--ease); }
.model-card:hover .mc-art img { scale: 1.035; }
.mc-free { z-index: 1; position: absolute; left: 12px; top: 12px; padding: 3px 8px; border-radius: 6px; background: var(--lime); color: var(--ink); font: 600 11px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
/* a paid design's price, on the image like the Free label: paper with ink figures */
.mc-price { z-index: 1; position: absolute; left: 12px; top: 12px; padding: 3px 8px; border-radius: 6px; background: var(--paper); color: #141519; font: 600 12px/1.4 var(--font-mono); letter-spacing: .02em; box-shadow: 0 1px 2px rgba(20, 21, 25, .18); }
.mc-body { display: grid; gap: 6px; flex: 1; align-content: start; padding: 16px 18px 18px; }
.mc-code { font: 500 11px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.mc-name { font-size: 20px; line-height: 1.15; }
.mc-tag { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.mc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.mc-fmt { font: 500 12px/1 var(--font-mono); letter-spacing: .04em; color: var(--ink-3); }
.mc-go { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; }
.mc-go .ico { width: 16px; height: 16px; transition: translate .2s var(--ease); }
.model-card:hover .mc-go .ico { translate: 3px 0; }

.bench { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 28px; font-size: 14.5px; color: var(--ink-3); }
.bench-k { margin-right: 4px; font: 500 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.bench-item { padding: 5px 9px; border-radius: 6px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); font-size: 14px; color: var(--ink-2); }
.bench .textlink { margin-left: auto; }

/* ============ Catalog (/models): search, filters, a dense grid (models.js) ============ */
.catalog { padding-block: clamp(20px, 3vw, 36px) clamp(64px, 8vw, 104px); }
/* sort and search share the title's row, so the chips get the whole width under it */
.cat-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "title tools search" "chips chips chips";
  align-items: center; gap: 16px 12px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.cat-title { grid-area: title; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-width: 0; }
.cat-title h1 { font-size: clamp(28px, 3vw, 38px); }
.cat-count { font: 500 12px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.cat-search { grid-area: search; position: relative; width: 380px; }
.cat-search .ico { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }
.cat-q {
  width: 100%; height: 46px; padding: 0 14px 0 42px; border: 0; border-radius: var(--r); background: var(--paper);
  box-shadow: 0 0 0 1px var(--line); font: inherit; font-size: 16px; color: var(--ink); transition: box-shadow .15s var(--ease);
}
.cat-q::placeholder { color: var(--ink-3); }
.cat-q:hover { box-shadow: 0 0 0 1px #CFCBC0; }
.cat-q:focus { outline: none; box-shadow: var(--focus); }
.cat-chips { grid-area: chips; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.cat-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--paper); box-shadow: 0 0 0 1px var(--line); color: var(--ink-2); font: 600 14px/1 var(--font-sans); cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
}
.cat-chip:hover { color: var(--ink); box-shadow: 0 0 0 1px #CFCBC0; }
.cat-chip[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); box-shadow: 0 0 0 1px var(--ink); }
.cat-chip:focus-visible { outline: none; box-shadow: var(--focus); }
.cat-n { font: 500 11px/1 var(--font-mono); color: var(--ink-3); }
.cat-chip[aria-pressed="true"] .cat-n { color: var(--lime); }
.cat-tools { grid-area: tools; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.cat-select { position: relative; display: inline-flex; }
.cat-select select {
  appearance: none; height: 36px; padding: 0 36px 0 14px; border: 0; border-radius: 999px; background: var(--paper);
  box-shadow: 0 0 0 1px var(--line); color: var(--ink); font: 600 14px/1 var(--font-sans); cursor: pointer;
}
.cat-select select:hover { box-shadow: 0 0 0 1px #CFCBC0; }
.cat-select select:focus-visible { outline: none; box-shadow: var(--focus); }
.cat-select .ico { position: absolute; right: 12px; top: 50%; width: 16px; height: 16px; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }

/* the catalog's cards: name, kind and files; the whole card is the link */
.model-grid.cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cat-grid .mc-tag, .cat-grid .mc-go { display: none; }
.cat-grid .mc-body { gap: 4px; padding: 12px 14px 14px; }
.cat-grid .mc-name { font-size: 17px; }
.cat-grid .mc-foot { margin-top: 6px; padding-top: 10px; }
.cat-grid .mc-free, .cat-grid .mc-price { left: 10px; top: 10px; }
.cat-empty { display: grid; justify-items: start; gap: 14px; padding: 24px; border-radius: var(--r-lg); border: 1px dashed #CFCBC0; background: var(--paper); color: var(--ink-2); line-height: 1.5; }
.cat-empty[hidden] { display: none; }
.cat-empty strong { color: var(--ink); }
.cat-more { display: flex; justify-content: center; margin-top: 28px; }
.cat-more[hidden] { display: none; }

@media (max-width: 1100px) {
  .model-grid.cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-search { width: 320px; }
}
/* on touch-size screens the chips scroll sideways in one row instead of wrapping */
@media (max-width: 900px) {
  .cat-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter); scrollbar-width: none; }
  .cat-chips::-webkit-scrollbar { display: none; }
}
@media (max-width: 760px) {
  .cat-head { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title tools" "search search" "chips chips"; gap: 14px 12px; padding-bottom: 14px; }
  .cat-search { width: 100%; }
  .model-grid.cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 480px) {
  .model-grid.cat-grid { gap: 10px; }
  .cat-grid .mc-body { padding: 10px 11px 12px; }
  .cat-grid .mc-name { font-size: 15px; }
  .cat-grid .mc-code { font-size: 10px; letter-spacing: .06em; }
  .cat-grid .mc-sku { display: none; }
  .cat-grid .mc-fmt { font-size: 10.5px; letter-spacing: 0; }
  .cat-grid .mc-free, .cat-grid .mc-price { left: 8px; top: 8px; padding: 2px 6px; font-size: 10px; }
}

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout { grid-template-columns: minmax(0, 1fr); }
  .readout-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .readout-grid div:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
}
@media (max-width: 900px) {
  .model-top { grid-template-columns: minmax(0, 1fr); }
  .model-body { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 640px) {
  .hero-stage { border-radius: var(--r-lg); }
  .gal-track { border-radius: var(--r-lg); }
  .gal-thumbs { gap: 8px; margin-top: 10px; }
  .gal-thumb { border-radius: 8px; }
  .readout { padding: 16px; }
  .readout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout-grid div, .readout-grid div:nth-child(3n + 1) { border-left: 1px solid var(--line-dark); padding-left: 14px; }
  .readout-grid div:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
  .readout-grid dd { font-size: 16px; white-space: normal; }
  .checks, .license { grid-template-columns: minmax(0, 1fr); }
  .spec div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .steps > li { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .step-n { width: 34px; height: 34px; font-size: 14px; }
  .swatches { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .model-grid { grid-template-columns: minmax(0, 1fr); }
  .bench .textlink { margin-left: 0; }
}
