/* Marketplace layer: mainstream template-store patterns adapted to X-STORE. */
body.home-page {
  --home-coral: #c24118;
  --home-coral-dark: #8f2b0e;
  --home-coral-on-dark: #f08a68;
}

/* Message-forward hero, followed by a delivery ledger and real project previews. */
.home-market-hero {
  padding: 64px 0 0;
  background: #fff;
}

.home-market-intro {
  display: block;
  max-width: none;
  margin: 0;
  text-align: center;
}

.home-market-intro .home-kicker {
  justify-content: center;
  color: #5f6468;
}

.home-market-intro h1 {
  max-width: 1120px;
  margin: 16px auto 0;
  font-size: clamp(50px, 6.6vw, 94px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: 0;
}

.home-market-intro h1 > span {
  white-space: nowrap;
}

.home-market-intro h1 em {
  white-space: nowrap;
}

.home-market-intro h1 em {
  color: var(--home-coral);
  font-style: normal;
}

.home-market-intro .home-hero-intro {
  max-width: 720px;
  margin: 0;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.75;
}

.home-market-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
  margin-top: 28px;
}

.home-market-story {
  max-width: 820px;
}

.home-market-story .home-hero-intro {
  color: #3f4448;
}

.home-market-detail {
  max-width: 760px;
  margin: 14px auto 0;
  color: #656a6e;
  font-size: 14px;
  line-height: 1.85;
}

.home-market-sales {
  width: 100%;
  min-width: 0;
}

.home-market-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  border-top: 1px solid var(--home-line);
  border-bottom: 1px solid var(--home-line);
  list-style: none;
}

.home-market-points li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 24px 28px;
  border-right: 1px solid var(--home-line);
}

.home-market-points li:last-child {
  border-right: 0;
}

.home-market-points li > span {
  padding-top: 2px;
  color: var(--home-coral);
  font-family: var(--home-numeric);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.home-market-points strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.home-market-points small {
  display: block;
  margin-top: 4px;
  color: #62676b;
  font-size: 12px;
  line-height: 1.65;
}

.home-market-ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 42px 0 0;
  border-top: 1px solid var(--home-line);
  border-bottom: 1px solid var(--home-line);
}

.home-market-ledger > div {
  min-width: 0;
  padding: 28px 30px;
  border-right: 1px solid var(--home-line);
}

.home-market-ledger > div:last-child {
  border-right: 0;
}

.home-market-ledger dt {
  color: #5f6468;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.home-market-ledger dd {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}

.home-market-ledger dd strong {
  font-family: "Avenir Next", var(--home-sans);
  font-size: clamp(28px, 2.65vw, 42px);
  font-weight: 720;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.home-market-ledger dd span {
  min-height: 2.8em;
  color: #5f6468;
  font-size: 12px;
  line-height: 1.5;
}

.home-generated-visual {
  height: 310px;
  padding: 0;
  border: 1px solid var(--home-line);
  background: #e8e5de;
}

.home-generated-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 420ms var(--ease-out);
}

.home-capability-row:hover .home-generated-visual img {
  transform: scale(1.018);
}

.home-inquiry-caption {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 10px 12px;
  background: rgba(17, 19, 21, 0.92);
  color: #fff;
  list-style: none;
}

.home-inquiry-caption li {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.home-inquiry-caption li:first-child {
  padding-left: 0;
}

.home-inquiry-caption li:last-child {
  padding-right: 0;
  border-right: 0;
}

.home-inquiry-caption b {
  color: var(--home-coral-on-dark);
  font-family: var(--home-numeric);
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.home-inquiry-caption span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-live-projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-block: 24px 48px;
}

.home-live-project {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--home-line);
  background: #fff;
  transition: border-color 150ms ease, transform 180ms var(--ease-out);
}

.home-live-project:hover {
  border-color: #8a8f92;
  transform: translateY(-3px);
}

.home-live-project figure {
  position: relative;
  min-height: 0;
  margin: 0;
  aspect-ratio: 16 / 8.4;
  overflow: hidden;
  background: #ebece8;
}

.home-live-project figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(17, 19, 21, 0.2));
  pointer-events: none;
}

.home-live-project figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms var(--ease-out);
}

.home-live-project:hover figure img {
  transform: scale(1.018);
}

.home-live-project figure > span {
  position: absolute;
  z-index: 1;
  top: 16px;
  left: 16px;
  padding: 6px 9px;
  background: #fff;
  color: #3f684d;
  font-size: 9px;
  font-weight: 650;
}

.home-live-project > div {
  padding: 22px 24px 24px;
  border-top: 1px solid var(--home-line);
}

.home-live-project p {
  color: #62676b;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.home-live-project h2 {
  margin-top: 8px;
  font-family: "Avenir Next", var(--home-sans);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 730;
  letter-spacing: -0.03em;
}

.home-live-project > div > span {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 9px;
  color: #62676b;
  font-size: 11px;
  line-height: 1.6;
}

.home-live-project b {
  flex: none;
  color: var(--home-ink);
  font-weight: 600;
}

/* A reusable full-page preview component shared by the home and marketplace pages. */
.tpl-shot {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--home-line);
  background: #f1f1ed;
  color: #171916;
}

.tpl-browser {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding-inline: 8px;
  border-bottom: 1px solid rgba(20, 22, 19, 0.12);
  background: #e8e9e4;
}

.tpl-browser i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #a8aaa5;
}

.tpl-browser span {
  min-width: 0;
  margin-left: 5px;
  overflow: hidden;
  color: #858985;
  font-size: 5px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tpl-site {
  position: absolute;
  inset: 20px 0 0;
  overflow: hidden;
}

.tpl-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  padding-inline: 12px;
  border-bottom: 1px solid rgba(20, 22, 19, 0.13);
  font-size: 5px;
}

.tpl-nav b {
  font-size: 8px;
  letter-spacing: 0.03em;
}

.tpl-nav span {
  display: flex;
  gap: 8px;
  color: rgba(20, 22, 19, 0.58);
}

.tpl-nav em {
  padding: 4px 7px;
  background: #1a1c1a;
  color: #fff;
  font-style: normal;
}

.tpl-kicker {
  font-size: 5px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* 01 · Collector: image mosaic and catalogue density. */
.tpl-shot-collector {
  background: #efe2dc;
}

.tpl-collector .tpl-nav {
  background: #fff7f1;
}

.tpl-collector-main {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  min-height: 111px;
}

.tpl-collector-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
}

.tpl-collector-copy strong {
  max-width: 110px;
  margin-top: 6px;
  font-size: 18px;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.tpl-collector-copy > span {
  margin-top: 7px;
  color: rgba(20, 22, 19, 0.58);
  font-size: 5px;
}

.tpl-collector-copy i {
  width: fit-content;
  margin-top: 10px;
  padding: 5px 8px;
  background: var(--home-coral);
  color: #fff;
  font-size: 5px;
  font-style: normal;
}

.tpl-collector-mosaic {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 3px;
  padding: 7px;
  background: #ddbcb2;
}

.tpl-collector-mosaic span {
  position: relative;
  overflow: hidden;
  background: #cf9e92;
}

.tpl-collector-mosaic span:nth-child(2) {
  background: #b9c8bb;
}

.tpl-collector-mosaic span:nth-child(3) {
  background: #d8c995;
}

.tpl-collector-mosaic span:nth-child(4) {
  background: #a9b9c5;
}

.tpl-collector-mosaic img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
}

.tpl-collector-mosaic span::after {
  content: "";
  position: absolute;
  inset: 18% 14% 12%;
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.tpl-mini-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px 12px;
  background: #fff8f3;
}

.tpl-mini-cards span {
  min-height: 30px;
  border: 1px solid rgba(20, 22, 19, 0.12);
  background: rgba(255, 255, 255, 0.68);
}

/* 02 · Wholesale: dense table, MOQ and quote action. */
.tpl-shot-wholesale {
  background: #f2f0e9;
}

.tpl-wholesale .tpl-nav {
  background: #fff;
}

.tpl-wholesale-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 13px;
}

.tpl-wholesale-head strong {
  max-width: 120px;
  font-size: 15px;
  line-height: 1;
  letter-spacing: -0.035em;
}

.tpl-wholesale-head span {
  color: #777b78;
  font-size: 5px;
}

.tpl-wholesale-tools {
  display: flex;
  gap: 3px;
  padding: 0 13px 8px;
}

.tpl-wholesale-tools i {
  height: 8px;
  border: 1px solid rgba(20, 22, 19, 0.14);
  background: #fff;
}

.tpl-wholesale-tools i:nth-child(1) {
  width: 26%;
}

.tpl-wholesale-tools i:nth-child(2) {
  width: 18%;
}

.tpl-wholesale-tools i:nth-child(3) {
  flex: 1;
}

.tpl-table {
  margin: 0 10px;
  border: 1px solid rgba(20, 22, 19, 0.13);
  background: #fff;
}

.tpl-table-row {
  display: grid;
  grid-template-columns: 30px 1.5fr 0.7fr 0.5fr;
  gap: 5px;
  align-items: center;
  min-height: 22px;
  padding: 3px 6px;
  border-bottom: 1px solid rgba(20, 22, 19, 0.08);
}

.tpl-table-row:last-child {
  border-bottom: 0;
}

.tpl-table-row i {
  width: 24px;
  height: 16px;
  background: #d9d6ce;
}

.tpl-table-row span {
  height: 4px;
  background: #d8dad5;
}

.tpl-table-row b {
  height: 4px;
  background: #babdb7;
}

/* 03 · Industrial: dark specification sheet and inquiry rail. */
.tpl-shot-industrial {
  background: #202522;
  color: #f7f3e8;
}

.tpl-industrial .tpl-nav {
  border-color: rgba(255, 255, 255, 0.14);
}

.tpl-industrial .tpl-nav em {
  background: var(--home-coral);
}

.tpl-industrial-main {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 8px;
  padding: 15px;
}

.tpl-industrial-copy strong {
  display: block;
  max-width: 120px;
  margin-top: 7px;
  font-size: 17px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.tpl-industrial-copy span {
  display: block;
  max-width: 120px;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.53);
  font-size: 5px;
  line-height: 1.55;
}

.tpl-spec-panel {
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.tpl-spec-panel b {
  display: block;
  font-size: 6px;
}

.tpl-spec-panel span {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.44);
  font-size: 4px;
}

.tpl-industrial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 0 12px 12px;
}

.tpl-industrial-grid span {
  height: 53px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent);
}

/* 04 · Retail: one dominant campaign image. */
.tpl-shot-retail {
  background: #d3c3b4;
}

.tpl-retail .tpl-nav {
  position: relative;
  z-index: 2;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.26);
}

.tpl-retail .tpl-nav em {
  background: #fff;
  color: #171916;
}

.tpl-retail-hero {
  position: absolute;
  inset: 28px 0 0;
  overflow: hidden;
}

.tpl-retail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tpl-retail-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #d3c3b4;
}

.tpl-retail-art i {
  position: absolute;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.tpl-retail-art i:nth-child(1) {
  top: 13%;
  left: 8%;
  width: 56%;
  height: 68%;
  background: #b7a495;
}

.tpl-retail-art i:nth-child(2) {
  top: 25%;
  right: 8%;
  width: 31%;
  height: 43%;
  background: #e5d9c8;
}

.tpl-retail-art i:nth-child(3) {
  right: 13%;
  bottom: 10%;
  width: 32%;
  height: 4px;
  border: 0;
  background: rgba(255, 255, 255, 0.72);
}

.tpl-retail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.58));
}

.tpl-retail-copy {
  position: absolute;
  z-index: 1;
  right: 15px;
  bottom: 21px;
  left: 15px;
  color: #fff;
}

.tpl-retail-copy strong {
  display: block;
  max-width: 170px;
  margin-top: 7px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.tpl-retail-strip {
  position: absolute;
  z-index: 1;
  right: 15px;
  bottom: 8px;
  left: 15px;
  display: flex;
  gap: 4px;
}

.tpl-retail-strip span {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.55);
}

/* 05 · Service: editorial trust page and assistant panel. */
.tpl-shot-service {
  background: #ece8dc;
}

.tpl-service .tpl-nav {
  background: #f5f1e7;
}

.tpl-service-main {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 8px;
  padding: 13px;
}

.tpl-service-copy strong {
  display: block;
  max-width: 115px;
  margin-top: 7px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.02;
}

.tpl-service-copy span {
  display: block;
  max-width: 110px;
  margin-top: 8px;
  color: #6c706c;
  font-size: 5px;
}

.tpl-service-copy i {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 7px;
  background: #8d3b37;
  color: #fff;
  font-size: 5px;
  font-style: normal;
}

.tpl-service-visual {
  position: relative;
  min-height: 105px;
  overflow: hidden;
  background: #d9d0bf;
}

.tpl-service-visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tpl-service-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #d9d0bf;
}

.tpl-service-art i {
  position: absolute;
  display: block;
  border: 1px solid rgba(83, 73, 58, 0.2);
  background: #eee8dc;
}

.tpl-service-art i:nth-child(1) {
  top: 11%;
  left: 8%;
  width: 56%;
  height: 72%;
}

.tpl-service-art i:nth-child(2) {
  top: 21%;
  right: 8%;
  width: 24%;
  height: 18%;
  background: #c9b9a2;
}

.tpl-service-art i:nth-child(3) {
  right: 8%;
  bottom: 18%;
  width: 38%;
  height: 30%;
  background: #f7f3eb;
}

.tpl-chat-card {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 60%;
  padding: 7px;
  background: #fff;
  box-shadow: 0 5px 12px rgba(30, 26, 20, 0.15);
}

.tpl-chat-card b {
  display: block;
  color: #8d3b37;
  font-size: 5px;
}

.tpl-chat-card span {
  display: block;
  margin-top: 5px;
  height: 3px;
  background: #e1e1dc;
}

.tpl-chat-card span + span {
  width: 72%;
}

/* 06 · Presale: batch timeline and order rhythm. */
.tpl-shot-presale {
  background: #151817;
  color: #fff;
}

.tpl-presale .tpl-nav {
  border-color: rgba(255, 255, 255, 0.16);
}

.tpl-presale .tpl-nav em {
  background: var(--home-coral);
}

.tpl-presale-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 13px;
}

.tpl-presale-head strong {
  max-width: 140px;
  font-size: 16px;
  line-height: 1;
}

.tpl-presale-head span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 5px;
}

.tpl-timeline {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin: 2px 13px 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.tpl-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--home-coral);
  transform: scaleX(0.58);
  transform-origin: left;
}

.tpl-timeline span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 5px;
}

.tpl-batch-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 0 12px 12px;
}

.tpl-batch-row span {
  min-height: 77px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #202422;
}

.tpl-batch-row b {
  display: block;
  width: 62%;
  height: 4px;
  background: rgba(255, 255, 255, 0.38);
}

.tpl-batch-row i {
  display: block;
  width: 46%;
  height: 3px;
  margin-top: 7px;
  background: rgba(255, 255, 255, 0.17);
}

/* 07 · Designer: restrained lookbook with strong editorial type. */
.tpl-shot-designer {
  background: #f2eee6;
  color: #25201c;
}

.tpl-designer .tpl-nav {
  border-color: rgba(37, 32, 28, 0.15);
  background: #f6f2eb;
}

.tpl-designer-main {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  min-height: 105px;
}

.tpl-designer-image {
  position: relative;
  overflow: hidden;
  background: #c9bcae;
}

.tpl-designer-image i {
  position: absolute;
  display: block;
  border: 1px solid rgba(38, 32, 26, 0.18);
}

.tpl-designer-image i:nth-child(1) {
  top: 16%;
  left: 18%;
  width: 56%;
  height: 68%;
  border-radius: 50%;
  background: #aa9785;
}

.tpl-designer-image i:nth-child(2) {
  top: 32%;
  right: 11%;
  width: 24%;
  height: 44%;
  background: #e3d8c8;
}

.tpl-designer-image i:nth-child(3) {
  bottom: 14%;
  left: 8%;
  width: 72%;
  height: 3px;
  border: 0;
  background: rgba(255, 255, 255, 0.72);
}

.tpl-designer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tpl-designer-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
}

.tpl-designer-copy small {
  font-size: 5px;
  letter-spacing: 0.1em;
}

.tpl-designer-copy strong {
  max-width: 130px;
  margin-top: 8px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 23px;
  font-weight: 500;
  line-height: 0.96;
}

.tpl-designer-copy span {
  margin-top: 10px;
  color: #77706b;
  font-size: 5px;
}

.tpl-lookbook {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px 12px 12px;
}

.tpl-lookbook span {
  height: 39px;
  background: #d6ccc0;
}

.tpl-lookbook span:nth-child(2) {
  background: #b7a89a;
}

.tpl-lookbook span:nth-child(3) {
  background: #ddd5c9;
}

/* 08 · Global: language-first catalogue and distribution grid. */
.tpl-shot-global {
  background: #e7eee7;
}

.tpl-global .tpl-nav {
  background: #f6faf5;
}

.tpl-global-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 13px;
  border-bottom: 1px solid rgba(20, 22, 19, 0.1);
  color: #737a73;
  font-size: 5px;
}

.tpl-global-toolbar b {
  color: #252a25;
}

.tpl-global-head {
  padding: 15px 13px 10px;
  text-align: center;
}

.tpl-global-head strong {
  display: block;
  font-size: 17px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.tpl-global-head span {
  display: block;
  margin-top: 7px;
  color: #747b74;
  font-size: 5px;
}

.tpl-global-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 0 13px 13px;
}

.tpl-global-products span {
  min-height: 45px;
  border: 1px solid rgba(20, 22, 19, 0.11);
  background: #fff;
}

.tpl-global-products span:nth-child(2) {
  background: #cedbcd;
}

.tpl-global-products span:nth-child(3) {
  background: #d9d1c3;
}

/* Home marketplace grid: look like a real theme store rather than a colour swatch set. */
.home-template-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.home-template-card .tpl-shot {
  border-bottom: 1px solid var(--home-line);
}

.home-template-card:hover {
  background: #fafaf7;
}

.home-template-card .home-template-preview {
  display: none;
}

.home-template-card .home-template-body {
  min-height: 232px;
}

.home-template-badge {
  position: static;
  display: inline-flex;
  width: fit-content;
  margin-bottom: 12px;
  padding: 4px 7px;
  border: 1px solid var(--home-line);
  background: #fff;
  color: #686d71;
}

.home-template-badge.is-live {
  border-color: #b8cabd;
  background: #edf4ee;
  color: #376147;
}

.home-template-note {
  border-top: 0;
  background: #f7f7f3;
  padding: 20px 22px;
}

.home-template-note span {
  color: var(--home-coral);
}

/* Template marketplace page, based on the browsing model used by mainstream theme stores. */
.atlas-store-hero {
  padding-block: 58px 38px;
  background: #fff;
}

.atlas-store-head {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(480px, 0.96fr);
  gap: clamp(42px, 6vw, 92px);
  align-items: stretch;
}

.atlas-store-head h1 {
  max-width: 720px;
  margin-top: 18px;
  font-size: clamp(48px, 4.8vw, 72px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
  white-space: nowrap;
}

.atlas-store-head h1 em {
  color: var(--home-coral);
  font-style: normal;
}

.atlas-store-head > div:last-child > p {
  max-width: 520px;
  color: #5b6064;
  font-size: 17px;
  line-height: 1.72;
}

.atlas-store-summary {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--home-line);
  background: var(--home-warm);
}

.atlas-store-jump {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-top: 24px;
  padding: 0 18px;
  border-radius: 0;
  background: var(--home-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  transition: background 150ms ease;
}

.atlas-store-jump:hover {
  background: var(--home-coral);
}

.atlas-store-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
  border-top: 1px solid var(--home-line);
  border-bottom: 1px solid var(--home-line);
}

.atlas-store-stats div {
  padding: 17px 14px;
  border-right: 1px solid var(--home-line);
}

.atlas-store-stats div:last-child {
  border-right: 0;
}

.atlas-store-stats strong {
  display: block;
  font-family: "Avenir Next", var(--home-sans);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.atlas-store-stats span {
  display: block;
  margin-top: 6px;
  color: #5f6468;
  font-size: 12px;
}

.atlas-live-cases {
  padding-block: 52px 0;
  background: #fff;
}

.atlas-live-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.atlas-live-head h2 {
  margin-top: 7px;
  font-family: "Avenir Next", var(--home-sans);
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 730;
  letter-spacing: -0.035em;
}

.atlas-live-head p {
  color: #666b70;
  font-size: 12px;
}

.atlas-live-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.atlas-live-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(210px, 0.85fr);
  min-height: 250px;
  overflow: hidden;
  border: 1px solid var(--home-line);
  background: #fff;
}

.atlas-live-card figure {
  position: relative;
  min-height: 250px;
  margin: 0;
  overflow: hidden;
  background: #e9ebe7;
}

.atlas-live-card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.atlas-live-card figure span {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 7px;
  background: #fff;
  color: #376147;
  font-size: 10px;
  font-weight: 650;
}

.atlas-live-card > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 25px 24px;
}

.atlas-live-card p {
  color: #666b70;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.atlas-live-card h3 {
  margin-top: 9px;
  font-family: "Avenir Next", var(--home-sans);
  font-size: 24px;
  font-weight: 730;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.atlas-live-card > div > span {
  margin-top: 12px;
  color: #5f6468;
  font-size: 12px;
  line-height: 1.7;
}

.atlas-live-card b {
  display: inline-block;
  margin-top: 18px;
  color: #3f4448;
  font-size: 12px;
  font-weight: 650;
}

/* Marketplace results: equal, scannable cards with full-page previews. */
.atlas-controls {
  padding-block: var(--section-space) 20px;
}

.atlas-controls-head h2 {
  font-size: clamp(33px, 4vw, 54px);
}

.atlas-results {
  padding-bottom: var(--section-space);
}

.atlas-results .source-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.atlas-results .source-card,
.atlas-results .source-card-feature {
  grid-column: auto;
  grid-row: auto;
  min-height: 0;
  border: 1px solid var(--home-line);
  background: #fff;
  color: var(--home-ink);
}

.atlas-results .source-card:hover,
.atlas-results .source-card-feature:hover {
  border-color: #9a9e9f;
  background: #fff;
  transform: translateY(-2px);
}

.atlas-results .source-card.is-targeted {
  border-color: var(--home-coral);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--home-coral) 13%, transparent);
}

.atlas-results .source-card-link {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.atlas-results .tpl-shot {
  width: 100%;
  margin: 0;
  border-bottom: 1px solid var(--home-line);
}

.module-source-card .source-card-link {
  padding: 0;
}

.theme-source-preview {
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--home-line);
  background: #f0f1ed;
}

.theme-source-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms var(--ease-out);
}

.module-source-card:hover .theme-source-preview img {
  transform: scale(1.018);
}

.module-source-card .catalog-card-copy {
  min-height: 200px;
}

.module-source-card p {
  color: var(--home-coral) !important;
  font-weight: 650;
}

.module-source-card small {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--home-line);
}

.atlas-results .source-card-body,
.atlas-results .catalog-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 230px;
  padding: 20px 21px 22px;
}

.atlas-results .source-card-top {
  color: #5f6468;
}

.atlas-results .source-card h2,
.atlas-results .source-card-feature h2 {
  margin-top: 24px;
  color: var(--home-ink);
  font-family: "Avenir Next", var(--home-sans);
  font-size: clamp(22px, 2vw, 29px);
  line-height: 1.12;
}

.atlas-results .source-card p,
.atlas-results .source-card-feature p {
  color: #5f6468;
}

.atlas-results .source-card ul {
  margin-top: 16px;
}

.atlas-results .source-card li {
  border-color: #dedfda;
  color: #62676b;
}

.atlas-results .source-card small,
.atlas-results .source-card-feature small {
  color: #3d4245;
}

.atlas-results .source-card-feature .source-card-top,
.atlas-results .source-card-feature dd {
  color: #6d7276;
}

.atlas-results .source-card-feature dl {
  border-color: var(--home-line);
}

.atlas-results .source-card-feature dt {
  color: #666b70;
}

@media (max-width: 1100px) {
  .home-market-intro h1 {
    max-width: none;
  }

  .home-market-copy {
    gap: 30px;
  }

  .home-market-intro .home-hero-intro {
    max-width: 780px;
    margin-inline: auto;
  }

  .home-market-points li {
    padding: 22px 20px;
  }

  .home-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .atlas-store-head {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .atlas-store-summary {
    max-width: 820px;
    padding: 22px;
  }

  .atlas-live-grid {
    grid-template-columns: 1fr;
  }

  .atlas-results .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .home-market-hero {
    padding-top: 52px;
  }

  .home-market-intro h1 {
    font-size: clamp(40px, 11.2vw, 52px);
    line-height: 1.08;
  }

  .home-market-intro h1 > span {
    white-space: nowrap;
  }

  .home-market-intro .home-hero-intro {
    margin-top: 22px;
    font-size: 15px;
  }

  .home-market-detail {
    font-size: 13px;
  }

  .home-market-copy {
    margin-top: 24px;
    gap: 26px;
  }

  .home-market-points {
    grid-template-columns: 1fr;
  }

  .home-market-points li {
    padding-block: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--home-line);
  }

  .home-market-points li:last-child {
    border-bottom: 0;
  }

  .home-market-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 36px;
  }

  .home-market-ledger > div {
    padding: 21px 18px;
  }

  .home-market-ledger > div:nth-child(2) {
    border-right: 0;
  }

  .home-market-ledger > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--home-line);
  }

  .home-live-projects {
    grid-template-columns: 1fr;
    padding-bottom: 36px;
  }

  .home-live-project > div > span {
    display: block;
  }

  .home-live-project b {
    display: block;
    margin-top: 7px;
  }

  .home-template-grid {
    grid-template-columns: 1fr;
  }

  .filter-chip {
    min-height: 44px;
    padding-inline: 16px;
  }

  .atlas-search {
    min-height: 48px;
  }

  .atlas-search input {
    font-size: 16px;
  }

  .home-template-card .home-template-body {
    min-height: 210px;
  }

  .atlas-store-hero {
    padding-block: 54px 34px;
  }

  .atlas-store-head h1 {
    font-size: clamp(40px, 10.5vw, 50px);
  }

  .atlas-store-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 24px;
  }

  .atlas-store-stats div {
    padding: 14px 10px;
    border-right: 1px solid var(--home-line);
    border-bottom: 0;
  }

  .atlas-store-stats div:last-child {
    border-right: 0;
  }

  .atlas-live-cases {
    padding-top: 42px;
  }

  .atlas-live-card {
    grid-template-columns: 1fr;
  }

  .atlas-live-card figure {
    min-height: 220px;
  }

  .atlas-results .source-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-live-project,
  .home-live-project figure img,
  .atlas-results .source-card {
    transition: none;
  }
}
